Title: [101873] trunk/Source/WebKit/mac
- Revision
- 101873
- Author
- simon.fra...@apple.com
- Date
- 2011-12-02 15:54:43 -0800 (Fri, 02 Dec 2011)
Log Message
<rdar://problem/10423627> Layers are flipped in WebKit1 views
Reviewed by Sam Weinig.
Host the compositing layers in an NSView which is flipped, which helps AppKit
get the geometry right in some situations.
* WebView/WebHTMLView.mm:
(-[WebLayerHostingFlippedView isFlipped]):
(-[WebHTMLView attachRootLayer:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/mac/ChangeLog (101872 => 101873)
--- trunk/Source/WebKit/mac/ChangeLog 2011-12-02 23:54:37 UTC (rev 101872)
+++ trunk/Source/WebKit/mac/ChangeLog 2011-12-02 23:54:43 UTC (rev 101873)
@@ -1,3 +1,16 @@
+2011-12-02 Simon Fraser <simon.fra...@apple.com>
+
+ <rdar://problem/10423627> Layers are flipped in WebKit1 views
+
+ Reviewed by Sam Weinig.
+
+ Host the compositing layers in an NSView which is flipped, which helps AppKit
+ get the geometry right in some situations.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebLayerHostingFlippedView isFlipped]):
+ (-[WebHTMLView attachRootLayer:]):
+
2011-12-02 Hajime Morrita <morr...@chromium.org>
Unreviewed, rolling out r101751 and r101775.
Modified: trunk/Source/WebKit/mac/WebView/WebHTMLView.mm (101872 => 101873)
--- trunk/Source/WebKit/mac/WebView/WebHTMLView.mm 2011-12-02 23:54:37 UTC (rev 101872)
+++ trunk/Source/WebKit/mac/WebView/WebHTMLView.mm 2011-12-02 23:54:43 UTC (rev 101873)
@@ -201,6 +201,16 @@
- (BOOL)receivedUnhandledCommand;
@end
+@interface WebLayerHostingFlippedView : NSView
+@end
+
+@implementation WebLayerHostingFlippedView
+- (BOOL)isFlipped
+{
+ return YES;
+}
+@end
+
// if YES, do the standard NSView hit test (which can't give the right result when HTML overlaps a view)
static BOOL forceNSViewHitTest;
@@ -5439,7 +5449,7 @@
- (void)attachRootLayer:(CALayer*)layer
{
if (!_private->layerHostingView) {
- NSView* hostingView = [[NSView alloc] initWithFrame:[self bounds]];
+ NSView* hostingView = [[WebLayerHostingFlippedView alloc] initWithFrame:[self bounds]];
#ifndef BUILDING_ON_LEOPARD
[hostingView setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes