Title: [290560] trunk/Source/WebCore
- Revision
- 290560
- Author
- [email protected]
- Date
- 2022-02-27 08:03:42 -0800 (Sun, 27 Feb 2022)
Log Message
Use hasAttributeWithoutSynchronisation for checking inert attribute in Adjuster::adjust
https://bugs.webkit.org/show_bug.cgi?id=237248
Reviewed by Dean Jackson.
hasAttributeWithoutSynchronisation should be slightly faster than hasAttribute.
* style/StyleAdjuster.cpp:
(WebCore::Style::Adjuster::adjust const):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (290559 => 290560)
--- trunk/Source/WebCore/ChangeLog 2022-02-27 14:10:58 UTC (rev 290559)
+++ trunk/Source/WebCore/ChangeLog 2022-02-27 16:03:42 UTC (rev 290560)
@@ -1,5 +1,17 @@
2022-02-27 Tim Nguyen <[email protected]>
+ Use hasAttributeWithoutSynchronisation for checking inert attribute in Adjuster::adjust
+ https://bugs.webkit.org/show_bug.cgi?id=237248
+
+ Reviewed by Dean Jackson.
+
+ hasAttributeWithoutSynchronisation should be slightly faster than hasAttribute.
+
+ * style/StyleAdjuster.cpp:
+ (WebCore::Style::Adjuster::adjust const):
+
+2022-02-27 Tim Nguyen <[email protected]>
+
Optimize StyleSharingResolver inert checks
https://bugs.webkit.org/show_bug.cgi?id=237235
Modified: trunk/Source/WebCore/style/StyleAdjuster.cpp (290559 => 290560)
--- trunk/Source/WebCore/style/StyleAdjuster.cpp 2022-02-27 14:10:58 UTC (rev 290559)
+++ trunk/Source/WebCore/style/StyleAdjuster.cpp 2022-02-27 16:03:42 UTC (rev 290560)
@@ -528,7 +528,7 @@
// Counterparts in Element::addToTopLayer/removeFromTopLayer & SharingResolver::canShareStyleWithElement need to match!
auto hasInertAttribute = [this] (const Element* element) -> bool {
- return m_document.settings().inertAttributeEnabled() && is<HTMLElement>(element) && element->hasAttribute(HTMLNames::inertAttr);
+ return m_document.settings().inertAttributeEnabled() && is<HTMLElement>(element) && element->hasAttributeWithoutSynchronization(HTMLNames::inertAttr);
};
auto isInertSubtreeRoot = [this, hasInertAttribute] (const Element* element) -> bool {
if (m_document.activeModalDialog() && element == m_document.documentElement())
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes