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

Side by Side Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 5 * Copyright (C) 2003, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
6 * rights reserved. 6 * rights reserved.
7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * Copyright (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 } 1006 }
1007 const Vector<GridTrackSize>& GridTemplateRows() const { 1007 const Vector<GridTrackSize>& GridTemplateRows() const {
1008 return rare_non_inherited_data_->grid_->grid_template_rows_; 1008 return rare_non_inherited_data_->grid_->grid_template_rows_;
1009 } 1009 }
1010 void SetGridTemplateRows(const Vector<GridTrackSize>& lengths) { 1010 void SetGridTemplateRows(const Vector<GridTrackSize>& lengths) {
1011 SET_NESTED_VAR(rare_non_inherited_data_, grid_, grid_template_rows_, 1011 SET_NESTED_VAR(rare_non_inherited_data_, grid_, grid_template_rows_,
1012 lengths); 1012 lengths);
1013 } 1013 }
1014 1014
1015 // Width/height properties. 1015 // Width/height properties.
1016 static Length InitialSize() { return Length(); }
1017 static Length InitialMaxSize() { return Length(kMaxSizeNone); }
1018 static Length InitialMinSize() { return Length(); }
1019 1016
1020 // width 1017 // width
1018 static Length InitialWidth() { return Length(); }
1021 const Length& Width() const { return box_data_->Width(); } 1019 const Length& Width() const { return box_data_->Width(); }
1022 void SetWidth(const Length& v) { SET_VAR(box_data_, width_, v); } 1020 void SetWidth(const Length& v) { SET_VAR(box_data_, width_, v); }
1023 1021
1024 // height 1022 // height
1023 static Length InitialHeight() { return Length(); }
1025 const Length& Height() const { return box_data_->Height(); } 1024 const Length& Height() const { return box_data_->Height(); }
1026 void SetHeight(const Length& v) { SET_VAR(box_data_, height_, v); } 1025 void SetHeight(const Length& v) { SET_VAR(box_data_, height_, v); }
1027 1026
1028 // max-width 1027 // max-width
1028 static Length InitialMaxWidth() { return Length(kMaxSizeNone); }
1029 const Length& MaxWidth() const { return box_data_->MaxWidth(); } 1029 const Length& MaxWidth() const { return box_data_->MaxWidth(); }
1030 void SetMaxWidth(const Length& v) { SET_VAR(box_data_, max_width_, v); } 1030 void SetMaxWidth(const Length& v) { SET_VAR(box_data_, max_width_, v); }
1031 1031
1032 // max-height 1032 // max-height
1033 static Length InitialMaxHeight() { return Length(kMaxSizeNone); }
1033 const Length& MaxHeight() const { return box_data_->MaxHeight(); } 1034 const Length& MaxHeight() const { return box_data_->MaxHeight(); }
1034 void SetMaxHeight(const Length& v) { SET_VAR(box_data_, max_height_, v); } 1035 void SetMaxHeight(const Length& v) { SET_VAR(box_data_, max_height_, v); }
1035 1036
1036 // min-width 1037 // min-width
1038 static Length InitialMinWidth() { return Length(); }
1037 const Length& MinWidth() const { return box_data_->MinWidth(); } 1039 const Length& MinWidth() const { return box_data_->MinWidth(); }
1038 void SetMinWidth(const Length& v) { SET_VAR(box_data_, min_width_, v); } 1040 void SetMinWidth(const Length& v) { SET_VAR(box_data_, min_width_, v); }
1039 1041
1040 // min-height 1042 // min-height
1043 static Length InitialMinHeight() { return Length(); }
1041 const Length& MinHeight() const { return box_data_->MinHeight(); } 1044 const Length& MinHeight() const { return box_data_->MinHeight(); }
1042 void SetMinHeight(const Length& v) { SET_VAR(box_data_, min_height_, v); } 1045 void SetMinHeight(const Length& v) { SET_VAR(box_data_, min_height_, v); }
1043 1046
1044 // image-orientation 1047 // image-orientation
1045 static RespectImageOrientationEnum InitialRespectImageOrientation() { 1048 static RespectImageOrientationEnum InitialRespectImageOrientation() {
1046 return kDoNotRespectImageOrientation; 1049 return kDoNotRespectImageOrientation;
1047 } 1050 }
1048 RespectImageOrientationEnum RespectImageOrientation() const { 1051 RespectImageOrientationEnum RespectImageOrientation() const {
1049 return static_cast<RespectImageOrientationEnum>( 1052 return static_cast<RespectImageOrientationEnum>(
1050 rare_inherited_data_->respect_image_orientation_); 1053 rare_inherited_data_->respect_image_orientation_);
(...skipping 2639 matching lines...) Expand 10 before | Expand all | Expand 10 after
3690 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3693 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3691 } 3694 }
3692 3695
3693 inline bool ComputedStyle::HasPseudoElementStyle() const { 3696 inline bool ComputedStyle::HasPseudoElementStyle() const {
3694 return PseudoBitsInternal() & kElementPseudoIdMask; 3697 return PseudoBitsInternal() & kElementPseudoIdMask;
3695 } 3698 }
3696 3699
3697 } // namespace blink 3700 } // namespace blink
3698 3701
3699 #endif // ComputedStyle_h 3702 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBox.cpp ('k') | third_party/WebKit/Source/core/style/StyleBoxData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698