WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
ready for review. let me watch whether mac-build error is reproducible or not
bug-77514-20120206152638.patch (text/plain), 24.07 KB, created by
Hayato Ito
on 2012-02-05 22:26:40 PST
(
hide
)
Description:
ready for review. let me watch whether mac-build error is reproducible or not
Filename:
MIME Type:
Creator:
Hayato Ito
Created:
2012-02-05 22:26:40 PST
Size:
24.07 KB
patch
obsolete
>Subversion Revision: 106668 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index b4639e2f1755375c573cd2bade8b0800c286de36..cbdec0164bad339f6e44f6d4d1b6f93adf388a19 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,57 @@ >+2012-02-05 Hayato Ito <hayato@chromium.org> >+ >+ Make ShadowRoot.nodeType return DOCUMENT_FRAGMENT_NODE. >+ https://bugs.webkit.org/show_bug.cgi?id=77514 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ NodeType.SHADOW_ROOT_NODE type is finally gone. >+ >+ * bindings/js/JSNodeCustom.cpp: >+ (WebCore::createWrapperInline): >+ * bindings/objc/DOM.mm: >+ (kitClass): >+ * bindings/v8/custom/V8NodeCustom.cpp: >+ (WebCore::toV8Slow): >+ * dom/Document.cpp: >+ (WebCore::Document::importNode): >+ (WebCore::Document::childTypeAllowed): >+ (WebCore::Document::canReplaceChild): >+ * dom/Node.cpp: >+ (WebCore::Node::dumpStatistics): >+ (WebCore::Node::isDefaultNamespace): >+ (WebCore::Node::lookupPrefix): >+ (WebCore::Node::lookupNamespaceURI): >+ (WebCore::appendTextContent): >+ (WebCore::Node::setTextContent): >+ * dom/Node.h: >+ * dom/Range.cpp: >+ (WebCore::lengthOfContentsInNode): >+ (WebCore::Range::processContentsBetweenOffsets): >+ (WebCore::Range::insertNode): >+ (WebCore::Range::checkNodeWOffset): >+ (WebCore::Range::checkNodeBA): >+ (WebCore::Range::selectNode): >+ (WebCore::Range::selectNodeContents): >+ (WebCore::Range::surroundContents): >+ * dom/ShadowRoot.cpp: >+ * dom/ShadowRoot.h: >+ (ShadowRoot): >+ (WebCore::toShadowRoot): >+ * editing/FrameSelection.cpp: >+ (WebCore::nodeIsDetachedFromDocument): >+ (WebCore): >+ (WebCore::FrameSelection::textWillBeReplaced): >+ * editing/MarkupAccumulator.cpp: >+ (WebCore::MarkupAccumulator::appendStartMarkup): >+ * html/parser/HTMLElementStack.cpp: >+ (WebCore::HTMLNames::isRootNode): >+ (WebCore::HTMLElementStack::pushRootNode): >+ * html/parser/HTMLElementStack.h: >+ (WebCore::isInHTMLNamespace): >+ * xml/XPathUtil.cpp: >+ (WebCore::XPath::isValidContextNode): >+ > 2012-02-03 Balazs Kelemen <kbalazs@webkit.org> > > Speculative unreviewed build fix for Qt-Windows >diff --git a/Source/WebKit/chromium/ChangeLog b/Source/WebKit/chromium/ChangeLog >index 0a4ced4afa8c59ddcc72e4623152843dd94e6fd4..77745e43487d1f21fe0c54db1a028e4b3b08d94f 100644 >--- a/Source/WebKit/chromium/ChangeLog >+++ b/Source/WebKit/chromium/ChangeLog >@@ -1,3 +1,15 @@ >+2012-02-05 Hayato Ito <hayato@chromium.org> >+ >+ Make ShadowRoot.nodeType return DOCUMENT_FRAGMENT_NODE. >+ https://bugs.webkit.org/show_bug.cgi?id=77514 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ NodeType.SHADOW_ROOT_NODE type is finally gone. >+ >+ * src/WebPageSerializerImpl.cpp: >+ (WebKit::WebPageSerializerImpl::buildContentForNode): >+ > 2012-02-03 Dana Jansens <danakj@chromium.org> > > [Chromium] Use the current clip when marking paints as opaque >diff --git a/Source/WebCore/bindings/js/JSNodeCustom.cpp b/Source/WebCore/bindings/js/JSNodeCustom.cpp >index 61c15d6b94f828e1dbb15dfa26cab99528e99804..41433758f8cc40ee9395a3a896d80d920dba5cca 100644 >--- a/Source/WebCore/bindings/js/JSNodeCustom.cpp >+++ b/Source/WebCore/bindings/js/JSNodeCustom.cpp >@@ -254,11 +254,12 @@ static ALWAYS_INLINE JSValue createWrapperInline(ExecState* exec, JSDOMGlobalObj > wrapper = CREATE_DOM_WRAPPER(exec, globalObject, Notation, node); > break; > case Node::DOCUMENT_FRAGMENT_NODE: >+ // In case of ShadowRoot, a cached ShadowRoot binding is always used and this >+ // code path never be used in current API set. >+ // Once we have such APIs, we should call CREATE_DOM_WRAPPER using ShadowRoot. >+ ASSERT(!node->isShadowRoot()); > wrapper = CREATE_DOM_WRAPPER(exec, globalObject, DocumentFragment, node); > break; >- case Node::SHADOW_ROOT_NODE: >- wrapper = CREATE_DOM_WRAPPER(exec, globalObject, Node, node); >- break; > case Node::ENTITY_REFERENCE_NODE: > wrapper = CREATE_DOM_WRAPPER(exec, globalObject, EntityReference, node); > break; >diff --git a/Source/WebCore/bindings/objc/DOM.mm b/Source/WebCore/bindings/objc/DOM.mm >index 8ccb7e286dd46095cd80551fd1349c7b35e3765c..780634acbb5b31b5dafa751fd57208862df248d6 100644 >--- a/Source/WebCore/bindings/objc/DOM.mm >+++ b/Source/WebCore/bindings/objc/DOM.mm >@@ -327,8 +327,6 @@ Class kitClass(WebCore::Node* impl) > // FIXME: Create an XPath objective C wrapper > // See http://bugs.webkit.org/show_bug.cgi?id=8755 > return nil; >- case WebCore::Node::SHADOW_ROOT_NODE: >- return [DOMNode class]; > } > ASSERT_NOT_REACHED(); > return nil; >diff --git a/Source/WebCore/bindings/v8/custom/V8NodeCustom.cpp b/Source/WebCore/bindings/v8/custom/V8NodeCustom.cpp >index 4ad13d4af7cfd5246f80f681acfc4996f904c5d7..6a98fec4815f5802f29b052c2f9d98b04d35bbd1 100644 >--- a/Source/WebCore/bindings/v8/custom/V8NodeCustom.cpp >+++ b/Source/WebCore/bindings/v8/custom/V8NodeCustom.cpp >@@ -163,10 +163,13 @@ v8::Handle<v8::Value> toV8Slow(Node* impl, bool forceNewObject) > case Node::DOCUMENT_TYPE_NODE: > return toV8(static_cast<DocumentType*>(impl), forceNewObject); > case Node::DOCUMENT_FRAGMENT_NODE: >+ // In case of ShadowRoot, a cached ShadowRoot is always used and this >+ // code path never be used in current API set. >+ // Once we have such APIs, we should call toV8(static_cast<ShadowRoot*>..). >+ ASSERT(!impl->isShadowRoot()); > return toV8(static_cast<DocumentFragment*>(impl), forceNewObject); > case Node::NOTATION_NODE: > return toV8(static_cast<Notation*>(impl), forceNewObject); >- case Node::SHADOW_ROOT_NODE: // There's no IDL class for ShadowRoot, fall-through to default and use Node instead. > default: break; // XPATH_NAMESPACE_NODE > } > return V8Node::wrap(impl, forceNewObject); >diff --git a/Source/WebCore/dom/Document.cpp b/Source/WebCore/dom/Document.cpp >index 6ef4bc77096c27bd1d4af81ab3a6abbbdfe411a8..bf41ab058b293ef47f5712c6d1bbd4942803144d 100644 >--- a/Source/WebCore/dom/Document.cpp >+++ b/Source/WebCore/dom/Document.cpp >@@ -877,6 +877,11 @@ PassRefPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionCo > case ATTRIBUTE_NODE: > return Attr::create(0, this, static_cast<Attr*>(importedNode)->attr()->clone()); > case DOCUMENT_FRAGMENT_NODE: { >+ if (importedNode->isShadowRoot()) { >+ // ShadowRoot nodes should not be explicitly importable. >+ // Either they are imported along with their host node, or created implicitly. >+ break; >+ } > DocumentFragment* oldFragment = static_cast<DocumentFragment*>(importedNode); > RefPtr<DocumentFragment> newFragment = createDocumentFragment(); > if (deep) { >@@ -899,9 +904,6 @@ PassRefPtr<Node> Document::importNode(Node* importedNode, bool deep, ExceptionCo > case DOCUMENT_NODE: > case DOCUMENT_TYPE_NODE: > case XPATH_NAMESPACE_NODE: >- case SHADOW_ROOT_NODE: >- // ShadowRoot nodes should not be explicitly importable. >- // Either they are imported along with their host node, or created implicitly. > break; > } > ec = NOT_SUPPORTED_ERR; >@@ -2848,7 +2850,6 @@ bool Document::childTypeAllowed(NodeType type) const > case NOTATION_NODE: > case TEXT_NODE: > case XPATH_NAMESPACE_NODE: >- case SHADOW_ROOT_NODE: > return false; > case COMMENT_NODE: > case PROCESSING_INSTRUCTION_NODE: >@@ -2918,9 +2919,6 @@ bool Document::canReplaceChild(Node* newChild, Node* oldChild) > case ELEMENT_NODE: > numElements++; > break; >- case SHADOW_ROOT_NODE: >- ASSERT_NOT_REACHED(); >- return false; > } > } > } else { >@@ -2934,7 +2932,6 @@ bool Document::canReplaceChild(Node* newChild, Node* oldChild) > case NOTATION_NODE: > case TEXT_NODE: > case XPATH_NAMESPACE_NODE: >- case SHADOW_ROOT_NODE: > return false; > case COMMENT_NODE: > case PROCESSING_INSTRUCTION_NODE: >diff --git a/Source/WebCore/dom/Node.cpp b/Source/WebCore/dom/Node.cpp >index 738000fecd314ae0dcbef7a2a9cd811f5825353f..15c810d9fd997b526cafbf9bae15e35af04b3879 100644 >--- a/Source/WebCore/dom/Node.cpp >+++ b/Source/WebCore/dom/Node.cpp >@@ -234,7 +234,10 @@ void Node::dumpStatistics() > break; > } > case DOCUMENT_FRAGMENT_NODE: { >- ++fragmentNodes; >+ if (node->isShadowRoot()) >+ ++shadowRootNodes; >+ else >+ ++fragmentNodes; > break; > } > case NOTATION_NODE: { >@@ -245,10 +248,6 @@ void Node::dumpStatistics() > ++xpathNSNodes; > break; > } >- case SHADOW_ROOT_NODE: { >- ++shadowRootNodes; >- break; >- } > } > } > >@@ -1853,7 +1852,6 @@ bool Node::isDefaultNamespace(const AtomicString& namespaceURIMaybeEmpty) const > case NOTATION_NODE: > case DOCUMENT_TYPE_NODE: > case DOCUMENT_FRAGMENT_NODE: >- case SHADOW_ROOT_NODE: > return false; > case ATTRIBUTE_NODE: { > const Attr* attr = static_cast<const Attr*>(this); >@@ -1887,7 +1885,6 @@ String Node::lookupPrefix(const AtomicString &namespaceURI) const > case NOTATION_NODE: > case DOCUMENT_FRAGMENT_NODE: > case DOCUMENT_TYPE_NODE: >- case SHADOW_ROOT_NODE: > return String(); > case ATTRIBUTE_NODE: { > const Attr *attr = static_cast<const Attr *>(this); >@@ -1946,7 +1943,6 @@ String Node::lookupNamespaceURI(const String &prefix) const > case NOTATION_NODE: > case DOCUMENT_TYPE_NODE: > case DOCUMENT_FRAGMENT_NODE: >- case SHADOW_ROOT_NODE: > return String(); > case ATTRIBUTE_NODE: { > const Attr *attr = static_cast<const Attr *>(this); >@@ -2012,7 +2008,6 @@ static void appendTextContent(const Node* node, bool convertBRsToNewlines, bool& > case Node::ENTITY_NODE: > case Node::ENTITY_REFERENCE_NODE: > case Node::DOCUMENT_FRAGMENT_NODE: >- case Node::SHADOW_ROOT_NODE: > isNullString = false; > for (Node* child = node->firstChild(); child; child = child->nextSibling()) { > if (child->nodeType() == Node::COMMENT_NODE || child->nodeType() == Node::PROCESSING_INSTRUCTION_NODE) >@@ -2050,8 +2045,7 @@ void Node::setTextContent(const String& text, ExceptionCode& ec) > case ATTRIBUTE_NODE: > case ENTITY_NODE: > case ENTITY_REFERENCE_NODE: >- case DOCUMENT_FRAGMENT_NODE: >- case SHADOW_ROOT_NODE: { >+ case DOCUMENT_FRAGMENT_NODE: { > ContainerNode* container = toContainerNode(this); > #if ENABLE(MUTATION_OBSERVERS) > ChildListMutationScope mutation(this); >diff --git a/Source/WebCore/dom/Node.h b/Source/WebCore/dom/Node.h >index 311bd4117cff9e740af60bffcb796bf00c389060..ea66064b145fc7fc451e2599f55094ea1aa0507e 100644 >--- a/Source/WebCore/dom/Node.h >+++ b/Source/WebCore/dom/Node.h >@@ -122,7 +122,6 @@ public: > DOCUMENT_FRAGMENT_NODE = 11, > NOTATION_NODE = 12, > XPATH_NAMESPACE_NODE = 13, >- SHADOW_ROOT_NODE = 14 > }; > enum DocumentPosition { > DOCUMENT_POSITION_EQUIVALENT = 0x00, >diff --git a/Source/WebCore/dom/Range.cpp b/Source/WebCore/dom/Range.cpp >index 9b569b3e0109644757a50b3d87d9b71851af7b53..dbe7fcccde3906be27915b2653f0ce28439597f7 100644 >--- a/Source/WebCore/dom/Range.cpp >+++ b/Source/WebCore/dom/Range.cpp >@@ -677,7 +677,6 @@ static inline unsigned lengthOfContentsInNode(Node* node) > case Node::DOCUMENT_FRAGMENT_NODE: > case Node::NOTATION_NODE: > case Node::XPATH_NAMESPACE_NODE: >- case Node::SHADOW_ROOT_NODE: > return node->childNodeCount(); > } > ASSERT_NOT_REACHED(); >@@ -840,7 +839,6 @@ PassRefPtr<Node> Range::processContentsBetweenOffsets(ActionType action, PassRef > case Node::DOCUMENT_FRAGMENT_NODE: > case Node::NOTATION_NODE: > case Node::XPATH_NAMESPACE_NODE: >- case Node::SHADOW_ROOT_NODE: > // FIXME: Should we assert that some nodes never appear here? > if (action == EXTRACT_CONTENTS || action == CLONE_CONTENTS) { > if (fragment) >@@ -1028,7 +1026,6 @@ void Range::insertNode(PassRefPtr<Node> prpNewNode, ExceptionCode& ec) > case Node::ENTITY_NODE: > case Node::NOTATION_NODE: > case Node::DOCUMENT_NODE: >- case Node::SHADOW_ROOT_NODE: > ec = RangeException::INVALID_NODE_TYPE_ERR; > return; > default: >@@ -1217,8 +1214,7 @@ Node* Range::checkNodeWOffset(Node* n, int offset, ExceptionCode& ec) const > case Node::DOCUMENT_NODE: > case Node::ELEMENT_NODE: > case Node::ENTITY_REFERENCE_NODE: >- case Node::XPATH_NAMESPACE_NODE: >- case Node::SHADOW_ROOT_NODE: { >+ case Node::XPATH_NAMESPACE_NODE: { > if (!offset) > return 0; > Node* childBefore = n->childNode(offset - 1); >@@ -1243,7 +1239,6 @@ void Range::checkNodeBA(Node* n, ExceptionCode& ec) const > case Node::DOCUMENT_NODE: > case Node::ENTITY_NODE: > case Node::NOTATION_NODE: >- case Node::SHADOW_ROOT_NODE: > ec = RangeException::INVALID_NODE_TYPE_ERR; > return; > case Node::CDATA_SECTION_NODE: >@@ -1265,7 +1260,6 @@ void Range::checkNodeBA(Node* n, ExceptionCode& ec) const > case Node::ATTRIBUTE_NODE: > case Node::DOCUMENT_NODE: > case Node::DOCUMENT_FRAGMENT_NODE: >- case Node::SHADOW_ROOT_NODE: > break; > case Node::CDATA_SECTION_NODE: > case Node::COMMENT_NODE: >@@ -1397,7 +1391,6 @@ void Range::selectNode(Node* refNode, ExceptionCode& ec) > case Node::PROCESSING_INSTRUCTION_NODE: > case Node::TEXT_NODE: > case Node::XPATH_NAMESPACE_NODE: >- case Node::SHADOW_ROOT_NODE: > break; > case Node::DOCUMENT_TYPE_NODE: > case Node::ENTITY_NODE: >@@ -1422,7 +1415,6 @@ void Range::selectNode(Node* refNode, ExceptionCode& ec) > case Node::DOCUMENT_NODE: > case Node::ENTITY_NODE: > case Node::NOTATION_NODE: >- case Node::SHADOW_ROOT_NODE: > ec = RangeException::INVALID_NODE_TYPE_ERR; > return; > } >@@ -1463,7 +1455,6 @@ void Range::selectNodeContents(Node* refNode, ExceptionCode& ec) > case Node::PROCESSING_INSTRUCTION_NODE: > case Node::TEXT_NODE: > case Node::XPATH_NAMESPACE_NODE: >- case Node::SHADOW_ROOT_NODE: > break; > case Node::DOCUMENT_TYPE_NODE: > case Node::ENTITY_NODE: >@@ -1512,7 +1503,6 @@ void Range::surroundContents(PassRefPtr<Node> passNewParent, ExceptionCode& ec) > case Node::PROCESSING_INSTRUCTION_NODE: > case Node::TEXT_NODE: > case Node::XPATH_NAMESPACE_NODE: >- case Node::SHADOW_ROOT_NODE: > break; > } > >diff --git a/Source/WebCore/dom/ShadowRoot.cpp b/Source/WebCore/dom/ShadowRoot.cpp >index 9ba68bd358113cdb1bf0089b467722069be766bd..f0706c34616e1fa6d7b1a4d4ceaf2af9477f39b7 100644 >--- a/Source/WebCore/dom/ShadowRoot.cpp >+++ b/Source/WebCore/dom/ShadowRoot.cpp >@@ -77,11 +77,6 @@ String ShadowRoot::nodeName() const > return "#shadow-root"; > } > >-Node::NodeType ShadowRoot::nodeType() const >-{ >- return SHADOW_ROOT_NODE; >-} >- > PassRefPtr<Node> ShadowRoot::cloneNode(bool) > { > // ShadowRoot should not be arbitrarily cloned. >diff --git a/Source/WebCore/dom/ShadowRoot.h b/Source/WebCore/dom/ShadowRoot.h >index d0b189472146bc79208a59a8b1ae1f2166ff725c..35907d2d7d3072284b7d42061ac6ba0f63eace1b 100644 >--- a/Source/WebCore/dom/ShadowRoot.h >+++ b/Source/WebCore/dom/ShadowRoot.h >@@ -68,7 +68,6 @@ private: > virtual ~ShadowRoot(); > > virtual String nodeName() const; >- virtual NodeType nodeType() const; > virtual PassRefPtr<Node> cloneNode(bool deep); > virtual bool childTypeAllowed(NodeType) const; > >@@ -96,7 +95,7 @@ inline bool ShadowRoot::needsReattachHostChildrenAndShadow() > > inline ShadowRoot* toShadowRoot(Node* node) > { >- ASSERT(!node || node->nodeType() == Node::SHADOW_ROOT_NODE); >+ ASSERT(!node || node->isShadowRoot()); > return static_cast<ShadowRoot*>(node); > } > >diff --git a/Source/WebCore/editing/FrameSelection.cpp b/Source/WebCore/editing/FrameSelection.cpp >index 539cc5bd077af81269098a1293f89b53b552a7e1..db587e775fda9b8f767edd2221797fd251153e3a 100644 >--- a/Source/WebCore/editing/FrameSelection.cpp >+++ b/Source/WebCore/editing/FrameSelection.cpp >@@ -425,10 +425,17 @@ static void updatePositionAfterAdoptingTextReplacement(Position& position, Chara > position.moveToOffset(positionOffset - oldLength + newLength); > } > >+static inline bool nodeIsDetachedFromDocument(Node* node) >+{ >+ ASSERT(node); >+ Node* highest = highestAncestor(node); >+ return highest->nodeType() == Node::DOCUMENT_FRAGMENT_NODE && !highest->isShadowRoot(); >+} >+ > void FrameSelection::textWillBeReplaced(CharacterData* node, unsigned offset, unsigned oldLength, unsigned newLength) > { > // The fragment check is a performance optimization. See http://trac.webkit.org/changeset/30062. >- if (isNone() || !node || highestAncestor(node)->nodeType() == Node::DOCUMENT_FRAGMENT_NODE) >+ if (isNone() || !node || nodeIsDetachedFromDocument(node)) > return; > > Position base = m_selection.base(); >diff --git a/Source/WebCore/editing/MarkupAccumulator.cpp b/Source/WebCore/editing/MarkupAccumulator.cpp >index 5226b214c25811760935c566964e7630f02f9d18..1aa27c5f34affabc20bc873df890fa3fa099714a 100644 >--- a/Source/WebCore/editing/MarkupAccumulator.cpp >+++ b/Source/WebCore/editing/MarkupAccumulator.cpp >@@ -445,7 +445,6 @@ void MarkupAccumulator::appendStartMarkup(StringBuilder& result, const Node* nod > case Node::ENTITY_REFERENCE_NODE: > case Node::NOTATION_NODE: > case Node::XPATH_NAMESPACE_NODE: >- case Node::SHADOW_ROOT_NODE: > ASSERT_NOT_REACHED(); > break; > } >diff --git a/Source/WebCore/html/parser/HTMLElementStack.cpp b/Source/WebCore/html/parser/HTMLElementStack.cpp >index 98885743e77686566f9297f654631308da344a7e..9cc3a03166e511ab258672f43cb700815c774024 100644 >--- a/Source/WebCore/html/parser/HTMLElementStack.cpp >+++ b/Source/WebCore/html/parser/HTMLElementStack.cpp >@@ -53,7 +53,6 @@ inline bool isNumberedHeaderElement(ContainerNode* node) > inline bool isRootNode(ContainerNode* node) > { > return node->nodeType() == Node::DOCUMENT_FRAGMENT_NODE >- || node->nodeType() == Node::SHADOW_ROOT_NODE > || node->hasTagName(htmlTag); > } > >@@ -310,7 +309,7 @@ void HTMLElementStack::popUntilForeignContentScopeMarker() > > void HTMLElementStack::pushRootNode(PassRefPtr<ContainerNode> rootNode) > { >- ASSERT(rootNode->nodeType() == Node::DOCUMENT_FRAGMENT_NODE || rootNode->nodeType() == Node::SHADOW_ROOT_NODE); >+ ASSERT(rootNode->nodeType() == Node::DOCUMENT_FRAGMENT_NODE); > pushRootNodeCommon(rootNode); > } > >diff --git a/Source/WebCore/html/parser/HTMLElementStack.h b/Source/WebCore/html/parser/HTMLElementStack.h >index f604f82c78379975d6ffb31b8dbbdf1627eaf988..5697e80c8786cda4d032b9ed06923e9210a2e850 100644 >--- a/Source/WebCore/html/parser/HTMLElementStack.h >+++ b/Source/WebCore/html/parser/HTMLElementStack.h >@@ -180,8 +180,7 @@ inline bool isInHTMLNamespace(Node* node) > // A DocumentFragment takes the place of the document element when parsing > // fragments and should be considered in the HTML namespace. > return node->namespaceURI() == HTMLNames::xhtmlNamespaceURI >- || node->nodeType() == Node::DOCUMENT_FRAGMENT_NODE >- || node->nodeType() == Node::SHADOW_ROOT_NODE; // FIXME: Does this also apply to ShadowRoot? >+ || node->nodeType() == Node::DOCUMENT_FRAGMENT_NODE; // FIXME: Does this also apply to ShadowRoot? > } > > >diff --git a/Source/WebCore/xml/XPathUtil.cpp b/Source/WebCore/xml/XPathUtil.cpp >index 4c45fcbca1a87faff2bb562af5fed771e5fc48ab..7a8ff33cf67325fb1eb44e28528ff77fd6e2f3e0 100644 >--- a/Source/WebCore/xml/XPathUtil.cpp >+++ b/Source/WebCore/xml/XPathUtil.cpp >@@ -85,7 +85,6 @@ bool isValidContextNode(Node* node) > case Node::ENTITY_NODE: > case Node::ENTITY_REFERENCE_NODE: > case Node::NOTATION_NODE: >- case Node::SHADOW_ROOT_NODE: > return false; > case Node::TEXT_NODE: > return !(node->parentNode() && node->parentNode()->isAttributeNode()); >diff --git a/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp b/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp >index da0e32555ec7cb8438ab8023a98bb62ceeeb53b5..ee6ba68ac4f95991eb6010ab50d22b906b74ab05 100644 >--- a/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp >+++ b/Source/WebKit/chromium/src/WebPageSerializerImpl.cpp >@@ -418,7 +418,6 @@ void WebPageSerializerImpl::buildContentForNode(Node* node, > case Node::ATTRIBUTE_NODE: > case Node::DOCUMENT_NODE: > case Node::DOCUMENT_FRAGMENT_NODE: >- case Node::SHADOW_ROOT_NODE: > // Should not exist. > ASSERT_NOT_REACHED(); > break; >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 4a74e761f1c35a6f6b3d03ad871cc85f7f2344bf..a84767e5cf5588d70c8270402bae77037a47f2a5 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,17 @@ >+2012-02-05 Hayato Ito <hayato@chromium.org> >+ >+ Make ShadowRoot.nodeType return DOCUMENT_FRAGMENT_NODE. >+ https://bugs.webkit.org/show_bug.cgi?id=77514 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ NodeType.SHADOW_ROOT_NODE type is finally gone. >+ >+ * fast/dom/shadow/nodetype-expected.txt: >+ * fast/dom/shadow/nodetype.html: >+ * resources/dump-as-markup.js: >+ (Markup._get): >+ > 2012-02-03 Sheriff Bot <webkit.review.bot@gmail.com> > > Unreviewed, rolling out r106654. >diff --git a/LayoutTests/fast/dom/shadow/nodetype-expected.txt b/LayoutTests/fast/dom/shadow/nodetype-expected.txt >index cb50552fd2a5584fd47a3a2dfa4479f94fc8a81b..21eccd55e9f6c69b375a2cc3b80d82a002e4c427 100644 >--- a/LayoutTests/fast/dom/shadow/nodetype-expected.txt >+++ b/LayoutTests/fast/dom/shadow/nodetype-expected.txt >@@ -1,9 +1,9 @@ > > This tests the shadow host's and shadow root's nodeType. > PASS keygen.nodeType is Node.ELEMENT_NODE >-PASS shadow.nodeType is 14 >+PASS shadow.nodeType is Node.DOCUMENT_FRAGMENT_NODE > PASS shadowChild is non-null. >-PASS shadowChild.nodeType != 14 is true >+PASS shadowChild.nodeType != Node.DOCUMENT_FRAGMENT_NODE is true > PASS successfullyParsed is true > > TEST COMPLETE >diff --git a/LayoutTests/fast/dom/shadow/nodetype.html b/LayoutTests/fast/dom/shadow/nodetype.html >index ea1ba1af560cc092f03ac4783fe1f8426a4130f8..0119258ad5205db459576ab1431a9673741d5437 100644 >--- a/LayoutTests/fast/dom/shadow/nodetype.html >+++ b/LayoutTests/fast/dom/shadow/nodetype.html >@@ -16,9 +16,9 @@ This tests the shadow host's and shadow root's nodeType. > var shadow = internals.shadowRoot(keygen); > var shadowChild = shadow.firstChild; > shouldBe('keygen.nodeType', 'Node.ELEMENT_NODE'); >- shouldBe('shadow.nodeType', '14'); >+ shouldBe('shadow.nodeType', 'Node.DOCUMENT_FRAGMENT_NODE'); > shouldBeNonNull('shadowChild'); >- shouldBeTrue('shadowChild.nodeType != 14'); >+ shouldBeTrue('shadowChild.nodeType != Node.DOCUMENT_FRAGMENT_NODE'); > } > </script> > <script src="../../js/resources/js-test-post.js"></script> >diff --git a/LayoutTests/resources/dump-as-markup.js b/LayoutTests/resources/dump-as-markup.js >index 8cb68ec87e7d9f962f4474f5b181d1d8f67a8273..c4d069c15d72f5528113833e816c00ac29374b66 100644 >--- a/LayoutTests/resources/dump-as-markup.js >+++ b/LayoutTests/resources/dump-as-markup.js >@@ -215,8 +215,9 @@ Markup._get = function(node, depth) > str += Markup._indent(depth + 1) + 'this.value="' + node.value + '"'; > > break; >- case 14: // See SHADOW_ROOT_NODE on Node::NodeType >- str += "<shadow:root>"; >+ case Node.DOCUMENT_FRAGMENT_NODE: >+ if (node.nodeName == "#shadow-root") >+ str += "<shadow:root>"; > } > > for (var i = 0, len = node.childNodes.length; i < len; i++) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 77514
:
125257
|
125264
|
125276
|
125282
|
125304
|
125307
|
125570
|
125575
|
125787
|
126721
|
126945