Title: [162626] trunk/Source/WebKit2
- Revision
- 162626
- Author
- timothy_hor...@apple.com
- Date
- 2014-01-23 10:52:01 -0800 (Thu, 23 Jan 2014)
Log Message
[iOS] [WK2] WKContentView has a black background
https://bugs.webkit.org/show_bug.cgi?id=127471
<rdar://problem/12287363>
Reviewed by Sam Weinig.
* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
Instead of giving it a (black!) background to make hit-testing work, use CALayer SPI
to tell CA that the whole layer should be treated as opaque when it comes to hit-testing.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (162625 => 162626)
--- trunk/Source/WebKit2/ChangeLog 2014-01-23 18:48:05 UTC (rev 162625)
+++ trunk/Source/WebKit2/ChangeLog 2014-01-23 18:52:01 UTC (rev 162626)
@@ -1,3 +1,16 @@
+2014-01-23 Tim Horton <timothy_hor...@apple.com>
+
+ [iOS] [WK2] WKContentView has a black background
+ https://bugs.webkit.org/show_bug.cgi?id=127471
+ <rdar://problem/12287363>
+
+ Reviewed by Sam Weinig.
+
+ * UIProcess/API/ios/WKContentView.mm:
+ (-[WKContentView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
+ Instead of giving it a (black!) background to make hit-testing work, use CALayer SPI
+ to tell CA that the whole layer should be treated as opaque when it comes to hit-testing.
+
2014-01-22 Carlos Garcia Campos <cgar...@igalia.com>
[GLIB] Use GUniquePtr instead of GOwnPtr
Modified: trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm (162625 => 162626)
--- trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm 2014-01-23 18:48:05 UTC (rev 162625)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKContentView.mm 2014-01-23 18:52:01 UTC (rev 162626)
@@ -43,6 +43,14 @@
#import <WebCore/ViewportArguments.h>
#import <wtf/RetainPtr.h>
+#if __has_include(<QuartzCore/QuartzCorePrivate.h>)
+#import <QuartzCore/QuartzCorePrivate.h>
+#endif
+
+@interface CALayer (Details)
+@property BOOL hitTestsAsOpaque;
+@end
+
using namespace WebCore;
using namespace WebKit;
@@ -180,10 +188,6 @@
- (void)_commonInitializationWithContextRef:(WKContextRef)contextRef pageGroupRef:(WKPageGroupRef)pageGroupRef relatedToPage:(WKPageRef)relatedPage
{
- // FIXME: This should not be necessary, find why hit testing does not work otherwise.
- // <rdar://problem/12287363>
- self.backgroundColor = [UIColor blackColor];
-
InitializeWebKit2();
RunLoop::initializeMainRunLoop();
@@ -204,6 +208,8 @@
_interactionView = adoptNS([[WKInteractionView alloc] init]);
[_interactionView setPage:_page];
[self addSubview:_interactionView.get()];
+
+ self.layer.hitTestsAsOpaque = YES;
}
- (void)_windowDidMoveToScreenNotification:(NSNotification *)notification
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes