Chromium Code Reviews| Index: Source/core/css/CSSRegion.h |
| diff --git a/Source/core/css/CSSFilterRule.h b/Source/core/css/CSSRegion.h |
| similarity index 51% |
| copy from Source/core/css/CSSFilterRule.h |
| copy to Source/core/css/CSSRegion.h |
| index 9e605873553aef3821cd10a78e96aa14b9ab9a55..ba82e44bea9d24862fcfa9039991afe54ba300d1 100644 |
| --- a/Source/core/css/CSSFilterRule.h |
| +++ b/Source/core/css/CSSRegion.h |
| @@ -27,37 +27,57 @@ |
| * SUCH DAMAGE. |
| */ |
| -#ifndef CSSFilterRule_h |
| -#define CSSFilterRule_h |
| +#ifndef CSSRegion_h |
| +#define CSSRegion_h |
| -#include "core/css/CSSRule.h" |
| +#include "core/dom/Element.h" |
| +#include "core/dom/PseudoElement.h" |
| +#include "core/dom/Range.h" |
| + |
| +#include "wtf/RefCounted.h" |
| +#include "wtf/RefPtr.h" |
| namespace WebCore { |
| -class CSSStyleDeclaration; |
| -class StyleRuleFilter; |
| -class StyleRuleCSSStyleDeclaration; |
| +class Range; |
| -class CSSFilterRule : public CSSRule { |
| +class CSSRegion { |
| public: |
| - static PassRefPtr<CSSFilterRule> create(StyleRuleFilter* rule, CSSStyleSheet* sheet) { return adoptRef(new CSSFilterRule(rule, sheet)); } |
| + static const AtomicString& webkitRegionOverset(const Element* element) |
| + { |
| + return element->webkitRegionOverset(); |
| + } |
|
abarth-chromium
2013/11/14 07:55:15
We shouldn't use the "webkit" prefix in C++. You
abucur
2013/11/15 07:15:14
Ok, I'll create a code review that will remove the
|
| + |
| + static Vector<RefPtr<Range> > webkitGetRegionFlowRanges(const Element* element) |
| + { |
| + return element->webkitGetRegionFlowRanges(); |
| + } |
| - virtual ~CSSFilterRule(); |
| + static const AtomicString& webkitRegionOverset(const PseudoElement* pseudoElement) |
| + { |
| + PseudoId pseudoId = pseudoElement->pseudoId(); |
| + if (pseudoElement->parentNode() && pseudoElement->parentElement()->pseudoElement(pseudoId) == pseudoElement) |
| + return pseudoElement->webkitRegionOverset(); |
| - virtual CSSRule::Type type() const OVERRIDE { return WEBKIT_FILTER_RULE; } |
| - virtual String cssText() const OVERRIDE; |
| - virtual void reattach(StyleRuleBase*) OVERRIDE; |
| + return nullAtom; |
| + } |
| - CSSStyleDeclaration* style() const; |
| + static Vector<RefPtr<Range> > webkitGetRegionFlowRanges(const PseudoElement* pseudoElement) |
| + { |
| + PseudoId pseudoId = pseudoElement->pseudoId(); |
| + if (pseudoElement->parentNode() && pseudoElement->parentElement()->pseudoElement(pseudoId) == pseudoElement) |
| + return pseudoElement->webkitGetRegionFlowRanges(); |
| + |
| + return Vector<RefPtr<Range> >(); |
| + } |
| private: |
| - CSSFilterRule(StyleRuleFilter*, CSSStyleSheet* parent); |
| + CSSRegion() |
| + { |
| - RefPtr<StyleRuleFilter> m_filterRule; |
| - mutable RefPtr<StyleRuleCSSStyleDeclaration> m_propertiesCSSOMWrapper; |
| + } |
| }; |
| -} |
| - |
| +} // namespace WebCore |
| -#endif // CSSFilterRule_h |
| +#endif // CSSRegion_h |