DescriptionText control elements should contain all (shadow DOM) children.
For instance, INPUT type="search" elements allow styling of the cancel button,
via a ::-webkit-search-cancel-button pseudo element selector. We don't want authors
to be able to escape the containing INPUT element by styling the cancel button as
position:absolute, etc.
Force INPUT and other text control elements to be in the containing block chain of
all its descendants. This should be a good idea in general (and at least harmless),
and there's also C++ code [1] that essentially assumes that it is so.
Since this change makes canContainFixedPositionObjects() in LayoutObject and
ComputedStyle even more different than they used to be, we need to change some
code from using the one in ComputedStyle to the one in LayoutObject.
Two existing tests in fast/forms/ had to be updated, since they were adding together
offsetLeft of an INPUT element and offsetLeft of something inside the INPUT element
in a way that used to work by accident. Use getBoundingClientRect() instead, since
the test ultimately wants absolute coordinates anyway.
[1] See ThemePainterDefault::paintSearchFieldCancelButton()
BUG=685527
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Review-Url: https://codereview.chromium.org/2733593002
Cr-Commit-Position: refs/heads/master@{#455644}
Committed: https://chromium.googlesource.com/chromium/src/+/8f4b7a0506f076b26b76dd6aaf624860a6d3fda1
Patch Set 1 #Patch Set 2 : rebase master #Patch Set 3 : Element::userAgentShadowRoot() fails when the shadow root isn't user agent instead of returning nul… #Patch Set 4 : See if this gets rid of all the assertion failures. #Patch Set 5 : Use getBoundingClientRect() rather than trying to get it right by adding offsetLeft values. #Patch Set 6 : Non-LayoutBlock transformed objects are not fixed-descendants containers. #Patch Set 7 : Improve documentation. #Messages
Total messages: 34 (27 generated)
|