WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
221226
Add scaffolding to request image extraction after a delay when hovering over images
https://bugs.webkit.org/show_bug.cgi?id=221226
Summary
Add scaffolding to request image extraction after a delay when hovering over ...
Wenson Hsieh
Reported
2021-02-01 14:00:24 PST
More work towards image extraction (accessibility).
Attachments
Patch
(20.01 KB, patch)
2021-02-01 14:51 PST
,
Wenson Hsieh
hi
: review+
Details
Formatted Diff
Diff
Patch
(20.10 KB, patch)
2021-02-02 11:56 PST
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2021-02-01 14:51:28 PST
Created
attachment 418930
[details]
Patch
Devin Rousso
Comment 2
2021-02-01 17:51:30 PST
Comment on
attachment 418930
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=418930&action=review
> Source/WebKit/WebProcess/WebPage/WebPage.cpp:7141 > + m_elementsWithExtractedImages.add(element);
When are items removed (other than page navigation)? What would happen if I hover over the same element twice?
Wenson Hsieh
Comment 3
2021-02-01 18:01:44 PST
(In reply to Devin Rousso from
comment #2
)
> Comment on
attachment 418930
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=418930&action=review
> > > Source/WebKit/WebProcess/WebPage/WebPage.cpp:7141 > > + m_elementsWithExtractedImages.add(element); > > When are items removed (other than page navigation)? What would happen if I > hover over the same element twice?
This is answered in the ChangeLog (essentially, we won't attempt to re-request image extraction when hovering over an element again).
Devin Rousso
Comment 4
2021-02-02 10:25:05 PST
Comment on
attachment 418930
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=418930&action=review
r=me
> Source/WebCore/page/EventHandler.cpp:1884 > + if (m_imageExtractionTimer.isActive()) > + m_imageExtractionTimer.restart();
As we discussed offline, we should probably not start the timer for synthetic mouse events (such as on iOS).
> Source/WebCore/page/EventHandler.cpp:2515 > + if (targetElement && is<RenderImage>(targetElement->renderer()))
NIT: i usually prefer to use member variables instead of parameters once the parameter is assigned to the member variable.
>>> Source/WebKit/WebProcess/WebPage/WebPage.cpp:7141 >>> + m_elementsWithExtractedImages.add(element); >> >> When are items removed (other than page navigation)? What would happen if I hover over the same element twice? > > This is answered in the ChangeLog (essentially, we won't attempt to re-request image extraction when hovering over an element again).
My apologies I totally missed that 😅
Wenson Hsieh
Comment 5
2021-02-02 11:03:40 PST
Comment on
attachment 418930
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=418930&action=review
Thanks for the review!
>> Source/WebCore/page/EventHandler.cpp:1884 >> + m_imageExtractionTimer.restart(); > > As we discussed offline, we should probably not start the timer for synthetic mouse events (such as on iOS).
👍🏻 Will guard the two timer activations with checks for `syntheticClickType() == NoTap`.
>> Source/WebCore/page/EventHandler.cpp:2515 >> + if (targetElement && is<RenderImage>(targetElement->renderer())) > > NIT: i usually prefer to use member variables instead of parameters once the parameter is assigned to the member variable.
Sounds good — changed to check `m_elementUnderMouse` instead.
Wenson Hsieh
Comment 6
2021-02-02 11:56:48 PST
Created
attachment 419043
[details]
Patch
EWS
Comment 7
2021-02-02 14:25:39 PST
Committed
r272236
: <
https://trac.webkit.org/changeset/272236
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 419043
[details]
.
Radar WebKit Bug Importer
Comment 8
2021-02-02 14:26:15 PST
<
rdar://problem/73898785
>
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