Bug 180381 - Alternative Presentation Button: No need to unapply shadow DOM substitution when removed by page
Summary: Alternative Presentation Button: No need to unapply shadow DOM substitution w...
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Local Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Daniel Bates
URL:
Keywords: InRadar
Depends on:
Blocks: 180086
  Show dependency treegraph
 
Reported: 2017-12-04 15:17 PST by Daniel Bates
Modified: 2017-12-06 13:49 PST (History)
2 users (show)

See Also:


Attachments
Patch and layout test (11.62 KB, patch)
2017-12-04 15:58 PST, Daniel Bates
bfulgham: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Bates 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).
Comment 1 Radar WebKit Bug Importer 2017-12-04 15:21:50 PST
<rdar://problem/35841099>
Comment 2 Daniel Bates 2017-12-04 15:58:23 PST
Created attachment 328401 [details]
Patch and layout test
Comment 3 Brent Fulgham 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.
Comment 4 Daniel Bates 2017-12-06 13:49:42 PST
The approach for the alternative presentation button has since changed. This bug is no longer applicable.