Title: [185093] trunk
- Revision
- 185093
- Author
- za...@apple.com
- Date
- 2015-06-01 18:29:38 -0700 (Mon, 01 Jun 2015)
Log Message
REGRESSION (179771): zooming on facebook images covers image
https://bugs.webkit.org/show_bug.cgi?id=145485
Reviewed by Simon Fraser.
Scaling an infinite rect should always produce an infinite rect.
(Based on Simon Fraser's patch)
Source/WebCore:
Test: compositing/layer-creation/zoomed-clip-intersection.html
* platform/graphics/LayoutRect.cpp:
(WebCore::LayoutRect::scale):
LayoutTests:
* compositing/layer-creation/zoomed-clip-intersection-expected.txt: Added.
* compositing/layer-creation/zoomed-clip-intersection.html: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (185092 => 185093)
--- trunk/LayoutTests/ChangeLog 2015-06-02 01:27:05 UTC (rev 185092)
+++ trunk/LayoutTests/ChangeLog 2015-06-02 01:29:38 UTC (rev 185093)
@@ -1,3 +1,16 @@
+2015-05-30 Zalan Bujtas <za...@apple.com>
+
+ REGRESSION (179771): zooming on facebook images covers image
+ https://bugs.webkit.org/show_bug.cgi?id=145485
+
+ Reviewed by Simon Fraser.
+
+ Scaling an infinite rect should always produce an infinite rect.
+ (Based on Simon Fraser's patch)
+
+ * compositing/layer-creation/zoomed-clip-intersection-expected.txt: Added.
+ * compositing/layer-creation/zoomed-clip-intersection.html: Added.
+
2015-06-01 Myles C. Maxfield <mmaxfi...@apple.com>
Test font selection for zh fonts
Added: trunk/LayoutTests/compositing/layer-creation/zoomed-clip-intersection-expected.txt (0 => 185093)
--- trunk/LayoutTests/compositing/layer-creation/zoomed-clip-intersection-expected.txt (rev 0)
+++ trunk/LayoutTests/compositing/layer-creation/zoomed-clip-intersection-expected.txt 2015-06-02 01:29:38 UTC (rev 185093)
@@ -0,0 +1,26 @@
+Image
+(GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 2355.00 1755.00)
+ (children 1
+ (GraphicsLayer
+ (anchor 0.00 0.00)
+ (bounds 785.00 585.00)
+ (contentsOpaque 1)
+ (transform [3.00 0.00 0.00 0.00] [0.00 3.00 0.00 0.00] [0.00 0.00 1.00 0.00] [0.00 0.00 0.00 1.00])
+ (children 2
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 1024.00 1042.00)
+ )
+ (GraphicsLayer
+ (position 8.00 8.00)
+ (bounds 100.00 100.00)
+ (contentsOpaque 1)
+ (drawsContent 1)
+ )
+ )
+ )
+ )
+)
+
Added: trunk/LayoutTests/compositing/layer-creation/zoomed-clip-intersection.html (0 => 185093)
--- trunk/LayoutTests/compositing/layer-creation/zoomed-clip-intersection.html (rev 0)
+++ trunk/LayoutTests/compositing/layer-creation/zoomed-clip-intersection.html 2015-06-02 01:29:38 UTC (rev 185093)
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<html>
+<head>
+ <style>
+ .underlay {
+ position: fixed;
+ width: 1024px;
+ height: 1042px;
+ background-color: rgba(0, 0, 0, 0.9);
+ }
+
+ .image {
+ position: relative;
+ width: 100px;
+ height: 100px;
+ background-color: green;
+ }
+ </style>
+ <script>
+ if (window.testRunner)
+ testRunner.dumpAsText();
+
+ function doTest()
+ {
+ if (window.eventSender)
+ eventSender.scalePageBy(3, 3);
+
+ if (window.internals)
+ window.internals.settings.setAcceleratedCompositingForFixedPositionEnabled(true);
+
+ if (window.testRunner)
+ document.getElementById('layers').innerText = window.internals.layerTreeAsText(document);
+ }
+ window.addEventListener('load', doTest, false);
+ </script>
+</head>
+<body>
+ <div class="underlay"></div>
+ <div class="image">Image</div>
+<pre id="layers"></pre>
+</body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (185092 => 185093)
--- trunk/Source/WebCore/ChangeLog 2015-06-02 01:27:05 UTC (rev 185092)
+++ trunk/Source/WebCore/ChangeLog 2015-06-02 01:29:38 UTC (rev 185093)
@@ -1,3 +1,18 @@
+2015-05-30 Zalan Bujtas <za...@apple.com>
+
+ REGRESSION (179771): zooming on facebook images covers image
+ https://bugs.webkit.org/show_bug.cgi?id=145485
+
+ Reviewed by Simon Fraser.
+
+ Scaling an infinite rect should always produce an infinite rect.
+ (Based on Simon Fraser's patch)
+
+ Test: compositing/layer-creation/zoomed-clip-intersection.html
+
+ * platform/graphics/LayoutRect.cpp:
+ (WebCore::LayoutRect::scale):
+
2015-06-01 Gyuyoung Kim <gyuyoung....@webkit.org>
Purge PassRefPtr in WebCore/Modules - 3
Modified: trunk/Source/WebCore/platform/graphics/LayoutRect.cpp (185092 => 185093)
--- trunk/Source/WebCore/platform/graphics/LayoutRect.cpp 2015-06-02 01:27:05 UTC (rev 185092)
+++ trunk/Source/WebCore/platform/graphics/LayoutRect.cpp 2015-06-02 01:29:38 UTC (rev 185093)
@@ -104,14 +104,15 @@
m_size = newMaxPoint - newLocation;
}
-void LayoutRect::scale(float s)
+void LayoutRect::scale(float scaleValue)
{
- m_location.scale(s, s);
- m_size.scale(s);
+ scale(scaleValue, scaleValue);
}
void LayoutRect::scale(float xScale, float yScale)
{
+ if (isInfinite())
+ return;
m_location.scale(xScale, yScale);
m_size.scale(xScale, yScale);
}
Modified: trunk/Source/WebCore/platform/graphics/LayoutRect.h (185092 => 185093)
--- trunk/Source/WebCore/platform/graphics/LayoutRect.h 2015-06-02 01:27:05 UTC (rev 185092)
+++ trunk/Source/WebCore/platform/graphics/LayoutRect.h 2015-06-02 01:29:38 UTC (rev 185093)
@@ -149,7 +149,7 @@
m_size.setHeight(m_size.height() + dy + dy);
}
void inflate(LayoutUnit d) { inflateX(d); inflateY(d); }
- WEBCORE_EXPORT void scale(float s);
+ WEBCORE_EXPORT void scale(float);
void scale(float xScale, float yScale);
LayoutRect transposedRect() const { return LayoutRect(m_location.transposedPoint(), m_size.transposedSize()); }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes