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

Unified Diff: third_party/WebKit/Source/core/style/ComputedStyle.h

Issue 2933303002: Generate diffs for all fields on StyleRareNonInheritedData (Closed)
Patch Set: fix failing tests 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/style/ComputedStyle.h
diff --git a/third_party/WebKit/Source/core/style/ComputedStyle.h b/third_party/WebKit/Source/core/style/ComputedStyle.h
index 5f3cb9e0a2a9a204911be4b6a9b3dcb239b7ea8b..56d9f7013fc20157abc19507cb33c83d345b3bf9 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -1144,6 +1144,24 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
SET_VAR(rare_non_inherited_data_, opacity_, v);
}
+ bool OpacityChangedStackingContext(const ComputedStyle& other) const {
+ // We only need do layout for opacity changes if adding or losing opacity
+ // could trigger a change
+ // in us being a stacking context.
+ if (IsStackingContext() == other.IsStackingContext() ||
+ HasOpacity() == other.HasOpacity()) {
+ // FIXME: We would like to use SimplifiedLayout here, but we can't quite
+ // do that yet. We need to make sure SimplifiedLayout can operate
+ // correctly on LayoutInlines (we will need to add a
+ // selfNeedsSimplifiedLayout bit in order to not get confused and taint
+ // every line). In addition we need to solve the floating object issue
+ // when layers come and go. Right now a full layout is necessary to keep
+ // floating object lists sane.
+ return true;
+ }
+ return false;
+ }
+
// order (aka -webkit-order)
static int InitialOrder() { return 0; }
int Order() const { return rare_non_inherited_data_->order_; }
@@ -1155,6 +1173,12 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
}
// Outline properties.
+
+ bool OutlineVisuallyEqual(const ComputedStyle& other) const {
+ return rare_non_inherited_data_->outline_.VisuallyEqual(
+ other.rare_non_inherited_data_->outline_);
+ }
+
// outline-color
void SetOutlineColor(const StyleColor& v) {
SET_BORDERVALUE_COLOR(rare_non_inherited_data_, outline_, v);
@@ -3418,18 +3442,45 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
StyleColor VisitedLinkBorderLeftColor() const {
return rare_non_inherited_data_->visited_link_border_left_color_;
}
+ bool VisitedLinkBorderLeftColorHasNotChanged(
+ const ComputedStyle& other) const {
+ return (VisitedLinkBorderLeftColor() ==
+ other.VisitedLinkBorderLeftColor() ||
+ !BorderLeftWidth());
+ }
StyleColor VisitedLinkBorderRightColor() const {
return rare_non_inherited_data_->visited_link_border_right_color_;
}
+ bool VisitedLinkBorderRightColorHasNotChanged(
+ const ComputedStyle& other) const {
+ return (VisitedLinkBorderRightColor() ==
+ other.VisitedLinkBorderRightColor() ||
+ !BorderRightWidth());
+ }
StyleColor VisitedLinkBorderBottomColor() const {
return rare_non_inherited_data_->visited_link_border_bottom_color_;
}
+ bool VisitedLinkBorderBottomColorHasNotChanged(
+ const ComputedStyle& other) const {
+ return (VisitedLinkBorderBottomColor() ==
+ other.VisitedLinkBorderBottomColor() ||
+ !BorderBottomWidth());
+ }
StyleColor VisitedLinkBorderTopColor() const {
return rare_non_inherited_data_->visited_link_border_top_color_;
}
+ bool VisitedLinkBorderTopColorHasNotChanged(
+ const ComputedStyle& other) const {
+ return (VisitedLinkBorderTopColor() == other.VisitedLinkBorderTopColor() ||
+ !BorderTopWidth());
+ }
StyleColor VisitedLinkOutlineColor() const {
return rare_non_inherited_data_->visited_link_outline_color_;
}
+ bool VisitedLinkOutlineColorHasNotChanged(const ComputedStyle& other) const {
+ return (VisitedLinkOutlineColor() == other.VisitedLinkOutlineColor() ||
+ !OutlineWidth());
+ }
StyleColor VisitedLinkColumnRuleColor() const {
return rare_non_inherited_data_->multi_col_data_
->visited_link_column_rule_color_;

Powered by Google App Engine
This is Rietveld 408576698