Title: [138338] trunk
Revision
138338
Author
[email protected]
Date
2012-12-20 18:42:11 -0800 (Thu, 20 Dec 2012)

Log Message

Replace documentFragmentIsShadowRoot with isTreeScope
https://bugs.webkit.org/show_bug.cgi?id=105345

Reviewed by Dimitri Glazkov.

.:

Expose isTreeScope symbol.

* Source/autotools/symbols.filter:

Source/WebCore:

We can replace documentFragmentIsShadowRoot with isTreeScope() which is
trival to detect by checking treeScope()->rootNode() == this;

No new tests, just refactoring.

* WebCore.exp.in:
* dom/DocumentFragment.h:
(DocumentFragment):
* dom/Node.cpp:
(WebCore::Node::isTreeScope):
* dom/Node.h:
(Node):
(WebCore::Node::isShadowRoot):
* dom/ShadowRoot.h:
(ShadowRoot):

Source/WebKit2:

Expose isTreeScope symbol.

* win/WebKit2.def.in:

Modified Paths

Diff

Modified: trunk/ChangeLog (138337 => 138338)


--- trunk/ChangeLog	2012-12-21 02:41:06 UTC (rev 138337)
+++ trunk/ChangeLog	2012-12-21 02:42:11 UTC (rev 138338)
@@ -1,3 +1,14 @@
+2012-12-20  Elliott Sprehn  <[email protected]>
+
+        Replace documentFragmentIsShadowRoot with isTreeScope
+        https://bugs.webkit.org/show_bug.cgi?id=105345
+
+        Reviewed by Dimitri Glazkov.
+
+        Expose isTreeScope symbol.
+
+        * Source/autotools/symbols.filter:
+
 2012-12-20  Ryuan Choi  <[email protected]>
 
         [EFL] Build break with latest EFL libraries.

Modified: trunk/Source/WebCore/ChangeLog (138337 => 138338)


--- trunk/Source/WebCore/ChangeLog	2012-12-21 02:41:06 UTC (rev 138337)
+++ trunk/Source/WebCore/ChangeLog	2012-12-21 02:42:11 UTC (rev 138338)
@@ -1,3 +1,26 @@
+2012-12-20  Elliott Sprehn  <[email protected]>
+
+        Replace documentFragmentIsShadowRoot with isTreeScope
+        https://bugs.webkit.org/show_bug.cgi?id=105345
+
+        Reviewed by Dimitri Glazkov.
+
+        We can replace documentFragmentIsShadowRoot with isTreeScope() which is
+        trival to detect by checking treeScope()->rootNode() == this;
+
+        No new tests, just refactoring.
+
+        * WebCore.exp.in:
+        * dom/DocumentFragment.h:
+        (DocumentFragment):
+        * dom/Node.cpp:
+        (WebCore::Node::isTreeScope):
+        * dom/Node.h:
+        (Node):
+        (WebCore::Node::isShadowRoot):
+        * dom/ShadowRoot.h:
+        (ShadowRoot):
+
 2012-12-20  Rik Cabanier  <[email protected]>
 
         Add canvas blending modes using Core Graphics

Modified: trunk/Source/WebCore/WebCore.exp.in (138337 => 138338)


--- trunk/Source/WebCore/WebCore.exp.in	2012-12-21 02:41:06 UTC (rev 138337)
+++ trunk/Source/WebCore/WebCore.exp.in	2012-12-21 02:42:11 UTC (rev 138338)
@@ -1369,6 +1369,7 @@
 __ZN7WebCore4Node12insertBeforeEN3WTF10PassRefPtrIS0_EEPS0_Rib
 __ZNK7WebCore4Node13ownerDocumentEv
 __ZNK7WebCore4Node14isDescendantOfEPKS0_
+__ZNK7WebCore4Node11isTreeScopeEv
 __ZNK7WebCore4Node18getSubresourceURLsERN3WTF11ListHashSetINS_4KURLELm256ENS_8KURLHashEEE
 __ZNK7WebCore4Node31numberOfScopedHTMLStyleChildrenEv
 __ZNK7WebCore4Node9nodeIndexEv

Modified: trunk/Source/WebCore/dom/DocumentFragment.h (138337 => 138338)


--- trunk/Source/WebCore/dom/DocumentFragment.h	2012-12-21 02:41:06 UTC (rev 138337)
+++ trunk/Source/WebCore/dom/DocumentFragment.h	2012-12-21 02:42:11 UTC (rev 138338)
@@ -46,7 +46,6 @@
     virtual NodeType nodeType() const;
     virtual PassRefPtr<Node> cloneNode(bool deep);
     virtual bool childTypeAllowed(NodeType) const;
-    virtual bool documentFragmentIsShadowRoot() const OVERRIDE { return false; }
 };
 
 } //namespace

Modified: trunk/Source/WebCore/dom/Node.cpp (138337 => 138338)


--- trunk/Source/WebCore/dom/Node.cpp	2012-12-21 02:41:06 UTC (rev 138337)
+++ trunk/Source/WebCore/dom/Node.cpp	2012-12-21 02:42:11 UTC (rev 138338)
@@ -913,6 +913,11 @@
     return true;
 }
 
+bool Node::isTreeScope() const
+{
+    return treeScope()->rootNode() == this;
+}
+
 bool Node::isKeyboardFocusable(KeyboardEvent*) const
 {
     return isFocusable() && tabIndex() >= 0;
@@ -923,12 +928,6 @@
     return isFocusable();
 }
 
-bool Node::documentFragmentIsShadowRoot() const
-{
-    ASSERT_NOT_REACHED();
-    return false;
-}
-
 Node* Node::focusDelegate()
 {
     return this;

Modified: trunk/Source/WebCore/dom/Node.h (138337 => 138338)


--- trunk/Source/WebCore/dom/Node.h	2012-12-21 02:41:06 UTC (rev 138337)
+++ trunk/Source/WebCore/dom/Node.h	2012-12-21 02:42:11 UTC (rev 138338)
@@ -246,12 +246,12 @@
     virtual bool isCharacterDataNode() const { return false; }
     virtual bool isFrameOwnerElement() const { return false; }
     virtual bool isPluginElement() const { return false; }
-    virtual bool documentFragmentIsShadowRoot() const;
     virtual bool isInsertionPointNode() const { return false; }
 
     bool isDocumentNode() const;
+    bool isTreeScope() const;
     bool isDocumentFragment() const { return getFlag(IsDocumentFragmentFlag); }
-    bool isShadowRoot() const { return isDocumentFragment() && documentFragmentIsShadowRoot(); }
+    bool isShadowRoot() const { return isDocumentFragment() && isTreeScope(); }
     bool isInsertionPoint() const { return getFlag(NeedsShadowTreeWalkerFlag) && isInsertionPointNode(); }
 
     bool needsShadowTreeWalker() const;

Modified: trunk/Source/WebCore/dom/ShadowRoot.h (138337 => 138338)


--- trunk/Source/WebCore/dom/ShadowRoot.h	2012-12-21 02:41:06 UTC (rev 138337)
+++ trunk/Source/WebCore/dom/ShadowRoot.h	2012-12-21 02:42:11 UTC (rev 138338)
@@ -121,7 +121,6 @@
     virtual PassRefPtr<Node> cloneNode(bool deep);
     virtual bool childTypeAllowed(NodeType) const;
     virtual void childrenChanged(bool changedByParser, Node* beforeChange, Node* afterChange, int childCountDelta) OVERRIDE;
-    virtual bool documentFragmentIsShadowRoot() const OVERRIDE { return true; }
 
     void setType(ShadowRootType type) { m_isAuthorShadowRoot = type == AuthorShadowRoot; }
 

Modified: trunk/Source/WebKit2/ChangeLog (138337 => 138338)


--- trunk/Source/WebKit2/ChangeLog	2012-12-21 02:41:06 UTC (rev 138337)
+++ trunk/Source/WebKit2/ChangeLog	2012-12-21 02:42:11 UTC (rev 138338)
@@ -1,3 +1,14 @@
+2012-12-20  Elliott Sprehn  <[email protected]>
+
+        Replace documentFragmentIsShadowRoot with isTreeScope
+        https://bugs.webkit.org/show_bug.cgi?id=105345
+
+        Reviewed by Dimitri Glazkov.
+
+        Expose isTreeScope symbol.
+
+        * win/WebKit2.def.in:
+
 2012-12-20  Kiran Muppala  <[email protected]>
 
         Set timer coalescing policy for WebKit2 processes on Mac until process visible assertion handles it automatically

Modified: trunk/Source/WebKit2/win/WebKit2.def.in (138337 => 138338)


--- trunk/Source/WebKit2/win/WebKit2.def.in	2012-12-21 02:41:06 UTC (rev 138337)
+++ trunk/Source/WebKit2/win/WebKit2.def.in	2012-12-21 02:42:11 UTC (rev 138338)
@@ -301,6 +301,7 @@
         ?toJS@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@PAVNodeList@1@@Z
         ?toRange@WebCore@@YAPAVRange@1@VJSValue@JSC@@@Z
         ?treeScope@Node@WebCore@@QBEPAVTreeScope@2@XZ
+        ?isTreeScope@Node@WebCore@@QBE_NXZ
         ?updateLayoutIgnorePendingStylesheets@Document@WebCore@@QAEXXZ
         ?userPreferredLanguages@WebCore@@YA?AV?$Vector@VString@WTF@@$0A@@WTF@@XZ
         ?utf8@String@WTF@@QBE?AVCString@2@W4ConversionMode@12@@Z

Modified: trunk/Source/autotools/symbols.filter (138337 => 138338)


--- trunk/Source/autotools/symbols.filter	2012-12-21 02:41:06 UTC (rev 138337)
+++ trunk/Source/autotools/symbols.filter	2012-12-21 02:42:11 UTC (rev 138338)
@@ -137,6 +137,7 @@
 _ZNK7WebCore4Node11textContentEb;
 _ZNK7WebCore4Node31numberOfScopedHTMLStyleChildrenEv;
 _ZNK7WebCore4Node9treeScopeEv;
+_ZNK7WebCore4Node11isTreeScopeEv;
 _ZNK7WebCore4Page17viewportArgumentsEv;
 _ZNK7WebCore12RenderObject23absoluteBoundingBoxRectEb;
 _ZNK7WebCore16HTMLInputElement14suggestedValueEv;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to