Title: [158529] trunk/Source/WebCore
- Revision
- 158529
- Author
- akl...@apple.com
- Date
- 2013-11-03 01:54:10 -0800 (Sun, 03 Nov 2013)
Log Message
Inline RenderStyle functions for getting/setting pseudo style bits.
<https://webkit.org/b/123702>
hasPseudoStyle() actually shows up on html5-full-render.html,
and it's pretty crazy to eat the cost of a function call just
to do some basic bit twiddling.
Reviewed by Antti Koivisto.
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (158528 => 158529)
--- trunk/Source/WebCore/ChangeLog 2013-11-03 09:41:04 UTC (rev 158528)
+++ trunk/Source/WebCore/ChangeLog 2013-11-03 09:54:10 UTC (rev 158529)
@@ -1,3 +1,14 @@
+2013-11-03 Andreas Kling <akl...@apple.com>
+
+ Inline RenderStyle functions for getting/setting pseudo style bits.
+ <https://webkit.org/b/123702>
+
+ hasPseudoStyle() actually shows up on html5-full-render.html,
+ and it's pretty crazy to eat the cost of a function call just
+ to do some basic bit twiddling.
+
+ Reviewed by Antti Koivisto.
+
2013-11-03 Xabier Rodriguez Calvar <calva...@igalia.com>
Remove HTMLMediaElement.initialTime
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.cpp (158528 => 158529)
--- trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2013-11-03 09:41:04 UTC (rev 158528)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.cpp 2013-11-03 09:54:10 UTC (rev 158529)
@@ -227,30 +227,6 @@
return this != StyleResolver::styleNotYetAvailable();
}
-static inline int pseudoBit(PseudoId pseudo)
-{
- return 1 << (pseudo - 1);
-}
-
-bool RenderStyle::hasAnyPublicPseudoStyles() const
-{
- return PUBLIC_PSEUDOID_MASK & noninherited_flags._pseudoBits;
-}
-
-bool RenderStyle::hasPseudoStyle(PseudoId pseudo) const
-{
- ASSERT(pseudo > NOPSEUDO);
- ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID);
- return pseudoBit(pseudo) & noninherited_flags._pseudoBits;
-}
-
-void RenderStyle::setHasPseudoStyle(PseudoId pseudo)
-{
- ASSERT(pseudo > NOPSEUDO);
- ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID);
- noninherited_flags._pseudoBits |= pseudoBit(pseudo);
-}
-
bool RenderStyle::hasUniquePseudoStyle() const
{
if (!m_cachedPseudoStyles || styleType() != NOPSEUDO)
Modified: trunk/Source/WebCore/rendering/style/RenderStyle.h (158528 => 158529)
--- trunk/Source/WebCore/rendering/style/RenderStyle.h 2013-11-03 09:41:04 UTC (rev 158528)
+++ trunk/Source/WebCore/rendering/style/RenderStyle.h 2013-11-03 09:54:10 UTC (rev 158529)
@@ -1977,6 +1977,25 @@
return true;
}
+inline bool RenderStyle::hasAnyPublicPseudoStyles() const
+{
+ return PUBLIC_PSEUDOID_MASK & noninherited_flags._pseudoBits;
+}
+
+inline bool RenderStyle::hasPseudoStyle(PseudoId pseudo) const
+{
+ ASSERT(pseudo > NOPSEUDO);
+ ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID);
+ return (1 << (pseudo - 1)) & noninherited_flags._pseudoBits;
+}
+
+inline void RenderStyle::setHasPseudoStyle(PseudoId pseudo)
+{
+ ASSERT(pseudo > NOPSEUDO);
+ ASSERT(pseudo < FIRST_INTERNAL_PSEUDOID);
+ noninherited_flags._pseudoBits |= 1 << (pseudo - 1);
+}
+
} // namespace WebCore
#endif // RenderStyle_h
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes