[Webkit-unassigned] [Bug 163911] window.find does not scroll with overflow:auto content on mobile Safari

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Apr 27 03:36:19 PDT 2017


Frédéric Wang (:fredw) <fred.wang at free.fr> changed:

           What    |Removed                     |Added
                 CC|                            |thorton at apple.com

--- Comment #4 from Frédéric Wang (:fredw) <fred.wang at free.fr> ---
So I debugged a bit what is happening here. Basically, in WebKit2/WebProcess/WebPage/FindController.cpp, FindController::findString sets a special DoNotRevealSelection flag under IOS:

    // iOS will reveal the selection through a different mechanism, and
    // we need to avoid sending the non-painted selection change to the UI process
    // so that it does not clear the selection out from under us.
    coreOptions = static_cast<FindOptions>(coreOptions | DoNotRevealSelection);

As a consequence, Editor::findString will skip the call to FrameSelection::revealSelection where the actual scrolling request is performed:

        if (RenderLayer* layer = start.deprecatedNode()->renderer()->enclosingLayer()) {
            if (!m_scrollingSuppressCount) {
                layer->scrollRectToVisible(revealMode, rect, insideFixed, alignment, alignment);
                if (m_frame->page())

If we force the call to FrameSelection::revealSelection then the scrolling happens as expected.

Note that this behavior was added in bug 131510.

You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170427/082d31e5/attachment-0001.html>

More information about the webkit-unassigned mailing list