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

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

Issue 2844183002: Generate StyleBoxData in ComputedStyleBase. (Closed)
Patch Set: Rebase Created 3 years, 7 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/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 77a3e506ed808ccb2e383dff2070fb6667c8ba65..e81d8705174f165d651d260be4a120351d78e466 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -180,61 +180,8 @@ 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_;
DataRef<StyleRareNonInheritedData> rare_non_inherited_data_;
// inherited attributes

Powered by Google App Engine
This is Rietveld 408576698