Changeset 160673 in webkit


Ignore:
Timestamp:
Dec 16, 2013 4:24:57 PM (10 years ago)
Author:
benjamin@webkit.org
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 <bpoulain@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::]):

Location:
trunk/Source/WebKit2
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit2/ChangeLog

    r160672 r160673  
     12013-12-16  Benjamin Poulain  <bpoulain@apple.com>
     2
     3        [WK2] Remove the constraint that highlight rects must be smaller than the scrollview bounds
     4        https://bugs.webkit.org/show_bug.cgi?id=125812
     5
     6        Reviewed by Dan Bernstein.
     7
     8        Currently, _scrollView is never set on WKInteractionView and all highlight rects are discarded.
     9
     10        Eventually, the constraint rect should be computed from the useful area of ScrollView and the scale
     11        of the document. In the meantime, the constraint code is just causing troubles.
     12
     13        The issue is tracked by <rdar://problem/15673655>.
     14
     15        * UIProcess/API/ios/WKInteractionView.mm:
     16        (-[WKInteractionView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
     17
    1182013-12-16  Simon Fraser  <simon.fraser@apple.com>
    219
  • trunk/Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm

    r160566 r160673  
    265265    [_highlightView.get() setColor:highlightUIKitColor.get()];
    266266
    267     // Like WebKit1, we don't bother highlighting items that are bigger than the constraining rect.
    268     // FIXME: this should not be done in mixed coordinate systems. It should be expressed in the ScrollView coordinates.
    269     CGRect constrainRect = _scrollView.bounds;
    270 
    271267    bool allHighlightRectsAreRectilinear = true;
    272268    const size_t quadCount = highlightedQuads.size();
     
    275271        const FloatQuad& quad = highlightedQuads[i];
    276272        if (quad.isRectilinear()) {
    277             CGRect rect = quad.boundingBox();
    278             if ((CGRectGetWidth(rect) > CGRectGetWidth(constrainRect)) || (CGRectGetHeight(rect) > CGRectGetHeight(constrainRect)))
    279                 continue;
    280 
    281             rect = CGRectInset(rect, -UIWebViewMinimumHighlightRadius, -UIWebViewMinimumHighlightRadius);
    282             [rects.get() addObject:[NSValue valueWithCGRect:rect]];
     273            CGRect rect = CGRectInset(quad.boundingBox(), -UIWebViewMinimumHighlightRadius, -UIWebViewMinimumHighlightRadius);
     274            [rects addObject:[NSValue valueWithCGRect:rect]];
    283275        } else {
    284276            allHighlightRectsAreRectilinear = false;
Note: See TracChangeset for help on using the changeset viewer.