Title: [289777] trunk/Source/WebCore
- Revision
- 289777
- Author
- hey...@apple.com
- Date
- 2022-02-14 15:59:59 -0800 (Mon, 14 Feb 2022)
Log Message
Consistenly use hasTagName instead of is<> in HTMLStackItem testing functions
https://bugs.webkit.org/show_bug.cgi?id=236571
Reviewed by Sam Weinig.
No reason to use is<> for a couple of element names but hasTagName for
all others.
* html/parser/HTMLElementStack.cpp:
(WebCore::HTMLNames::isScopeMarker):
(WebCore::HTMLNames::isTableScopeMarker):
(WebCore::HTMLNames::isSelectScopeMarker):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (289776 => 289777)
--- trunk/Source/WebCore/ChangeLog 2022-02-14 23:33:58 UTC (rev 289776)
+++ trunk/Source/WebCore/ChangeLog 2022-02-14 23:59:59 UTC (rev 289777)
@@ -1,3 +1,18 @@
+2022-02-14 Cameron McCormack <hey...@apple.com>
+
+ Consistenly use hasTagName instead of is<> in HTMLStackItem testing functions
+ https://bugs.webkit.org/show_bug.cgi?id=236571
+
+ Reviewed by Sam Weinig.
+
+ No reason to use is<> for a couple of element names but hasTagName for
+ all others.
+
+ * html/parser/HTMLElementStack.cpp:
+ (WebCore::HTMLNames::isScopeMarker):
+ (WebCore::HTMLNames::isTableScopeMarker):
+ (WebCore::HTMLNames::isSelectScopeMarker):
+
2022-02-14 Simon Fraser <simon.fra...@apple.com>
Fix crash with deeply nested async overflow scroll
Modified: trunk/Source/WebCore/html/parser/HTMLElementStack.cpp (289776 => 289777)
--- trunk/Source/WebCore/html/parser/HTMLElementStack.cpp 2022-02-14 23:33:58 UTC (rev 289776)
+++ trunk/Source/WebCore/html/parser/HTMLElementStack.cpp 2022-02-14 23:59:59 UTC (rev 289777)
@@ -49,7 +49,7 @@
|| item.hasTagName(captionTag)
|| item.hasTagName(marqueeTag)
|| item.hasTagName(objectTag)
- || is<HTMLTableElement>(item.node())
+ || item.hasTagName(tableTag)
|| item.hasTagName(tdTag)
|| item.hasTagName(thTag)
|| item.hasTagName(MathMLNames::miTag)
@@ -74,7 +74,7 @@
inline bool isTableScopeMarker(HTMLStackItem& item)
{
- return is<HTMLTableElement>(item.node())
+ return item.hasTagName(tableTag)
|| item.hasTagName(templateTag)
|| isRootNode(item);
}
@@ -110,7 +110,7 @@
inline bool isSelectScopeMarker(HTMLStackItem& item)
{
- return !is<HTMLOptGroupElement>(item.node()) && !is<HTMLOptionElement>(item.node());
+ return !item.hasTagName(optgroupTag) && !item.hasTagName(optionTag);
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes