[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:47:02 UTC 2009


The following commit has been merged in the debian/unstable branch:
commit d41cb9538e967cfd4ffdf1abe1c6d0057d8b3370
Author: hyatt <hyatt at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Sat Jul 12 00:36:55 2003 +0000

    	Fix pseudostyles to inherit from the element's style that they are
    	specified for.  This is incorrect both for ::first-line and
    	::first-letter, but it is at least right for ::before and ::after.
    
    	Fix iframes and objects and embeds so that they will render borders
    	when borders are specified (as well as background images).
    
    	Patch iframes so that they correctly let the parent document's
    	background show through when the Web page inside the iframe has
    	no specified background.  Also patched iframes to understand not
    	to blit in this case and to not blit when opacity has been specified
    	on the iframe.
    
            Reviewed by darin
    
            * khtml/css/cssstyleselector.cpp:
            * khtml/khtmlview.h:
            * khtml/rendering/render_box.cpp:
            (RenderBox::paintRootBoxDecorations):
            * khtml/rendering/render_canvas.cpp:
            * khtml/rendering/render_form.cpp:
            (RenderFormElement::setStyle):
            * khtml/rendering/render_replaced.cpp:
            (RenderReplaced::calcMinMaxWidth):
            (RenderWidget::setStyle):
            (RenderWidget::paintObject):
            * kwq/KWQKHTMLPart.mm:
            (KWQKHTMLPart::paint):
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@4629 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/WebCore/ChangeLog-2003-10-25 b/WebCore/ChangeLog-2003-10-25
index b24f461..06b9ab2 100644
--- a/WebCore/ChangeLog-2003-10-25
+++ b/WebCore/ChangeLog-2003-10-25
@@ -1,3 +1,34 @@
+2003-07-11  Dave Hyatt  <hyatt at apple.com>
+
+	Fix pseudostyles to inherit from the element's style that they are
+	specified for.  This is incorrect both for ::first-line and
+	::first-letter, but it is at least right for ::before and ::after.
+
+	Fix iframes and objects and embeds so that they will render borders
+	when borders are specified (as well as background images).
+
+	Patch iframes so that they correctly let the parent document's
+	background show through when the Web page inside the iframe has
+	no specified background.  Also patched iframes to understand not
+	to blit in this case and to not blit when opacity has been specified
+	on the iframe.
+	
+        Reviewed by darin
+
+        * khtml/css/cssstyleselector.cpp:
+        * khtml/khtmlview.h:
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::paintRootBoxDecorations):
+        * khtml/rendering/render_canvas.cpp:
+        * khtml/rendering/render_form.cpp:
+        (RenderFormElement::setStyle):
+        * khtml/rendering/render_replaced.cpp:
+        (RenderReplaced::calcMinMaxWidth):
+        (RenderWidget::setStyle):
+        (RenderWidget::paintObject):
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::paint):
+
 2003-07-11  Darin Adler  <darin at apple.com>
 
         Reviewed by Ken.
diff --git a/WebCore/ChangeLog-2005-08-23 b/WebCore/ChangeLog-2005-08-23
index b24f461..06b9ab2 100644
--- a/WebCore/ChangeLog-2005-08-23
+++ b/WebCore/ChangeLog-2005-08-23
@@ -1,3 +1,34 @@
+2003-07-11  Dave Hyatt  <hyatt at apple.com>
+
+	Fix pseudostyles to inherit from the element's style that they are
+	specified for.  This is incorrect both for ::first-line and
+	::first-letter, but it is at least right for ::before and ::after.
+
+	Fix iframes and objects and embeds so that they will render borders
+	when borders are specified (as well as background images).
+
+	Patch iframes so that they correctly let the parent document's
+	background show through when the Web page inside the iframe has
+	no specified background.  Also patched iframes to understand not
+	to blit in this case and to not blit when opacity has been specified
+	on the iframe.
+	
+        Reviewed by darin
+
+        * khtml/css/cssstyleselector.cpp:
+        * khtml/khtmlview.h:
+        * khtml/rendering/render_box.cpp:
+        (RenderBox::paintRootBoxDecorations):
+        * khtml/rendering/render_canvas.cpp:
+        * khtml/rendering/render_form.cpp:
+        (RenderFormElement::setStyle):
+        * khtml/rendering/render_replaced.cpp:
+        (RenderReplaced::calcMinMaxWidth):
+        (RenderWidget::setStyle):
+        (RenderWidget::paintObject):
+        * kwq/KWQKHTMLPart.mm:
+        (KWQKHTMLPart::paint):
+
 2003-07-11  Darin Adler  <darin at apple.com>
 
         Reviewed by Ken.
diff --git a/WebCore/khtml/css/cssstyleselector.cpp b/WebCore/khtml/css/cssstyleselector.cpp
index 8b72868..6453598 100644
--- a/WebCore/khtml/css/cssstyleselector.cpp
+++ b/WebCore/khtml/css/cssstyleselector.cpp
@@ -430,6 +430,7 @@ RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e)
 		    //We have to do this for all pseudo styles
 		    RenderStyle *pseudoStyle = style->pseudoStyle;
 		    while ( pseudoStyle ) {
+                        checkForGenericFamilyChange(pseudoStyle, style);
 			pseudoStyle->htmlFont().update( paintDeviceMetrics );
 			pseudoStyle = pseudoStyle->pseudoStyle;
 		    }
@@ -446,17 +447,21 @@ RenderStyle *CSSStyleSelector::styleForElement(ElementImpl *e)
                 }
 
                 RenderStyle* oldStyle = style;
-		style = pseudoStyle;
+                RenderStyle* oldParentStyle = parentStyle;
+                parentStyle = style;
+                style = pseudoStyle;
                 if ( pseudoStyle ) {
                     DOM::CSSProperty *prop = pseudoProps[i]->prop;
                     applyRule( prop->m_id, prop->value() );
                 }
                 style = oldStyle;
+                parentStyle = oldParentStyle;
             }
 
 	    if ( fontDirty ) {
 		RenderStyle *pseudoStyle = style->pseudoStyle;
 		while ( pseudoStyle ) {
+                    checkForGenericFamilyChange(pseudoStyle, style);
 		    pseudoStyle->htmlFont().update( paintDeviceMetrics );
 		    pseudoStyle = pseudoStyle->pseudoStyle;
 		}
diff --git a/WebCore/khtml/khtmlview.h b/WebCore/khtml/khtmlview.h
index 0287c39..ecf0f0c 100644
--- a/WebCore/khtml/khtmlview.h
+++ b/WebCore/khtml/khtmlview.h
@@ -48,6 +48,7 @@ namespace DOM {
 
 namespace khtml {
     class RenderObject;
+    class RenderBox;
     class RenderCanvas;
     class RenderStyle;
     class RenderLineEdit;
@@ -78,6 +79,7 @@ class KHTMLView : public QScrollView
     friend class KHTMLPart;
     friend class khtml::RenderCanvas;
     friend class khtml::RenderObject;
+    friend class khtml::RenderBox;
     friend class khtml::RenderLineEdit;
     friend class khtml::RenderPartObject;
     friend class khtml::RenderWidget;
diff --git a/WebCore/khtml/rendering/render_box.cpp b/WebCore/khtml/rendering/render_box.cpp
index fce419e..ec0de31 100644
--- a/WebCore/khtml/rendering/render_box.cpp
+++ b/WebCore/khtml/rendering/render_box.cpp
@@ -235,9 +235,15 @@ void RenderBox::paintRootBoxDecorations(QPainter *p,int, int _y,
             bg = firstChild()->style()->backgroundImage();
     }
 
-    if( !c.isValid() && canvas()->view())
-        c = canvas()->view()->palette().active().color(QColorGroup::Base);
-
+    // Only fill with a base color (e.g., white) if we're the root document, since iframes/frames with
+    // no background in the child document should show the parent's background.
+    if (!c.isValid() && canvas()->view()) {
+        if (element()->getDocument()->ownerElement())
+            canvas()->view()->useSlowRepaints(); // The parent must show behind the child.
+        else
+            c = canvas()->view()->palette().active().color(QColorGroup::Base);
+    }
+    
     int w = width();
     int h = height();
 
diff --git a/WebCore/khtml/rendering/render_canvas.cpp b/WebCore/khtml/rendering/render_canvas.cpp
index 265f487..7dfa7d4 100644
--- a/WebCore/khtml/rendering/render_canvas.cpp
+++ b/WebCore/khtml/rendering/render_canvas.cpp
@@ -241,10 +241,25 @@ void RenderCanvas::paintObject(QPainter *p, int _x, int _y,
 void RenderCanvas::paintBoxDecorations(QPainter *p,int _x, int _y,
                                        int _w, int _h, int _tx, int _ty)
 {
+    // Check to see if we are enclosed by a transparent layer.  If so, we cannot blit
+    // when scrolling, and we need to use slow repaints.
+    DOM::ElementImpl* elt = element()->getDocument()->ownerElement();
+    if (view() && elt) {
+        RenderLayer* layer = elt->renderer()->enclosingLayer();
+        if (layer->isTransparent() || layer->transparentAncestor())
+            view()->useSlowRepaints();
+    }
+    
     if ((firstChild() && firstChild()->style()->visibility() == VISIBLE) || !view())
         return;
 
-    p->fillRect(_x,_y,_w,_h, view()->palette().active().color(QColorGroup::Base));
+    // This code typically only executes if the root element's visibility has been set to hidden.
+    // Only fill with a base color (e.g., white) if we're the root document, since iframes/frames with
+    // no background in the child document should show the parent's background.
+    if (elt)
+        view()->useSlowRepaints(); // The parent must show behind the child.
+    else
+        p->fillRect(_x,_y,_w,_h, view()->palette().active().color(QColorGroup::Base));
 }
 
 void RenderCanvas::repaintRectangle(int x, int y, int w, int h, bool immediate, bool f)
diff --git a/WebCore/khtml/rendering/render_form.cpp b/WebCore/khtml/rendering/render_form.cpp
index 18412cd..859bbfc 100644
--- a/WebCore/khtml/rendering/render_form.cpp
+++ b/WebCore/khtml/rendering/render_form.cpp
@@ -196,6 +196,9 @@ void RenderFormElement::setStyle(RenderStyle* _style)
     if (canHaveIntrinsicMargins())
         addIntrinsicMarginsIfAllowed(_style);
     RenderWidget::setStyle(_style);
+
+    // Do not paint a background or border for Aqua form elements
+    setShouldPaintBackgroundOrBorder(false);
 }
 #endif
 
diff --git a/WebCore/khtml/rendering/render_replaced.cpp b/WebCore/khtml/rendering/render_replaced.cpp
index f9b7d7a..37d53e1 100644
--- a/WebCore/khtml/rendering/render_replaced.cpp
+++ b/WebCore/khtml/rendering/render_replaced.cpp
@@ -86,11 +86,7 @@ void RenderReplaced::calcMinMaxWidth()
     kdDebug( 6040 ) << "RenderReplaced::calcMinMaxWidth() known=" << minMaxKnown() << endl;
 #endif
 
-    int width = calcReplacedWidth();
-
-    if (!isWidget())
-        width += paddingLeft() + paddingRight() + borderLeft() + borderRight();
-
+    int width = calcReplacedWidth() + paddingLeft() + paddingRight() + borderLeft() + borderRight();
     if ( style()->width().isPercent() || style()->height().isPercent() ) {
         m_minWidth = 0;
         m_maxWidth = width;
@@ -247,18 +243,10 @@ void RenderWidget::setStyle(RenderStyle *_style)
             m_widget->hide();
         }
     }
-
-    // do not paint background or borders for widgets
-    setShouldPaintBackgroundOrBorder(false);
 }
 
-#if APPLE_CHANGES
 void RenderWidget::paintObject(QPainter *p, int x, int y, int width, int height, int _tx, int _ty,
                                PaintAction paintAction)
-#else
-void RenderWidget::paintObject(QPainter* /*p*/, int, int, int, int, int _tx, int _ty,
-                               PaintAction paintAction)
-#endif
 {
     if (!m_widget || !m_view || paintAction != PaintActionForeground)
         return;
diff --git a/WebCore/kwq/KWQKHTMLPart.mm b/WebCore/kwq/KWQKHTMLPart.mm
index d530ef7..ad315d7 100644
--- a/WebCore/kwq/KWQKHTMLPart.mm
+++ b/WebCore/kwq/KWQKHTMLPart.mm
@@ -737,7 +737,7 @@ void KWQKHTMLPart::paint(QPainter *p, const QRect &rect)
 {
 #ifndef NDEBUG
     bool isPrinting = (p->device()->devType() == QInternal::Printer);
-    if (!isPrinting) {
+    if (!isPrinting && xmlDocImpl() && !xmlDocImpl()->ownerElement()) {
         p->fillRect(rect.x(), rect.y(), rect.width(), rect.height(), QColor(0xFF, 0, 0));
     }
 #endif

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list