[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:15:49 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 1dbdf72376ea244fa58b415b684a6cf84905db70
Author: mjs <mjs at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Tue Dec 17 07:00:31 2002 +0000

            Reviewed by Darin.
    
    	- fixed 3125283 - HOMEPAGE: in onload of an IMG, the width and height are equal to zero
    
    	There were two problems here. First, the calls to get image width
    	and height didn't force a layout in all the cases where it was
    	required. Second, layout wouldn't lay out images at all until
    	parsing was done, due to a hack to block inline layout until that
    	point. I'm not sure if this will have other bad consquences, but
    	nearly every page I tried, including Hebrew and Japanese pages as
    	well as every page on the base PLT laid out properly.
    
            * khtml/html/html_imageimpl.cpp:
            (HTMLImageElementImpl::width): Force a layout if not laid out.
            (HTMLImageElementImpl::height): Likewise.
            * khtml/html/htmlparser.cpp:
    	(KHTMLParser::insertNode): Remove setBlockBidi hack - this was
    	preventing images from getting laid out until the document was
    	totally done parsing.
            * khtml/rendering/render_flow.cpp:
            (RenderFlow::RenderFlow): More setBLockBidi removal.
            (RenderFlow::layout): Likewise.
            (RenderFlow::close): Likewise.
            (RenderFlow::addChildToFlow): Likewise.
            (RenderFlow::printTree): Likewise.
            * khtml/rendering/render_flow.h:
            * khtml/rendering/render_object.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@3097 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 616aea5..f61876f 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,33 @@
+2002-12-16  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Darin.
+
+	- fixed 3125283 - HOMEPAGE: in onload of an IMG, the width and height are equal to zero
+
+	There were two problems here. First, the calls to get image width
+	and height didn't force a layout in all the cases where it was
+	required. Second, layout wouldn't lay out images at all until
+	parsing was done, due to a hack to block inline layout until that
+	point. I'm not sure if this will have other bad consquences, but
+	nearly every page I tried, including Hebrew and Japanese pages as
+	well as every page on the base PLT laid out properly.
+
+        * khtml/html/html_imageimpl.cpp:
+        (HTMLImageElementImpl::width): Force a layout if not laid out.
+        (HTMLImageElementImpl::height): Likewise.
+        * khtml/html/htmlparser.cpp:
+	(KHTMLParser::insertNode): Remove setBlockBidi hack - this was
+	preventing images from getting laid out until the document was
+	totally done parsing.
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::RenderFlow): More setBLockBidi removal.
+        (RenderFlow::layout): Likewise.
+        (RenderFlow::close): Likewise.
+        (RenderFlow::addChildToFlow): Likewise.
+        (RenderFlow::printTree): Likewise.
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_object.h:
+
 2002-12-16  David Hyatt  <hyatt at apple.com>
 
 	When a clear occurs (thus causing a block to move underneath
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 616aea5..f61876f 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,33 @@
+2002-12-16  Maciej Stachowiak  <mjs at apple.com>
+
+        Reviewed by Darin.
+
+	- fixed 3125283 - HOMEPAGE: in onload of an IMG, the width and height are equal to zero
+
+	There were two problems here. First, the calls to get image width
+	and height didn't force a layout in all the cases where it was
+	required. Second, layout wouldn't lay out images at all until
+	parsing was done, due to a hack to block inline layout until that
+	point. I'm not sure if this will have other bad consquences, but
+	nearly every page I tried, including Hebrew and Japanese pages as
+	well as every page on the base PLT laid out properly.
+
+        * khtml/html/html_imageimpl.cpp:
+        (HTMLImageElementImpl::width): Force a layout if not laid out.
+        (HTMLImageElementImpl::height): Likewise.
+        * khtml/html/htmlparser.cpp:
+	(KHTMLParser::insertNode): Remove setBlockBidi hack - this was
+	preventing images from getting laid out until the document was
+	totally done parsing.
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::RenderFlow): More setBLockBidi removal.
+        (RenderFlow::layout): Likewise.
+        (RenderFlow::close): Likewise.
+        (RenderFlow::addChildToFlow): Likewise.
+        (RenderFlow::printTree): Likewise.
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_object.h:
+
 2002-12-16  David Hyatt  <hyatt at apple.com>
 
 	When a clear occurs (thus causing a block to move underneath
diff --git a/WebCore/khtml/html/html_imageimpl.cpp b/WebCore/khtml/html/html_imageimpl.cpp
index 56a3c8b..6cb4f04 100644
--- a/WebCore/khtml/html/html_imageimpl.cpp
+++ b/WebCore/khtml/html/html_imageimpl.cpp
@@ -233,7 +233,7 @@ long HTMLImageElementImpl::width() const
     if (!m_render) return getAttribute(ATTR_WIDTH).toInt();
 
     // ### make a unified call for this
-    if (changed()) {
+    if (changed() || !m_render->layouted()) {
         getDocument()->updateRendering();
         if (getDocument()->view())
             getDocument()->view()->layout();
@@ -247,7 +247,7 @@ long HTMLImageElementImpl::height() const
     if (!m_render) return getAttribute(ATTR_HEIGHT).toInt();
 
     // ### make a unified call for this
-    if (changed()) {
+    if (changed() || !m_render->layouted()) {
         getDocument()->updateRendering();
         if (getDocument()->view())
             getDocument()->view()->layout();
diff --git a/WebCore/khtml/html/htmlparser.cpp b/WebCore/khtml/html/htmlparser.cpp
index a2280ec..b99d5fd 100644
--- a/WebCore/khtml/html/htmlparser.cpp
+++ b/WebCore/khtml/html/htmlparser.cpp
@@ -332,8 +332,6 @@ bool KHTMLParser::insertNode(NodeImpl *n, bool flat)
                 //
                 if (!n->attached())
                     n->attach();
-                if (n->renderer())
-                    n->renderer()->setBlockBidi();
             }
 #endif
         }
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index 5be7c5f..6bf225a 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -50,7 +50,6 @@ RenderFlow::RenderFlow(DOM::NodeImpl* node)
     m_childrenInline = true;
     m_pre = false;
     firstLine = false;
-    m_blockBidi = false;
     m_clearStatus = CNONE;
 
     specialObjects = 0;
@@ -313,9 +312,7 @@ void RenderFlow::layout()
                                        
 //    kdDebug( 6040 ) << "childrenInline()=" << childrenInline() << endl;
     if(childrenInline()) {
-        // ### make bidi resumeable so that we can get rid of this ugly hack
-        if (!m_blockBidi)
-            layoutInlineChildren( relayoutChildren );
+	layoutInlineChildren( relayoutChildren );
     }
     else
         layoutBlockChildren( relayoutChildren );
@@ -1723,9 +1720,6 @@ void RenderFlow::calcMinMaxWidth()
 
 void RenderFlow::close()
 {
-    // ### get rid of me
-    m_blockBidi = false;
-
     if(lastChild() && lastChild()->isAnonymousBox()) {
         lastChild()->close();
     }
@@ -1980,12 +1974,6 @@ void RenderFlow::addChildToFlow(RenderObject* newChild, RenderObject* beforeChil
     
     bool madeBoxesNonInline = FALSE;
 
-    if ( newChild->isPositioned() ) {
-        m_blockBidi = false;
-    }
-    if (m_blockBidi)
-	    newChild->setBlockBidi();
-
     RenderStyle* pseudoStyle=0;
     if (!isInline() && (!firstChild() || firstChild() == beforeChild) && newChild->isText())
     {
@@ -2298,8 +2286,6 @@ void RenderFlow::printTree(int indent) const
 {
     RenderBox::printTree(indent);
 
-//     KHTMLAssert(!m_blockBidi);
-
     if(specialObjects)
     {
         QPtrListIterator<SpecialObject> it(*specialObjects);
diff --git a/WebCore/khtml/rendering/render_flow.h b/WebCore/khtml/rendering/render_flow.h
index 39dc6f4..18ab824 100644
--- a/WebCore/khtml/rendering/render_flow.h
+++ b/WebCore/khtml/rendering/render_flow.h
@@ -72,7 +72,6 @@ public:
     virtual void setChildrenInline(bool b) { m_childrenInline = b; }
     
     virtual bool isRendered() const { return true; }
-    virtual void setBlockBidi() { m_blockBidi = true; }
 
     virtual RenderFlow* continuation() const { return m_continuation; }
     void setContinuation(RenderFlow* c) { m_continuation = c; }
@@ -235,7 +234,6 @@ private:
     bool m_childrenInline : 1;
     bool m_pre            : 1;
     bool firstLine        : 1; // used in inline layouting
-    bool m_blockBidi : 1;
     EClear m_clearStatus  : 2; // used during layuting of paragraphs
      
     short m_maxTopPosMargin;
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index d995998..7476340 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -212,10 +212,6 @@ public:
     void setOverhangingContents(bool p=true);
     
     void setLayouted(bool b=true);
-        
-    // hack to block inline layouts during parsing
-    // evil, evil. I didn't do it. <tm>
-    virtual void setBlockBidi() {}
 
     void setMinMaxKnown(bool b=true) {
 	m_minMaxKnown = b;

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list