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

Unified Diff: Source/core/css/CSSRegion.h

Issue 38943008: Explore the possibility of implementing the CSS Region interface. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/css/CSSRegion.h
diff --git a/Source/core/css/CSSFilterRule.h b/Source/core/css/CSSRegion.h
similarity index 62%
copy from Source/core/css/CSSFilterRule.h
copy to Source/core/css/CSSRegion.h
index 9e605873553aef3821cd10a78e96aa14b9ab9a55..0bdbf68bb854329e81eac6a5f03837fe1fdb0d4f 100644
--- a/Source/core/css/CSSFilterRule.h
+++ b/Source/core/css/CSSRegion.h
@@ -27,37 +27,52 @@
* 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/Range.h"
+
+#include "wtf/RefCounted.h"
+#include "wtf/RefPtr.h"
namespace WebCore {
-class CSSStyleDeclaration;
-class StyleRuleFilter;
-class StyleRuleCSSStyleDeclaration;
+class Range;
+class RenderRegion;
-class CSSFilterRule : public CSSRule {
+class CSSRegion : public RefCounted<CSSRegion> {
public:
- static PassRefPtr<CSSFilterRule> create(StyleRuleFilter* rule, CSSStyleSheet* sheet) { return adoptRef(new CSSFilterRule(rule, sheet)); }
+ static PassRefPtr<CSSRegion> create(const RenderRegion* region)
Inactive 2013/10/25 17:48:50 Would be nice to use a reference instead of a poin
+ {
+ return adoptRef(new CSSRegion(region));
+ }
- virtual ~CSSFilterRule();
+ static const AtomicString& webkitRegionOverset(const Element* element)
Inactive 2013/10/25 17:48:50 Would be nice to use a reference instead of a poin
+ {
+ return element->webkitRegionOverset();
+ }
- virtual CSSRule::Type type() const OVERRIDE { return WEBKIT_FILTER_RULE; }
- virtual String cssText() const OVERRIDE;
- virtual void reattach(StyleRuleBase*) OVERRIDE;
+ static Vector<RefPtr<Range>> webkitGetRegionFlowRanges(const Element* element)
Inactive 2013/10/25 17:48:50 '>>' do we support C++11 on all platforms now?
Inactive 2013/10/25 17:48:50 Would be nice to use a reference instead of a poin
+ {
+ return element->webkitGetRegionFlowRanges();
+ }
- CSSStyleDeclaration* style() const;
+ const RenderRegion* region()
Inactive 2013/10/25 17:48:50 This getter could be const and return a reference.
+ {
+ return m_region;
+ }
private:
- CSSFilterRule(StyleRuleFilter*, CSSStyleSheet* parent);
+ CSSRegion(const RenderRegion* region)
+ : m_region(region)
+ {
- RefPtr<StyleRuleFilter> m_filterRule;
- mutable RefPtr<StyleRuleCSSStyleDeclaration> m_propertiesCSSOMWrapper;
-};
+ }
-}
+ const RenderRegion* m_region;
abarth-chromium 2013/10/25 16:56:20 How are the lifetimes of CSSRegion and RenderRegio
+};
+} // namespace WebCore
-#endif // CSSFilterRule_h
+#endif // CSSRegion_h

Powered by Google App Engine
This is Rietveld 408576698