<https://webkit.org/b/119854> REGRESSION (r153379): Serious drawing issues with WebViews
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Aug 2013 18:50:48 +0000 (18:50 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 15 Aug 2013 18:50:48 +0000 (18:50 +0000)
<rdar://problem/14698870>

Reviewed by Simon Fraser.

Don't set aside subviews if they have already been set aside.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@154114 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebView/WebHTMLView.mm

index f2656de..d60ef84 100644 (file)
@@ -1,3 +1,15 @@
+2013-08-15  Anders Carlsson  <andersca@apple.com>
+
+        <https://webkit.org/b/119854> REGRESSION (r153379): Serious drawing issues with WebViews
+        <rdar://problem/14698870>
+
+        Reviewed by Simon Fraser.
+
+        Don't set aside subviews if they have already been set aside.
+
+        * WebView/WebHTMLView.mm:
+        (-[WebHTMLView _recursive:displayRectIgnoringOpacity:inGraphicsContext:CGContext:topView:shouldChangeFontReferenceColor:]):
+
 2013-08-15  Eric Carlson  <eric.carlson@apple.com>
 
         [Mac] Remove "legacy" media UI
 2013-08-15  Eric Carlson  <eric.carlson@apple.com>
 
         [Mac] Remove "legacy" media UI
index 9497e0c..14d027b 100644 (file)
@@ -1366,9 +1366,17 @@ static NSURL* uniqueURLWithRelativePart(NSString *relativePart)
 // Don't let AppKit even draw subviews. We take care of that.
 - (void)_recursive:(BOOL)recurseX displayRectIgnoringOpacity:(NSRect)displayRect inGraphicsContext:(NSGraphicsContext *)graphicsContext CGContext:(CGContextRef)ctx topView:(BOOL)isTopView shouldChangeFontReferenceColor:(BOOL)shouldChangeFontReferenceColor
 {
 // Don't let AppKit even draw subviews. We take care of that.
 - (void)_recursive:(BOOL)recurseX displayRectIgnoringOpacity:(NSRect)displayRect inGraphicsContext:(NSGraphicsContext *)graphicsContext CGContext:(CGContextRef)ctx topView:(BOOL)isTopView shouldChangeFontReferenceColor:(BOOL)shouldChangeFontReferenceColor
 {
-    [self _setAsideSubviews];
+    BOOL didSetAsideSubviews = NO;
+
+    if (!_private->subviewsSetAside) {
+        [self _setAsideSubviews];
+        didSetAsideSubviews = YES;
+    }
+    
     [super _recursive:recurseX displayRectIgnoringOpacity:displayRect inGraphicsContext:graphicsContext CGContext:ctx topView:isTopView shouldChangeFontReferenceColor:shouldChangeFontReferenceColor];
     [super _recursive:recurseX displayRectIgnoringOpacity:displayRect inGraphicsContext:graphicsContext CGContext:ctx topView:isTopView shouldChangeFontReferenceColor:shouldChangeFontReferenceColor];
-    [self _restoreSubviews];
+
+    if (didSetAsideSubviews)
+        [self _restoreSubviews];
 }
 
 - (BOOL)_insideAnotherHTMLView
 }
 
 - (BOOL)_insideAnotherHTMLView