Diff
Modified: trunk/LayoutTests/ChangeLog (180660 => 180661)
--- trunk/LayoutTests/ChangeLog 2015-02-26 06:05:02 UTC (rev 180660)
+++ trunk/LayoutTests/ChangeLog 2015-02-26 06:56:01 UTC (rev 180661)
@@ -1,3 +1,17 @@
+2015-02-25 Zalan Bujtas <[email protected]>
+
+ Black line across screen on Adobe Illustrator detail page (non-retina only)
+ https://bugs.webkit.org/show_bug.cgi?id=141866
+
+ Reviewed by Simon Fraser.
+
+ Phase is relative to the destination origin. We need to take location information into account
+ while snapping so that the result is inline with the snapped destination rect.
+ (location affects the snapped size.)
+
+ * fast/backgrounds/gradient-background-on-subpixel-position-expected.html: Added.
+ * fast/backgrounds/gradient-background-on-subpixel-position.html: Added.
+
2015-02-25 Michael Saboff <[email protected]>
Web Inspector: CRASH when debugger pauses inside a Promise handler
Added: trunk/LayoutTests/fast/backgrounds/gradient-background-on-subpixel-position-expected.html (0 => 180661)
--- trunk/LayoutTests/fast/backgrounds/gradient-background-on-subpixel-position-expected.html (rev 0)
+++ trunk/LayoutTests/fast/backgrounds/gradient-background-on-subpixel-position-expected.html 2015-02-26 06:56:01 UTC (rev 180661)
@@ -0,0 +1,18 @@
+<html>
+<head>
+<title>This tests that background image is filling up the space properly when on subpixel position.</title>
+<style>
+.gradient{
+ width: 300px;
+ height: 100.8px;
+ position: absolute;
+ background-image: linear-gradient(white, black);
+}
+</style>
+</head>
+<body>
+<div class="container">
+ <div class="gradient">Pass if there's no black line at the top of the gradient.</div>
+</div>
+</body>
+</html>
Added: trunk/LayoutTests/fast/backgrounds/gradient-background-on-subpixel-position.html (0 => 180661)
--- trunk/LayoutTests/fast/backgrounds/gradient-background-on-subpixel-position.html (rev 0)
+++ trunk/LayoutTests/fast/backgrounds/gradient-background-on-subpixel-position.html 2015-02-26 06:56:01 UTC (rev 180661)
@@ -0,0 +1,24 @@
+<html>
+<head>
+<title>This tests that background image is filling up the space properly when on subpixel position.</title>
+<style>
+.container {
+ position: relative;
+ height: 100.5px;
+}
+
+.gradient{
+ width: 300px;
+ height: 100.1px;
+ position: absolute;
+ bottom: 0px;
+ background-image: linear-gradient(white, black);
+}
+</style>
+</head>
+<body>
+<div class="container">
+ <div class="gradient">Pass if there's no black line at the top of the gradient.</div>
+</div>
+</body>
+</html>
Modified: trunk/LayoutTests/fast/backgrounds/hidpi-bitmap-background-repeat-on-subpixel-position-expected.html (180660 => 180661)
--- trunk/LayoutTests/fast/backgrounds/hidpi-bitmap-background-repeat-on-subpixel-position-expected.html 2015-02-26 06:05:02 UTC (rev 180660)
+++ trunk/LayoutTests/fast/backgrounds/hidpi-bitmap-background-repeat-on-subpixel-position-expected.html 2015-02-26 06:56:01 UTC (rev 180661)
@@ -51,12 +51,14 @@
</script>
<div class=thin style="left: 151px; top: 25px; width: 255px;"></div>
<div class=thick style="left: 406px; top: 25px; width: 105px;"></div>
-<div class=thin style="left: 176px; top: 0px; height: 50px;"></div>
+<div class=thin style="left: 151px; top: 0px; height: 50px;"></div>
+<div class=thin style="left: 176.5px; top: 0px; height: 50px;"></div>
<div class=thin style="left: 226.5px; top: 0px; height: 50px;"></div>
<div class=thin style="left: 277.5px; top: 0px; height: 50px;"></div>
<div class=thin style="left: 328.5px; top: 0px; height: 50px;"></div>
<div class=thin style="left: 380px; top: 0px; height: 50px;"></div>
-<div class=thick style="left: 431.5px; top: 0px; height: 50px;"></div>
+<div class=thick style="left: 406px; top: 0px; height: 50px;"></div>
+<div class=thick style="left: 432px; top: 0px; height: 50px;"></div>
<div class=thick style="left: 483px; top: 0px; height: 50px;"></div>
</body>
</html>
Modified: trunk/Source/WebCore/ChangeLog (180660 => 180661)
--- trunk/Source/WebCore/ChangeLog 2015-02-26 06:05:02 UTC (rev 180660)
+++ trunk/Source/WebCore/ChangeLog 2015-02-26 06:56:01 UTC (rev 180661)
@@ -1,3 +1,20 @@
+2015-02-25 Zalan Bujtas <[email protected]>
+
+ Black line across screen on Adobe Illustrator detail page (non-retina only)
+ https://bugs.webkit.org/show_bug.cgi?id=141866
+
+ Reviewed by Simon Fraser.
+
+ Phase is relative to the destination origin. We need to take location information into account
+ while snapping so that the result is inline with the snapped destination rect.
+ (location affects the snapped size.)
+
+ Test: fast/backgrounds/gradient-background-on-subpixel-position.html
+
+ * rendering/RenderBoxModelObject.cpp:
+ (WebCore::pixelSnapBackgroundImageGeometryForPainting):
+ (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
+
2015-02-25 Brent Fulgham <[email protected]>
[Win] Use WEBCORE_EXPORT instead of Definition file
Modified: trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp (180660 => 180661)
--- trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2015-02-26 06:05:02 UTC (rev 180660)
+++ trunk/Source/WebCore/rendering/RenderBoxModelObject.cpp 2015-02-26 06:56:01 UTC (rev 180661)
@@ -1035,9 +1035,9 @@
static void pixelSnapBackgroundImageGeometryForPainting(LayoutRect& destinationRect, LayoutSize& tileSize, LayoutSize& phase, LayoutSize& space, float scaleFactor)
{
tileSize = LayoutSize(snapRectToDevicePixels(LayoutRect(destinationRect.location(), tileSize), scaleFactor).size());
+ phase = LayoutSize(snapRectToDevicePixels(LayoutRect(destinationRect.location(), phase), scaleFactor).size());
space = LayoutSize(snapRectToDevicePixels(LayoutRect(LayoutPoint(), space), scaleFactor).size());
destinationRect = LayoutRect(snapRectToDevicePixels(destinationRect, scaleFactor));
- phase = LayoutSize(toFloatSize(roundPointToDevicePixels(toLayoutPoint(phase), scaleFactor)));
}
bool RenderBoxModelObject::fixedBackgroundPaintsInLocalCoordinates() const
@@ -1161,7 +1161,7 @@
}
if (backgroundRepeatX == RepeatFill) {
- phase.setWidth(tileSize.width() ? tileSize.width() - fmodf(computedXPosition + left, tileSize.width()): 0);
+ phase.setWidth(tileSize.width() ? tileSize.width() - fmodf(computedXPosition + left, tileSize.width()) : 0);
spaceSize.setWidth(0);
} else if (backgroundRepeatX == SpaceFill && tileSize.width() > 0) {
LayoutUnit space = getSpace(positioningAreaSize.width(), tileSize.width());