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

Side by Side Diff: third_party/WebKit/Source/core/style/StyleBoxData.cpp

Issue 2841353002: Split initial methods of (/max/min)(width/height) on ComputedStyle. (Closed)
Patch Set: gco rename-style-box && gut 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 17 matching lines...) Expand all
28 struct SameSizeAsStyleBoxData : public RefCounted<SameSizeAsStyleBoxData> { 28 struct SameSizeAsStyleBoxData : public RefCounted<SameSizeAsStyleBoxData> {
29 Length length[7]; 29 Length length[7];
30 int z_index_; 30 int z_index_;
31 uint32_t bitfields; 31 uint32_t bitfields;
32 }; 32 };
33 33
34 static_assert(sizeof(StyleBoxData) == sizeof(SameSizeAsStyleBoxData), 34 static_assert(sizeof(StyleBoxData) == sizeof(SameSizeAsStyleBoxData),
35 "StyleBoxData should stay small"); 35 "StyleBoxData should stay small");
36 36
37 StyleBoxData::StyleBoxData() 37 StyleBoxData::StyleBoxData()
38 : min_width_(ComputedStyle::InitialMinSize()), 38 : min_width_(ComputedStyle::InitialMinWidth()),
39 max_width_(ComputedStyle::InitialMaxSize()), 39 max_width_(ComputedStyle::InitialMaxWidth()),
40 min_height_(ComputedStyle::InitialMinSize()), 40 min_height_(ComputedStyle::InitialMinHeight()),
41 max_height_(ComputedStyle::InitialMaxSize()), 41 max_height_(ComputedStyle::InitialMaxHeight()),
42 z_index_(0), 42 z_index_(0),
43 has_auto_z_index_(true), 43 has_auto_z_index_(true),
44 box_sizing_(static_cast<unsigned>(ComputedStyle::InitialBoxSizing())), 44 box_sizing_(static_cast<unsigned>(ComputedStyle::InitialBoxSizing())),
45 box_decoration_break_(kBoxDecorationBreakSlice) {} 45 box_decoration_break_(kBoxDecorationBreakSlice) {}
46 46
47 bool StyleBoxData::operator==(const StyleBoxData& o) const { 47 bool StyleBoxData::operator==(const StyleBoxData& o) const {
48 return width_ == o.width_ && height_ == o.height_ && 48 return width_ == o.width_ && height_ == o.height_ &&
49 min_width_ == o.min_width_ && max_width_ == o.max_width_ && 49 min_width_ == o.min_width_ && max_width_ == o.max_width_ &&
50 min_height_ == o.min_height_ && max_height_ == o.max_height_ && 50 min_height_ == o.min_height_ && max_height_ == o.max_height_ &&
51 vertical_align_ == o.vertical_align_ && z_index_ == o.z_index_ && 51 vertical_align_ == o.vertical_align_ && z_index_ == o.z_index_ &&
52 has_auto_z_index_ == o.has_auto_z_index_ && 52 has_auto_z_index_ == o.has_auto_z_index_ &&
53 box_sizing_ == o.box_sizing_ && 53 box_sizing_ == o.box_sizing_ &&
54 box_decoration_break_ == o.box_decoration_break_; 54 box_decoration_break_ == o.box_decoration_break_;
55 } 55 }
56 56
57 } // namespace blink 57 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/style/ComputedStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698