Bug 184255 - Revealing find results fails in pages containing more than one subframe
Summary: Revealing find results fails in pages containing more than one subframe
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Frames (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-04-02 23:20 PDT by Frédéric Wang (:fredw)
Modified: 2018-11-12 15:15 PST (History)
5 users (show)

See Also:


Attachments
testcase (1.38 KB, text/html)
2018-04-02 23:20 PDT, Frédéric Wang (:fredw)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frédéric Wang (:fredw) 2018-04-02 23:20:50 PDT
Created attachment 337061 [details]
testcase

Attached testcase is similar to attachment 312006 [details] but using subframes instead of "overflow: auto" nodes.

If you find "text" with the Find UI, the result will be highlighted in that order: 
* Main frame: text5a, text5b, text5c, text10a text10b text10c
* Subframe 1: text1a, text1b, text1c, ... text4a, text4b, text4c
* Subframe 2: text6a, text6b, text6c, ... text9a text9b text9c

Some remarks:
- The result from the main frame are returned first. Although this is different from "overflow: auto" node, it is the same behavior as on desktop and other browsers.
- Scrolling and smart magnification work for the main frame and the first subframe.

For the second subframe, text6a, text6b, text6c, ... text9a text9b text9c are highlighted as expected BUT the scrolling / magnification reveals the *first* subframe (you can scroll down to check that the expected text is highlighted).
Comment 1 Radar WebKit Bug Importer 2018-04-02 23:21:11 PDT
<rdar://problem/39132221>
Comment 2 Simon Fraser (smfr) 2018-11-12 14:57:45 PST
Relevant stack trace:

  * frame #0: 0x0000000319330158 WebCore`WebCore::FrameSelection::revealSelection(this=0x0000000341628c60, revealMode=RevealUpToMainFrame, alignment=0x000000031bf29608, revealExtentOption=DoNotRevealExtent) at FrameSelection.cpp:2366
    frame #1: 0x0000000308bda05a WebKit`WebKit::FindController::didFindString(this=0x00007f8cf8001770) at FindControllerIOS.mm:165
    frame #2: 0x0000000308f028bb WebKit`WebKit::FindController::findString(this=0x00007f8cf8001770, string={ length = 4, contents = 'text' }, options=343, maxMatchCount=100) at FindController.cpp:237
    frame #3: 0x000000030900e089 WebKit`WebKit::WebPage::findString(this=0x00007f8cfd000008, string={ length = 4, contents = 'text' }, options=343, maxMatchCount=100) at WebPage.cpp:3790