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

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

Issue 2841433002: Generate StyleBackgroundData in ComputedStyleBase. (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 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 221444d69c8ce5ad0b0c6ca7ba2efdf2f60a16a8..7c64b5b52a6a099ea9572aac8dff273cf33c5a3c 100644
--- a/third_party/WebKit/Source/core/style/ComputedStyle.h
+++ b/third_party/WebKit/Source/core/style/ComputedStyle.h
@@ -37,7 +37,6 @@
#include "core/style/LineClampValue.h"
#include "core/style/NinePieceImage.h"
#include "core/style/SVGComputedStyle.h"
-#include "core/style/StyleBackgroundData.h"
#include "core/style/StyleBoxData.h"
#include "core/style/StyleContentAlignmentData.h"
#include "core/style/StyleDeprecatedFlexibleBoxData.h"
@@ -186,7 +185,6 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// non-inherited attributes
DataRef<StyleBoxData> box_data_;
DataRef<StyleVisualData> visual_data_;
- DataRef<StyleBackgroundData> background_data_;
DataRef<StyleRareNonInheritedData> rare_non_inherited_data_;
// inherited attributes
@@ -417,21 +415,21 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
// background-color
static Color InitialBackgroundColor() { return Color::kTransparent; }
void SetBackgroundColor(const StyleColor& v) {
- SET_VAR(background_data_, color_, v);
+ SET_VAR(background_data_, background_color_, v);
}
// background-image
bool HasBackgroundImage() const {
- return background_data_->Background().HasImage();
+ return background_data_->background_.HasImage();
}
bool HasFixedBackgroundImage() const {
- return background_data_->Background().HasFixedImage();
+ return background_data_->background_.HasFixedImage();
}
bool HasEntirelyFixedBackground() const;
// background-clip
EFillBox BackgroundClip() const {
- return static_cast<EFillBox>(background_data_->Background().Clip());
+ return static_cast<EFillBox>(background_data_->background_.Clip());
}
// Border properties.
@@ -3365,7 +3363,7 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
return background_data_.Access()->background_;
}
const FillLayer& BackgroundLayers() const {
- return background_data_->Background();
+ return background_data_->background_;
}
void AdjustBackgroundLayers() {
if (BackgroundLayers().Next()) {
@@ -3500,7 +3498,9 @@ class CORE_EXPORT ComputedStyle : public ComputedStyleBase,
StyleColor BorderBottomColor() const {
return surround_data_->border_.Bottom().GetColor();
}
- StyleColor BackgroundColor() const { return background_data_->GetColor(); }
+ StyleColor BackgroundColor() const {
+ return background_data_->background_color_;
+ }
StyleAutoColor CaretColor() const {
return rare_inherited_data_->CaretColor();
}
« no previous file with comments | « third_party/WebKit/Source/core/style/BUILD.gn ('k') | third_party/WebKit/Source/core/style/ComputedStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698