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

hyatt hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 06:30:54 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 0810ec432f24b4f0fe4011147a853690f0651a5e
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Mon Aug 12 23:57:25 2002 +0000

    	Make the news ticker on livepage.apple.com scroll properly.
    	It still doesn't clip though.  Fixing this involved correctly
    	dirtying the render tree when dynamic DOM changes occurred
    	(this was a bug in KHTML's DOM), as well as providing an
    	implementation of the MSIE offsetWidth extension that took
    	inlines into account (KHTML's impl was always returning a width
    	of 0 for inlines).
    
            * khtml/ecma/kjs_dom.cpp:
            (DOMNode::getValueProperty):
            * khtml/rendering/render_flow.cpp:
            (RenderFlow::offsetWidth):
            (RenderFlow::offsetHeight):
            * khtml/rendering/render_flow.h:
            * khtml/rendering/render_object.h:
            * khtml/xml/dom_nodeimpl.cpp:
            (NodeBaseImpl::insertBefore):
            (NodeBaseImpl::replaceChild):
            (NodeBaseImpl::appendChild):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@1803 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2002-12-03 b/WebCore/ChangeLog-2002-12-03
index d26f52a..184c114 100644
--- a/WebCore/ChangeLog-2002-12-03
+++ b/WebCore/ChangeLog-2002-12-03
@@ -1,3 +1,25 @@
+2002-08-12  David Hyatt  <hyatt at apple.com>
+
+	Make the news ticker on livepage.apple.com scroll properly.
+	It still doesn't clip though.  Fixing this involved correctly
+	dirtying the render tree when dynamic DOM changes occurred
+	(this was a bug in KHTML's DOM), as well as providing an
+	implementation of the MSIE offsetWidth extension that took
+	inlines into account (KHTML's impl was always returning a width
+	of 0 for inlines).
+	
+        * khtml/ecma/kjs_dom.cpp:
+        (DOMNode::getValueProperty):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::offsetWidth):
+        (RenderFlow::offsetHeight):
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_object.h:
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeBaseImpl::insertBefore):
+        (NodeBaseImpl::replaceChild):
+        (NodeBaseImpl::appendChild):
+
 2002-08-12  Darin Adler  <darin at apple.com>
 
         * khtml/misc/loader.cpp: (Cache::insertInLRUList):
diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index d26f52a..184c114 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,25 @@
+2002-08-12  David Hyatt  <hyatt at apple.com>
+
+	Make the news ticker on livepage.apple.com scroll properly.
+	It still doesn't clip though.  Fixing this involved correctly
+	dirtying the render tree when dynamic DOM changes occurred
+	(this was a bug in KHTML's DOM), as well as providing an
+	implementation of the MSIE offsetWidth extension that took
+	inlines into account (KHTML's impl was always returning a width
+	of 0 for inlines).
+	
+        * khtml/ecma/kjs_dom.cpp:
+        (DOMNode::getValueProperty):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::offsetWidth):
+        (RenderFlow::offsetHeight):
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_object.h:
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeBaseImpl::insertBefore):
+        (NodeBaseImpl::replaceChild):
+        (NodeBaseImpl::appendChild):
+
 2002-08-12  Darin Adler  <darin at apple.com>
 
         * khtml/misc/loader.cpp: (Cache::insertInLRUList):
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index d26f52a..184c114 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,25 @@
+2002-08-12  David Hyatt  <hyatt at apple.com>
+
+	Make the news ticker on livepage.apple.com scroll properly.
+	It still doesn't clip though.  Fixing this involved correctly
+	dirtying the render tree when dynamic DOM changes occurred
+	(this was a bug in KHTML's DOM), as well as providing an
+	implementation of the MSIE offsetWidth extension that took
+	inlines into account (KHTML's impl was always returning a width
+	of 0 for inlines).
+	
+        * khtml/ecma/kjs_dom.cpp:
+        (DOMNode::getValueProperty):
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::offsetWidth):
+        (RenderFlow::offsetHeight):
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_object.h:
+        * khtml/xml/dom_nodeimpl.cpp:
+        (NodeBaseImpl::insertBefore):
+        (NodeBaseImpl::replaceChild):
+        (NodeBaseImpl::appendChild):
+
 2002-08-12  Darin Adler  <darin at apple.com>
 
         * khtml/misc/loader.cpp: (Cache::insertInLRUList):
diff --git a/WebCore/khtml/ecma/kjs_dom.cpp b/WebCore/khtml/ecma/kjs_dom.cpp
index 0a820c8..c8de093 100644
--- a/WebCore/khtml/ecma/kjs_dom.cpp
+++ b/WebCore/khtml/ecma/kjs_dom.cpp
@@ -250,9 +250,9 @@ Value DOMNode::getValueProperty(ExecState *exec, int token) const
     case OffsetTop:
       return rend ? static_cast<Value>(Number(rend->yPos())) : Value(Undefined());
     case OffsetWidth:
-      return rend ? static_cast<Value>(Number(rend->width()) ) : Value(Undefined());
+      return rend ? static_cast<Value>(Number(rend->offsetWidth()) ) : Value(Undefined());
     case OffsetHeight:
-      return rend ? static_cast<Value>(Number(rend->height() ) ) : Value(Undefined());
+      return rend ? static_cast<Value>(Number(rend->offsetHeight() ) ) : Value(Undefined());
     case OffsetParent:
       return getDOMNode(exec,node.parentNode()); // not necessarily correct
     case ClientWidth:
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index 67123af..315aec8 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -1286,6 +1286,27 @@ void RenderFlow::close()
     RenderBox::close();
 }
 
+short RenderFlow::offsetWidth() const
+{
+    if (isInline() && !isText()) {
+        short w = 0;
+        RenderObject* object = firstChild();
+        while (object) {
+            w += object->offsetWidth();
+            object = object->nextSibling();
+        }
+        return w;
+    }    
+    return width();
+}
+
+int RenderFlow::offsetHeight() const
+{
+   // if (isInline() && !isText() && firstChild())
+   //     return firstChild()->height();
+    return height();
+}
+
 void RenderFlow::addChild(RenderObject *newChild, RenderObject *beforeChild)
 {
 #ifdef DEBUG_LAYOUT
diff --git a/WebCore/khtml/rendering/render_flow.h b/WebCore/khtml/rendering/render_flow.h
index 7c7e0fa..fa440f0 100644
--- a/WebCore/khtml/rendering/render_flow.h
+++ b/WebCore/khtml/rendering/render_flow.h
@@ -107,6 +107,11 @@ public:
     inline int rightBottom();
     bool checkClear(RenderObject *child);
 
+    // used to calculate offsetWidth/Height.  Overridden by inlines (render_flow) to return
+    // the remaining width on a given line (and the height of a single line).
+    virtual short offsetWidth() const;
+    virtual int offsetHeight() const;
+
     void insertSpecialObject(RenderObject *o);
 
     // from BiDiParagraph
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index a30fd1b..4985e9c 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -352,6 +352,11 @@ public:
     virtual short width() const { return 0; }
     virtual int height() const { return 0; }
 
+    // used to calculate offsetWidth/Height.  Overridden by inlines (render_flow) to return
+    // the remaining width on a given line (and the height of a single line). -dwh
+    virtual short offsetWidth() const { return width(); }
+    virtual int offsetHeight() const { return height(); }
+    
     virtual short marginTop() const { return 0; }
     virtual short marginBottom() const { return 0; }
     virtual short marginLeft() const { return 0; }
diff --git a/WebCore/khtml/xml/dom_nodeimpl.cpp b/WebCore/khtml/xml/dom_nodeimpl.cpp
index fedc984..b5be92a 100644
--- a/WebCore/khtml/xml/dom_nodeimpl.cpp
+++ b/WebCore/khtml/xml/dom_nodeimpl.cpp
@@ -1073,8 +1073,14 @@ NodeImpl *NodeBaseImpl::insertBefore ( NodeImpl *newChild, NodeImpl *refChild, i
 
         // Add child to the rendering tree
         // ### should we detach() it first if it's already attached?
-        if (attached() && !child->attached())
+        if (attached() && !child->attached()) {
             child->attach();
+            // This is extremely important, as otherwise a fresh layout
+            // isn't scheduled, and you end up with stale data (especially
+            // with inline runs of text). -dwh
+            if (child->renderer())
+                child->renderer()->setLayouted(false);
+        }
 
         // Dispatch the mutation events
         dispatchChildInsertedEvents(child,exceptioncode);
@@ -1142,8 +1148,14 @@ NodeImpl *NodeBaseImpl::replaceChild ( NodeImpl *newChild, NodeImpl *oldChild, i
 
         // Add child to the rendering tree
         // ### should we detach() it first if it's already attached?
-        if (attached() && !child->attached())
+        if (attached() && !child->attached()) {
             child->attach();
+            // This is extremely important, as otherwise a fresh layout
+            // isn't scheduled, and you end up with stale data (especially
+            // with inline runs of text). -dwh
+            if (child->renderer())
+                child->renderer()->setLayouted(false);
+        }
 
         // Dispatch the mutation events
         dispatchChildInsertedEvents(child,exceptioncode);
@@ -1289,9 +1301,15 @@ NodeImpl *NodeBaseImpl::appendChild ( NodeImpl *newChild, int &exceptioncode )
 
         // Add child to the rendering tree
         // ### should we detach() it first if it's already attached?
-        if (attached() && !child->attached())
+        if (attached() && !child->attached()) {
             child->attach();
-
+            // This is extremely important, as otherwise a fresh layout
+            // isn't scheduled, and you end up with stale data (especially
+            // with inline runs of text). -dwh
+            if (child->renderer())
+                child->renderer()->setLayouted(false);
+        }
+          
         // Dispatch the mutation events
         dispatchChildInsertedEvents(child,exceptioncode);
 

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list