WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
226775
[iOS] Safari tab pill should toggle visibility when tapping on article text on adventure.com
https://bugs.webkit.org/show_bug.cgi?id=226775
Summary
[iOS] Safari tab pill should toggle visibility when tapping on article text o...
Wenson Hsieh
Reported
2021-06-08 12:38:16 PDT
rdar://78826820
Attachments
Patch
(13.78 KB, patch)
2021-06-08 12:46 PDT
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
Small adjustment
(13.83 KB, patch)
2021-06-08 13:45 PDT
,
Wenson Hsieh
thorton
: review+
Details
Formatted Diff
Diff
Patch for landing
(13.84 KB, patch)
2021-06-08 14:23 PDT
,
Wenson Hsieh
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Wenson Hsieh
Comment 1
2021-06-08 12:46:01 PDT
Comment hidden (obsolete)
Created
attachment 430877
[details]
Patch
Wenson Hsieh
Comment 2
2021-06-08 13:45:39 PDT
Created
attachment 430885
[details]
Small adjustment
Devin Rousso
Comment 3
2021-06-08 13:53:49 PDT
Comment on
attachment 430885
[details]
Small adjustment View in context:
https://bugs.webkit.org/attachment.cgi?id=430885&action=review
r=me as well :)
> Source/WebKit/ChangeLog:9 > + Adjust the meaningful click heuristic to account for click event listeners added to the document node. See below
Do we also want to consider if the event listener was added to the `document.documentElement` or `window`?
> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:845 > + if (is<HTMLBodyElement>(clickNode) || clickNode.isDocumentNode())
NIT: `is<Document>(clickNode)`
> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1700 > + auto frame = makeRefPtr(node.document().frame());
Is it actually necessary/desirable to keep `frame` alive for the lifetime of this function? My understanding of the "rules" regarding this is that since `Frame::view` is a simple getter it's not necessary to keep the `frame` alive (this is also true for `FrameDestructionObserver::frame`).
> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1735 > + auto frame = makeRefPtr(node.document().frame());
ditto (:1700)
> LayoutTests/fast/events/ios/non-meaningful-click-when-tapping-document.html:6 > +body, html {
NIT: Is this actually necessary?
Wenson Hsieh
Comment 4
2021-06-08 14:22:02 PDT
Comment on
attachment 430885
[details]
Small adjustment View in context:
https://bugs.webkit.org/attachment.cgi?id=430885&action=review
>> Source/WebKit/ChangeLog:9 >> + Adjust the meaningful click heuristic to account for click event listeners added to the document node. See below > > Do we also want to consider if the event listener was added to the `document.documentElement` or `window`?
Good point — I'll a check for the documentElement(). However, we don't seem to dispatch synthetic clicks in the case where the click event listener is added on `window`...
>> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:845 >> + if (is<HTMLBodyElement>(clickNode) || clickNode.isDocumentNode()) > > NIT: `is<Document>(clickNode)`
Sure.
>> Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm:1700 >> + auto frame = makeRefPtr(node.document().frame()); > > Is it actually necessary/desirable to keep `frame` alive for the lifetime of this function? My understanding of the "rules" regarding this is that since `Frame::view` is a simple getter it's not necessary to keep the `frame` alive (this is also true for `FrameDestructionObserver::frame`).
My understanding is that it's considered better practice to use smart pointers to hold on to RefCounted objects in local variables, even if it's only being called with trivial getters.
>> LayoutTests/fast/events/ios/non-meaningful-click-when-tapping-document.html:6 >> +body, html { > > NIT: Is this actually necessary?
Not all of them - just width and height. I'll remove the other properties, I suppose.
Wenson Hsieh
Comment 5
2021-06-08 14:23:01 PDT
Created
attachment 430891
[details]
Patch for landing
EWS
Comment 6
2021-06-08 16:30:29 PDT
Committed
r278633
(
238616@main
): <
https://commits.webkit.org/238616@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 430891
[details]
.
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