[webkit-reviews] review requested: [Bug 180086] Alternative Presentation Button: Improve substitution heuristic : [Attachment 328136] Patch and layout test

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Dec 1 12:46:12 PST 2017

Daniel Bates <dbates at webkit.org> has asked  for review:
Bug 180086: Alternative Presentation Button: Improve substitution heuristic

Attachment 328136: Patch and layout test


--- Comment #10 from Daniel Bates <dbates at webkit.org> ---
Created attachment 328136

  --> https://bugs.webkit.org/attachment.cgi?id=328136&action=review

Patch and layout test

We likely can simplify the logic for picking the element for alternative
presentation in Editor::substituteWithAlternativePresentationButton(),
including removing the need to expose Element::canAttachAuthorShadowRoot(). We
are still iterating on the algorithm and I want to avoid a programmer error of
inadvertently whitelisting an element that can have an author shadow root. Once
we finalize the algorithm we will be in a position to determine whether it is
necessary to expose Element::canAttachAuthorShadowRoot() to catch such errors.
I added more test cases to
LayoutTests/fast/forms/alternative-presentation-button/replacement.html and
expect the EWS to fail this test. Will grab results from EWS and update patch.

More information about the webkit-reviews mailing list