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

Side by Side Diff: Source/core/css/StylePropertySet.cpp

Issue 119533003: Clear mutable inline style when it is empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Resolved reviewer comments. Created 6 years, 12 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * (C) 1999-2003 Lars Knoll (knoll@kde.org) 2 * (C) 1999-2003 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2012, 2013 Apple Inc. All rights reserved.
4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved. 4 * Copyright (C) 2011 Research In Motion Limited. All rights reserved.
5 * Copyright (C) 2013 Intel Corporation. All rights reserved. 5 * Copyright (C) 2013 Intel Corporation. All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 { 111 {
112 RefPtr<CSSValue> value = getPropertyCSSValue(propertyID); 112 RefPtr<CSSValue> value = getPropertyCSSValue(propertyID);
113 if (value) 113 if (value)
114 return value->cssText(); 114 return value->cssText();
115 115
116 return StylePropertySerializer(*this).getPropertyValue(propertyID); 116 return StylePropertySerializer(*this).getPropertyValue(propertyID);
117 } 117 }
118 118
119 PassRefPtr<CSSVariablesIterator> MutableStylePropertySet::variablesIterator() 119 PassRefPtr<CSSVariablesIterator> MutableStylePropertySet::variablesIterator()
120 { 120 {
121 return VariablesIterator::create(this); 121 return new VariablesIterator(this);
eseidel 2013/12/23 23:26:28 Oh. The ::create() pattern is still perfered (sinc
chrishtr 2013/12/23 23:54:51 Done.
122 } 122 }
123 123
124 PassRefPtr<CSSValue> StylePropertySet::getPropertyCSSValue(CSSPropertyID propert yID) const 124 PassRefPtr<CSSValue> StylePropertySet::getPropertyCSSValue(CSSPropertyID propert yID) const
125 { 125 {
126 int foundPropertyIndex = findPropertyIndex(propertyID); 126 int foundPropertyIndex = findPropertyIndex(propertyID);
127 if (foundPropertyIndex == -1) 127 if (foundPropertyIndex == -1)
128 return 0; 128 return 0;
129 return propertyAt(foundPropertyIndex).value(); 129 return propertyAt(foundPropertyIndex).value();
130 } 130 }
131 131
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 result.appendLiteral(": "); 653 result.appendLiteral(": ");
654 result.append(propertyValue()->cssText()); 654 result.append(propertyValue()->cssText());
655 if (isImportant()) 655 if (isImportant())
656 result.appendLiteral(" !important"); 656 result.appendLiteral(" !important");
657 result.append(';'); 657 result.append(';');
658 return result.toString(); 658 return result.toString();
659 } 659 }
660 660
661 661
662 } // namespace WebCore 662 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698