Title: [160673] trunk/Source/WebKit2
Revision
160673
Author
benja...@webkit.org
Date
2013-12-16 16:24:57 -0800 (Mon, 16 Dec 2013)

Log Message

[WK2] Remove the constraint that highlight rects must be smaller than the scrollview bounds
https://bugs.webkit.org/show_bug.cgi?id=125812

Patch by Benjamin Poulain <bpoul...@apple.com> on 2013-12-16
Reviewed by Dan Bernstein.

Currently, _scrollView is never set on WKInteractionView and all highlight rects are discarded.

Eventually, the constraint rect should be computed from the useful area of ScrollView and the scale
of the document. In the meantime, the constraint code is just causing troubles.

The issue is tracked by <rdar://problem/15673655>.

* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):

Modified Paths

Diff

Modified: trunk/Source/WebKit2/ChangeLog (160672 => 160673)


--- trunk/Source/WebKit2/ChangeLog	2013-12-17 00:13:38 UTC (rev 160672)
+++ trunk/Source/WebKit2/ChangeLog	2013-12-17 00:24:57 UTC (rev 160673)
@@ -1,3 +1,20 @@
+2013-12-16  Benjamin Poulain  <bpoul...@apple.com>
+
+        [WK2] Remove the constraint that highlight rects must be smaller than the scrollview bounds
+        https://bugs.webkit.org/show_bug.cgi?id=125812
+
+        Reviewed by Dan Bernstein.
+
+        Currently, _scrollView is never set on WKInteractionView and all highlight rects are discarded.
+
+        Eventually, the constraint rect should be computed from the useful area of ScrollView and the scale
+        of the document. In the meantime, the constraint code is just causing troubles.
+
+        The issue is tracked by <rdar://problem/15673655>.
+
+        * UIProcess/API/ios/WKInteractionView.mm:
+        (-[WKInteractionView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
+
 2013-12-16  Simon Fraser  <simon.fra...@apple.com>
 
         Apply overhang shadow and linen to UI-side layers

Modified: trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm (160672 => 160673)


--- trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm	2013-12-17 00:13:38 UTC (rev 160672)
+++ trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm	2013-12-17 00:24:57 UTC (rev 160673)
@@ -264,22 +264,14 @@
     RetainPtr<UIColor> highlightUIKitColor = adoptNS([[UIColor alloc] initWithRed:(color.red() / 255.0) green:(color.green() / 255.0) blue:(color.blue() / 255.0) alpha:(color.alpha() / 255.0)]);
     [_highlightView.get() setColor:highlightUIKitColor.get()];
 
-    // Like WebKit1, we don't bother highlighting items that are bigger than the constraining rect.
-    // FIXME: this should not be done in mixed coordinate systems. It should be expressed in the ScrollView coordinates.
-    CGRect constrainRect = _scrollView.bounds;
-
     bool allHighlightRectsAreRectilinear = true;
     const size_t quadCount = highlightedQuads.size();
     RetainPtr<NSMutableArray> rects = adoptNS([[NSMutableArray alloc] initWithCapacity:static_cast<const NSUInteger>(quadCount)]);
     for (size_t i = 0; i < quadCount; ++i) {
         const FloatQuad& quad = highlightedQuads[i];
         if (quad.isRectilinear()) {
-            CGRect rect = quad.boundingBox();
-            if ((CGRectGetWidth(rect) > CGRectGetWidth(constrainRect)) || (CGRectGetHeight(rect) > CGRectGetHeight(constrainRect)))
-                continue;
-
-            rect = CGRectInset(rect, -UIWebViewMinimumHighlightRadius, -UIWebViewMinimumHighlightRadius);
-            [rects.get() addObject:[NSValue valueWithCGRect:rect]];
+            CGRect rect = CGRectInset(quad.boundingBox(), -UIWebViewMinimumHighlightRadius, -UIWebViewMinimumHighlightRadius);
+            [rects addObject:[NSValue valueWithCGRect:rect]];
         } else {
             allHighlightRectsAreRectilinear = false;
             rects.clear();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to