Changeset 250779 in webkit


Ignore:
Timestamp:
Oct 7, 2019 11:37:37 AM (5 years ago)
Author:
commit-queue@webkit.org
Message:

foundStringMatchIndex in FindController::findString gets reset on page scroll
https://bugs.webkit.org/show_bug.cgi?id=201773
<rdar://problem/55351892>

Patch by Matt Mokary <mmokary@apple.com> on 2019-10-07
Reviewed by Tim Horton.

Decouple hiding of the find indicator from resetting match index, and only reset match index when there is not
an active match.

  • WebProcess/WebPage/FindController.cpp:

(WebKit::FindController::updateFindUIAfterPageScroll):
(WebKit::FindController::hideFindUI):
(WebKit::FindController::hideFindIndicator):
(WebKit::FindController::resetMatchIndex):

  • WebProcess/WebPage/FindController.h:
  • WebProcess/WebPage/ios/FindControllerIOS.mm:

(WebKit::FindController::hideFindIndicator):
(WebKit::FindController::resetMatchIndex):

Location:
trunk/Source/WebKit
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r250773 r250779  
     12019-10-07  Matt Mokary  <mmokary@apple.com>
     2
     3        foundStringMatchIndex in FindController::findString gets reset on page scroll
     4        https://bugs.webkit.org/show_bug.cgi?id=201773
     5        <rdar://problem/55351892>
     6
     7        Reviewed by Tim Horton.
     8
     9        Decouple hiding of the find indicator from resetting match index, and only reset match index when there is not
     10        an active match.
     11
     12        * WebProcess/WebPage/FindController.cpp:
     13        (WebKit::FindController::updateFindUIAfterPageScroll):
     14        (WebKit::FindController::hideFindUI):
     15        (WebKit::FindController::hideFindIndicator):
     16        (WebKit::FindController::resetMatchIndex):
     17        * WebProcess/WebPage/FindController.h:
     18        * WebProcess/WebPage/ios/FindControllerIOS.mm:
     19        (WebKit::FindController::hideFindIndicator):
     20        (WebKit::FindController::resetMatchIndex):
     21
    1222019-10-07  youenn fablet  <youenn@apple.com>
    223
  • trunk/Source/WebKit/WebProcess/WebPage/FindController.cpp

    r249921 r250779  
    147147
    148148        hideFindIndicator();
     149        resetMatchIndex();
    149150        didFailToFindString();
    150151
     
    370371   
    371372    hideFindIndicator();
     373    resetMatchIndex();
    372374}
    373375
     
    396398    m_webPage->send(Messages::WebPageProxy::ClearTextIndicator());
    397399    m_isShowingFindIndicator = false;
     400    didHideFindIndicator();
     401}
     402
     403void FindController::resetMatchIndex()
     404{
    398405    m_foundStringMatchIndex = -1;
    399     didHideFindIndicator();
    400406}
    401407
  • trunk/Source/WebKit/WebProcess/WebPage/FindController.h

    r248762 r250779  
    6767   
    6868    void hideFindIndicator();
     69    void resetMatchIndex();
    6970    void showFindIndicatorInSelection();
    7071
  • trunk/Source/WebKit/WebProcess/WebPage/ios/FindControllerIOS.mm

    r248846 r250779  
    129129    m_findIndicatorOverlay = nullptr;
    130130    m_isShowingFindIndicator = false;
     131    didHideFindIndicator();
     132}
     133
     134void FindController::resetMatchIndex()
     135{
    131136    m_foundStringMatchIndex = -1;
    132     didHideFindIndicator();
    133137}
    134138
Note: See TracChangeset for help on using the changeset viewer.