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

Unified Diff: Source/core/css/InlineVariablesIterator.cpp

Issue 119533003: Clear mutable inline style when it is empty. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fixed typo. Created 7 years 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/css/InlineVariablesIterator.h ('k') | Source/core/css/PropertySetCSSStyleDeclaration.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/InlineVariablesIterator.cpp
diff --git a/Source/platform/graphics/filters/SourceAlpha.h b/Source/core/css/InlineVariablesIterator.cpp
similarity index 53%
copy from Source/platform/graphics/filters/SourceAlpha.h
copy to Source/core/css/InlineVariablesIterator.cpp
index 519a31af32f9ccd11cac8787250ec4660b7e9754..5b2c56f19734bc166b85c01b3f6e6c4492a4925e 100644
--- a/Source/platform/graphics/filters/SourceAlpha.h
+++ b/Source/core/css/InlineVariablesIterator.cpp
@@ -1,5 +1,4 @@
/*
- * Copyright (C) 2009 Dirk Schulze <krit@webkit.org>
* Copyright (C) 2013 Google Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
@@ -18,35 +17,35 @@
* Boston, MA 02110-1301, USA.
*/
-#ifndef SourceAlpha_h
-#define SourceAlpha_h
+#include "config.h"
+#include "core/css/InlineVariablesIterator.h"
-#include "platform/graphics/filters/Filter.h"
-#include "platform/graphics/filters/FilterEffect.h"
+#include "RuntimeEnabledFeatures.h"
+#include "core/css/CSSVariableValue.h"
+#include "core/css/StylePropertySet.h"
+#include "core/dom/Element.h"
namespace WebCore {
-class PLATFORM_EXPORT SourceAlpha : public FilterEffect {
-public:
- static PassRefPtr<SourceAlpha> create(Filter*);
+InlineVariablesIterator::InlineVariablesIterator(Element* element)
+ : m_element(element)
+{
+ ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled());
- static const AtomicString& effectName();
-
- virtual void determineAbsolutePaintRect();
-
- virtual FilterEffectType filterEffectType() const { return FilterEffectTypeSourceInput; }
-
- virtual TextStream& externalRepresentation(TextStream&, int indention) const;
-
-private:
- SourceAlpha(Filter* filter)
- : FilterEffect(filter)
- {
+ const StylePropertySet* propertySet = element->inlineStyle();
+ if (propertySet) {
+ initRemainingNames(propertySet);
}
+}
- virtual void applySoftware() OVERRIDE;
-};
+PassRefPtr<InlineVariablesIterator> InlineVariablesIterator::create(Element* element)
+{
+ return adoptRef(new InlineVariablesIterator(element));
+}
-} // namespace WebCore
+MutableStylePropertySet* InlineVariablesIterator::propertySet() const
+{
+ return m_element->ensureMutableInlineStyle();
+}
-#endif // SourceAlpha_h
+} // namespace WebCore
« no previous file with comments | « Source/core/css/InlineVariablesIterator.h ('k') | Source/core/css/PropertySetCSSStyleDeclaration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698