WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
183889
[iOS] Make the Find UI better estimate the obscured area when revealing highlighted text
https://bugs.webkit.org/show_bug.cgi?id=183889
Summary
[iOS] Make the Find UI better estimate the obscured area when revealing highl...
Frédéric Wang (:fredw)
Reported
2018-03-21 23:28:49 PDT
In
bug 183658
, I landed a quick workaround to prevent the NBC news header from overlapping highlighted text result. Basically, we now just center the result in the viewport. However, there is probably a better way to estimate the obscured area via adjustScrollStepForFixedContent.
Attachments
Testcase (main frame)
(10.37 KB, text/html)
2018-03-28 07:49 PDT
,
Frédéric Wang (:fredw)
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Frédéric Wang (:fredw)
Comment 1
2018-03-21 23:36:40 PDT
Sorry, I had forgotten to set a title.
Frédéric Wang (:fredw)
Comment 2
2018-03-27 04:24:08 PDT
I took a look into this. As I understand the logic of adjustScrollStepForFixedContent is to check if some fixed opaque content covers the full width at the top/bottom of the frame so that vertical page scroll can be adjusted appropriately on macOS. I guess we can re-use this logic but we have couple differences here. First since fixed content is relative to parent subframe, adjusting the page scroll of "overflow: auto" node does not seem to work in general (we would have to scroll the parent subframe to make the overflow node visible). Second, I'm not exactly sure page scroll makes sense on iOS and anyway here it's not page scroll but "scroll to reveal match" which ends up at scrollRectToVisible. Finally, in the AMP use case of
bug 183658
, the frame area is essentially the same as the "overflow: auto" area so we could apply the same logic but I wonder whether we should rather focus on making frame scrollable on iOS (
bug 149264
) in order to address these kinds of use case of "scrollable page with fixed-positioned header/footer".
Frédéric Wang (:fredw)
Comment 3
2018-03-28 07:49:05 PDT
Created
attachment 336658
[details]
Testcase (main frame) This is a testcase with the main frame. As I see: * For Ctrl+F: * On macOS, the text is revealed without scrolling the result away from the "position: fixed" overlay (so similar to iOS before
bug 183658
). * On iOS, the result is revealed at the center (so consistent with what is now done for overflow node after
bug 183658
) * For PageUp/PageDown: * On macOS, the header/footer are taken into account in adjustScrollStepForFixedContent to calculate the page step value. * On iOS, it's not clear to me. The scroll is initiated in the UI process while FrameView::adjustScrollStepForFixedContent (or even ScrollArea::scroll) is not called in the Web process.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug