Title: [107347] trunk/Source/WebCore
Revision
107347
Author
[email protected]
Date
2012-02-09 19:45:06 -0800 (Thu, 09 Feb 2012)

Log Message

Add Node::isShadowElement() member function.
https://bugs.webkit.org/show_bug.cgi?id=78201

Reviewed by Dimitri Glazkov.

No tests. No change in behavior. An upcoming change requires this to detect HTMLShadowElement.

* dom/Node.h:
(Node):
(WebCore::Node::isShadowElement):
* html/shadow/HTMLShadowElement.h:
(WebCore::HTMLShadowElement::isShadowElement):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (107346 => 107347)


--- trunk/Source/WebCore/ChangeLog	2012-02-10 03:34:21 UTC (rev 107346)
+++ trunk/Source/WebCore/ChangeLog	2012-02-10 03:45:06 UTC (rev 107347)
@@ -1,3 +1,18 @@
+2012-02-09  Hayato Ito  <[email protected]>
+
+        Add Node::isShadowElement() member function.
+        https://bugs.webkit.org/show_bug.cgi?id=78201
+
+        Reviewed by Dimitri Glazkov.
+
+        No tests. No change in behavior. An upcoming change requires this to detect HTMLShadowElement.
+
+        * dom/Node.h:
+        (Node):
+        (WebCore::Node::isShadowElement):
+        * html/shadow/HTMLShadowElement.h:
+        (WebCore::HTMLShadowElement::isShadowElement):
+
 2012-02-09  Ryosuke Niwa  <[email protected]>
 
         CachedResourceLoader is destroyed before CSSFontSelector is destroyed

Modified: trunk/Source/WebCore/dom/Node.h (107346 => 107347)


--- trunk/Source/WebCore/dom/Node.h	2012-02-10 03:34:21 UTC (rev 107346)
+++ trunk/Source/WebCore/dom/Node.h	2012-02-10 03:45:06 UTC (rev 107347)
@@ -224,6 +224,9 @@
     bool isDocumentNode() const;
     bool isShadowRoot() const { return getFlag(IsShadowRootOrSVGShadowRootFlag) && !isSVGElement(); }
     virtual bool isContentElement() const { return false; }
+#if ENABLE(SHADOW_DOM)
+    virtual bool isShadowElement() const { return false; }
+#endif
 
     Node* shadowAncestorNode() const;
     // Returns 0, a ShadowRoot, or a legacy shadow root.

Modified: trunk/Source/WebCore/html/shadow/HTMLShadowElement.h (107346 => 107347)


--- trunk/Source/WebCore/html/shadow/HTMLShadowElement.h	2012-02-10 03:34:21 UTC (rev 107346)
+++ trunk/Source/WebCore/html/shadow/HTMLShadowElement.h	2012-02-10 03:45:06 UTC (rev 107347)
@@ -45,6 +45,7 @@
 
 private:
     HTMLShadowElement(const QualifiedName&, Document*);
+    virtual bool isShadowElement() const { return true; }
 };
 
 } // namespace WebCore
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to