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

Unified Diff: Source/core/rendering/style/RenderStyle.h

Issue 381473002: Use reference for FillLayer if possible (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 | « Source/core/rendering/style/CachedUAStyle.h ('k') | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/style/RenderStyle.h
diff --git a/Source/core/rendering/style/RenderStyle.h b/Source/core/rendering/style/RenderStyle.h
index 5e49939420771fc2dc5786a27af8079d6c4b3967..a85ead09327a7ff7803eb88daf80e084e86266a4 100644
--- a/Source/core/rendering/style/RenderStyle.h
+++ b/Source/core/rendering/style/RenderStyle.h
@@ -651,8 +651,8 @@ public:
const Length& backgroundYPosition() const { return m_background->background().yPosition(); }
EFillSizeType backgroundSizeType() const { return m_background->background().sizeType(); }
const LengthSize& backgroundSizeLength() const { return m_background->background().sizeLength(); }
- FillLayer* accessBackgroundLayers() { return &(m_background.access()->m_background); }
- const FillLayer* backgroundLayers() const { return &(m_background->background()); }
+ FillLayer& accessBackgroundLayers() { return m_background.access()->m_background; }
+ const FillLayer& backgroundLayers() const { return m_background->background(); }
StyleImage* maskImage() const { return rareNonInheritedData->m_mask.image(); }
EFillRepeat maskRepeatX() const { return static_cast<EFillRepeat>(rareNonInheritedData->m_mask.repeatX()); }
@@ -664,8 +664,8 @@ public:
const Length& maskYPosition() const { return rareNonInheritedData->m_mask.yPosition(); }
EFillSizeType maskSizeType() const { return rareNonInheritedData->m_mask.sizeType(); }
const LengthSize& maskSizeLength() const { return rareNonInheritedData->m_mask.sizeLength(); }
- FillLayer* accessMaskLayers() { return &(rareNonInheritedData.access()->m_mask); }
- const FillLayer* maskLayers() const { return &(rareNonInheritedData->m_mask); }
+ FillLayer& accessMaskLayers() { return rareNonInheritedData.access()->m_mask; }
+ const FillLayer& maskLayers() const { return rareNonInheritedData->m_mask; }
const NinePieceImage& maskBoxImage() const { return rareNonInheritedData->m_maskBoxImage; }
StyleImage* maskBoxImageSource() const { return rareNonInheritedData->m_maskBoxImage.image(); }
@@ -1143,17 +1143,17 @@ public:
void adjustBackgroundLayers()
{
- if (backgroundLayers()->next()) {
- accessBackgroundLayers()->cullEmptyLayers();
- accessBackgroundLayers()->fillUnsetProperties();
+ if (backgroundLayers().next()) {
+ accessBackgroundLayers().cullEmptyLayers();
+ accessBackgroundLayers().fillUnsetProperties();
}
}
void adjustMaskLayers()
{
- if (maskLayers()->next()) {
- accessMaskLayers()->cullEmptyLayers();
- accessMaskLayers()->fillUnsetProperties();
+ if (maskLayers().next()) {
+ accessMaskLayers().cullEmptyLayers();
+ accessMaskLayers().fillUnsetProperties();
}
}
« no previous file with comments | « Source/core/rendering/style/CachedUAStyle.h ('k') | Source/core/rendering/style/RenderStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698