Bug 180381

Summary: Alternative Presentation Button: No need to unapply shadow DOM substitution when removed by page
Product: WebKit Reporter: Daniel Bates <dbates>
Component: WebCore Misc.Assignee: Daniel Bates <dbates>
Status: RESOLVED INVALID    
Severity: Normal CC: bfulgham, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 180086    
Attachments:
Description Flags
Patch and layout test bfulgham: review+

Daniel Bates
Reported 2017-12-04 15:17:38 PST
Currently we unapply the alternative presentation button substitution whenever the associated Alternative Presentation Button is removed. We should only unapply the substitution when the Alternative Presentation Button is removed via SPI. Otherwise, we will cause the assertion NoEventDispatchAssertion::InMainThread::isEventDispatchAllowedInSubtree(child) to fail in WebCore::dispatchChildRemovalEvents() when unapplying the substitution for an <input> (since unapplying the substitution for an <input> changes its input type => destroys and creates a new shadow subtree).
Attachments
Patch and layout test (11.62 KB, patch)
2017-12-04 15:58 PST, Daniel Bates
bfulgham: review+
Radar WebKit Bug Importer
Comment 1 2017-12-04 15:21:50 PST
Daniel Bates
Comment 2 2017-12-04 15:58:23 PST
Created attachment 328401 [details] Patch and layout test
Brent Fulgham
Comment 3 2017-12-06 13:48:31 PST
Comment on attachment 328401 [details] Patch and layout test View in context: https://bugs.webkit.org/attachment.cgi?id=328401&action=review > Source/WebCore/editing/cocoa/AlternativePresentationButtonSubstitution.h:47 > + void unapply(bool fromAPI); This would be better with an enum, but I'm fine with this as-is.
Daniel Bates
Comment 4 2017-12-06 13:49:42 PST
The approach for the alternative presentation button has since changed. This bug is no longer applicable.
Note You need to log in before you can comment on or make changes to this bug.