Chromium Code Reviews| 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..b50f9c4f5577da6c656fccead1bd9275fec24c36 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,32 @@ |
| * 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*); |
| +PassRefPtr<InlineVariablesIterator> InlineVariablesIterator::create(Element* element) |
| +{ |
| + ASSERT(RuntimeEnabledFeatures::cssVariablesEnabled()); |
| + RefPtr<InlineVariablesIterator> iterator = adoptRef(new InlineVariablesIterator(element)); |
| - 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(); |
|
eseidel
2013/12/23 21:22:43
Shouldn't this be in the constructor itself instea
chrishtr
2013/12/23 22:06:46
Good point. I was following the existing structure
|
| + if (propertySet) { |
| + AbstractVariablesIterator::initRemainingNames(propertySet, iterator.get()); |
| } |
| + return iterator.release(); |
| +} |
| - virtual void applySoftware() OVERRIDE; |
| -}; |
| -} // namespace WebCore |
| +MutableStylePropertySet* InlineVariablesIterator::propertySet() const |
| +{ |
| + return m_element->ensureMutableInlineStyle(); |
| +} |
| -#endif // SourceAlpha_h |
| +} // namespace WebCore |