https://bugs.webkit.org/show_bug.cgi?id=65690
Reviewed by Simon Fraser.
Test: fast/repaint/background-scaling.html
* rendering/RenderBox.cpp:
(WebCore::RenderBox::paintRootBoxFillLayers):
* rendering/RenderView.cpp:
(WebCore::RenderView::unscaledDocumentRect):
(WebCore::RenderView::documentRect):
* rendering/RenderView.h:
LayoutTests: Background Does Not Scale Correctly with Page
Scaling is applied twice to the background (the paint area is doubly scaled).
This patch fixes this issue by passing the unscaled document rect to paintFillLayers
in paintRootBoxFillLayers.
https://bugs.webkit.org/show_bug.cgi?id=65690
Reviewed by Simon Fraser.
* fast/repaint/background-scaling-expected.png: Added.
* fast/repaint/background-scaling-expected.txt: Added.
* fast/repaint/background-scaling.html: Added.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@92417
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2011-08-04 Fady Samuel <fsamuel@chromium.org>
+
+ Background Does Not Scale Correctly with Page
+
+ Scaling is applied twice to the background (the paint area is doubly scaled).
+ This patch fixes this issue by passing the unscaled document rect to paintFillLayers
+ in paintRootBoxFillLayers.
+
+ https://bugs.webkit.org/show_bug.cgi?id=65690
+
+ Reviewed by Simon Fraser.
+
+ * fast/repaint/background-scaling-expected.png: Added.
+ * fast/repaint/background-scaling-expected.txt: Added.
+ * fast/repaint/background-scaling.html: Added.
+
2011-08-04 Yael Aharon <yael.aharon@nokia.com>
[Qt] 69 tests failing after http://trac.webkit.org/changeset/92375
--- /dev/null
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600 [bgcolor=#008000]
+ RenderBody {BODY} at (0,0) size 800x600
+ RenderBlock {DIV} at (0,0) size 800x100 [bgcolor=#008000]
--- /dev/null
+<html style="background-color: green;">
+<head>
+<script src="resources/repaint.js" type="text/javascript" charset="utf-8"></script>
+<script type="text/javascript">
+ function repaintTest()
+ {
+ if (window.layoutTestController)
+ eventSender.scalePageBy(0.2,0,0);
+ }
+</script>
+</head>
+<body style="margin:0;" onload="runRepaintTest();">
+ <div style="background-color: green; width: 100%; height: 100px;"></div>
+</body>
+</html>
+2011-08-04 Fady Samuel <fsamuel@chromium.org>
+
+ Background Does Not Scale Correctly with Page
+ https://bugs.webkit.org/show_bug.cgi?id=65690
+
+ Reviewed by Simon Fraser.
+
+ Test: fast/repaint/background-scaling.html
+
+ * rendering/RenderBox.cpp:
+ (WebCore::RenderBox::paintRootBoxFillLayers):
+ * rendering/RenderView.cpp:
+ (WebCore::RenderView::unscaledDocumentRect):
+ (WebCore::RenderView::documentRect):
+ * rendering/RenderView.h:
+
2011-08-04 Jochen Eisinger <jochen@chromium.org>
Introduce a new ResourceRequest::TargetType for XHRs
}
// The background of the box generated by the root element covers the entire canvas, so just use
- // the RenderView's documentRect accessor.
- paintFillLayers(paintInfo, bgColor, bgLayer, view()->documentRect(), BackgroundBleedNone, CompositeSourceOver, bodyObject);
+ // the RenderView's unscaledDocumentRect accessor.
+ paintFillLayers(paintInfo, bgColor, bgLayer, view()->unscaledDocumentRect(), BackgroundBleedNone, CompositeSourceOver, bodyObject);
}
BackgroundBleedAvoidance RenderBox::determineBackgroundBleedAvoidance(GraphicsContext* context) const
return IntRect();
}
-IntRect RenderView::documentRect() const
+
+IntRect RenderView::unscaledDocumentRect() const
{
IntRect overflowRect(layoutOverflowRect());
flipForWritingMode(overflowRect);
+ return overflowRect;
+}
+
+IntRect RenderView::documentRect() const
+{
+ IntRect overflowRect(unscaledDocumentRect());
if (hasTransform())
overflowRect = layer()->currentTransform().mapRect(overflowRect);
return overflowRect;
bool usesCompositing() const;
#endif
+ IntRect unscaledDocumentRect() const;
+
IntRect documentRect() const;
#if ENABLE(CSS_REGIONS)