REGRESSION (r99613): Incomplete painting of the root element background in flipped...
authormitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Nov 2011 00:24:46 +0000 (00:24 +0000)
committermitz@apple.com <mitz@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Nov 2011 00:24:46 +0000 (00:24 +0000)
https://bugs.webkit.org/show_bug.cgi?id=71863

Reviewed by Anders Carlsson.

* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintRootBoxFillLayers): Instead of unconditionally flipping the background
rect here...
* rendering/RenderView.cpp:
(WebCore::RenderView::backgroundRect): ...flip it only in column mode here.
* rendering/RenderView.h:

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

Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderBox.cpp
Source/WebCore/rendering/RenderView.cpp
Source/WebCore/rendering/RenderView.h

index 05cea8c9156aaac7293001831e3c2520e270e154..e30f5aadb80800d5ac8f92379afa7dfb3895704c 100644 (file)
@@ -1,3 +1,17 @@
+2011-11-08  Dan Bernstein  <mitz@apple.com>
+
+        REGRESSION (r99613): Incomplete painting of the root element background in flipped blocks writing mode
+        https://bugs.webkit.org/show_bug.cgi?id=71863
+
+        Reviewed by Anders Carlsson.
+
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::paintRootBoxFillLayers): Instead of unconditionally flipping the background
+        rect here...
+        * rendering/RenderView.cpp:
+        (WebCore::RenderView::backgroundRect): ...flip it only in column mode here.
+        * rendering/RenderView.h:
+
 2011-11-08  Michael Saboff  <msaboff@apple.com>
 
         Towards 8 Bit Strings: Templatize JSC::Parser class by Lexer type
index 1191e1552fa16228aedc34c1e59425b846e60fcf..5821605f4abb85eb78fe7fb7529817546871c444 100644 (file)
@@ -872,10 +872,7 @@ void RenderBox::paintRootBoxFillLayers(const PaintInfo& paintInfo)
         }
     }
 
-    RenderView* view = this->view();
-    LayoutRect backgroundRect = view->backgroundRect();
-    flipForWritingMode(backgroundRect);
-    paintFillLayers(paintInfo, bgColor, bgLayer, backgroundRect, BackgroundBleedNone, CompositeSourceOver, bodyObject);
+    paintFillLayers(paintInfo, bgColor, bgLayer, view()->backgroundRect(this), BackgroundBleedNone, CompositeSourceOver, bodyObject);
 }
 
 BackgroundBleedAvoidance RenderBox::determineBackgroundBleedAvoidance(GraphicsContext* context) const
index 9b4300f8a119eb491a5928d4a371bc94aef8d435..92a97f7da38796cdc4dfd4c2364ac9cc384c3cae 100644 (file)
@@ -692,7 +692,7 @@ IntRect RenderView::unscaledDocumentRect() const
     return overflowRect;
 }
 
-LayoutRect RenderView::backgroundRect() const
+LayoutRect RenderView::backgroundRect(RenderBox* backgroundRenderer) const
 {
     if (!hasColumns())
         return unscaledDocumentRect();
@@ -701,6 +701,8 @@ LayoutRect RenderView::backgroundRect() const
     LayoutRect backgroundRect(0, 0, columnInfo->desiredColumnWidth(), columnInfo->columnHeight() * columnInfo->columnCount());
     if (!isHorizontalWritingMode())
         backgroundRect = backgroundRect.transposedRect();
+    backgroundRenderer->flipForWritingMode(backgroundRect);
+
     return backgroundRect;
 }
 
index 7e0b36f8fe744a1c02444fb299edcfccd3175637..615010c857724a23bb031fb5f48d82b844298844 100644 (file)
@@ -167,7 +167,7 @@ public:
 #endif
 
     IntRect unscaledDocumentRect() const;
-    LayoutRect backgroundRect() const;
+    LayoutRect backgroundRect(RenderBox* backgroundRenderer) const;
 
     IntRect documentRect() const;