⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 240062 in webkit


Ignore:
Timestamp:
Jan 16, 2019, 3:27:14 PM (8 years ago)
Author:
Alan Coon
Message:

Cherry-pick r239843. rdar://problem/47260277

REGRESSION (r237658): Tap highlight limits cause the highlight to no longer show with legitimate button sizes
​https://bugs.webkit.org/show_bug.cgi?id=193294
<rdar://problem/46006678>

Reviewed by Simon Fraser.

Input type elements should always paint tap highlight (ignore size heuristic).

  • UIProcess/PageClient.h:
  • UIProcess/WebPageProxy.h:
  • UIProcess/WebPageProxy.messages.in:
  • UIProcess/ios/PageClientImplIOS.h:
  • UIProcess/ios/PageClientImplIOS.mm: (WebKit::PageClientImpl::didGetTapHighlightGeometries):
  • UIProcess/ios/WKContentViewInteraction.h:
  • UIProcess/ios/WKContentViewInteraction.mm: (-[WKContentView _showTapHighlight]): (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:nodeHasBuiltInClickHandling:]): (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]): Deleted.
  • UIProcess/ios/WebPageProxyIOS.mm: (WebKit::WebPageProxy::didGetTapHighlightGeometries):
  • WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):

git-svn-id: ​https://svn.webkit.org/repository/webkit/trunk@239843 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Location:
branches/safari-607-branch/Source
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • branches/safari-607-branch/Source/WebCore/WebCore.xcodeproj/project.pbxproj

    r240058 r240062  
    42414241                D3A94A47122DC40F00A37BBC /* JSMediaQueryList.h in Headers */ = {isa = PBXBuildFile; fileRef = D3A94A43122DC40F00A37BBC /* JSMediaQueryList.h */; };
    42424242                D3AA10F4123A98AA0092152B /* MediaQueryMatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = D3AA10F2123A98AA0092152B /* MediaQueryMatcher.h */; };
    4243                 D3D4E973130C7CFE007BA540 /* HTMLSummaryElement.h in Headers */ = {isa = PBXBuildFile; fileRef = D3D4E971130C7CFE007BA540 /* HTMLSummaryElement.h */; };
     4243                D3D4E973130C7CFE007BA540 /* HTMLSummaryElement.h in Headers */ = {isa = PBXBuildFile; fileRef = D3D4E971130C7CFE007BA540 /* HTMLSummaryElement.h */; settings = {ATTRIBUTES = (Private, ); }; };
    42444244                D3F3D3641A69B1900059FC2B /* JSWebGL2RenderingContext.h in Headers */ = {isa = PBXBuildFile; fileRef = D3F3D3621A69B1900059FC2B /* JSWebGL2RenderingContext.h */; };
    42454245                D3F3D3691A69B7B00059FC2B /* WebGLRenderingContextBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D3F3D35E1A69A5060059FC2B /* WebGLRenderingContextBase.cpp */; };
  • branches/safari-607-branch/Source/WebKit/ChangeLog

    r240060 r240062  
     12019-01-15  Alan Coon  <alancoon@apple.com>
     2
     3        Cherry-pick r239843. rdar://problem/47260277
     4
     5    REGRESSION (r237658): Tap highlight limits cause the highlight to no longer show with legitimate button sizes
     6    https://bugs.webkit.org/show_bug.cgi?id=193294
     7    <rdar://problem/46006678>
     8   
     9    Reviewed by Simon Fraser.
     10   
     11    Input type elements should always paint tap highlight (ignore size heuristic).
     12   
     13    * UIProcess/PageClient.h:
     14    * UIProcess/WebPageProxy.h:
     15    * UIProcess/WebPageProxy.messages.in:
     16    * UIProcess/ios/PageClientImplIOS.h:
     17    * UIProcess/ios/PageClientImplIOS.mm:
     18    (WebKit::PageClientImpl::didGetTapHighlightGeometries):
     19    * UIProcess/ios/WKContentViewInteraction.h:
     20    * UIProcess/ios/WKContentViewInteraction.mm:
     21    (-[WKContentView _showTapHighlight]):
     22    (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:nodeHasBuiltInClickHandling:]):
     23    (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]): Deleted.
     24    * UIProcess/ios/WebPageProxyIOS.mm:
     25    (WebKit::WebPageProxy::didGetTapHighlightGeometries):
     26    * WebProcess/WebPage/ios/WebPageIOS.mm:
     27    (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
     28   
     29    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239843 268f45cc-cd09-0410-ab3c-d52691b4dbfc
     30
     31    2019-01-10  Zalan Bujtas  <zalan@apple.com>
     32
     33            REGRESSION (r237658): Tap highlight limits cause the highlight to no longer show with legitimate button sizes
     34            https://bugs.webkit.org/show_bug.cgi?id=193294
     35            <rdar://problem/46006678>
     36
     37            Reviewed by Simon Fraser.
     38
     39            Input type elements should always paint tap highlight (ignore size heuristic).
     40
     41            * UIProcess/PageClient.h:
     42            * UIProcess/WebPageProxy.h:
     43            * UIProcess/WebPageProxy.messages.in:
     44            * UIProcess/ios/PageClientImplIOS.h:
     45            * UIProcess/ios/PageClientImplIOS.mm:
     46            (WebKit::PageClientImpl::didGetTapHighlightGeometries):
     47            * UIProcess/ios/WKContentViewInteraction.h:
     48            * UIProcess/ios/WKContentViewInteraction.mm:
     49            (-[WKContentView _showTapHighlight]):
     50            (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:nodeHasBuiltInClickHandling:]):
     51            (-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]): Deleted.
     52            * UIProcess/ios/WebPageProxyIOS.mm:
     53            (WebKit::WebPageProxy::didGetTapHighlightGeometries):
     54            * WebProcess/WebPage/ios/WebPageIOS.mm:
     55            (WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
     56
    1572019-01-15  Alan Coon  <alancoon@apple.com>
    258
  • branches/safari-607-branch/Source/WebKit/UIProcess/PageClient.h

    r239628 r240062  
    355355#if PLATFORM(IOS_FAMILY)
    356356    virtual void commitPotentialTapFailed() = 0;
    357     virtual void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color&, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius) = 0;
     357    virtual void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color&, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius, bool nodeHasBuiltInClickHandling) = 0;
    358358
    359359    virtual void didCommitLayerTree(const RemoteLayerTreeTransaction&) = 0;
  • branches/safari-607-branch/Source/WebKit/UIProcess/WebPageProxy.h

    r239809 r240062  
    17811781    void restorePageCenterAndScale(Optional<WebCore::FloatPoint>, double scale);
    17821782
    1783     void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& geometries, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius);
     1783    void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& geometries, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius, bool nodeHasBuiltInClickHandling);
    17841784
    17851785    void elementDidFocus(const FocusedElementInformation&, bool userIsInteracting, bool blurPreviousNode, bool changingActivityState, const UserData&);
  • branches/safari-607-branch/Source/WebKit/UIProcess/WebPageProxy.messages.in

    r239584 r240062  
    402402    RestorePageState(Optional<WebCore::FloatPoint> scrollPosition, WebCore::FloatPoint scrollOrigin, WebCore::RectEdges<float> obscuredInsetsOnSave, double scale)
    403403    RestorePageCenterAndScale(Optional<WebCore::FloatPoint> unobscuredCenter, double scale)
    404     DidGetTapHighlightGeometries(uint64_t requestID, WebCore::Color color, Vector<WebCore::FloatQuad> geometries, WebCore::IntSize topLeftRadius, WebCore::IntSize topRightRadius, WebCore::IntSize bottomLeftRadius, WebCore::IntSize bottomRightRadius)
     404    DidGetTapHighlightGeometries(uint64_t requestID, WebCore::Color color, Vector<WebCore::FloatQuad> geometries, WebCore::IntSize topLeftRadius, WebCore::IntSize topRightRadius, WebCore::IntSize bottomLeftRadius, WebCore::IntSize bottomRightRadius, bool nodeHasBuiltInClickHandling)
    405405
    406406    ElementDidFocus(struct WebKit::FocusedElementInformation information, bool userIsInteracting, bool blurPreviousNode, bool changingActivityState, WebKit::UserData userData)
  • branches/safari-607-branch/Source/WebKit/UIProcess/ios/PageClientImplIOS.h

    r239628 r240062  
    131131
    132132    void commitPotentialTapFailed() override;
    133     void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color&, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius) override;
     133    void didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color&, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius, bool nodeHasBuiltInClickHandling) override;
    134134
    135135    void didCommitLayerTree(const RemoteLayerTreeTransaction&) override;
  • branches/safari-607-branch/Source/WebKit/UIProcess/ios/PageClientImplIOS.mm

    r239628 r240062  
    480480}
    481481
    482 void PageClientImpl::didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius)
    483 {
    484     [m_contentView _didGetTapHighlightForRequest:requestID color:color quads:highlightedQuads topLeftRadius:topLeftRadius topRightRadius:topRightRadius bottomLeftRadius:bottomLeftRadius bottomRightRadius:bottomRightRadius];
     482void PageClientImpl::didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius, bool nodeHasBuiltInClickHandling)
     483{
     484    [m_contentView _didGetTapHighlightForRequest:requestID color:color quads:highlightedQuads topLeftRadius:topLeftRadius topRightRadius:topRightRadius bottomLeftRadius:bottomLeftRadius bottomRightRadius:bottomRightRadius nodeHasBuiltInClickHandling:nodeHasBuiltInClickHandling];
    485485}
    486486
  • branches/safari-607-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.h

    r239628 r240062  
    243243    uint64_t _latestTapID;
    244244    struct TapHighlightInformation {
     245        BOOL nodeHasBuiltInClickHandling { false };
    245246        WebCore::Color color;
    246247        Vector<WebCore::FloatQuad> quads;
    … …  
    382383- (void)_didNotHandleTapAsClick:(const WebCore::IntPoint&)point;
    383384- (void)_didCompleteSyntheticClick;
    384 - (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&)color quads:(const Vector<WebCore::FloatQuad>&)highlightedQuads topLeftRadius:(const WebCore::IntSize&)topLeftRadius topRightRadius:(const WebCore::IntSize&)topRightRadius bottomLeftRadius:(const WebCore::IntSize&)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&)bottomRightRadius;
     385- (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&)color quads:(const Vector<WebCore::FloatQuad>&)highlightedQuads topLeftRadius:(const WebCore::IntSize&)topLeftRadius topRightRadius:(const WebCore::IntSize&)topRightRadius bottomLeftRadius:(const WebCore::IntSize&)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&)bottomRightRadius nodeHasBuiltInClickHandling:(BOOL)nodeHasBuiltInClickHandling;
    385386
    386387- (BOOL)_mayDisableDoubleTapGesturesDuringSingleTap;
  • branches/safari-607-branch/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm

    r239629 r240062  
    12751275        return NO;
    12761276#else
     1277        if (_tapHighlightInformation.nodeHasBuiltInClickHandling)
     1278            return true;
     1279
    12771280        static const float highlightPaintThreshold = 0.3; // 30%
    12781281        float highlightArea = 0;
    … …  
    13011304}
    13021305
    1303 - (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&)color quads:(const Vector<WebCore::FloatQuad>&)highlightedQuads topLeftRadius:(const WebCore::IntSize&)topLeftRadius topRightRadius:(const WebCore::IntSize&)topRightRadius bottomLeftRadius:(const WebCore::IntSize&)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&)bottomRightRadius
     1306- (void)_didGetTapHighlightForRequest:(uint64_t)requestID color:(const WebCore::Color&)color quads:(const Vector<WebCore::FloatQuad>&)highlightedQuads topLeftRadius:(const WebCore::IntSize&)topLeftRadius topRightRadius:(const WebCore::IntSize&)topRightRadius bottomLeftRadius:(const WebCore::IntSize&)bottomLeftRadius bottomRightRadius:(const WebCore::IntSize&)bottomRightRadius nodeHasBuiltInClickHandling:(BOOL)nodeHasBuiltInClickHandling
    13041307{
    13051308    if (!_isTapHighlightIDValid || _latestTapID != requestID)
    … …  
    13161319    _tapHighlightInformation.bottomLeftRadius = bottomLeftRadius;
    13171320    _tapHighlightInformation.bottomRightRadius = bottomRightRadius;
     1321    _tapHighlightInformation.nodeHasBuiltInClickHandling = nodeHasBuiltInClickHandling;
    13181322    if (_showDebugTapHighlightsForFastClicking)
    13191323        _tapHighlightInformation.color = [self _tapHighlightColorForFastClick:![_doubleTapGestureRecognizer isEnabled]];
  • branches/safari-607-branch/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm

    r239584 r240062  
    895895}
    896896
    897 void WebPageProxy::didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius)
    898 {
    899     pageClient().didGetTapHighlightGeometries(requestID, color, highlightedQuads, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius);
     897void WebPageProxy::didGetTapHighlightGeometries(uint64_t requestID, const WebCore::Color& color, const Vector<WebCore::FloatQuad>& highlightedQuads, const WebCore::IntSize& topLeftRadius, const WebCore::IntSize& topRightRadius, const WebCore::IntSize& bottomLeftRadius, const WebCore::IntSize& bottomRightRadius, bool nodeHasBuiltInClickHandling)
     898{
     899    pageClient().didGetTapHighlightGeometries(requestID, color, highlightedQuads, topLeftRadius, topRightRadius, bottomLeftRadius, bottomRightRadius, nodeHasBuiltInClickHandling);
    900900}
    901901
  • branches/safari-607-branch/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm

    r239590 r240062  
    8181#import <WebCore/HTMLImageElement.h>
    8282#import <WebCore/HTMLInputElement.h>
     83#import <WebCore/HTMLLabelElement.h>
    8384#import <WebCore/HTMLOptGroupElement.h>
    8485#import <WebCore/HTMLOptionElement.h>
    8586#import <WebCore/HTMLParserIdioms.h>
    8687#import <WebCore/HTMLSelectElement.h>
     88#import <WebCore/HTMLSummaryElement.h>
    8789#import <WebCore/HTMLTextAreaElement.h>
    8890#import <WebCore/HTMLTextFormControlElement.h>
    … …  
    726728            borderRadii = downcast<RenderBox>(*renderer).borderRadii();
    727729
    728         send(Messages::WebPageProxy::DidGetTapHighlightGeometries(requestID, highlightColor, quads, roundedIntSize(borderRadii.topLeft()), roundedIntSize(borderRadii.topRight()), roundedIntSize(borderRadii.bottomLeft()), roundedIntSize(borderRadii.bottomRight())));
     730        bool nodeHasBuiltInClickHandling = is<HTMLFormControlElement>(*node) || is<HTMLAnchorElement>(*node) || is<HTMLLabelElement>(*node) || is<HTMLSummaryElement>(*node) || node->isLink();
     731        send(Messages::WebPageProxy::DidGetTapHighlightGeometries(requestID, highlightColor, quads, roundedIntSize(borderRadii.topLeft()), roundedIntSize(borderRadii.topRight()), roundedIntSize(borderRadii.bottomLeft()), roundedIntSize(borderRadii.bottomRight()), nodeHasBuiltInClickHandling));
    729732    }
    730733#else
Note: See TracChangeset for help on using the changeset viewer.