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

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

Issue 2779353002: Add operator<< to StyleDifference for debug logging. (Closed)
Patch Set: 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/StyleDifference.h
diff --git a/third_party/WebKit/Source/core/style/StyleDifference.h b/third_party/WebKit/Source/core/style/StyleDifference.h
index 64d62ac5b1f4a488f47af701dfcf7a86cffe2bad..6ecc0087c1c262ccd4e11c7e197dbea807587219 100644
--- a/third_party/WebKit/Source/core/style/StyleDifference.h
+++ b/third_party/WebKit/Source/core/style/StyleDifference.h
@@ -5,6 +5,8 @@
#ifndef StyleDifference_h
#define StyleDifference_h
+#include <iosfwd>
+#include "core/CoreExport.h"
#include "wtf/Allocator.h"
#include "wtf/Assertions.h"
@@ -24,8 +26,7 @@ class StyleDifference {
// The object needs to issue paint invalidations if it is affected by text
// decorations or properties dependent on color (e.g., border or outline).
TextDecorationOrColorChanged = 1 << 6,
- // If you add a value here, be sure to update the number of bits on
- // m_propertySpecificDifferences.
+ // If you add a value here, be sure to update kPropertyDifferenceCount.
};
StyleDifference()
@@ -139,6 +140,11 @@ class StyleDifference {
}
private:
+ static constexpr int kPropertyDifferenceCount = 7;
+
+ friend CORE_EXPORT std::ostream& operator<<(std::ostream&,
+ const StyleDifference&);
+
enum PaintInvalidationType {
NoPaintInvalidation,
PaintInvalidationObject,
@@ -149,10 +155,12 @@ class StyleDifference {
enum LayoutType { NoLayout = 0, PositionedMovement, FullLayout };
unsigned m_layoutType : 2;
unsigned m_recomputeOverflow : 1;
- unsigned m_propertySpecificDifferences : 7;
+ unsigned m_propertySpecificDifferences : kPropertyDifferenceCount;
unsigned m_scrollAnchorDisablingPropertyChanged : 1;
};
+CORE_EXPORT std::ostream& operator<<(std::ostream&, const StyleDifference&);
+
} // namespace blink
#endif // StyleDifference_h
« no previous file with comments | « third_party/WebKit/Source/core/style/BUILD.gn ('k') | third_party/WebKit/Source/core/style/StyleDifference.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698