Title: [285483] trunk/Source/WebCore
- Revision
- 285483
- Author
- n...@apple.com
- Date
- 2021-11-09 00:15:54 -0800 (Tue, 09 Nov 2021)
Log Message
Re-use isCSSWideKeyword in CSSVariableParser.cpp & CSSPropertyParser.cpp
https://bugs.webkit.org/show_bug.cgi?id=232830
Reviewed by Antti Koivisto.
* css/parser/CSSPropertyParser.cpp:
(WebCore::CSSPropertyParser::canParseTypedCustomPropertyValue):
* css/parser/CSSVariableParser.cpp:
(WebCore::classifyVariableRange):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (285482 => 285483)
--- trunk/Source/WebCore/ChangeLog 2021-11-09 08:05:39 UTC (rev 285482)
+++ trunk/Source/WebCore/ChangeLog 2021-11-09 08:15:54 UTC (rev 285483)
@@ -1,3 +1,15 @@
+2021-11-09 Tim Nguyen <n...@apple.com>
+
+ Re-use isCSSWideKeyword in CSSVariableParser.cpp & CSSPropertyParser.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=232830
+
+ Reviewed by Antti Koivisto.
+
+ * css/parser/CSSPropertyParser.cpp:
+ (WebCore::CSSPropertyParser::canParseTypedCustomPropertyValue):
+ * css/parser/CSSVariableParser.cpp:
+ (WebCore::classifyVariableRange):
+
2021-11-09 Martin Robinson <mrobin...@webkit.org>
A mask or isolation should set transform-style to flat
Modified: trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp (285482 => 285483)
--- trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2021-11-09 08:05:39 UTC (rev 285482)
+++ trunk/Source/WebCore/css/parser/CSSPropertyParser.cpp 2021-11-09 08:15:54 UTC (rev 285483)
@@ -4565,8 +4565,7 @@
m_range.consumeWhitespace();
// First check for keywords
- CSSValueID id = m_range.peek().id();
- if (id == CSSValueInherit || id == CSSValueInitial || id == CSSValueRevert)
+ if (isCSSWideKeyword(m_range.peek().id()))
return true;
auto localRange = m_range;
Modified: trunk/Source/WebCore/css/parser/CSSVariableParser.cpp (285482 => 285483)
--- trunk/Source/WebCore/css/parser/CSSVariableParser.cpp 2021-11-09 08:05:39 UTC (rev 285482)
+++ trunk/Source/WebCore/css/parser/CSSVariableParser.cpp 2021-11-09 08:15:54 UTC (rev 285483)
@@ -32,6 +32,7 @@
#include "CSSCustomPropertyValue.h"
#include "CSSParserContext.h"
+#include "CSSParserIdioms.h"
#include "CSSParserTokenRange.h"
#include "CSSPropertyParserHelpers.h"
@@ -161,7 +162,7 @@
range.consumeWhitespace();
if (range.peek().type() == IdentToken) {
CSSValueID id = range.consumeIncludingWhitespace().id();
- if (range.atEnd() && (id == CSSValueInherit || id == CSSValueInitial || id == CSSValueUnset || id == CSSValueRevert))
+ if (range.atEnd() && isCSSWideKeyword(id))
return id;
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes