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

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

Issue 2825653002: Split initial methods of padding on ComputedStyle. (Closed)
Patch Set: Rebase Created 3 years, 8 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/css/CSSProperties.json5 ('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) 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 1274 matching lines...) Expand 10 before | Expand all | Expand 10 after
1285 int OutlineOffset() const { 1285 int OutlineOffset() const {
1286 if (rare_non_inherited_data_->outline_.Style() == kBorderStyleNone) 1286 if (rare_non_inherited_data_->outline_.Style() == kBorderStyleNone)
1287 return 0; 1287 return 0;
1288 return rare_non_inherited_data_->outline_.Offset(); 1288 return rare_non_inherited_data_->outline_.Offset();
1289 } 1289 }
1290 void SetOutlineOffset(int v) { 1290 void SetOutlineOffset(int v) {
1291 SET_VAR(rare_non_inherited_data_, outline_.offset_, v); 1291 SET_VAR(rare_non_inherited_data_, outline_.offset_, v);
1292 } 1292 }
1293 1293
1294 // Padding properties. 1294 // Padding properties.
1295 static Length InitialPadding() { return Length(kFixed); }
1296 1295
1297 // padding-bottom 1296 // padding-bottom
1297 static Length InitialPaddingBottom() { return Length(kFixed); }
1298 const Length& PaddingBottom() const { return surround_->padding_.Bottom(); } 1298 const Length& PaddingBottom() const { return surround_->padding_.Bottom(); }
1299 void SetPaddingBottom(const Length& v) { 1299 void SetPaddingBottom(const Length& v) {
1300 SET_VAR(surround_, padding_.bottom_, v); 1300 SET_VAR(surround_, padding_.bottom_, v);
1301 } 1301 }
1302 1302
1303 // padding-left 1303 // padding-left
1304 static Length InitialPaddingLeft() { return Length(kFixed); }
1304 const Length& PaddingLeft() const { return surround_->padding_.Left(); } 1305 const Length& PaddingLeft() const { return surround_->padding_.Left(); }
1305 void SetPaddingLeft(const Length& v) { 1306 void SetPaddingLeft(const Length& v) {
1306 SET_VAR(surround_, padding_.left_, v); 1307 SET_VAR(surround_, padding_.left_, v);
1307 } 1308 }
1308 1309
1309 // padding-right 1310 // padding-right
1311 static Length InitialPaddingRight() { return Length(kFixed); }
1310 const Length& PaddingRight() const { return surround_->padding_.Right(); } 1312 const Length& PaddingRight() const { return surround_->padding_.Right(); }
1311 void SetPaddingRight(const Length& v) { 1313 void SetPaddingRight(const Length& v) {
1312 SET_VAR(surround_, padding_.right_, v); 1314 SET_VAR(surround_, padding_.right_, v);
1313 } 1315 }
1314 1316
1315 // padding-top 1317 // padding-top
1318 static Length InitialPaddingTop() { return Length(kFixed); }
1316 const Length& PaddingTop() const { return surround_->padding_.Top(); } 1319 const Length& PaddingTop() const { return surround_->padding_.Top(); }
1317 void SetPaddingTop(const Length& v) { SET_VAR(surround_, padding_.top_, v); } 1320 void SetPaddingTop(const Length& v) { SET_VAR(surround_, padding_.top_, v); }
1318 1321
1319 // perspective (aka -webkit-perspective) 1322 // perspective (aka -webkit-perspective)
1320 static float InitialPerspective() { return 0; } 1323 static float InitialPerspective() { return 0; }
1321 float Perspective() const { return rare_non_inherited_data_->perspective_; } 1324 float Perspective() const { return rare_non_inherited_data_->perspective_; }
1322 void SetPerspective(float p) { 1325 void SetPerspective(float p) {
1323 SET_VAR(rare_non_inherited_data_, perspective_, p); 1326 SET_VAR(rare_non_inherited_data_, perspective_, p);
1324 } 1327 }
1325 1328
(...skipping 2387 matching lines...) Expand 10 before | Expand all | Expand 10 after
3713 pseudo_bits_ |= 1 << (pseudo - kFirstPublicPseudoId); 3716 pseudo_bits_ |= 1 << (pseudo - kFirstPublicPseudoId);
3714 } 3717 }
3715 3718
3716 inline bool ComputedStyle::HasPseudoElementStyle() const { 3719 inline bool ComputedStyle::HasPseudoElementStyle() const {
3717 return pseudo_bits_ & kElementPseudoIdMask; 3720 return pseudo_bits_ & kElementPseudoIdMask;
3718 } 3721 }
3719 3722
3720 } // namespace blink 3723 } // namespace blink
3721 3724
3722 #endif // ComputedStyle_h 3725 #endif // ComputedStyle_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/CSSProperties.json5 ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698