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

Side by Side 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 3772 matching lines...) Expand 10 before | Expand all | Expand 10 after
3783 3783
3784 inline bool ComputedStyle::setTextOrientation(TextOrientation textOrientation) { 3784 inline bool ComputedStyle::setTextOrientation(TextOrientation textOrientation) {
3785 if (compareEqual(m_rareInheritedData->m_textOrientation, textOrientation)) 3785 if (compareEqual(m_rareInheritedData->m_textOrientation, textOrientation))
3786 return false; 3786 return false;
3787 3787
3788 m_rareInheritedData.access()->m_textOrientation = textOrientation; 3788 m_rareInheritedData.access()->m_textOrientation = textOrientation;
3789 return true; 3789 return true;
3790 } 3790 }
3791 3791
3792 inline bool ComputedStyle::hasAnyPublicPseudoStyles() const { 3792 inline bool ComputedStyle::hasAnyPublicPseudoStyles() const {
3793 return PublicPseudoIdMask & m_nonInheritedData.m_pseudoBits; 3793 return m_nonInheritedData.m_pseudoBits;
3794 } 3794 }
3795 3795
3796 inline bool ComputedStyle::hasPseudoStyle(PseudoId pseudo) const { 3796 inline bool ComputedStyle::hasPseudoStyle(PseudoId pseudo) const {
3797 ASSERT(pseudo > PseudoIdNone); 3797 DCHECK(pseudo >= FirstPublicPseudoId);
3798 ASSERT(pseudo < FirstInternalPseudoId); 3798 DCHECK(pseudo < FirstInternalPseudoId);
3799 return (1 << (pseudo - 1)) & m_nonInheritedData.m_pseudoBits; 3799 return (1 << (pseudo - FirstPublicPseudoId)) &
3800 m_nonInheritedData.m_pseudoBits;
3800 } 3801 }
3801 3802
3802 inline void ComputedStyle::setHasPseudoStyle(PseudoId pseudo) { 3803 inline void ComputedStyle::setHasPseudoStyle(PseudoId pseudo) {
3803 ASSERT(pseudo > PseudoIdNone); 3804 DCHECK(pseudo >= FirstPublicPseudoId);
3804 ASSERT(pseudo < FirstInternalPseudoId); 3805 DCHECK(pseudo < FirstInternalPseudoId);
3805 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - 1); 3806 m_nonInheritedData.m_pseudoBits |= 1 << (pseudo - FirstPublicPseudoId);
3806 } 3807 }
3807 3808
3808 inline bool ComputedStyle::hasPseudoElementStyle() const { 3809 inline bool ComputedStyle::hasPseudoElementStyle() const {
3809 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask; 3810 return m_nonInheritedData.m_pseudoBits & ElementPseudoIdMask;
3810 } 3811 }
3811 3812
3812 } // namespace blink 3813 } // namespace blink
3813 3814
3814 #endif // ComputedStyle_h 3815 #endif // ComputedStyle_h
OLDNEW
« 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