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 2933303002: Generate diffs for all fields on StyleRareNonInheritedData (Closed)
Patch Set: Created 3 years, 6 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 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1148 static int InitialOrder() { return 0; } 1148 static int InitialOrder() { return 0; }
1149 int Order() const { return rare_non_inherited_data_->order_; } 1149 int Order() const { return rare_non_inherited_data_->order_; }
1150 // We restrict the smallest value to int min + 2 because we use int min and 1150 // We restrict the smallest value to int min + 2 because we use int min and
1151 // int min + 1 as special values in a hash set. 1151 // int min + 1 as special values in a hash set.
1152 void SetOrder(int o) { 1152 void SetOrder(int o) {
1153 SET_VAR(rare_non_inherited_data_, order_, 1153 SET_VAR(rare_non_inherited_data_, order_,
1154 max(std::numeric_limits<int>::min() + 2, o)); 1154 max(std::numeric_limits<int>::min() + 2, o));
1155 } 1155 }
1156 1156
1157 // Outline properties. 1157 // Outline properties.
1158
1159 bool OutlineVisuallyEqual(const ComputedStyle& other) const {
1160 return rare_non_inherited_data_->outline_.VisuallyEqual(
1161 other.rare_non_inherited_data_->outline_);
1162 }
1163
1158 // outline-color 1164 // outline-color
1159 void SetOutlineColor(const StyleColor& v) { 1165 void SetOutlineColor(const StyleColor& v) {
1160 SET_BORDERVALUE_COLOR(rare_non_inherited_data_, outline_, v); 1166 SET_BORDERVALUE_COLOR(rare_non_inherited_data_, outline_, v);
1161 } 1167 }
1162 1168
1163 // outline-style 1169 // outline-style
1164 EBorderStyle OutlineStyle() const { 1170 EBorderStyle OutlineStyle() const {
1165 return rare_non_inherited_data_->outline_.Style(); 1171 return rare_non_inherited_data_->outline_.Style();
1166 } 1172 }
1167 void SetOutlineStyle(EBorderStyle v) { 1173 void SetOutlineStyle(EBorderStyle v) {
(...skipping 2239 matching lines...) Expand 10 before | Expand all | Expand 10 after
3407 if (VisitedLinkCaretColorIsAutoInternal()) 3413 if (VisitedLinkCaretColorIsAutoInternal())
3408 return StyleAutoColor::AutoColor(); 3414 return StyleAutoColor::AutoColor();
3409 return StyleAutoColor(VisitedLinkCaretColorInternal()); 3415 return StyleAutoColor(VisitedLinkCaretColorInternal());
3410 } 3416 }
3411 StyleColor VisitedLinkBackgroundColor() const { 3417 StyleColor VisitedLinkBackgroundColor() const {
3412 return rare_non_inherited_data_->visited_link_background_color_; 3418 return rare_non_inherited_data_->visited_link_background_color_;
3413 } 3419 }
3414 StyleColor VisitedLinkBorderLeftColor() const { 3420 StyleColor VisitedLinkBorderLeftColor() const {
3415 return rare_non_inherited_data_->visited_link_border_left_color_; 3421 return rare_non_inherited_data_->visited_link_border_left_color_;
3416 } 3422 }
3423 bool VisitedLinkBorderLeftColorHasChanged(const ComputedStyle& other) const {
3424 return (VisitedLinkBorderLeftColor() !=
3425 other.VisitedLinkBorderLeftColor() &&
3426 BorderLeftWidth());
3427 }
3417 StyleColor VisitedLinkBorderRightColor() const { 3428 StyleColor VisitedLinkBorderRightColor() const {
3418 return rare_non_inherited_data_->visited_link_border_right_color_; 3429 return rare_non_inherited_data_->visited_link_border_right_color_;
3419 } 3430 }
3431 bool VisitedLinkBorderRightColorHasChanged(const ComputedStyle& other) const {
3432 return (VisitedLinkBorderRightColor() !=
3433 other.VisitedLinkBorderRightColor() &&
3434 BorderRightWidth());
3435 }
3420 StyleColor VisitedLinkBorderBottomColor() const { 3436 StyleColor VisitedLinkBorderBottomColor() const {
3421 return rare_non_inherited_data_->visited_link_border_bottom_color_; 3437 return rare_non_inherited_data_->visited_link_border_bottom_color_;
3422 } 3438 }
3439 bool VisitedLinkBorderBottomColorHasChanged(
3440 const ComputedStyle& other) const {
3441 return (VisitedLinkBorderBottomColor() !=
3442 other.VisitedLinkBorderBottomColor() &&
3443 BorderBottomWidth());
3444 }
3423 StyleColor VisitedLinkBorderTopColor() const { 3445 StyleColor VisitedLinkBorderTopColor() const {
3424 return rare_non_inherited_data_->visited_link_border_top_color_; 3446 return rare_non_inherited_data_->visited_link_border_top_color_;
3425 } 3447 }
3448 bool VisitedLinkBorderTopColorHasChanged(const ComputedStyle& other) const {
3449 return (VisitedLinkBorderTopColor() != other.VisitedLinkBorderTopColor() &&
3450 BorderTopWidth());
3451 }
3426 StyleColor VisitedLinkOutlineColor() const { 3452 StyleColor VisitedLinkOutlineColor() const {
3427 return rare_non_inherited_data_->visited_link_outline_color_; 3453 return rare_non_inherited_data_->visited_link_outline_color_;
3428 } 3454 }
3455 bool VisitedLinkOutlineColorHasChanged(const ComputedStyle& other) const {
3456 return (VisitedLinkOutlineColor() != other.VisitedLinkOutlineColor() &&
3457 OutlineWidth());
3458 }
3429 StyleColor VisitedLinkColumnRuleColor() const { 3459 StyleColor VisitedLinkColumnRuleColor() const {
3430 return rare_non_inherited_data_->multi_col_data_ 3460 return rare_non_inherited_data_->multi_col_data_
3431 ->visited_link_column_rule_color_; 3461 ->visited_link_column_rule_color_;
3432 } 3462 }
3433 StyleColor TextDecorationColor() const { 3463 StyleColor TextDecorationColor() const {
3434 return rare_non_inherited_data_->text_decoration_color_; 3464 return rare_non_inherited_data_->text_decoration_color_;
3435 } 3465 }
3436 StyleColor VisitedLinkTextDecorationColor() const { 3466 StyleColor VisitedLinkTextDecorationColor() const {
3437 return rare_non_inherited_data_->visited_link_text_decoration_color_; 3467 return rare_non_inherited_data_->visited_link_text_decoration_color_;
3438 } 3468 }
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
3570 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId))); 3600 PseudoBitsInternal() | 1 << (pseudo - kFirstPublicPseudoId)));
3571 } 3601 }
3572 3602
3573 inline bool ComputedStyle::HasPseudoElementStyle() const { 3603 inline bool ComputedStyle::HasPseudoElementStyle() const {
3574 return PseudoBitsInternal() & kElementPseudoIdMask; 3604 return PseudoBitsInternal() & kElementPseudoIdMask;
3575 } 3605 }
3576 3606
3577 } // namespace blink 3607 } // namespace blink
3578 3608
3579 #endif // ComputedStyle_h 3609 #endif // ComputedStyle_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698