| Index: Source/bindings/v8/custom/V8CSSRegionCustom.cpp
|
| diff --git a/Source/core/css/CSSFilterRule.h b/Source/bindings/v8/custom/V8CSSRegionCustom.cpp
|
| similarity index 61%
|
| copy from Source/core/css/CSSFilterRule.h
|
| copy to Source/bindings/v8/custom/V8CSSRegionCustom.cpp
|
| index 9e605873553aef3821cd10a78e96aa14b9ab9a55..93e47970546d2c1720e39501538dff19f3c9582d 100644
|
| --- a/Source/core/css/CSSFilterRule.h
|
| +++ b/Source/bindings/v8/custom/V8CSSRegionCustom.cpp
|
| @@ -27,37 +27,31 @@
|
| * SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef CSSFilterRule_h
|
| -#define CSSFilterRule_h
|
| +#include "config.h"
|
| +#include "V8CSSRegion.h"
|
|
|
| -#include "core/css/CSSRule.h"
|
| +#include "V8HTMLElement.h"
|
| +#include "bindings/v8/V8Binding.h"
|
| +#include "core/css/CSSRegion.h"
|
| +#include "core/dom/Element.h"
|
| +#include "core/dom/Range.h"
|
| +#include "core/rendering/RenderRegion.h"
|
| +#include "wtf/RefPtr.h"
|
|
|
| namespace WebCore {
|
|
|
| -class CSSStyleDeclaration;
|
| -class StyleRuleFilter;
|
| -class StyleRuleCSSStyleDeclaration;
|
| -
|
| -class CSSFilterRule : public CSSRule {
|
| -public:
|
| - static PassRefPtr<CSSFilterRule> create(StyleRuleFilter* rule, CSSStyleSheet* sheet) { return adoptRef(new CSSFilterRule(rule, sheet)); }
|
| -
|
| - virtual ~CSSFilterRule();
|
| -
|
| - virtual CSSRule::Type type() const OVERRIDE { return WEBKIT_FILTER_RULE; }
|
| - virtual String cssText() const OVERRIDE;
|
| - virtual void reattach(StyleRuleBase*) OVERRIDE;
|
| -
|
| - CSSStyleDeclaration* style() const;
|
| -
|
| -private:
|
| - CSSFilterRule(StyleRuleFilter*, CSSStyleSheet* parent);
|
| -
|
| - RefPtr<StyleRuleFilter> m_filterRule;
|
| - mutable RefPtr<StyleRuleCSSStyleDeclaration> m_propertiesCSSOMWrapper;
|
| -};
|
| -
|
| +v8::Handle<v8::Object> wrap(CSSRegion* impl, v8::Handle<v8::Object> creationContext, v8::Isolate* isolate)
|
| +{
|
| + ASSERT(impl);
|
| + const RenderRegion* region = impl->region();
|
| +
|
| + // FIXME: Add more types once we support the PseudoElement interface
|
| + ASSERT(region->element());
|
| + ASSERT(region->element()->isHTMLElement());
|
| + v8::Handle<v8::Object> wrapper = DOMDataStore::getWrapper<V8HTMLElement>(toHTMLElement(region->element()), isolate);
|
| + if (!wrapper.IsEmpty())
|
| + return wrapper;
|
| + return wrap(toHTMLElement(region->element()), creationContext, isolate);
|
| }
|
|
|
| -
|
| -#endif // CSSFilterRule_h
|
| +} // namespace WebCore
|
|
|