WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
Patch
bug-224930-20210615175924.patch (text/plain), 8.38 KB, created by
Tim Nguyen (:ntim)
on 2021-06-15 08:59:25 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tim Nguyen (:ntim)
Created:
2021-06-15 08:59:25 PDT
Size:
8.38 KB
patch
obsolete
>Subversion Revision: 278824 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 358ca230f2fe16f21163e7ef0b12f6de521c9ec4..7af0d88097f1e4ed1b2bf5459513faf8cae3cfeb 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,24 @@ >+2021-06-14 Tim Nguyen <ntim@apple.com> >+ >+ Make CSS.supports() return false for internal CSS properties >+ https://bugs.webkit.org/show_bug.cgi?id=224930 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: LayoutTests/fast/backgrounds/background-repeat-x-y-parse.html >+ >+ Examples that are now rejected: >+ >+ CSS.supports("background-repeat-x: inherit") >+ CSS.supports("background-repeat-x", "inherit") >+ CSS.supports("background-repeat-y: inherit") >+ CSS.supports("background-repeat-y", "inherit") >+ >+ * css/DOMCSSNamespace.cpp: >+ (WebCore::DOMCSSNamespace::supports): >+ * css/parser/CSSParserImpl.cpp: >+ (WebCore::CSSParserImpl::consumeDeclaration): >+ > 2021-06-13 Chris Dumez <cdumez@apple.com> > > Relax "parent must be an HTMLElement" restriction in outerHTML setter >diff --git a/Source/WebCore/css/DOMCSSNamespace.cpp b/Source/WebCore/css/DOMCSSNamespace.cpp >index cebeaab13b6de5cb4652397c53f100cec0648788..f7fcf5e27ddc60b2fd45d5c351d447f6f1f10acb 100644 >--- a/Source/WebCore/css/DOMCSSNamespace.cpp >+++ b/Source/WebCore/css/DOMCSSNamespace.cpp >@@ -63,6 +63,9 @@ bool DOMCSSNamespace::supports(Document& document, const String& property, const > if (parserContext.isPropertyRuntimeDisabled(propertyID)) > return false; > >+ if (isInternalCSSProperty(propertyID)) >+ return false; >+ > if (propertyID == CSSPropertyInvalid) > return false; > >diff --git a/Source/WebCore/css/parser/CSSParserImpl.cpp b/Source/WebCore/css/parser/CSSParserImpl.cpp >index 724f1b391d32b6387848b7b4e01792f3fbdf8e23..8192ce2c66ff569e6500a84e3bad7eddb4e20fca 100644 >--- a/Source/WebCore/css/parser/CSSParserImpl.cpp >+++ b/Source/WebCore/css/parser/CSSParserImpl.cpp >@@ -810,7 +810,7 @@ void CSSParserImpl::consumeDeclaration(CSSParserTokenRange range, StyleRuleType > if (range.consume().type() != ColonToken) > return; // Parse error > >- if (m_context.isPropertyRuntimeDisabled(propertyID)) >+ if (m_context.isPropertyRuntimeDisabled(propertyID) || isInternalCSSProperty(propertyID)) > propertyID = CSSPropertyInvalid; > > bool important = false; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 25672ca1536713092712e28e10734c7ea7343353..c00977ddf7219ebf6fc6c25be8a713ec7823372a 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,24 @@ >+2021-06-14 Tim Nguyen <ntim@apple.com> >+ >+ Make CSS.supports() return false for internal CSS properties >+ https://bugs.webkit.org/show_bug.cgi?id=224930 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: LayoutTests/fast/backgrounds/background-repeat-x-y-parse.html >+ >+ Examples that are now rejected: >+ >+ CSS.supports("background-repeat-x: inherit") >+ CSS.supports("background-repeat-x", "inherit") >+ CSS.supports("background-repeat-y: inherit") >+ CSS.supports("background-repeat-y", "inherit") >+ >+ * fast/backgrounds/background-repeat-x-y-parse-expected.txt: >+ * fast/backgrounds/background-repeat-x-y-parse.html: >+ * fast/css/webkit-mask-crash-implicit-expected.txt: >+ * fast/css/webkit-mask-crash-implicit.html: >+ > 2021-06-13 Fujii Hironori <Hironori.Fujii@sony.com> > > [WinCairo] Unreviewed test gardening >diff --git a/LayoutTests/fast/backgrounds/background-repeat-x-y-parse-expected.txt b/LayoutTests/fast/backgrounds/background-repeat-x-y-parse-expected.txt >index 01480cdbacbcbd204b7d4d1b8e9afedf536f7511..a50a6961a738ac8aedb3ae5e804117e46c7df7a4 100644 >--- a/LayoutTests/fast/backgrounds/background-repeat-x-y-parse-expected.txt >+++ b/LayoutTests/fast/backgrounds/background-repeat-x-y-parse-expected.txt >@@ -1,4 +1,4 @@ >-This test checks that background-repeat-x/y are not parsed >+This test checks that background-repeat-x/y are not parsed or supported > > On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". > >@@ -7,6 +7,10 @@ PASS window.getComputedStyle(document.getElementById('test1')).getPropertyValue( > PASS window.getComputedStyle(document.getElementById('test2')).getPropertyValue('background-repeat') is "repeat" > PASS window.getComputedStyle(document.getElementById('test3')).getPropertyValue('background-repeat') is "repeat-y" > PASS window.getComputedStyle(document.getElementById('test4')).getPropertyValue('background-repeat') is "repeat-x" >+PASS CSS.supports('background-repeat-x: inherit') is false >+PASS CSS.supports('background-repeat-x', 'inherit') is false >+PASS CSS.supports('background-repeat-y: inherit') is false >+PASS CSS.supports('background-repeat-y', 'inherit') is false > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/fast/backgrounds/background-repeat-x-y-parse.html b/LayoutTests/fast/backgrounds/background-repeat-x-y-parse.html >index 3efae61c0a3fedc1e305fbcf99a062bcd750d928..f4f076cbc3b0c368daa31a960812c977c97a5cf4 100644 >--- a/LayoutTests/fast/backgrounds/background-repeat-x-y-parse.html >+++ b/LayoutTests/fast/backgrounds/background-repeat-x-y-parse.html >@@ -19,12 +19,17 @@ > <div id="test3" class="test" style="background-repeat: repeat-y; background-repeat-y: no-repeat;"></div> > <div id="test4" class="test" style="background-repeat: repeat-x; background-repeat-x: no-repeat;"></div> > <script> >-description("This test checks that background-repeat-x/y are not parsed"); >+description("This test checks that background-repeat-x/y are not parsed or supported"); > > shouldBeEqualToString("window.getComputedStyle(document.getElementById('test1')).getPropertyValue('background-repeat')", "repeat"); > shouldBeEqualToString("window.getComputedStyle(document.getElementById('test2')).getPropertyValue('background-repeat')", "repeat"); > shouldBeEqualToString("window.getComputedStyle(document.getElementById('test3')).getPropertyValue('background-repeat')", "repeat-y"); > shouldBeEqualToString("window.getComputedStyle(document.getElementById('test4')).getPropertyValue('background-repeat')", "repeat-x"); >+ >+shouldBeFalse("CSS.supports('background-repeat-x: inherit')"); >+shouldBeFalse("CSS.supports('background-repeat-x', 'inherit')"); >+shouldBeFalse("CSS.supports('background-repeat-y: inherit')"); >+shouldBeFalse("CSS.supports('background-repeat-y', 'inherit')"); > </script> > <script src="../../resources/js-test-post.js"></script> > </body> >diff --git a/LayoutTests/fast/css/webkit-mask-crash-implicit-expected.txt b/LayoutTests/fast/css/webkit-mask-crash-implicit-expected.txt >index 813a9abca95b65e6d5306245c9ee08d753927df3..7b66457eb32c0d11d7db1a37708d12551baaf780 100644 >--- a/LayoutTests/fast/css/webkit-mask-crash-implicit-expected.txt >+++ b/LayoutTests/fast/css/webkit-mask-crash-implicit-expected.txt >@@ -1,4 +1,4 @@ >-PASS document.styleSheets[1].rules[0].style.cssText is "-webkit-mask-repeat-x: repeat; -webkit-mask-repeat-y: inherit;" >+PASS document.styleSheets[1].rules[0].style.cssText is "-webkit-mask-repeat-x: repeat; -webkit-mask-repeat-y: no-repeat;" > PASS document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask') is "" >-PASS document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask-repeat') is "inherit" >+PASS document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask-repeat') is "repeat-x" > >diff --git a/LayoutTests/fast/css/webkit-mask-crash-implicit.html b/LayoutTests/fast/css/webkit-mask-crash-implicit.html >index f49c01f6c7cde0248e31f9093dd623189a4f672f..162bd75c4fe7b4678d21221ebde73625ac2a31c2 100644 >--- a/LayoutTests/fast/css/webkit-mask-crash-implicit.html >+++ b/LayoutTests/fast/css/webkit-mask-crash-implicit.html >@@ -9,9 +9,9 @@ > <script> > if (window.internals) > testRunner.dumpAsText(); >-shouldBeEqualToString("document.styleSheets[1].rules[0].style.cssText", "-webkit-mask-repeat-x: repeat; -webkit-mask-repeat-y: inherit;"); >+shouldBeEqualToString("document.styleSheets[1].rules[0].style.cssText", "-webkit-mask-repeat-x: repeat; -webkit-mask-repeat-y: no-repeat;"); > shouldBeEqualToString("document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask')", ""); >-shouldBeEqualToString("document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask-repeat')", "inherit"); >+shouldBeEqualToString("document.styleSheets[1].rules[0].style.getPropertyValue('-webkit-mask-repeat')", "repeat-x"); > </script> > </head> > <body>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 224930
:
431310
|
431311
| 431443