|
Make all CSSSelector data members private
Make all CSSSelector data members private. Previously, some of the data members
such as m_relation / m_match / m_pseudoType were public and accessed directly
from outside the class. The new approach is better because:
- Those members are bit fields so by using getters, we can hide the casts inside
the getters. The setters can now also check that the bitfield is big enough to
actually store the enum value.
- When using those in switch() statements, the compiler now complains if we fail
to test some of the enum values as the value is now an enum, and not merely an
unsigned integer.
- Some of these members already has getters (e.g. relation(), pseudoType()).
- Better encapsulation.
R=esprehn@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175994
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+59 lines, -45 lines) |
Patch |
|
M |
Source/core/css/CSSParserValues.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/css/CSSParserValues.cpp
|
View
|
|
2 chunks |
+2 lines, -2 lines |
0 comments
|
Download
|
|
M |
Source/core/css/CSSSelector.h
|
View
|
1
2
|
2 chunks |
+13 lines, -2 lines |
1 comment
|
Download
|
|
M |
Source/core/css/CSSSelector.cpp
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
|
M |
Source/core/css/CSSSelectorList.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/css/PageRuleCollector.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/css/RuleFeature.cpp
|
View
|
|
5 chunks |
+12 lines, -12 lines |
0 comments
|
Download
|
|
M |
Source/core/css/RuleSet.cpp
|
View
|
|
5 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/core/css/SelectorChecker.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/css/SelectorChecker.cpp
|
View
|
1
|
5 chunks |
+9 lines, -9 lines |
0 comments
|
Download
|
|
M |
Source/core/css/SelectorFilter.cpp
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
|
M |
Source/core/css/invalidation/StyleSheetInvalidationAnalysis.cpp
|
View
|
|
2 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/core/dom/SelectorQuery.cpp
|
View
|
|
4 chunks |
+4 lines, -4 lines |
0 comments
|
Download
|
|
M |
Source/core/html/HTMLContentElement.cpp
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 5 (0 generated)
|