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

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

Issue 2563753003: Moved pointer-events to be generated in ComputedStyleBase (Closed)
Patch Set: Rebase Created 4 years 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 8088675adee2dd5e532ff57f9500566bd6ef60fa..55ac6f8c80cf571a5e38b83ae2929c3779d833de 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -198,24 +198,6 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// inherit
struct InheritedData {
bool operator==(const InheritedData& other) const {
- return compareEqualIndependent(other) &&
- compareEqualNonIndependent(other);
- }
-
- bool operator!=(const InheritedData& other) const {
- return !(*this == other);
- }
-
- inline bool compareEqualIndependent(const InheritedData& other) const {
- // These must match the properties tagged 'independent' in
- // CSSProperties.in.
- // TODO(napper): Remove this once all independent properties are
- // generated and replace with a private function used only in
- // stylePropagationDiff().
- return (m_pointerEvents == other.m_pointerEvents);
- }
-
- inline bool compareEqualNonIndependent(const InheritedData& other) const {
return (m_listStyleType == other.m_listStyleType) &&
(m_textAlign == other.m_textAlign) &&
(m_hasSimpleUnderline == other.m_hasSimpleUnderline) &&
@@ -227,6 +209,10 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
(m_writingMode == other.m_writingMode);
}
+ bool operator!=(const InheritedData& other) const {
+ return !(*this == other);
+ }
+
unsigned m_listStyleType : 7; // EListStyleType
unsigned m_textAlign : 4; // ETextAlign
unsigned m_hasSimpleUnderline : 1; // True if 'underline solid' is the only
@@ -238,7 +224,6 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// non CSS2 inherited
unsigned m_rtlOrdering : 1; // EOrder
unsigned m_printColorAdjust : 1; // PrintColorAdjust
- unsigned m_pointerEvents : 4; // EPointerEvents
unsigned m_insideLink : 2; // EInsideLink
// CSS Text Layout Module Level 3: Vertical writing support
@@ -324,25 +309,6 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
mutable unsigned m_hasRemUnits : 1;
- // For each independent inherited property, store a 1 if the stored
- // value was inherited from its parent, or 0 if it is explicitly set on
- // this element.
- // Eventually, all properties will have a bit in here to store whether
- // they were inherited from their parent or not.
- // Although two ComputedStyles are equal if their nonInheritedData is
- // equal regardless of the isInherited flags, this struct is stored next
- // to the existing flags to take advantage of packing as much as possible.
- // TODO(sashab): Move these flags closer to inheritedData so that it's
- // clear which inherited properties have a flag stored and which don't.
- // Keep this list of fields in sync with:
- // - setBitDefaults()
- // - The ComputedStyle setter, which must take an extra boolean parameter
- // and set this - propagateIndependentInheritedProperties() in
- // ComputedStyle.cpp
- // - The compareEqual() methods in the corresponding class
- // InheritedFlags
- unsigned m_isPointerEventsInherited : 1;
-
// If you add more style bits here, you will also need to update
// ComputedStyle::copyNonInheritedFromCached() 68 bits
} m_nonInheritedData;
@@ -360,8 +326,6 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
m_inheritedData.m_rtlOrdering = static_cast<unsigned>(initialRTLOrdering());
m_inheritedData.m_printColorAdjust =
static_cast<unsigned>(initialPrintColorAdjust());
- m_inheritedData.m_pointerEvents =
- static_cast<unsigned>(initialPointerEvents());
m_inheritedData.m_insideLink = NotInsideLink;
m_inheritedData.m_writingMode = initialWritingMode();
@@ -393,9 +357,6 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
m_nonInheritedData.m_affectedByDrag = false;
m_nonInheritedData.m_isLink = false;
m_nonInheritedData.m_hasRemUnits = false;
-
- // All independently inherited properties default to being inherited.
- m_nonInheritedData.m_isPointerEventsInherited = true;
}
private:
@@ -2130,18 +2091,6 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
SET_VAR(m_rareInheritedData, overflowWrap, b);
}
- // pointer-events
- static EPointerEvents initialPointerEvents() { return EPointerEvents::Auto; }
- EPointerEvents pointerEvents() const {
- return static_cast<EPointerEvents>(m_inheritedData.m_pointerEvents);
- }
- void setPointerEvents(EPointerEvents p) {
- m_inheritedData.m_pointerEvents = static_cast<unsigned>(p);
- }
- void setPointerEventsIsInherited(bool isInherited) {
- m_nonInheritedData.m_isPointerEventsInherited = isInherited;
- }
-
// quotes
static QuotesData* initialQuotes() { return 0; }
QuotesData* quotes() const { return m_rareInheritedData->quotes.get(); }
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperties.in ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698