Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Computed display of form inside table elements should be display:none
https://bugs.webkit.org/show_bug.cgi?id=252541 rdar://problem/105932450 Reviewed by Tim Nguyen. This patch is to align WebKit with Blink / Chromium and Gecko / Firefox and web-specification. Web-Spec: https://html.spec.whatwg.org/multipage/rendering.html#tables-2 The patch adds UA stylesheet rule as expected from the web-specification to change display type of form inside table elements to "display: none" by introducing internal pseudo class ':-internal-html-document'. * Source/WebCore/css/html.css: Add new UA rules for form in tables * Source/WebCore/css/CSSSelector.h: New Pseudo class 'PseudoClassHtmlDocument' * Source/WebCore/css/CSSSelector.cpp: (CSSSelector::selectorText): As above to translate in ':-internal-html-document' * Source/WebCore/css/SelectorChecker.cpp: (SelectorChecker::checkOne): Add case for 'PseudoClassHtmlDocument' * Source/WebCore/css/SelectorCheckerTestFunctions.h: New bool function 'matchesHtmlDocumentPseudoClass' to return 'HTML' document * Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in: Add '-internal-html-document' in list * Source/WebCore/cssjit/SelectorCompiler.cpp: Add in namespace similar to other (operationMatchesIsHtmlPseudoClass): New function to return 'matchesHtmlDocumentPseudoClass' (addPseudoClassType): Add new case 'PseudoClassHtmlDocument' * Source/WebCore/html/HTMLFormElement.cpp: (HTMLFormElement::rendererIsNeeded): Deleted hardcoded logic of forms in table layout (copyNonAttributePropertiesFromElement): Deleted * Source/WebCore/html/HTMLFormElement.h: Deleted unused definition after above changes * Source/WebCore/css/parser/CSSSelectorParser.cpp: (CSSSelectorParser::consumePseudo): Restrict exposing internal pseudo class to web * Source/WebCore/html/parser/HTMLConstructionSite.cpp: (HTMLConstructionSite::insertHTMLFormElement): Remove 'isDemoted' and usage * Source/WebCore/html/parser/HTMLConstructionSite.h: Remove 'isDemoted' from definition * Source/WebCore/html/parser/HTMLTreeBuilder.cpp: (HTMLTreeBuilder::processStartTagForInTable): Update since 'isDemoted' is now gone * LayoutTests/fast/css/pseudo-class-internal.html: Update for new internal pseudo class * LayoutTests/fast/css/pseudo-class-internal-expected.txt" Update Expectations for above * LayoutTests/imported/w3c/web-platform-tests/html/rendering/non-replaced-elements/tables/form-in-tables-expected.txt: Rebaselined Canonical link: https://commits.webkit.org/265283@main
- Loading branch information
1 parent
1756a62
commit 78b5405
Showing
16 changed files
with
47 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 10 additions & 10 deletions
20
...eb-platform-tests/html/rendering/non-replaced-elements/tables/form-in-tables-expected.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
|
||
FAIL Computed display of form inside TABLE should be 'none' assert_equals: expected "none" but got "block" | ||
FAIL Computed display of form inside THEAD should be 'none' assert_equals: expected "none" but got "block" | ||
FAIL Computed display of form inside TBODY should be 'none' assert_equals: expected "none" but got "block" | ||
FAIL Computed display of form inside TFOOT should be 'none' assert_equals: expected "none" but got "block" | ||
FAIL Computed display of form inside TR should be 'none' assert_equals: expected "none" but got "block" | ||
FAIL Computed display of form inside TABLE should be 'none' (!important UA style)) assert_equals: expected "none" but got "block" | ||
FAIL Computed display of form inside THEAD should be 'none' (!important UA style)) assert_equals: expected "none" but got "block" | ||
FAIL Computed display of form inside TBODY should be 'none' (!important UA style)) assert_equals: expected "none" but got "block" | ||
FAIL Computed display of form inside TFOOT should be 'none' (!important UA style)) assert_equals: expected "none" but got "block" | ||
FAIL Computed display of form inside TR should be 'none' (!important UA style)) assert_equals: expected "none" but got "block" | ||
PASS Computed display of form inside TABLE should be 'none' | ||
PASS Computed display of form inside THEAD should be 'none' | ||
PASS Computed display of form inside TBODY should be 'none' | ||
PASS Computed display of form inside TFOOT should be 'none' | ||
PASS Computed display of form inside TR should be 'none' | ||
PASS Computed display of form inside TABLE should be 'none' (!important UA style)) | ||
PASS Computed display of form inside THEAD should be 'none' (!important UA style)) | ||
PASS Computed display of form inside TBODY should be 'none' (!important UA style)) | ||
PASS Computed display of form inside TFOOT should be 'none' (!important UA style)) | ||
PASS Computed display of form inside TR should be 'none' (!important UA style)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
Source/WebCore/css/SelectorPseudoClassAndCompatibilityElementMap.in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters