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

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

Issue 2815033002: Split initial methods of left/right/top/bottom on ComputedStyle. (Closed)
Patch Set: 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 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 589
590 // border-bottom-right-radius (aka -webkit-border-bottom-right-radius) 590 // border-bottom-right-radius (aka -webkit-border-bottom-right-radius)
591 const LengthSize& BorderBottomRightRadius() const { 591 const LengthSize& BorderBottomRightRadius() const {
592 return surround_->border_.BottomRight(); 592 return surround_->border_.BottomRight();
593 } 593 }
594 void SetBorderBottomRightRadius(const LengthSize& s) { 594 void SetBorderBottomRightRadius(const LengthSize& s) {
595 SET_VAR(surround_, border_.bottom_right_, s); 595 SET_VAR(surround_, border_.bottom_right_, s);
596 } 596 }
597 597
598 // Offset properties. 598 // Offset properties.
599 static Length InitialOffset() { return Length(); }
600
601 // left 599 // left
600 static Length InitialLeft() { return Length(); }
602 const Length& Left() const { return surround_->left_; } 601 const Length& Left() const { return surround_->left_; }
603 void SetLeft(const Length& v) { SET_VAR(surround_, left_, v); } 602 void SetLeft(const Length& v) { SET_VAR(surround_, left_, v); }
604 603
605 // right 604 // right
605 static Length InitialRight() { return Length(); }
606 const Length& Right() const { return surround_->right_; } 606 const Length& Right() const { return surround_->right_; }
607 void SetRight(const Length& v) { SET_VAR(surround_, right_, v); } 607 void SetRight(const Length& v) { SET_VAR(surround_, right_, v); }
608 608
609 // top 609 // top
610 static Length InitialTop() { return Length(); }
610 const Length& Top() const { return surround_->top_; } 611 const Length& Top() const { return surround_->top_; }
611 void SetTop(const Length& v) { SET_VAR(surround_, top_, v); } 612 void SetTop(const Length& v) { SET_VAR(surround_, top_, v); }
612 613
613 // bottom 614 // bottom
615 static Length InitialBottom() { return Length(); }
614 const Length& Bottom() const { return surround_->bottom_; } 616 const Length& Bottom() const { return surround_->bottom_; }
615 void SetBottom(const Length& v) { SET_VAR(surround_, bottom_, v); } 617 void SetBottom(const Length& v) { SET_VAR(surround_, bottom_, v); }
616 618
617 // box-shadow (aka -webkit-box-shadow) 619 // box-shadow (aka -webkit-box-shadow)
618 static ShadowList* InitialBoxShadow() { return 0; } 620 static ShadowList* InitialBoxShadow() { return 0; }
619 ShadowList* BoxShadow() const { 621 ShadowList* BoxShadow() const {
620 return rare_non_inherited_data_->box_shadow_.Get(); 622 return rare_non_inherited_data_->box_shadow_.Get();
621 } 623 }
622 void SetBoxShadow(PassRefPtr<ShadowList>); 624 void SetBoxShadow(PassRefPtr<ShadowList>);
623 625
(...skipping 3087 matching lines...) Expand 10 before | Expand all | Expand 10 after
3711 pseudo_bits_ |= 1 << (pseudo - kFirstPublicPseudoId); 3713 pseudo_bits_ |= 1 << (pseudo - kFirstPublicPseudoId);
3712 } 3714 }
3713 3715
3714 inline bool ComputedStyle::HasPseudoElementStyle() const { 3716 inline bool ComputedStyle::HasPseudoElementStyle() const {
3715 return pseudo_bits_ & kElementPseudoIdMask; 3717 return pseudo_bits_ & kElementPseudoIdMask;
3716 } 3718 }
3717 3719
3718 } // namespace blink 3720 } // namespace blink
3719 3721
3720 #endif // ComputedStyle_h 3722 #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