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

Unified Diff: Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl

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 | « no previous file | Source/core/animation/css/CSSAnimatableValueFactory.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
diff --git a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
index 97b552a043173e8f05fc3bbce1e2e5ef2814ec96..41608da871169671796a0cede7438e6f8dda5016 100644
--- a/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
+++ b/Source/build/scripts/templates/StyleBuilderFunctions.cpp.tmpl
@@ -388,7 +388,7 @@ static bool lengthTypeAndValueMatch(const BorderImageLengthBox& borderImageLengt
{% set map_fill = 'mapFill' + fill_type %}
{{declare_initial_function(property_id)}}
{
- FillLayer* currChild = state.style()->{{access_layers}}();
+ FillLayer* currChild = &state.style()->{{access_layers}}();
currChild->set{{fill_type}}(FillLayer::initialFill{{fill_type}}({{fill_layer_type}}));
for (currChild = currChild->next(); currChild; currChild = currChild->next())
currChild->clear{{fill_type}}();
@@ -396,9 +396,9 @@ static bool lengthTypeAndValueMatch(const BorderImageLengthBox& borderImageLengt
{{declare_inherit_function(property_id)}}
{
- FillLayer* currChild = state.style()->{{access_layers}}();
+ FillLayer* currChild = &state.style()->{{access_layers}}();
FillLayer* prevChild = 0;
- const FillLayer* currParent = state.parentStyle()->{{layer_type|lower}}Layers();
+ const FillLayer* currParent = &state.parentStyle()->{{layer_type|lower}}Layers();
while (currParent && currParent->is{{fill_type}}Set()) {
if (!currChild) {
/* Need to make a new layer.*/
@@ -420,7 +420,7 @@ static bool lengthTypeAndValueMatch(const BorderImageLengthBox& borderImageLengt
{{declare_value_function(property_id)}}
{
- FillLayer* currChild = state.style()->{{access_layers}}();
+ FillLayer* currChild = &state.style()->{{access_layers}}();
FillLayer* prevChild = 0;
if (value->isValueList() && !value->isImageSetValue()) {
/* Walk each value and put it into a layer, creating new layers as needed. */
« no previous file with comments | « no previous file | Source/core/animation/css/CSSAnimatableValueFactory.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698