Commit 367e0ced authored by Koji Ishii's avatar Koji Ishii Committed by Commit Bot

[LayoutNG] Force legacy layout for fieldset elements

This is one missed LayoutBlockFlow-derived class that were
not handled yet, either by implementing LayoutNG counterpart
or by forcing legacy.

This isn't a big class, but since most form controls forces
legacy at its cloest BFC ancestor, it's reasonable to handle
when we support form controls.

Bug: 635619
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I9a9bb1788e9fe8367d6ce8d9439aae3f243335de
Reviewed-on: https://chromium-review.googlesource.com/1122028Reviewed-by: default avatarIan Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Koji Ishii <kojii@chromium.org>
Cr-Commit-Position: refs/heads/master@{#571875}
parent 91ca88a0
......@@ -431,7 +431,6 @@ crbug.com/591099 fast/events/select-element.html [ Failure ]
crbug.com/591099 fast/events/touch/compositor-touch-hit-rects.html [ Failure ]
crbug.com/591099 fast/events/wheel/mainthread-touchpad-fling-latching.html [ Pass ]
crbug.com/591099 fast/events/wheel/wheel-scroll-latching-on-scrollbar.html [ Pass ]
crbug.com/591099 fast/forms/fieldset/fieldset-with-float.html [ Failure ]
crbug.com/591099 fast/forms/form-hides-table.html [ Failure ]
crbug.com/591099 fast/forms/select/select-initial-position.html [ Failure ]
crbug.com/591099 fast/forms/select/select-style.html [ Failure ]
......
Use descendant invalidation set for :disabled fieldset.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS getComputedStyle(fieldset, '').backgroundColor is transparent
PASS internals.updateStyleAndReturnAffectedElementCount() is 2
PASS getComputedStyle(fieldset, '').backgroundColor is green
PASS successfullyParsed is true
TEST COMPLETE
......@@ -5,9 +5,9 @@ layer at (0,0) size 800x600
LayoutNGBlockFlow {BODY} at (8,8) size 784x584
LayoutNGBlockFlow {DIV} at (0,0) size 784x75.59 [border: (5px solid #000000)]
LayoutFieldset {FIELDSET} at (7,5) size 770x65.59 [border: (10px groove #FF0000)]
LayoutNGBlockFlow {LEGEND} at (42,0) size 122x20
LayoutBlockFlow {LEGEND} at (42,0) size 122x20
LayoutText {#text} at (2,0) size 118x19
text run at (2,0) width 118: "Test without forms"
LayoutNGBlockFlow {DIV} at (22,25.59) size 726x20
LayoutText {#text} at (0,0) size 275x19
text run at (0,0) width 275: "A DIV inside a fieldset, not related to forms"
LayoutBlockFlow {DIV} at (22,25.59) size 726x20
LayoutText {#text} at (0,0) size 276x19
text run at (0,0) width 276: "A DIV inside a fieldset, not related to forms"
......@@ -4,22 +4,22 @@ layer at (0,0) size 800x600
LayoutNGBlockFlow {HTML} at (0,0) size 800x600
LayoutNGBlockFlow {BODY} at (8,8) size 784x584
LayoutFieldset {FIELDSET} at (2,0) size 115x77.59 [border: (2px groove #C0C0C0)]
LayoutNGBlockFlow {LEGEND} at (14,0) size 87x20
LayoutBlockFlow {LEGEND} at (14,0) size 87x20
LayoutText {#text} at (2,0) size 83x19
text run at (2,0) width 83: "Number One"
LayoutNGBlockFlow (anonymous) at (14,25.59) size 87x40
LayoutBlockFlow (anonymous) at (14,25.59) size 87x40
LayoutText {#text} at (0,0) size 80x19
text run at (0,0) width 80: "Hello world."
LayoutBR {BR} at (80,0) size 0x0
LayoutBR {BR} at (80,15) size 0x0
LayoutText {#text} at (0,20) size 80x19
text run at (0,20) width 80: "Hello world."
LayoutText {#text} at (119,45) size 4x20
text run at (119,45) width 4: " "
LayoutFieldset {FIELDSET} at (125,20) size 117x57.59 [border: (2px groove #C0C0C0)]
LayoutNGBlockFlow {LEGEND} at (14,0) size 89x20
LayoutBlockFlow {LEGEND} at (14,0) size 89x20
LayoutText {#text} at (2,0) size 85x19
text run at (2,0) width 85: "Number Two"
LayoutNGBlockFlow (anonymous) at (14,25.59) size 89x20
LayoutBlockFlow (anonymous) at (14,25.59) size 89x20
LayoutText {#text} at (0,0) size 80x19
text run at (0,0) width 80: "Hello world."
LayoutText {#text} at (0,0) size 0x0
......@@ -12,10 +12,10 @@ layer at (48,38) size 722x542 layerType: foreground only
LayoutNGBlockFlow (positioned) {body} at (48,38) size 722x542 [border: (1px solid #000000)]
LayoutNGBlockFlow {form} at (1,1) size 720x129.59
LayoutFieldset {fieldset} at (2,0) size 716x129.59 [border: (2px groove #C0C0C0)]
LayoutNGBlockFlow {legend} at (14,0) size 87x20
LayoutText {#text} at (2,0) size 83x19
text run at (2,0) width 83: "HTML Form"
LayoutNGBlockFlow {p} at (14,41.59) size 688x22
LayoutBlockFlow {legend} at (14,0) size 88x20
LayoutText {#text} at (2,0) size 84x19
text run at (2,0) width 84: "HTML Form"
LayoutBlockFlow {p} at (14,41.59) size 688x22
LayoutInline {label} at (0,0) size 107x19
LayoutText {#text} at (0,1) size 107x19
text run at (0,1) width 107: "Enter something:"
......@@ -23,9 +23,9 @@ layer at (48,38) size 722x542 layerType: foreground only
text run at (107,1) width 4: " "
LayoutTextControl {input} at (111,0) size 181x22 [bgcolor=#FFFFFF] [border: (2px inset #EEEEEE)]
LayoutText {#text} at (0,0) size 0x0
LayoutNGBlockFlow {p} at (14,79.59) size 688x22
LayoutBlockFlow {p} at (14,79.59) size 688x22
LayoutButton {button} at (0,0) size 68x22 [bgcolor=#C0C0C0] [border: (2px outset #C0C0C0)]
LayoutNGBlockFlow (anonymous) at (8,3) size 52x16
LayoutBlockFlow (anonymous) at (8,3) size 52x16
LayoutText {#text} at (0,0) size 52x16
text run at (0,0) width 52: "Activate!"
layer at (178,84) size 177x16
......
......@@ -48,6 +48,7 @@ class CORE_EXPORT HTMLFieldSetElement final : public HTMLFormControlElement {
bool IsEnumeratable() const override { return true; }
bool SupportsFocus() const override;
LayoutObject* CreateLayoutObject(const ComputedStyle&) override;
bool ShouldForceLegacyLayout() const final { return true; }
const AtomicString& FormControlType() const override;
bool RecalcWillValidate() const override { return false; }
int tabIndex() const final;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment