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

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

Issue 2885753002: Remove references to background_data_ in ComputedStyle. (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1c7035340a3e14fca53571c65699951383eda71e..bc6fe69189bc3640c19bb0169fb0baa60ead3755 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -418,21 +418,19 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
// background-color
static Color InitialBackgroundColor() { return Color::kTransparent; }
void SetBackgroundColor(const StyleColor& v) {
- SET_VAR(background_data_, background_color_, v);
+ SetBackgroundColorInternal(v);
}
// background-image
- bool HasBackgroundImage() const {
- return background_data_->background_.HasImage();
- }
+ bool HasBackgroundImage() const { return BackgroundInternal().HasImage(); }
bool HasFixedBackgroundImage() const {
- return background_data_->background_.HasFixedImage();
+ return BackgroundInternal().HasFixedImage();
}
bool HasEntirelyFixedBackground() const;
// background-clip
EFillBox BackgroundClip() const {
- return static_cast<EFillBox>(background_data_->background_.Clip());
+ return static_cast<EFillBox>(BackgroundInternal().Clip());
}
// Border properties.
@@ -3393,12 +3391,8 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
}
// Background utility functions.
- FillLayer& AccessBackgroundLayers() {
- return background_data_.Access()->background_;
- }
- const FillLayer& BackgroundLayers() const {
- return background_data_->background_;
- }
+ FillLayer& AccessBackgroundLayers() { return MutableBackgroundInternal(); }
shend 2017/05/16 07:50:06 yay these actually have uses :P
nainar 2017/05/16 07:51:28 lol. :P we are way too excited if this makes us ha
+ const FillLayer& BackgroundLayers() const { return BackgroundInternal(); }
void AdjustBackgroundLayers() {
if (BackgroundLayers().Next()) {
AccessBackgroundLayers().CullEmptyLayers();
@@ -3554,9 +3548,7 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase<ComputedStyle>,
: StyleColor(BorderBottomColorInternal());
}
- StyleColor BackgroundColor() const {
- return background_data_->background_color_;
- }
+ StyleColor BackgroundColor() const { return BackgroundColorInternal(); }
StyleAutoColor CaretColor() const {
if (rare_inherited_data_->caret_color_is_current_color_)
return StyleAutoColor::CurrentColor();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698