rev 10303 - in trunk/packages/kdelibs/debian: . patches

Fathi Boudra fabo at alioth.debian.org
Sun Apr 27 16:34:23 UTC 2008


Author: fabo
Date: 2008-04-27 16:34:23 +0000 (Sun, 27 Apr 2008)
New Revision: 10303

Added:
   trunk/packages/kdelibs/debian/patches/06_khtml_rendering_r786289.diff
Modified:
   trunk/packages/kdelibs/debian/changelog
   trunk/packages/kdelibs/debian/control
   trunk/packages/kdelibs/debian/control.in
   trunk/packages/kdelibs/debian/patches/05_kate_debianchangelog_default_context_r799980.diff
Log:
* Add 06_khtml_rendering_r786289 patch to fix khtml crash when rendering some pages. (Closes: #476896)
* Update 05 patch.


Modified: trunk/packages/kdelibs/debian/changelog
===================================================================
--- trunk/packages/kdelibs/debian/changelog	2008-04-27 15:10:41 UTC (rev 10302)
+++ trunk/packages/kdelibs/debian/changelog	2008-04-27 16:34:23 UTC (rev 10303)
@@ -1,12 +1,15 @@
-kdelibs (4:3.5.9.dfsg.1-3) UNRELEASED; urgency=low
+kdelibs (4:3.5.9.dfsg.1-4) unstable; urgency=low
 
   * Add 03_start_kdeinit_integer_overflow.diff patch to fix a security
-    advisory: start_kdeinit multiple vulnerabilities.
+    advisory: CVE-2008-1671 start_kdeinit multiple vulnerabilities.
+    (Closes: #478024)
   * Add 05_kate_debianchangelog_default_context_r799980 patch to give a name
-    to the default context in kate debian changelog support.
+    to the default context in kate debian changelog/control support.
     Thanks to Pino Toscano.
+  * Add 06_khtml_rendering_r786289 patch to fix khtml crash when rendering some
+    pages. (Closes: #476896)
 
- -- Fathi Boudra <fabo at debian.org>  Tue, 22 Apr 2008 19:44:01 +0200
+ -- Fathi Boudra <fabo at debian.org>  Sun, 27 Apr 2008 17:26:36 +0200
 
 kdelibs (4:3.5.9.dfsg.1-2) unstable; urgency=low
 

Modified: trunk/packages/kdelibs/debian/control
===================================================================
--- trunk/packages/kdelibs/debian/control	2008-04-27 15:10:41 UTC (rev 10302)
+++ trunk/packages/kdelibs/debian/control	2008-04-27 16:34:23 UTC (rev 10303)
@@ -85,7 +85,7 @@
  libarts1-dev (>= 1.5.0), ${libasound2-dev}, libacl1-dev, libattr1-dev,
  libaspell-dev, libbz2-dev, libcupsys2-dev, libfam-dev | libgamin-dev,
  libidn11-dev, libjasper-dev (>= 1.900.1), libkrb5-dev,
- libopenexr-dev (>= 1.2.2-3), libpcre3-dev, liblualib50-dev,
+ libopenexr-dev (>= 1.2.2-4.1), libpcre3-dev, liblualib50-dev,
  libqt3-mt-dev (>= 3:3.3.5), libsasl2-dev, libssl-dev,
  libtiff4-dev (>= 3.7.3-1), libxml2-dev, libxml2-utils, libxslt1-dev,
  libavahi-client-dev (>= 0.4), libavahi-qt3-dev (>= 0.4)

Modified: trunk/packages/kdelibs/debian/control.in
===================================================================
--- trunk/packages/kdelibs/debian/control.in	2008-04-27 15:10:41 UTC (rev 10302)
+++ trunk/packages/kdelibs/debian/control.in	2008-04-27 16:34:23 UTC (rev 10303)
@@ -85,7 +85,7 @@
  libarts1-dev (>= 1.5.0), ${libasound2-dev}, libacl1-dev, libattr1-dev,
  libaspell-dev, libbz2-dev, libcupsys2-dev, libfam-dev | libgamin-dev,
  libidn11-dev, libjasper-dev (>= 1.900.1), libkrb5-dev,
- libopenexr-dev (>= 1.2.2-3), libpcre3-dev, liblualib50-dev,
+ libopenexr-dev (>= 1.2.2-4.1), libpcre3-dev, liblualib50-dev,
  libqt3-mt-dev (>= 3:3.3.5), libsasl2-dev, libssl-dev,
  libtiff4-dev (>= 3.7.3-1), libxml2-dev, libxml2-utils, libxslt1-dev,
  libavahi-client-dev (>= 0.4), libavahi-qt3-dev (>= 0.4)

Modified: trunk/packages/kdelibs/debian/patches/05_kate_debianchangelog_default_context_r799980.diff
===================================================================
--- trunk/packages/kdelibs/debian/patches/05_kate_debianchangelog_default_context_r799980.diff	2008-04-27 15:10:41 UTC (rev 10302)
+++ trunk/packages/kdelibs/debian/patches/05_kate_debianchangelog_default_context_r799980.diff	2008-04-27 16:34:23 UTC (rev 10303)
@@ -1,13 +1,106 @@
-give a name to the default context
-
 --- a/kate/data/debianchangelog.xml
 +++ b/kate/data/debianchangelog.xml
-@@ -23,7 +23,7 @@
+@@ -1,6 +1,6 @@
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE language SYSTEM "language.dtd">
+-<language name="Debian Changelog" version="0.62" kateversion="2.4" section="Other" extensions="" mimetype="">
++<language name="Debian Changelog" version="0.63" kateversion="2.4" section="Other" extensions="" mimetype="">
+     <highlighting>
+         <list name="keywords">
+             <item>urgency</item>
+@@ -8,10 +8,57 @@
+ 
+         <list name="distributions">
+             <item>stable</item>
++            <item>stable-security</item>
+             <item>testing</item>
++            <item>testing-proposed-updates</item>
+             <item>frozen</item>
+             <item>unstable</item>
+             <item>experimental</item>
++            <item>UNRELEASED</item>
++            <!-- Debian releases -->
++            <item>sarge-backports</item>
++            <item>sarge-volatile</item>
++            <item>etch-backports</item>
++            <item>etch-volatile</item>
++            <item>lenny-backports</item>
++            <item>lenny-volatile</item>
++            <!-- Ubuntu releases -->
++            <item>dapper</item>
++            <item>dapper-security</item>
++            <item>dapper-proposed</item>
++            <item>dapper-updates</item>
++            <item>dapper-backports</item>
++            <item>dapper-commercial</item>
++            <item>edgy</item>
++            <item>edgy-security</item>
++            <item>edgy-proposed</item>
++            <item>edgy-updates</item>
++            <item>edgy-backports</item>
++            <item>edgy-commercial</item>
++            <item>feisty</item>
++            <item>feisty-security</item>
++            <item>feisty-proposed</item>
++            <item>feisty-updates</item>
++            <item>feisty-backports</item>
++            <item>feisty-commercial</item>
++            <item>gutsy</item>
++            <item>gutsy-security</item>
++            <item>gutsy-proposed</item>
++            <item>gutsy-updates</item>
++            <item>gutsy-backports</item>
++            <item>gutsy-partner</item>
++            <item>hardy</item>
++            <item>hardy-security</item>
++            <item>hardy-proposed</item>
++            <item>hardy-updates</item>
++            <item>hardy-backports</item>
++            <item>hardy-partner</item>
++            <item>ibex</item>
++            <item>ibex-security</item>
++            <item>ibex-proposed</item>
++            <item>ibex-updates</item>
++            <item>ibex-backports</item>
++            <item>ibex-partner</item>
          </list>
  
+         <list name="urgencies">
+@@ -20,15 +67,16 @@
+             <item>high</item>
+             <item>emergency</item>
+             <item>bug</item>
++            <item>critical</item>
+         </list>
+ 
          <contexts>
 -            <context attribute="Normal Text" lineEndContext="#stay">
 +            <context attribute="Normal Text" lineEndContext="#stay" name="INIT">
                  <RegExpr attribute="Keyword" context="Head" String="[^ ]*" column="0"/>
                  <RegExpr attribute="Email" context="#stay" String="&lt;.*@.*&gt;"/>
                  <RegExpr attribute="Keyword" context="#stay" String=" \-\-" column="0"/>
+                 <RegExpr attribute="Keyword" context="#stay" String="  \*" column="0"/>
+-                <RegExpr attribute="Bug" context="#stay" String="[Cc][Ll][Oo][Ss][Ee][Ss]:[\s]*(([Bb][Uu][Gg]\s*)?#\s*\d+)(\s*, *([Bb[Uu][Gg]\s*)?#\s*\d+)*"/>
++                <RegExpr attribute="Bug" context="#stay" String="closes:[\s]*((bug\s*)?#\s*\d+)(\s*, *(bug\s*)?#\s*\d+)*" insensitive="true"/>
+             </context>
+ 
+             <context attribute="Normal Text" lineEndContext="#pop" name="Head">
+@@ -55,6 +103,6 @@
+     </highlighting>
+ 
+     <general>
+-        <keywords casesensitive="1" />
++        <keywords casesensitive="1" weakDeliminator="-"/>
+     </general>
+ </language>
+--- a/kate/data/debiancontrol.xml
++++ b/kate/data/debiancontrol.xml
+@@ -3,7 +3,7 @@
+ <language name="Debian Control" version="0.82" kateversion="2.4" section="Other" extensions="" mimetype="">
+     <highlighting>
+         <contexts>
+-            <context attribute="Normal Text" lineEndContext="#stay">
++            <context attribute="Normal Text" lineEndContext="#stay" name="INIT">
+                 <StringDetect attribute="Keyword" context="DependencyField" String="Depends:"/>
+                 <StringDetect attribute="Keyword" context="DependencyField" String="Recommends:"/>
+                 <StringDetect attribute="Keyword" context="DependencyField" String="Suggests:"/>

Added: trunk/packages/kdelibs/debian/patches/06_khtml_rendering_r786289.diff
===================================================================
--- trunk/packages/kdelibs/debian/patches/06_khtml_rendering_r786289.diff	                        (rev 0)
+++ trunk/packages/kdelibs/debian/patches/06_khtml_rendering_r786289.diff	2008-04-27 16:34:23 UTC (rev 10303)
@@ -0,0 +1,436 @@
+--- a/khtml/rendering/render_block.cpp
++++ b/khtml/rendering/render_block.cpp
+@@ -736,13 +736,13 @@
+         // blocks that have overflowed content.
+         // Check for an overhanging float first.
+         // FIXME: This needs to look at the last flow, not the last child.
+-        if (lastChild() && lastChild()->hasOverhangingFloats() && !lastChild()->style()->hidesOverflow()) {
++        if (lastChild() && lastChild()->hasOverhangingFloats() && !lastChild()->hasOverflowClip()) {
+             KHTMLAssert(lastChild()->isRenderBlock());
+             m_height = lastChild()->yPos() + static_cast<RenderBlock*>(lastChild())->floatBottom();
+             m_height += borderBottom() + paddingBottom();
+         }
+ 
+-        if (m_overflowHeight > m_height && !style()->hidesOverflow())
++        if (m_overflowHeight > m_height && !hasOverflowClip())
+             m_height = m_overflowHeight + borderBottom() + paddingBottom();
+     }
+ 
+@@ -780,7 +780,7 @@
+ 
+     // Update our scrollbars if we're overflow:auto/scroll now that we know if
+     // we overflow or not.
+-    if (style()->hidesOverflow() && m_layer)
++    if (hasOverflowClip() && m_layer)
+         m_layer->checkScrollbarsAfterLayout();
+ 
+     setNeedsLayout(false);
+@@ -1640,7 +1640,7 @@
+     // 2. paint contents
+     int scrolledX = _tx;
+     int scrolledY = _ty;
+-    if (style()->hidesOverflow() && m_layer)
++    if (hasOverflowClip() && m_layer)
+         m_layer->subtractScrollOffset(scrolledX, scrolledY);
+ 
+     if (childrenInline())
+@@ -1927,7 +1927,7 @@
+             o->setPos(fx - o->marginRight() - o->width(), y + o->marginTop());
+         }
+ 
+-        if ( m_layer && style()->hidesOverflow()) {
++        if ( m_layer && hasOverflowClip()) {
+             if (o->xPos()+o->width() > m_overflowWidth)
+                 m_overflowWidth = o->xPos()+o->width();
+             else
+@@ -2097,7 +2097,7 @@
+ int RenderBlock::lowestPosition(bool includeOverflowInterior, bool includeSelf) const
+ {
+     int bottom = RenderFlow::lowestPosition(includeOverflowInterior, includeSelf);
+-    if (!includeOverflowInterior && style()->hidesOverflow())
++    if (!includeOverflowInterior && hasOverflowClip())
+         return bottom;
+     if (includeSelf && m_overflowHeight > bottom)
+         bottom = m_overflowHeight;
+@@ -2144,7 +2144,7 @@
+ int RenderBlock::rightmostPosition(bool includeOverflowInterior, bool includeSelf) const
+ {
+     int right = RenderFlow::rightmostPosition(includeOverflowInterior, includeSelf);
+-    if (!includeOverflowInterior && style()->hidesOverflow())
++    if (!includeOverflowInterior && hasOverflowClip())
+         return right;
+     if (includeSelf && m_overflowWidth > right)
+         right = m_overflowWidth;
+@@ -2190,7 +2190,7 @@
+ int RenderBlock::leftmostPosition(bool includeOverflowInterior, bool includeSelf) const
+ {
+     int left = RenderFlow::leftmostPosition(includeOverflowInterior, includeSelf);
+-    if (!includeOverflowInterior && style()->hidesOverflow())
++    if (!includeOverflowInterior && hasOverflowClip())
+         return left;
+ 
+     if (includeSelf && m_overflowLeft < left)
+@@ -2235,7 +2235,7 @@
+ int RenderBlock::highestPosition(bool includeOverflowInterior, bool includeSelf) const
+ {
+     int top = RenderFlow::highestPosition(includeOverflowInterior, includeSelf);
+-    if (!includeOverflowInterior && style()->hidesOverflow())
++    if (!includeOverflowInterior && hasOverflowClip())
+         return top;
+ 
+     if (includeSelf && m_overflowTop < top)
+@@ -2551,7 +2551,7 @@
+     if (hitTestAction != HitTestSelfOnly && m_floatingObjects && !inScrollbar) {
+         int stx = _tx + xPos();
+         int sty = _ty + yPos();
+-        if (style()->hidesOverflow() && m_layer)
++        if (hasOverflowClip() && m_layer)
+             m_layer->subtractScrollOffset(stx, sty);
+         FloatingObject* o;
+         QPtrListIterator<FloatingObject> it(*m_floatingObjects);
+@@ -3135,7 +3135,7 @@
+ 
+ bool RenderBlock::inRootBlockContext() const
+ {
+-    if (isTableCell() || isFloatingOrPositioned() || style()->hidesOverflow())
++    if (isTableCell() || isFloatingOrPositioned() || hasOverflowClip())
+         return false;
+ 
+     if (isRoot() || isCanvas())
+--- a/khtml/rendering/render_box.cpp
++++ b/khtml/rendering/render_box.cpp
+@@ -114,6 +114,26 @@
+     }
+ }
+ 
++static inline bool overflowAppliesTo(RenderObject* o) 
++{
++     // css 2.1-11.1.1
++     // 1) overflow only applies to non-replaced block-level elements, table cells, and inline-block elements
++     if (o->isRenderBlock() || o->isTableRow() || o->isTableSection())
++         // 2) overflow on root applies to the viewport (cf. KHTMLView::layout)
++         if (!o->isRoot())
++             // 3) overflow on body may apply to the viewport...
++             if (!o->isBody()
++                   // ...but only for HTML documents...
++                   || !o->document()->isHTMLDocument()
++                   // ...and only when the root has a visible overflow   
++                   || !o->document()->documentElement()->renderer()
++                   || !o->document()->documentElement()->renderer()->style()
++                   ||  o->document()->documentElement()->renderer()->style()->hidesOverflow())
++                 return true;
++
++     return false; 
++} 
++
+ void RenderBox::setStyle(RenderStyle *_style)
+ {
+     bool affectsParent = style() && isFloatingOrPositioned() &&
+@@ -155,6 +175,9 @@
+             setRelPositioned(true);
+     }
+ 
++    if (overflowAppliesTo(this) && _style->hidesOverflow())
++        setHasOverflowClip();
++        
+     if (requiresLayer()) {
+         if (!m_layer) {
+             m_layer = new (renderArena()) RenderLayer(this);
+@@ -295,7 +318,7 @@
+     _tx += m_x;
+     _ty += m_y;
+ 
+-    if (style()->hidesOverflow() && m_layer)
++    if (hasOverflowClip() && m_layer)
+         m_layer->subtractScrollOffset(_tx, _ty);
+ 
+     // default implementation. Just pass things through to the children
+@@ -725,7 +748,7 @@
+     if( o && o->absolutePosition(_xPos, _yPos, f))
+     {
+         if ( o->layer() ) {
+-            if (o->style()->hidesOverflow())
++            if (o->hasOverflowClip())
+                 o->layer()->subtractScrollOffset( _xPos, _yPos );
+             if (isPositioned())
+                 o->layer()->checkInlineRelOffset(this, _xPos, _yPos);
+@@ -811,7 +834,7 @@
+     RenderObject *o = container();
+     if( o ) {
+          if (o->layer()) {
+-             if (o->style()->hidesOverflow())
++             if (o->style()->hidesOverflow() && o->layer() && !o->isInlineFlow())
+                  o->layer()->subtractScrollOffset(x,y); // For overflow:auto/scroll/hidden.
+              if (style()->position() == ABSOLUTE)
+                  o->layer()->checkInlineRelOffset(this,x,y);
+@@ -1051,7 +1074,7 @@
+             height = calcBoxHeight(h.value());
+         }
+ 
+-        if (height<m_height && !overhangingContents() && !style()->hidesOverflow())
++        if (height<m_height && !overhangingContents() && !hasOverflowClip())
+             setOverhangingContents();
+ 
+         m_height = height;
+--- a/khtml/rendering/render_container.cpp
++++ b/khtml/rendering/render_container.cpp
+@@ -79,6 +79,8 @@
+     kdDebug( 6040 ) << this << ": " <<  renderName() << "(RenderObject)::addChild( " << newChild << ": " <<
+         newChild->renderName() << ", " << (beforeChild ? beforeChild->renderName() : "0") << " )" << endl;
+ #endif
++    // protect ourselves from deletion
++    setDoNotDelete(true);
+ 
+     bool needsTable = false;
+ 
+@@ -159,6 +161,8 @@
+             static_cast<RenderText*>(newChild)->setText(textToTransform, true);
+     }
+     newChild->attach();
++
++    setDoNotDelete(false);
+ }
+ 
+ RenderObject* RenderContainer::removeChildNode(RenderObject* oldChild)
+@@ -545,7 +549,7 @@
+ 	RenderObject *next = child->nextSibling();
+ 
+ 	if ( child->isRenderBlock() && child->isAnonymousBlock() && !child->continuation() &&
+-             !child->childrenInline() && !child->isTableCell() ) {
++	     !child->childrenInline() && !child->isTableCell() && !child->doNotDelete()) {
+ 	    RenderObject *firstAnChild = child->firstChild();
+ 	    RenderObject *lastAnChild = child->lastChild();
+ 	    if ( firstAnChild ) {
+@@ -560,17 +564,20 @@
+ 		    child->previousSibling()->setNextSibling( firstAnChild );
+ 		if ( child->nextSibling() )
+ 		    child->nextSibling()->setPreviousSibling( lastAnChild );
++		if ( child == firstChild() )
++		    m_first = firstAnChild;
++		if ( child == lastChild() )
++		    m_last = lastAnChild;
+ 	    } else {
+ 		if ( child->previousSibling() )
+ 		    child->previousSibling()->setNextSibling( child->nextSibling() );
+ 		if ( child->nextSibling() )
+ 		    child->nextSibling()->setPreviousSibling( child->previousSibling() );
+-
++		if ( child == firstChild() )
++		    m_first = child->nextSibling();
++		if ( child == lastChild() )
++		    m_last = child->previousSibling();
+ 	    }
+-	    if ( child == firstChild() )
+-		m_first = firstAnChild;
+-	    if ( child == lastChild() )
+-		m_last = lastAnChild;
+ 	    child->setParent( 0 );
+ 	    child->setPreviousSibling( 0 );
+ 	    child->setNextSibling( 0 );
+--- a/khtml/rendering/render_flow.cpp
++++ b/khtml/rendering/render_flow.cpp
+@@ -314,7 +314,7 @@
+ RenderFlow::lowestPosition(bool includeOverflowInterior, bool includeSelf) const
+ {
+     int bottom = RenderBox::lowestPosition(includeOverflowInterior, includeSelf);
+-    if (!includeOverflowInterior && style()->hidesOverflow())
++    if (!includeOverflowInterior && hasOverflowClip())
+         return bottom;
+ 
+     // FIXME: Come up with a way to use the layer tree to avoid visiting all the kids.
+@@ -339,7 +339,7 @@
+ int RenderFlow::rightmostPosition(bool includeOverflowInterior, bool includeSelf) const
+ {
+     int right = RenderBox::rightmostPosition(includeOverflowInterior, includeSelf);
+-    if (!includeOverflowInterior && style()->hidesOverflow())
++    if (!includeOverflowInterior && hasOverflowClip())
+         return right;
+ 
+     // FIXME: Come up with a way to use the layer tree to avoid visiting all the kids.
+@@ -364,7 +364,7 @@
+ int RenderFlow::leftmostPosition(bool includeOverflowInterior, bool includeSelf) const
+ {
+     int left = RenderBox::leftmostPosition(includeOverflowInterior, includeSelf);
+-    if (!includeOverflowInterior && style()->hidesOverflow())
++    if (!includeOverflowInterior && hasOverflowClip())
+         return left;
+ 
+     // FIXME: Come up with a way to use the layer tree to avoid visiting all the kids.
+@@ -389,7 +389,7 @@
+ int RenderFlow::highestPosition(bool includeOverflowInterior, bool includeSelf) const
+ {
+     int top = RenderBox::highestPosition(includeOverflowInterior, includeSelf);
+-    if (!includeOverflowInterior && style()->hidesOverflow())
++    if (!includeOverflowInterior && hasOverflowClip())
+         return top;
+ 
+     // FIXME: Come up with a way to use the layer tree to avoid visiting all the kids.
+--- a/khtml/rendering/render_layer.cpp
++++ b/khtml/rendering/render_layer.cpp
+@@ -284,7 +284,7 @@
+ short RenderLayer::width() const
+ {
+     int w = m_object->width();
+-    if (!m_object->style()->hidesOverflow())
++    if (!m_object->hasOverflowClip())
+         w = kMax(m_object->overflowWidth(), w);
+     return w;
+ }
+@@ -292,7 +292,7 @@
+ int RenderLayer::height() const
+ {
+     int h = m_object->height() + m_object->borderTopExtra() + m_object->borderBottomExtra();
+-    if (!m_object->style()->hidesOverflow())
++    if (!m_object->hasOverflowClip())
+         h = kMax(m_object->overflowHeight(), h);
+     return h;
+ }
+@@ -539,7 +539,7 @@
+ 
+ void RenderLayer::scrollToOffset(int x, int y, bool updateScrollbars, bool repaint)
+ {
+-    if (renderer()->style()->overflowX() != OMARQUEE) {
++    if (renderer()->style()->overflowX() != OMARQUEE || !renderer()->hasOverflowClip()) {
+         if (x < 0) x = 0;
+         if (y < 0) y = 0;
+ 
+@@ -735,16 +735,18 @@
+ 
+     bool haveHorizontalBar = m_hBar && m_hBar->isEnabled();
+     bool haveVerticalBar = m_vBar && m_vBar->isEnabled();
++    
++    bool hasOvf = m_object->hasOverflowClip();
+ 
+     // overflow:scroll should just enable/disable.
+-    if (m_object->style()->overflowX() == OSCROLL)
++    if (hasOvf && m_object->style()->overflowX() == OSCROLL)
+         m_hBar->setEnabled(needHorizontalBar);
+-    if (m_object->style()->overflowY() == OSCROLL)
++    if (hasOvf && m_object->style()->overflowY() == OSCROLL)
+         m_vBar->setEnabled(needVerticalBar);
+ 
+     // overflow:auto may need to lay out again if scrollbars got added/removed.
+-    bool scrollbarsChanged = (m_object->style()->overflowX() == OAUTO && haveHorizontalBar != needHorizontalBar)
+-                          || (m_object->style()->overflowY() == OAUTO && haveVerticalBar != needVerticalBar);
++    bool scrollbarsChanged = (hasOvf && m_object->style()->overflowX() == OAUTO && haveHorizontalBar != needHorizontalBar)
++                          || (hasOvf && m_object->style()->overflowY() == OAUTO && haveVerticalBar != needVerticalBar);
+     if (scrollbarsChanged) {
+         if (m_object->style()->overflowX() == OAUTO) {
+             showScrollbar(Qt::Horizontal, needHorizontalBar);
+@@ -1518,7 +1520,8 @@
+             sc->dirtyZOrderLists();
+     }
+ 
+-    if (m_object->style()->overflowX() == OMARQUEE && m_object->style()->marqueeBehavior() != MNONE) {
++    if (m_object->hasOverflowClip() && 
++         m_object->style()->overflowX() == OMARQUEE && m_object->style()->marqueeBehavior() != MNONE) {
+         if (!m_marquee)
+             m_marquee = new Marquee(this);
+         m_marquee->updateMarqueeStyle();
+--- a/khtml/rendering/render_object.cpp
++++ b/khtml/rendering/render_object.cpp
+@@ -178,7 +178,9 @@
+       m_isRoot( false ),
+       m_afterPageBreak( false ),
+       m_needsPageClear( false ),
+-      m_containsPageBreak( false )
++      m_containsPageBreak( false ),
++      m_hasOverflowClip( false ),
++      m_doNotDelete( false )
+ {
+   assert( node );
+   if (node->getDocument()->documentElement() == node) setIsRoot(true);
+@@ -508,12 +510,12 @@
+ // scrollWidth/scrollHeight is the size including the overflow area
+ short RenderObject::scrollWidth() const
+ {
+-    return (style()->hidesOverflow() && layer()) ? layer()->scrollWidth() : overflowWidth() - overflowLeft();
++    return (hasOverflowClip() && layer()) ? layer()->scrollWidth() : overflowWidth() - overflowLeft();
+ }
+ 
+ int RenderObject::scrollHeight() const
+ {
+-    return (style()->hidesOverflow() && layer()) ? layer()->scrollHeight() : overflowHeight() - overflowTop();
++    return (hasOverflowClip() && layer()) ? layer()->scrollHeight() : overflowHeight() - overflowTop();
+ }
+ 
+ bool RenderObject::hasStaticX() const
+@@ -1302,6 +1304,7 @@
+         m_positioned = false;
+         m_relPositioned = false;
+         m_paintBackground = false;
++        m_hasOverflowClip = false;
+     }
+ 
+     // only honour z-index for non-static objects
+@@ -1486,9 +1489,9 @@
+ bool RenderObject::absolutePosition(int &xPos, int &yPos, bool f) const
+ {
+     RenderObject* p = parent();
+-    if(p) {
+-        parent()->absolutePosition(xPos, yPos, f);
+-        if ( p->style()->hidesOverflow() && p->layer() )
++    if (p) {
++        p->absolutePosition(xPos, yPos, f);
++        if ( p->hasOverflowClip() )
+             p->layer()->subtractScrollOffset( xPos, yPos );
+         return true;
+     }
+@@ -1782,7 +1785,7 @@
+         isTableRow() || isTableSection() || inside || mouseInside() ))) {
+         if ( hitTestAction == HitTestChildrenOnly )
+             inside = false;
+-        if ( style()->hidesOverflow() && layer() )
++        if ( hasOverflowClip() && layer() )
+             layer()->subtractScrollOffset(tx, ty);
+         for (RenderObject* child = lastChild(); child; child = child->previousSibling())
+             if (!child->layer() && child->nodeAtPoint(info, _x, _y, tx, ty, HitTestAll))
+--- a/khtml/rendering/render_object.h
++++ b/khtml/rendering/render_object.h
+@@ -173,11 +173,11 @@
+ 	{ return QRect(0,0,0,0); }
+     virtual QRect getClipRect(int /*tx*/, int /*ty*/) { return QRect(0,0,0,0); }
+     bool hasClip() const { return isPositioned() &&  style()->hasClip(); }
+-    bool hasOverflowClip() const { return style()->hidesOverflow(); }
++    bool hasOverflowClip() const { return m_hasOverflowClip; }
+ 
+     bool scrollsOverflow() const { return scrollsOverflowX() || scrollsOverflowY(); }
+-    bool scrollsOverflowX() const { return (style()->overflowX() == OSCROLL || style()->overflowX() == OAUTO); }
+-    bool scrollsOverflowY() const { return (style()->overflowY() == OSCROLL || style()->overflowY() == OAUTO); }
++    bool scrollsOverflowX() const { return  hasOverflowClip() && (style()->overflowX() == OSCROLL || style()->overflowX() == OAUTO); }
++    bool scrollsOverflowY() const { return  hasOverflowClip() && (style()->overflowY() == OSCROLL || style()->overflowY() == OAUTO); }
+ 
+     virtual int getBaselineOfFirstLineBox() { return -1; } // Tables and blocks implement this.
+     virtual InlineFlowBox* getFirstLineBox() { return 0; } // Tables and blocks implement this.
+@@ -353,6 +353,7 @@
+     void setShouldPaintBackgroundOrBorder(bool b=true) { m_paintBackground = b; }
+     void setRenderText() { m_isText = true; }
+     void setReplaced(bool b=true) { m_replaced = b; }
++    void setHasOverflowClip(bool b = true) { m_hasOverflowClip = b; }
+     void setIsSelectionBorder(bool b=true) { m_isSelectionBorder = b; }
+ 
+     void scheduleRelayout(RenderObject *clippedObj = 0);
+@@ -754,6 +755,9 @@
+     virtual void deleteInlineBoxes(RenderArena* arena=0) {(void)arena;}
+     virtual void detach( );
+ 
++    void setDoNotDelete(bool b) { m_doNotDelete = b; }
++    bool doNotDelete() const { return m_doNotDelete; }
++
+     const QFont &font(bool firstLine) const {
+ 	return style( firstLine )->font();
+     }
+@@ -834,8 +838,12 @@
+ 
+     bool m_needsPageClear            : 1;
+     bool m_containsPageBreak         : 1;
++    
++    bool m_hasOverflowClip           : 1;
++
++    bool m_doNotDelete 	             : 1; // This object should not be auto-deleted
+ 
+-    // ### we have 16 + 24 bits. Cut 8 and save 32
++    // ### we have 16 + 26 bits.
+ 
+ 
+     void arenaDelete(RenderArena *arena, void *objectBase);




More information about the pkg-kde-commits mailing list