Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(602)

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2729373003: Bit-mask incorrectly removed first-line pseudo bit. (Closed)
Patch Set: Fixed issues. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 340e8b6f3fd66282fca8d5435e605ded708ecb46..ed8e7e1d62eaebd494ea9261bb7fd8b15e9887b9 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -3790,19 +3790,20 @@ inline bool ComputedStyle::setTextOrientation(TextOrientation textOrientation) {
}
inline bool ComputedStyle::hasAnyPublicPseudoStyles() const {
- return PublicPseudoIdMask & m_nonInheritedData.m_pseudoBits;
+ return m_nonInheritedData.m_pseudoBits;
}
inline bool ComputedStyle::hasPseudoStyle(PseudoId pseudo) const {
- ASSERT(pseudo > PseudoIdNone);
- ASSERT(pseudo < FirstInternalPseudoId);
- return (1 << (pseudo - 1)) & m_nonInheritedData.m_pseudoBits;
+ DCHECK(pseudo >= FirstPublicPseudoId);
+ DCHECK(pseudo < FirstInternalPseudoId);
+ return (1 << (pseudo - FirstPublicPseudoId)) &
+ m_nonInheritedData.m_pseudoBits;
}
inline void ComputedStyle::setHasPseudoStyle(PseudoId pseudo) {
- ASSERT(pseudo > PseudoIdNone);
- ASSERT(pseudo < FirstInternalPseudoId);
- m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1);
+ DCHECK(pseudo >= FirstPublicPseudoId);
+ DCHECK(pseudo < FirstInternalPseudoId);
+ m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - FirstPublicPseudoId);
}
inline bool ComputedStyle::hasPseudoElementStyle() const {
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.cpp ('k') | third_party/WebKit/Source/core/style/ComputedStyleConstants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698