Title: [151042] trunk/Source/WebCore
Revision
151042
Author
[email protected]
Date
2013-05-31 14:55:24 -0700 (Fri, 31 May 2013)

Log Message

Take the normal NSView code path when drawing into an inclusive layer
https://bugs.webkit.org/show_bug.cgi?id=117094
<rdar://problem/13812355>

Reviewed by Sam Weinig.

For now, take the normal code path when drawing into an inclusive layer.

* platform/mac/WidgetMac.mm:
(WebCore::Widget::paint):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (151041 => 151042)


--- trunk/Source/WebCore/ChangeLog	2013-05-31 21:48:46 UTC (rev 151041)
+++ trunk/Source/WebCore/ChangeLog	2013-05-31 21:55:24 UTC (rev 151042)
@@ -1,3 +1,16 @@
+2013-05-31  Anders Carlsson  <[email protected]>
+
+        Take the normal NSView code path when drawing into an inclusive layer
+        https://bugs.webkit.org/show_bug.cgi?id=117094
+        <rdar://problem/13812355>
+
+        Reviewed by Sam Weinig.
+
+        For now, take the normal code path when drawing into an inclusive layer.
+
+        * platform/mac/WidgetMac.mm:
+        (WebCore::Widget::paint):
+
 2013-05-31  Tiancheng Jiang  <[email protected]>
 
         [BlackBerry] Update Button UX.

Modified: trunk/Source/WebCore/platform/mac/WidgetMac.mm (151041 => 151042)


--- trunk/Source/WebCore/platform/mac/WidgetMac.mm	2013-05-31 21:48:46 UTC (rev 151041)
+++ trunk/Source/WebCore/platform/mac/WidgetMac.mm	2013-05-31 21:55:24 UTC (rev 151042)
@@ -54,6 +54,9 @@
 
 @interface NSView (Widget)
 - (void)visibleRectDidChange;
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+- (BOOL)_hasCanDrawSubviewsIntoLayerOrAncestor;
+#endif
 @end
 
 namespace WebCore {
@@ -208,9 +211,14 @@
     // code, which can deref it.
     RefPtr<Widget> protectedThis(this);
 
+    BOOL hasCanDrawSubviewsIntoLayerOrAncestor = NO;
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
+    hasCanDrawSubviewsIntoLayerOrAncestor = [view _hasCanDrawSubviewsIntoLayerOrAncestor];
+#endif
+    
     NSGraphicsContext *currentContext = [NSGraphicsContext currentContext];
-    if (currentContext == [[view window] graphicsContext] || ![currentContext isDrawingToScreen]) {
-        // This is the common case of drawing into a window or printing.
+    if (currentContext == [[view window] graphicsContext] || ![currentContext isDrawingToScreen] || hasCanDrawSubviewsIntoLayerOrAncestor) {
+        // This is the common case of drawing into a window or an inclusive layer, or printing.
         BEGIN_BLOCK_OBJC_EXCEPTIONS;
         [view displayRectIgnoringOpacity:[view convertRect:r fromView:[view superview]]];
         END_BLOCK_OBJC_EXCEPTIONS;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to