Title: [247712] trunk
Revision
247712
Author
simon.fra...@apple.com
Date
2019-07-22 19:08:20 -0700 (Mon, 22 Jul 2019)

Log Message

Fix WebView iframe rendering in macOS Catalina
https://bugs.webkit.org/show_bug.cgi?id=200022
rdar://problem/49102040

Reviewed by Darin Adler.
Source/WebKitLegacy/mac:

Adapt to internal NSView method renames in Catalina.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:_recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:stopAtLayerBackedViews:_recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:_recursive:displayRectIgnoringOpacity:inContext:topView:]):
(-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:stopAtLayerBackedViews:_recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:_recursive:displayRectIgnoringOpacity:inContext:topView:]): Deleted.

LayoutTests:

New test for rendering of overlapping iframes, defects when we fail to setAsideSubviews
in WebView.

* fast/frames/frames-not-double-painted-expected.html: Added.
* fast/frames/frames-not-double-painted.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (247711 => 247712)


--- trunk/LayoutTests/ChangeLog	2019-07-23 00:18:36 UTC (rev 247711)
+++ trunk/LayoutTests/ChangeLog	2019-07-23 02:08:20 UTC (rev 247712)
@@ -1,3 +1,17 @@
+2019-07-22  Simon Fraser  <simon.fra...@apple.com>
+
+        Fix WebView iframe rendering in macOS Catalina
+        https://bugs.webkit.org/show_bug.cgi?id=200022
+        rdar://problem/49102040
+
+        Reviewed by Darin Adler.
+        
+        New test for rendering of overlapping iframes, defects when we fail to setAsideSubviews
+        in WebView. 
+
+        * fast/frames/frames-not-double-painted-expected.html: Added.
+        * fast/frames/frames-not-double-painted.html: Added.
+
 2019-07-22  Youenn Fablet  <you...@apple.com>
 
         Make sure the player underlying volume is correctly set after creating a new player

Added: trunk/LayoutTests/fast/frames/frames-not-double-painted-expected.html (0 => 247712)


--- trunk/LayoutTests/fast/frames/frames-not-double-painted-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/frames/frames-not-double-painted-expected.html	2019-07-23 02:08:20 UTC (rev 247712)
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <style>
+        .outer {
+            position: absolute;
+            width: 300px;
+            height: 150px;
+            border: 20px solid rgba(0, 0, 0, 0.5);
+            background-color: rgba(255, 255, 255, 0.8);
+        }
+        
+        .inner {
+            width: 100%;
+            height: 100%;
+            background-color: rgba(0, 0, 128, 0.2);
+        }
+    </style>
+</head>
+<body>
+    <div class="outer" style="top: 20px">
+        <div class="inner"></div>
+    </div>
+    <div class="outer" style="top: 120px; left: 100px">
+        <div class="inner"></div>
+    </div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/frames/frames-not-double-painted.html (0 => 247712)


--- trunk/LayoutTests/fast/frames/frames-not-double-painted.html	                        (rev 0)
+++ trunk/LayoutTests/fast/frames/frames-not-double-painted.html	2019-07-23 02:08:20 UTC (rev 247712)
@@ -0,0 +1,18 @@
+<!DOCTYPE html>
+<html>
+<head>
+    <style>
+        iframe {
+            position: absolute;
+            width: 300px;
+            height: 150px;
+            border: 20px solid rgba(0, 0, 0, 0.5);
+            background-color: rgba(255, 255, 255, 0.8);
+        }
+    </style>
+</head>
+<body>
+    <iframe style="top: 20px" srcdoc="<style> body { background-color: rgba(0, 0, 128, 0.2); } "></iframe>
+    <iframe style="top: 120px; left: 100px"srcdoc="<style> body { background-color: rgba(0, 0, 128, 0.2); } "></iframe>
+</body>
+</html>

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (247711 => 247712)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2019-07-23 00:18:36 UTC (rev 247711)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2019-07-23 02:08:20 UTC (rev 247712)
@@ -1,5 +1,19 @@
 2019-07-22  Simon Fraser  <simon.fra...@apple.com>
 
+        Fix WebView iframe rendering in macOS Catalina
+        https://bugs.webkit.org/show_bug.cgi?id=200022
+        rdar://problem/49102040
+
+        Reviewed by Darin Adler.
+
+        Adapt to internal NSView method renames in Catalina.
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:stopAtLayerBackedViews:_recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:stopAtLayerBackedViews:_recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:_recursive:displayRectIgnoringOpacity:inContext:topView:]):
+        (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:stopAtLayerBackedViews:_recursive:displayRectIgnoringOpacity:inContext:shouldChangeFontReferenceColor:_recursive:displayRectIgnoringOpacity:inContext:topView:]): Deleted.
+
+2019-07-22  Simon Fraser  <simon.fra...@apple.com>
+
         Enable CSSOMViewScrollingAPIEnabled in WebKit1
         https://bugs.webkit.org/show_bug.cgi?id=200008
         rdar://problem/53409062

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm (247711 => 247712)


--- trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm	2019-07-23 00:18:36 UTC (rev 247711)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebHTMLView.mm	2019-07-23 02:08:20 UTC (rev 247712)
@@ -725,7 +725,9 @@
 - (void)_recursiveDisplayRectIfNeededIgnoringOpacity:(NSRect)rect isVisibleRect:(BOOL)isVisibleRect rectIsVisibleRectForView:(NSView *)visibleView topView:(BOOL)topView;
 - (void)_recursiveDisplayAllDirtyWithLockFocus:(BOOL)needsLockFocus visRect:(NSRect)visRect;
 #if PLATFORM(MAC)
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500
+- (void)_recursive:(BOOL)recursive displayRectIgnoringOpacity:(NSRect)displayRect inContext:(NSGraphicsContext *)graphicsContext stopAtLayerBackedViews:(BOOL)stopAtLayerBackedViews;
+#elif __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
 - (void)_recursive:(BOOL)recursive displayRectIgnoringOpacity:(NSRect)displayRect inContext:(NSGraphicsContext *)graphicsContext shouldChangeFontReferenceColor:(BOOL)shouldChangeFontReferenceColor stopAtLayerBackedViews:(BOOL)stopAtLayerBackedViews;
 #elif __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
 - (void)_recursive:(BOOL)recurse displayRectIgnoringOpacity:(NSRect)displayRect inContext:(NSGraphicsContext *)context shouldChangeFontReferenceColor:(BOOL)shouldChangeFontReferenceColor;
@@ -1670,7 +1672,9 @@
 }
 
 // Don't let AppKit even draw subviews. We take care of that.
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500
+- (void)_recursive:(BOOL)recursive displayRectIgnoringOpacity:(NSRect)displayRect inContext:(NSGraphicsContext *)graphicsContext stopAtLayerBackedViews:(BOOL)stopAtLayerBackedViews
+#elif __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
 - (void)_recursive:(BOOL)recursive displayRectIgnoringOpacity:(NSRect)displayRect inContext:(NSGraphicsContext *)graphicsContext shouldChangeFontReferenceColor:(BOOL)shouldChangeFontReferenceColor stopAtLayerBackedViews:(BOOL)stopAtLayerBackedViews
 #elif __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
 - (void)_recursive:(BOOL)recurse displayRectIgnoringOpacity:(NSRect)displayRect inContext:(NSGraphicsContext *)context shouldChangeFontReferenceColor:(BOOL)shouldChangeFontReferenceColor
@@ -1679,7 +1683,9 @@
 #endif
 {
     [self _setAsideSubviews];
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500
+    [super _recursive:recursive displayRectIgnoringOpacity:displayRect inContext:graphicsContext stopAtLayerBackedViews:stopAtLayerBackedViews];
+#elif __MAC_OS_X_VERSION_MIN_REQUIRED >= 101400
     [super _recursive:recursive displayRectIgnoringOpacity:displayRect inContext:graphicsContext shouldChangeFontReferenceColor:shouldChangeFontReferenceColor stopAtLayerBackedViews:stopAtLayerBackedViews];
 #elif __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
     [super _recursive:recurse displayRectIgnoringOpacity:displayRect inContext:context shouldChangeFontReferenceColor:shouldChangeFontReferenceColor];
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to