Reviewed by Hyatt.
authorthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Sep 2006 03:45:02 +0000 (03:45 +0000)
committerthatcher <thatcher@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 21 Sep 2006 03:45:02 +0000 (03:45 +0000)
        Bug 10917: REGRESSION (r16027): iFrame transparency broken
        http://bugzilla.opendarwin.org/show_bug.cgi?id=10917

        Don't paint the base background color if we transparent.

        * rendering/RenderBox.cpp:
        (WebCore::RenderBox::paintBackgroundExtended):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@16491 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/rendering/RenderBox.cpp

index 8848b2b67ced1fd25a7caef5b1ada4f6187159a2..acfe3fc44b5c7dc3fd2dbe7dbf35dc88fa881469 100644 (file)
@@ -1,3 +1,15 @@
+2006-09-20  Timothy Hatcher  <timothy@apple.com>
+
+        Reviewed by Hyatt.
+
+        Bug 10917: REGRESSION (r16027): iFrame transparency broken
+        http://bugzilla.opendarwin.org/show_bug.cgi?id=10917
+
+        Don't paint the base background color if we transparent.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::paintBackgroundExtended):
+
 2006-09-20  Adam Roben  <aroben@apple.com>
 
         Reviewed by andersca.
index 29f061c10b6b7f8255f4dc048bbbd77ef6052768..b4458b3ab04c21febc0fa5b838079af069d477e3 100644 (file)
@@ -481,8 +481,8 @@ void RenderBox::paintBackgroundExtended(GraphicsContext* p, const Color& c, cons
 
     // 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.
+    bool isTransparent = false;
     if (!bgLayer->next() && isRoot() && !(bgColor.isValid() && bgColor.alpha() > 0) && view()->frameView()) {
-        bool isTransparent;
         Node* elt = document()->ownerElement();
         if (elt) {
             if (elt->hasTagName(frameTag))
@@ -506,7 +506,7 @@ void RenderBox::paintBackgroundExtended(GraphicsContext* p, const Color& c, cons
     if (!bgLayer->next()) {
         IntRect rect(_tx, clipy, w, cliph);
         // If we have an alpha and we are painting the root element, go ahead and blend with the base background color.
-        if (isRoot() && (!bgColor.isValid() || bgColor.alpha() < 0xFF) && !view()->frameView()->isTransparent()) {
+        if (isRoot() && (!bgColor.isValid() || bgColor.alpha() < 0xFF) && !isTransparent) {
             Color baseColor = view()->frameView()->baseBackgroundColor();
             if (baseColor.alpha() > 0) {
                 p->save();