[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 07:11:33 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit 4948ef9f8509f93e13057ac95324a21f188a5eec
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Thu Dec 5 01:20:09 2002 +0000

    	Fix shroudedisles.com table misalignment by removing more\
    	bogus rules from html4.css.
    
    	Fix forums on macosx.com by implementing support for the align
    	attribute on the <P> tag.
    
    	Implement min-width and max-width for block level floating
    	and normal flow elements.
    
    	Fix event handling so that :hover notifications get through to
    	objects inside floats.
    
            Reviewed by: rjw
    
            * khtml/css/html4.css:
            * khtml/html/html_blockimpl.cpp:
            (HTMLParagraphElementImpl::parseAttribute):
            * khtml/html/html_blockimpl.h:
            * khtml/rendering/render_box.cpp:
            (RenderBox::calcWidth):
            (RenderBox::calcWidthUsing):
            (RenderBox::calcHeight):
            * khtml/rendering/render_box.h:
            * khtml/rendering/render_flow.cpp:
            (RenderFlow::layoutBlockChildren):
            (RenderFlow::nodeAtPoint):
            * khtml/rendering/render_flow.h:
            * khtml/rendering/render_frames.cpp:
            (RenderFrameSet::nodeAtPoint):
            * khtml/rendering/render_frames.h:
            * khtml/rendering/render_image.cpp:
            (RenderImage::nodeAtPoint):
            * khtml/rendering/render_image.h:
            * khtml/rendering/render_object.cpp:
            (RenderObject::nodeAtPoint):
            * khtml/rendering/render_object.h:
            * khtml/rendering/render_root.cpp:
            (RenderRoot::calcHeight):
            * khtml/rendering/render_style.cpp:
            (StyleBoxData::StyleBoxData):
            * khtml/rendering/render_text.cpp:
            (RenderText::nodeAtPoint):
            * khtml/rendering/render_text.h:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@2937 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index 7c176e4..7f8c838 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,49 @@
+2002-12-04  David Hyatt  <hyatt at apple.com>
+
+	Fix shroudedisles.com table misalignment by removing more\
+	bogus rules from html4.css.
+
+	Fix forums on macosx.com by implementing support for the align
+	attribute on the <P> tag.
+
+	Implement min-width and max-width for block level floating
+	and normal flow elements.
+
+	Fix event handling so that :hover notifications get through to
+	objects inside floats.
+	
+        Reviewed by: rjw
+
+        * khtml/css/html4.css:
+        * khtml/html/html_blockimpl.cpp:
+        (HTMLParagraphElementImpl::parseAttribute):
+        * khtml/html/html_blockimpl.h:
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::calcWidth):
+        (RenderBox::calcWidthUsing):
+        (RenderBox::calcHeight):
+        * khtml/rendering/render_box.h:
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::layoutBlockChildren):
+        (RenderFlow::nodeAtPoint):
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_frames.cpp:
+        (RenderFrameSet::nodeAtPoint):
+        * khtml/rendering/render_frames.h:
+        * khtml/rendering/render_image.cpp:
+        (RenderImage::nodeAtPoint):
+        * khtml/rendering/render_image.h:
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::nodeAtPoint):
+        * khtml/rendering/render_object.h:
+        * khtml/rendering/render_root.cpp:
+        (RenderRoot::calcHeight):
+        * khtml/rendering/render_style.cpp:
+        (StyleBoxData::StyleBoxData):
+        * khtml/rendering/render_text.cpp:
+        (RenderText::nodeAtPoint):
+        * khtml/rendering/render_text.h:
+
 2002-12-04  Darin Adler  <darin at apple.com>
 
         Reviewed by Trey and Maciej.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index 7c176e4..7f8c838 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,49 @@
+2002-12-04  David Hyatt  <hyatt at apple.com>
+
+	Fix shroudedisles.com table misalignment by removing more\
+	bogus rules from html4.css.
+
+	Fix forums on macosx.com by implementing support for the align
+	attribute on the <P> tag.
+
+	Implement min-width and max-width for block level floating
+	and normal flow elements.
+
+	Fix event handling so that :hover notifications get through to
+	objects inside floats.
+	
+        Reviewed by: rjw
+
+        * khtml/css/html4.css:
+        * khtml/html/html_blockimpl.cpp:
+        (HTMLParagraphElementImpl::parseAttribute):
+        * khtml/html/html_blockimpl.h:
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::calcWidth):
+        (RenderBox::calcWidthUsing):
+        (RenderBox::calcHeight):
+        * khtml/rendering/render_box.h:
+        * khtml/rendering/render_flow.cpp:
+        (RenderFlow::layoutBlockChildren):
+        (RenderFlow::nodeAtPoint):
+        * khtml/rendering/render_flow.h:
+        * khtml/rendering/render_frames.cpp:
+        (RenderFrameSet::nodeAtPoint):
+        * khtml/rendering/render_frames.h:
+        * khtml/rendering/render_image.cpp:
+        (RenderImage::nodeAtPoint):
+        * khtml/rendering/render_image.h:
+        * khtml/rendering/render_object.cpp:
+        (RenderObject::nodeAtPoint):
+        * khtml/rendering/render_object.h:
+        * khtml/rendering/render_root.cpp:
+        (RenderRoot::calcHeight):
+        * khtml/rendering/render_style.cpp:
+        (StyleBoxData::StyleBoxData):
+        * khtml/rendering/render_text.cpp:
+        (RenderText::nodeAtPoint):
+        * khtml/rendering/render_text.h:
+
 2002-12-04  Darin Adler  <darin at apple.com>
 
         Reviewed by Trey and Maciej.
diff --git a/WebCore/khtml/css/html4.css b/WebCore/khtml/css/html4.css
index 65141da..8da10e4 100644
--- a/WebCore/khtml/css/html4.css
+++ b/WebCore/khtml/css/html4.css
@@ -249,19 +249,6 @@ DIV[align="right"] > P,
 DIV[align="right"] > DIV
  { margin-left: auto; margin-right: 0px; }
 
-/* don't use "TD[align=...] > *". This sould give problems with
- * constructs as <td align=left><ul><li>...
- * Hope the next ones cover all relevant cases. Lars 
- */ 
-TD[align="right"] > TABLE { margin-left: auto; margin-right: 0px; }
-TD[align="left"] > TABLE { margin-left: 0px; margin-right: auto; }
-TD[align="right"] > DIV { margin-left: auto; margin-right: 0px; text-align: right; }
-TD[align="left"] > DIV { margin-left: 0px; margin-right: auto; text-align: left; }
-TD[align="right"] > P { margin-left: auto; margin-right: 0px; text-align: right; }
-TD[align="left"] > P { margin-left: 0px; margin-right: auto; text-align: left; }
-TD[align="right"] > HR { margin-left: auto; margin-right: 1px; }
-TD[align="left"] > HR { margin-left: 0px; margin-right: auto; }
-
 /*
  * Lists
  */
diff --git a/WebCore/khtml/html/html_blockimpl.cpp b/WebCore/khtml/html/html_blockimpl.cpp
index c0137e4..f2634e1 100644
--- a/WebCore/khtml/html/html_blockimpl.cpp
+++ b/WebCore/khtml/html/html_blockimpl.cpp
@@ -187,6 +187,23 @@ NodeImpl::Id HTMLParagraphElementImpl::id() const
     return ID_P;
 }
 
+void HTMLParagraphElementImpl::parseAttribute(AttributeImpl *attr)
+{
+    switch(attr->id())
+    {
+        case ATTR_ALIGN:
+        {
+            DOMString v = attr->value();
+            if ( strcasecmp( attr->value(), "middle" ) == 0 || strcasecmp( attr->value(), "center" ) == 0 )
+                    v = "-konq-center";
+                addCSSProperty(CSS_PROP_TEXT_ALIGN, v);
+                break;
+        }
+        default:
+            HTMLElementImpl::parseAttribute(attr);
+    }
+}
+
 // -------------------------------------------------------------------------
 
 HTMLPreElementImpl::HTMLPreElementImpl(DocumentPtr *doc, unsigned short _tagid)
diff --git a/WebCore/khtml/html/html_blockimpl.h b/WebCore/khtml/html/html_blockimpl.h
index 7da50a4..ce789cc 100644
--- a/WebCore/khtml/html/html_blockimpl.h
+++ b/WebCore/khtml/html/html_blockimpl.h
@@ -94,6 +94,8 @@ class HTMLParagraphElementImpl : public HTMLElementImpl
 public:
     HTMLParagraphElementImpl(DocumentPtr *doc);
 
+    virtual void parseAttribute(AttributeImpl *attr);
+    
     virtual NodeImpl::Id id() const;
 };
 
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index 75e5777..abbcd26 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -485,11 +485,11 @@ void RenderBox::calcWidth()
         Length mr = style()->marginRight();
 
         int cw;
-	RenderObject *cb = containingBlock();
-	if ( style()->flowAroundFloats() && cb->isFlow() )
-	    cw = static_cast<RenderFlow *>(cb)->lineWidth( m_y );
-	else
-	    cw = cb->contentWidth();
+        RenderObject *cb = containingBlock();
+        if ( style()->flowAroundFloats() && cb->isFlow() )
+            cw = static_cast<RenderFlow *>(cb)->lineWidth( m_y );
+        else
+            cw = cb->contentWidth();
 
         if (cw<0) cw = 0;
 
@@ -510,28 +510,38 @@ void RenderBox::calcWidth()
 
             return;
         }
-        else if (w.type == Variable)
-        {
-//          kdDebug( 6040 ) << "variable" << endl;
-            m_marginLeft = ml.minWidth(cw);
-            m_marginRight = mr.minWidth(cw);
-            if (cw) m_width = cw - m_marginLeft - m_marginRight;
-
-//          kdDebug( 6040 ) <<  m_width <<"," << cw <<"," <<
-//              m_marginLeft <<"," <<  m_marginRight << endl;
-
-            if (isFloating()) {
-                if(m_width < m_minWidth) m_width = m_minWidth;
-                if(m_width > m_maxWidth) m_width = m_maxWidth;
+        else {
+            LengthType widthType, minWidthType, maxWidthType;
+            if (isReplaced()) {
+                m_width = w.width(cw);
+                m_width += paddingLeft() + paddingRight() + borderLeft() + borderRight();
+                widthType = w.type;
+            } else {
+                m_width = calcWidthUsing(Width, cw, widthType);
+                int minW = calcWidthUsing(MinWidth, cw, minWidthType);
+                int maxW = style()->maxWidth().value == UNDEFINED ?
+                             m_width : calcWidthUsing(MaxWidth, cw, maxWidthType);
+                
+                if (m_width > maxW) {
+                    m_width = maxW;
+                    widthType = maxWidthType;
+                }
+                else if (m_width < minW) {
+                    m_width = minW;
+                    widthType = minWidthType;
+                }
+            }
+            
+            if (widthType == Variable) {
+    //          kdDebug( 6040 ) << "variable" << endl;
+                m_marginLeft = ml.minWidth(cw);
+                m_marginRight = mr.minWidth(cw);
+            }
+            else
+            {
+//          	kdDebug( 6040 ) << "non-variable " << w.type << ","<< w.value << endl;
+                calcHorizontalMargins(ml,mr,cw);
             }
-        }
-        else
-        {
-//          kdDebug( 6040 ) << "non-variable " << w.type << ","<< w.value << endl;
-            m_width = w.width(cw);
-            m_width += paddingLeft() + paddingRight() + borderLeft() + borderRight();
-
-            calcHorizontalMargins(ml,mr,cw);
         }
 
         if (cw && cw != m_width + m_marginLeft + m_marginRight && !isFloating() && !isInline())
@@ -549,6 +559,40 @@ void RenderBox::calcWidth()
 #endif
 }
 
+int RenderBox::calcWidthUsing(WidthType widthType, int cw, LengthType& lengthType)
+{
+    int width = m_width;
+    Length w;
+    if (widthType == Width)
+        w = style()->width();
+    else if (widthType == MinWidth)
+        w = style()->minWidth();
+    else
+        w = style()->maxWidth();
+        
+    lengthType = w.type;
+    
+    if (lengthType == Variable) {
+        int marginLeft = style()->marginLeft().minWidth(cw);
+        int marginRight = style()->marginRight().minWidth(cw);
+        if (cw) width = cw - marginLeft - marginRight;
+        
+        if (isFloating()) {
+            if (width < m_minWidth) 
+                width = m_minWidth;
+            if (width > m_maxWidth) 
+                width = m_maxWidth;
+        }
+    }
+    else
+    {
+        width = w.width(cw);
+        width += paddingLeft() + paddingRight() + borderLeft() + borderRight();
+    }
+    
+    return width;
+}
+
 void RenderBox::calcHorizontalMargins(const Length& ml, const Length& mr, int cw)
 {
     if (isFloating())
@@ -629,8 +673,13 @@ void RenderBox::calcHeight()
                 }
 
                 if (cb->isRoot()) {
+                    // Don't allow this to affect the root's m_height member variable, since this
+                    // can get called while the root is still laying out its kids.
+                    // e.g., <html style="height:100%">etc. -dwh
+                    int oldHeight = cb->height();
                     static_cast<RenderRoot*>(cb)->calcHeight();
                     fh = h.width(cb->height()) + borderTop() + paddingTop() + borderBottom() + paddingBottom();
+                    cb->setHeight(oldHeight);
                 }
                 else if (ch.isFixed())
                     fh = h.width(ch.value) + borderTop() + paddingTop() + borderBottom() + paddingBottom();
diff --git a/WebCore/khtml/rendering/render_box.h b/WebCore/khtml/rendering/render_box.h
index 1f14353..e672269 100644
--- a/WebCore/khtml/rendering/render_box.h
+++ b/WebCore/khtml/rendering/render_box.h
@@ -30,6 +30,8 @@
 namespace khtml {
     class CachedObject;
     
+    enum WidthType { Width, MinWidth, MaxWidth };
+    
 class RenderBox : public RenderContainer
 {
 
@@ -96,6 +98,8 @@ public:
     virtual void calcWidth();
     virtual void calcHeight();
 
+    int calcWidthUsing(WidthType widthType, int cw, LengthType& lengthType);
+    
     virtual short calcReplacedWidth(bool* ieHack=0) const;
     virtual int   calcReplacedHeight() const;
 
diff --git a/WebCore/khtml/rendering/render_flow.cpp b/WebCore/khtml/rendering/render_flow.cpp
index f16a56f..5813b7d 100644
--- a/WebCore/khtml/rendering/render_flow.cpp
+++ b/WebCore/khtml/rendering/render_flow.cpp
@@ -520,7 +520,7 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
         }
 
         child->calcVerticalMargins();
-
+         
         //kdDebug(0) << "margin = " << margin << " yPos = " << m_height << endl;
 
         // Try to guess our correct y position.  In most cases this guess will
@@ -635,6 +635,7 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
                     bottomChildQuirk = child->isBottomMarginQuirk();
                 }
             }
+            
             child->setPos(child->xPos(), ypos);
             if (ypos != yPosEstimate) {
                 // Our guess was wrong. Make the child lay itself out again.
@@ -718,7 +719,6 @@ void RenderFlow::layoutBlockChildren( bool relayoutChildren )
         child = child->nextSibling();
     }
 
-    // XXX This check is unconvincing. Needs to be a reliable way to test for auto height. -dwh
     bool autoHeight = style()->height().isVariable() && style()->height().value == 0;
     
     // If any height other than auto is specified in CSS, then we don't collapse our bottom
@@ -2238,9 +2238,8 @@ void RenderFlow::removeChild(RenderObject *oldChild)
     }
 }
 
-bool RenderFlow::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty)
+bool RenderFlow::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, bool inBox)
 {
-    bool inBox = false;
     if (specialObjects) {
         int stx = _tx + xPos();
         int sty = _ty + yPos();
@@ -2257,7 +2256,7 @@ bool RenderFlow::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty)
                     sty+o->startY + o->node->marginTop() - o->node->yPos());
     }
 
-    inBox |= RenderBox::nodeAtPoint(info, _x, _y, _tx, _ty);
+    inBox |= RenderBox::nodeAtPoint(info, _x, _y, _tx, _ty, inBox);
     return inBox;
 }
 
diff --git a/WebCore/khtml/rendering/render_flow.h b/WebCore/khtml/rendering/render_flow.h
index fd82e1d..cf87348 100644
--- a/WebCore/khtml/rendering/render_flow.h
+++ b/WebCore/khtml/rendering/render_flow.h
@@ -111,7 +111,7 @@ public:
     virtual void dump(QTextStream *stream, QString ind = "") const;
 #endif
 
-    virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty);
+    virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, bool inside=false);
 
 protected:
 
diff --git a/WebCore/khtml/rendering/render_frames.cpp b/WebCore/khtml/rendering/render_frames.cpp
index 3db50f5..39f1001 100644
--- a/WebCore/khtml/rendering/render_frames.cpp
+++ b/WebCore/khtml/rendering/render_frames.cpp
@@ -83,11 +83,11 @@ RenderFrameSet::~RenderFrameSet()
       delete [] m_vSplitVar;
 }
 
-bool RenderFrameSet::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty)
+bool RenderFrameSet::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, bool inside)
 {
-    RenderBox::nodeAtPoint(info, _x, _y, _tx, _ty);
+    RenderBox::nodeAtPoint(info, _x, _y, _tx, _ty, inside);
 
-    bool inside = m_resizing || canResize(_x, _y);
+    inside = m_resizing || canResize(_x, _y);
 
     if ( inside && element() && !element()->noResize() && !info.readonly()){
         info.setInnerNode(element());
diff --git a/WebCore/khtml/rendering/render_frames.h b/WebCore/khtml/rendering/render_frames.h
index 77df68b..d6faa00 100644
--- a/WebCore/khtml/rendering/render_frames.h
+++ b/WebCore/khtml/rendering/render_frames.h
@@ -60,7 +60,7 @@ public:
   bool canResize( int _x, int _y);
   void setResizing(bool e);
 
-  bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty);
+  bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, bool inside=false);
 
     DOM::HTMLFrameSetElementImpl *element() const
     { return static_cast<DOM::HTMLFrameSetElementImpl*>(RenderObject::element()); }
diff --git a/WebCore/khtml/rendering/render_image.cpp b/WebCore/khtml/rendering/render_image.cpp
index d26657d..7e56783 100644
--- a/WebCore/khtml/rendering/render_image.cpp
+++ b/WebCore/khtml/rendering/render_image.cpp
@@ -345,9 +345,9 @@ void RenderImage::notifyFinished(CachedObject *finishedObj)
     }
 }
 
-bool RenderImage::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty)
+bool RenderImage::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, bool inside)
 {
-    bool inside = RenderReplaced::nodeAtPoint(info, _x, _y, _tx, _ty);
+    inside |= RenderReplaced::nodeAtPoint(info, _x, _y, _tx, _ty, inside);
 
     if (inside && element()) {
         int tx = _tx + m_x;
diff --git a/WebCore/khtml/rendering/render_image.h b/WebCore/khtml/rendering/render_image.h
index 77cae48..40cf79e 100644
--- a/WebCore/khtml/rendering/render_image.h
+++ b/WebCore/khtml/rendering/render_image.h
@@ -64,7 +64,7 @@ public:
 
     virtual void notifyFinished(CachedObject *finishedObj);
 
-    virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty);
+    virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, bool inside=false);
 
 private:
     /*
diff --git a/WebCore/khtml/rendering/render_object.cpp b/WebCore/khtml/rendering/render_object.cpp
index ca28ff5..aa34edb 100644
--- a/WebCore/khtml/rendering/render_object.cpp
+++ b/WebCore/khtml/rendering/render_object.cpp
@@ -976,15 +976,14 @@ bool RenderObject::mouseInside() const
     return m_mouseInside; 
 }
 
-bool RenderObject::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty)
+bool RenderObject::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty, bool inside)
 {
     int tx = _tx + xPos();
     int ty = _ty + yPos();
     
-    bool inside = (style()->visibility() != HIDDEN && ((_y >= ty) && (_y < ty + height()) &&
+    inside |= (style()->visibility() != HIDDEN && ((_y >= ty) && (_y < ty + height()) &&
                   (_x >= tx) && (_x < tx + width()))) || isBody() || isHtml();
-    bool inner = !info.innerNode();
-
+    
     // ### table should have its own, more performant method
     if (overhangingContents() || isInline() || isRoot() || isTableRow() || isTableSection() || inside || mouseInside() ) {
         for (RenderObject* child = lastChild(); child; child = child->previousSibling())
@@ -1015,14 +1014,16 @@ bool RenderObject::nodeAtPoint(NodeInfo& info, int _x, int _y, int _tx, int _ty)
     if (!info.readonly()) {
         // lets see if we need a new style
         bool oldinside = mouseInside();
-        setMouseInside(inside && inner);
-        if (element()) {
-            bool oldactive = element()->active();
-            if (oldactive != (inside && info.active() && element() == info.innerNode()))
-                element()->setActive(inside && info.active() && element() == info.innerNode());
-            if ( ((oldinside != mouseInside()) && style()->hasHover()) ||
-                 ((oldactive != element()->active()) && style()->hasActive()))
-                element()->setChanged();
+        setMouseInside(inside);
+        DOM::NodeImpl* elt = (!isInline() && continuation()) ? continuation()->element() : element();
+        RenderObject* obj = (!isInline() && continuation()) ? continuation() : this;
+        if (elt) {
+            bool oldactive = elt->active();
+            if (oldactive != (inside && info.active() && elt == info.innerNode()))
+                elt->setActive(inside && info.active() && elt == info.innerNode());
+            if ( ((oldinside != mouseInside()) && obj->style()->hasHover()) ||
+                 ((oldactive != elt->active()) && obj->style()->hasActive()))
+                elt->setChanged();
         }
     }
 
diff --git a/WebCore/khtml/rendering/render_object.h b/WebCore/khtml/rendering/render_object.h
index 8a81bd7..68c49f1 100644
--- a/WebCore/khtml/rendering/render_object.h
+++ b/WebCore/khtml/rendering/render_object.h
@@ -341,7 +341,7 @@ public:
 
     virtual FindSelectionResult checkSelectionPoint( int _x, int _y, int _tx, int _ty,
                                                      DOM::NodeImpl*&, int & offset );
-    virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty);
+    virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, bool inside=false);
 
     // set the style of the object.
     virtual void setStyle(RenderStyle *style);
diff --git a/WebCore/khtml/rendering/render_root.cpp b/WebCore/khtml/rendering/render_root.cpp
index 1a601f6..5205076 100644
--- a/WebCore/khtml/rendering/render_root.cpp
+++ b/WebCore/khtml/rendering/render_root.cpp
@@ -79,7 +79,7 @@ void RenderRoot::calcHeight()
     else if (!m_view)
     {
         m_height = m_rootHeight;
-    }    
+    }
 }
 
 void RenderRoot::calcWidth()
diff --git a/WebCore/khtml/rendering/render_style.cpp b/WebCore/khtml/rendering/render_style.cpp
index 3ed5585..de87f0c 100644
--- a/WebCore/khtml/rendering/render_style.cpp
+++ b/WebCore/khtml/rendering/render_style.cpp
@@ -49,6 +49,15 @@ bool StyleSurroundData::operator==(const StyleSurroundData& o) const
 StyleBoxData::StyleBoxData()
     : z_index( 0 ), z_auto(true)
 {
+    // Initialize our min/max widths/heights.
+    min_width.type = Fixed;
+    min_width.value = 0;
+    min_height.type = Fixed;
+    min_height.value = 0;
+    max_width.type = Fixed;
+    max_width.value = UNDEFINED;
+    max_height.type = Fixed;
+    max_height.value = UNDEFINED;
 }
 
 StyleBoxData::StyleBoxData(const StyleBoxData& o )
diff --git a/WebCore/khtml/rendering/render_text.cpp b/WebCore/khtml/rendering/render_text.cpp
index 170239d..fd78dba 100644
--- a/WebCore/khtml/rendering/render_text.cpp
+++ b/WebCore/khtml/rendering/render_text.cpp
@@ -388,7 +388,7 @@ TextSlave * RenderText::findTextSlave( int offset, int &pos )
     return s;
 }
 
-bool RenderText::nodeAtPoint(NodeInfo& /*info*/, int _x, int _y, int _tx, int _ty)
+bool RenderText::nodeAtPoint(NodeInfo& /*info*/, int _x, int _y, int _tx, int _ty, bool inside)
 {
     assert(parent());
 
@@ -398,7 +398,6 @@ bool RenderText::nodeAtPoint(NodeInfo& /*info*/, int _x, int _y, int _tx, int _t
     int height = m_lineHeight + borderTop() + paddingTop() +
                  borderBottom() + paddingBottom();
 
-    bool inside = false;
     TextSlave *s = m_lines.count() ? m_lines[0] : 0;
     int si = 0;
     while(s) {
diff --git a/WebCore/khtml/rendering/render_text.h b/WebCore/khtml/rendering/render_text.h
index a561b88..5dbc8e3 100644
--- a/WebCore/khtml/rendering/render_text.h
+++ b/WebCore/khtml/rendering/render_text.h
@@ -146,7 +146,7 @@ public:
 
     virtual void layout() {assert(false);}
 
-    virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty);
+    virtual bool nodeAtPoint(NodeInfo& info, int x, int y, int tx, int ty, bool inside);
 
     // Return before, after (offset set to max), or inside the text, at @p offset
     virtual FindSelectionResult checkSelectionPoint( int _x, int _y, int _tx, int _ty,

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list