Bug 145485

Summary: REGRESSION (179771): zooming on facebook images covers image
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: New BugsAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: buildbot, commit-queue, esprehn+autocc, glenn, kondapallykalyan, rniwa, simon.fraser, zalan
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
simon.fraser: review+, buildbot: commit-queue-
Archive of layout-test-results from ews100 for mac-mavericks none

Description Simon Fraser (smfr) 2015-05-29 17:22:19 PDT
REGRESSION (179771): zooming on facebook images covers image
Comment 1 Simon Fraser (smfr) 2015-05-29 17:23:34 PDT
Created attachment 253943 [details]
Patch
Comment 2 Jon Lee 2015-05-29 17:27:18 PDT
*** Bug 145484 has been marked as a duplicate of this bug. ***
Comment 3 Simon Fraser (smfr) 2015-05-29 18:05:38 PDT
Comment on attachment 253943 [details]
Patch

Re-instating this patch, since I think fixing LayoutRect::scale to not overflow is hard.
Comment 4 zalan 2015-05-30 14:00:04 PDT
(In reply to comment #3)
> Comment on attachment 253943 [details]
> Patch
> 
> Re-instating this patch, since I think fixing LayoutRect::scale to not
> overflow is hard.
I think the proper fix is to preserve the infinite state of the LayoutRect regardless of the scale; something like this

diff --git a/Source/WebCore/platform/graphics/LayoutRect.cpp b/Source/WebCore/platform/graphics/LayoutRect.cpp
index f899004..a2f53b9 100644
--- a/Source/WebCore/platform/graphics/LayoutRect.cpp
+++ b/Source/WebCore/platform/graphics/LayoutRect.cpp
@@ -106,12 +106,13 @@ void LayoutRect::uniteIfNonZero(const LayoutRect& other)
 
 void LayoutRect::scale(float s)
 {
-    m_location.scale(s, s);
-    m_size.scale(s);
+    scale(s, s);
 }
 
 void LayoutRect::scale(float xScale, float yScale)
 {
+    if (isInfinite())
+        return;
     m_location.scale(xScale, yScale);
     m_size.scale(xScale, yScale);
 }
Comment 5 zalan 2015-05-30 14:26:13 PDT
Created attachment 253963 [details]
Patch
Comment 6 Build Bot 2015-05-30 15:35:35 PDT
Comment on attachment 253963 [details]
Patch

Attachment 253963 [details] did not pass mac-ews (mac):
Output: http://webkit-queues.appspot.com/results/5482701704396800

New failing tests:
compositing/layer-creation/zoomed-clip-intersection.html
Comment 7 Build Bot 2015-05-30 15:35:38 PDT
Created attachment 253967 [details]
Archive of layout-test-results from ews100 for mac-mavericks

The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews100  Port: mac-mavericks  Platform: Mac OS X 10.9.5
Comment 8 zalan 2015-06-01 18:30:01 PDT
Committed r185093: <http://trac.webkit.org/changeset/185093>
Comment 9 zalan 2015-06-01 18:31:39 PDT
rdar://problem/21003563