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 Review URL: https://codereview.chromium.org/322803004 git-svn-id: svn://svn.chromium.org/blink/trunk@175994 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Showing
Please register or sign in to comment