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 90342759e0e5d6ae4ceaf73ec095d9f5234f190e..ff5b21027c65aa8bbe3b14fcbc4b3b4264e75330 100644 |
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h |
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h |
@@ -37,7 +37,6 @@ |
#include "core/style/LineClampValue.h" |
#include "core/style/NinePieceImage.h" |
#include "core/style/SVGComputedStyle.h" |
-#include "core/style/StyleBoxData.h" |
#include "core/style/StyleContentAlignmentData.h" |
#include "core/style/StyleDeprecatedFlexibleBoxData.h" |
#include "core/style/StyleDifference.h" |
@@ -181,6 +180,58 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase, |
friend class StyleResolverState; |
friend class StyleResolver; |
+ private: |
+ class StyleBoxData : public RefCountedCopyable<StyleBoxData> { |
+ public: |
+ static PassRefPtr<StyleBoxData> Create() { |
+ return AdoptRef(new StyleBoxData); |
+ } |
+ PassRefPtr<StyleBoxData> Copy() const { |
+ return AdoptRef(new StyleBoxData(*this)); |
+ } |
+ |
+ bool operator==(const StyleBoxData& other) const { |
+ return width_ == other.width_ && height_ == other.height_ && |
+ min_width_ == other.min_width_ && max_width_ == other.max_width_ && |
+ min_height_ == other.min_height_ && |
+ max_height_ == other.max_height_ && |
+ vertical_align_length_ == other.vertical_align_length_ && |
+ z_index_ == other.z_index_ && |
+ has_auto_z_index_ == other.has_auto_z_index_ && |
+ box_sizing_ == other.box_sizing_ && |
+ box_decoration_break_ == other.box_decoration_break_; |
+ } |
+ bool operator!=(const StyleBoxData& o) const { return !(*this == o); } |
+ |
+ Length width_; |
+ Length height_; |
+ Length min_width_; |
+ Length max_width_; |
+ Length min_height_; |
+ Length max_height_; |
+ Length vertical_align_length_; |
+ int z_index_; |
+ unsigned has_auto_z_index_ : 1; |
+ unsigned box_sizing_ : 1; // EBoxSizing |
+ unsigned box_decoration_break_ : 1; // EBoxDecorationBreak |
+ |
+ private: |
+ StyleBoxData() |
+ : width_(Length()), |
+ height_(Length()), |
+ min_width_(Length()), |
+ max_width_(Length(kMaxSizeNone)), |
+ min_height_(Length()), |
+ max_height_(Length(kMaxSizeNone)), |
+ z_index_(0), |
+ has_auto_z_index_(static_cast<unsigned>(true)), |
+ box_sizing_(static_cast<unsigned>(EBoxSizing::kContentBox)), |
+ box_decoration_break_( |
+ static_cast<unsigned>(EBoxDecorationBreak::kSlice)) {} |
+ |
+ StyleBoxData(const StyleBoxData&) = default; |
+ }; |
+ |
protected: |
// non-inherited attributes |
DataRef<StyleBoxData> box_data_; |