[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677

mjs mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 07:07:57 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit f377c6d2ea3116324936de6e096fd4a0eb5cf0f0
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Nov 25 07:08:44 2002 +0000

    	Fixed support for onLoad handlers on images - this is in
    	APPLE_CHANGES because khtml used a different mechanism. Also
    	implemented onError on images. As a result:
    
    	- fixed 3084916 - blank page at aol
    	- fixed 3093162 - golfswitch doesn't work
    
            * khtml/html/html_imageimpl.cpp:
            (HTMLImageElementImpl::parseAttribute): Remove "implement this"
    	comment from onError attribute.
            * khtml/misc/loader.h:
            * khtml/misc/loader.cpp:
            (CachedImage::CachedImage): Initialize m_loading to true.
    	(CachedImage::ref): Send notifyFinished to the new client if the
    	image is not loading.
            (CachedImage::data): If at eof, set m_loading to false and notify.
            (CachedImage::error): Set m_loading to false and notify.
    	(CachedImage::checkNotify): New method to notify all clients of
    	changes.
            * khtml/rendering/render_image.cpp:
            (RenderImage::notifyFinished): Deliver the appropriate choice of
    	LOAD_EVENT or ERROR_EVENT.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2855 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index 531dd2e..7869efe 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,28 @@
+2002-11-24  Maciej Stachowiak  <mjs at apple.com>
+
+	Fixed support for onLoad handlers on images - this is in
+	APPLE_CHANGES because khtml used a different mechanism. Also
+	implemented onError on images. As a result:
+
+	- fixed 3084916 - blank page at aol
+	- fixed 3093162 - golfswitch doesn't work
+	
+        * khtml/html/html_imageimpl.cpp:
+        (HTMLImageElementImpl::parseAttribute): Remove "implement this"
+	comment from onError attribute.
+        * khtml/misc/loader.h:
+        * khtml/misc/loader.cpp:
+        (CachedImage::CachedImage): Initialize m_loading to true.
+	(CachedImage::ref): Send notifyFinished to the new client if the
+	image is not loading.
+        (CachedImage::data): If at eof, set m_loading to false and notify.
+        (CachedImage::error): Set m_loading to false and notify.
+	(CachedImage::checkNotify): New method to notify all clients of
+	changes.
+        * khtml/rendering/render_image.cpp:
+        (RenderImage::notifyFinished): Deliver the appropriate choice of
+	LOAD_EVENT or ERROR_EVENT.
+
 2002-11-24  David Hyatt  <hyatt at apple.com>
 
 	This landing adds support for blocks inside inlines.  It
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 531dd2e..7869efe 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,28 @@
+2002-11-24  Maciej Stachowiak  <mjs at apple.com>
+
+	Fixed support for onLoad handlers on images - this is in
+	APPLE_CHANGES because khtml used a different mechanism. Also
+	implemented onError on images. As a result:
+
+	- fixed 3084916 - blank page at aol
+	- fixed 3093162 - golfswitch doesn't work
+	
+        * khtml/html/html_imageimpl.cpp:
+        (HTMLImageElementImpl::parseAttribute): Remove "implement this"
+	comment from onError attribute.
+        * khtml/misc/loader.h:
+        * khtml/misc/loader.cpp:
+        (CachedImage::CachedImage): Initialize m_loading to true.
+	(CachedImage::ref): Send notifyFinished to the new client if the
+	image is not loading.
+        (CachedImage::data): If at eof, set m_loading to false and notify.
+        (CachedImage::error): Set m_loading to false and notify.
+	(CachedImage::checkNotify): New method to notify all clients of
+	changes.
+        * khtml/rendering/render_image.cpp:
+        (RenderImage::notifyFinished): Deliver the appropriate choice of
+	LOAD_EVENT or ERROR_EVENT.
+
 2002-11-24  David Hyatt  <hyatt at apple.com>
 
 	This landing adds support for blocks inside inlines.  It
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 531dd2e..7869efe 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,28 @@
+2002-11-24  Maciej Stachowiak  <mjs at apple.com>
+
+	Fixed support for onLoad handlers on images - this is in
+	APPLE_CHANGES because khtml used a different mechanism. Also
+	implemented onError on images. As a result:
+
+	- fixed 3084916 - blank page at aol
+	- fixed 3093162 - golfswitch doesn't work
+	
+        * khtml/html/html_imageimpl.cpp:
+        (HTMLImageElementImpl::parseAttribute): Remove "implement this"
+	comment from onError attribute.
+        * khtml/misc/loader.h:
+        * khtml/misc/loader.cpp:
+        (CachedImage::CachedImage): Initialize m_loading to true.
+	(CachedImage::ref): Send notifyFinished to the new client if the
+	image is not loading.
+        (CachedImage::data): If at eof, set m_loading to false and notify.
+        (CachedImage::error): Set m_loading to false and notify.
+	(CachedImage::checkNotify): New method to notify all clients of
+	changes.
+        * khtml/rendering/render_image.cpp:
+        (RenderImage::notifyFinished): Deliver the appropriate choice of
+	LOAD_EVENT or ERROR_EVENT.
+
 2002-11-24  David Hyatt  <hyatt at apple.com>
 
 	This landing adds support for blocks inside inlines.  It
diff --git a/WebCore/khtml/html/html_imageimpl.cpp b/WebCore/khtml/html/html_imageimpl.cpp
index ad330e1..efac205 100644
--- a/WebCore/khtml/html/html_imageimpl.cpp
+++ b/WebCore/khtml/html/html_imageimpl.cpp
@@ -124,7 +124,7 @@ void HTMLImageElementImpl::parseAttribute(AttributeImpl *attr)
         setHTMLEventListener(EventImpl::ABORT_EVENT,
 	    getDocument()->createHTMLEventListener(attr->value().string()));
         break;
-    case ATTR_ONERROR: // ### add support for this
+    case ATTR_ONERROR:
         setHTMLEventListener(EventImpl::ERROR_EVENT,
 	    getDocument()->createHTMLEventListener(attr->value().string()));
         break;
diff --git a/WebCore/khtml/misc/loader.cpp b/WebCore/khtml/misc/loader.cpp
index 063f488..e9581f6 100644
--- a/WebCore/khtml/misc/loader.cpp
+++ b/WebCore/khtml/misc/loader.cpp
@@ -508,6 +508,7 @@ CachedImage::CachedImage(DocLoader* dl, const DOMString &url, KIO::CacheControl
     formatType = 0;
     m_status = Unknown;
     imgSource = 0;
+    m_loading = true;
 #if !APPLE_CHANGES
     setAccept( acceptHeader );
 #endif
@@ -536,6 +537,8 @@ void CachedImage::ref( CachedObjectClient *c )
     // for mouseovers, dynamic changes
     if ( m_status >= Persistent && !valid_rect().isNull() )
         c->setPixmap( pixmap(), valid_rect(), this);
+
+    if(!m_loading) c->notifyFinished(this);
 }
 
 void CachedImage::deref( CachedObjectClient *c )
@@ -923,6 +926,10 @@ void CachedImage::data ( QBuffer &_buffer, bool eof )
         QSize s = pixmap_size();
         setSize(s.width() * s.height() * 2);
     }
+    if (eof) {
+	m_loading = false;
+	checkNotify();
+    }
 #endif // APPLE_CHANGES
 }
 
@@ -938,8 +945,23 @@ void CachedImage::error( int /*err*/, const char */*text*/ )
 #endif
     errorOccured = true;
     do_notify(pixmap(), QRect(0, 0, 16, 16));
+#if APPLE_CHANGES
+    m_loading = false;
+    checkNotify();
+#endif
+}
+
+void CachedImage::checkNotify()
+{
+    if(m_loading) return;
+
+    QPtrList<CachedObjectClient> clients(m_clients);
+    CachedObjectClient *c;
+    for ( c = clients.first(); c != 0; c = clients.next() )
+        c->notifyFinished(this);
 }
 
+
 // ------------------------------------------------------------------------------------------
 
 Request::Request(DocLoader* dl, CachedObject *_object, bool _incremental)
diff --git a/WebCore/khtml/misc/loader.h b/WebCore/khtml/misc/loader.h
index bd2f65b..d0bb51b 100644
--- a/WebCore/khtml/misc/loader.h
+++ b/WebCore/khtml/misc/loader.h
@@ -294,6 +294,8 @@ namespace khtml
 
         virtual bool schedule() const { return true; }
 
+	void checkNotify();
+
     protected:
 	void clear();
 
diff --git a/WebCore/khtml/rendering/render_image.cpp b/WebCore/khtml/rendering/render_image.cpp
index f1b5c4c..461d715 100644
--- a/WebCore/khtml/rendering/render_image.cpp
+++ b/WebCore/khtml/rendering/render_image.cpp
@@ -337,7 +337,11 @@ void RenderImage::notifyFinished(CachedObject *finishedObj)
 {
     if (image == finishedObj && !loadEventSent && element()) {
         loadEventSent = true;
-        element()->dispatchHTMLEvent(EventImpl::LOAD_EVENT,false,false);
+	if (image->isErrorImage()) {
+	    element()->dispatchHTMLEvent(EventImpl::ERROR_EVENT,false,false);
+	} else {
+	    element()->dispatchHTMLEvent(EventImpl::LOAD_EVENT,false,false);
+	}
     }
 }
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list