Changeset 109179 in webkit
- Timestamp:
- Feb 28, 2012 5:43:50 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r109177 r109179 1 2012-02-27 MORITA Hajime <morrita@google.com> 2 3 <content> element should behave as HTMLUnknownElement outside of a shadow DOM subtree 4 https://bugs.webkit.org/show_bug.cgi?id=79551 5 6 Reviewed by Dimitri Glazkov. 7 8 * fast/dom/shadow/content-element-outside-shadow-style-expected.html: Added. 9 * fast/dom/shadow/content-element-outside-shadow-style.html: Added. 10 * fast/dom/shadow/content-element-outside-shadow.html: 11 * platform/efl/Skipped: 12 * platform/gtk/Skipped: 13 * platform/mac/Skipped: 14 * platform/qt/Skipped: 15 * platform/win/Skipped: 16 * platform/wk2/Skipped: 17 1 18 2012-02-28 Gavin Barraclough <barraclough@apple.com> 2 19 -
trunk/LayoutTests/fast/dom/shadow/content-element-outside-shadow.html
r105917 r109179 19 19 var cases = [ 20 20 ["<div><content></content></div>", 21 "<div>< /div>"],21 "<div><unknown></unknown></div>"], 22 22 ["<div><content>Here is a text.</content></div>", 23 "<div> Here is a text.</div>"],23 "<div><unknown>Here is a text.</unknown></div>"], 24 24 ["<div><content><div>Here is a </div><div>series of</div><div>blocks</div></content></div>", 25 "<div>< div>Here is a </div><div>series of</div><div>blocks</div></div>"],25 "<div><unknown><div>Here is a </div><div>series of</div><div>blocks</div></unknown></div>"], 26 26 ["<div><content><span>Here is a<span><span>series of</span><span>inlines.</span></content></div>", 27 "<div>< span>Here is a<span><span>series of</span><span>inlines.</span></div>"],27 "<div><unknown><span>Here is a<span><span>series of</span><span>inlines.</span></unknown></div>"], 28 28 ["<div><content>Here is a <content>nested content</content> inside content.</content></div>", 29 "<div> Here is a <" + "!-- --" + ">nested content<" + "!-- --" + "> inside content.</div>"],29 "<div><unknown>Here is a <unknown>nested content</unknown> inside content.</unknown></div>"], 30 30 ["<div><content>Here is a <div>block and <content>nested content</content> inside the block</div>.</content></div>", 31 "<div> Here is a <div>block and <!" + "-- --" + ">nested content<!" + "-- --" + "> inside the block</div>.</div>"]31 "<div><unknown>Here is a <div>block and <unknown>nested content</unknown> inside the block</div>.</unknown></div>"] 32 32 ]; 33 33 … … 42 42 comparisonContainer.innerHTML = expectedMarkup; 43 43 targetRenderTree = removeContainerLines(window.internals.elementRenderTreeAsText(targetContainer)); 44 targetRenderTree = targetRenderTree.replace(/CONTENT/g, "UNKNOWN"); 44 45 comparisonRenderTree = removeContainerLines(window.internals.elementRenderTreeAsText(comparisonContainer)); 45 46 debug(escapeHTML(targetMarkup)); -
trunk/LayoutTests/platform/efl/Skipped
r109096 r109179 2088 2088 fast/dom/shadow/content-element-api.html 2089 2089 fast/dom/shadow/content-element-outside-shadow.html 2090 fast/dom/shadow/content-element-outside-shadow-style.html 2090 2091 fast/dom/shadow/shadow-root-js-api.html 2091 2092 fast/dom/shadow/shadow-disable.html -
trunk/LayoutTests/platform/mac/Skipped
r109096 r109179 426 426 fast/dom/shadow/content-element-api.html 427 427 fast/dom/shadow/content-element-outside-shadow.html 428 fast/dom/shadow/content-element-outside-shadow-style.html 428 429 fast/dom/shadow/shadow-root-js-api.html 429 430 fast/dom/shadow/shadow-disable.html -
trunk/LayoutTests/platform/qt/Skipped
r109167 r109179 162 162 fast/dom/shadow/content-element-api.html 163 163 fast/dom/shadow/content-element-outside-shadow.html 164 fast/dom/shadow/content-element-outside-shadow-style.html 164 165 fast/dom/shadow/iframe-shadow.html 165 166 fast/dom/shadow/shadow-root-js-api.html -
trunk/LayoutTests/platform/win/Skipped
r109156 r109179 1452 1452 fast/dom/shadow/content-element-api.html 1453 1453 fast/dom/shadow/content-element-outside-shadow.html 1454 fast/dom/shadow/content-element-outside-shadow-style.html 1454 1455 fast/dom/shadow/shadow-root-js-api.html 1455 1456 fast/dom/shadow/shadow-disable.html -
trunk/LayoutTests/platform/wk2/Skipped
r109096 r109179 1066 1066 fast/dom/shadow/content-element-api.html 1067 1067 fast/dom/shadow/content-element-outside-shadow.html 1068 fast/dom/shadow/content-element-outside-shadow-style.html 1068 1069 fast/dom/shadow/shadow-root-js-api.html 1069 1070 fast/dom/shadow/shadow-disable.html -
trunk/Source/WebCore/ChangeLog
r109176 r109179 1 2012-02-27 MORITA Hajime <morrita@google.com> 2 3 <content> element should behave as HTMLUnknownElement outside of a shadow DOM subtree 4 https://bugs.webkit.org/show_bug.cgi?id=79551 5 6 Reviewed by Dimitri Glazkov. 7 8 The problem happened because HTMLContentElement doesn't create renderer anytime. 9 10 This change allows it to create a renderer unless the HTMLContentElement is shadowed. 11 Since this could happen not only on <content> but also on upcoming <shadow>, 12 the corresponding part of the code is pulled up to InsertionPoint. 13 14 Tests: fast/dom/shadow/content-element-outside-shadow-style-expected.html 15 fast/dom/shadow/content-element-outside-shadow-style.html 16 17 * dom/NodeRenderingContext.cpp: 18 (WebCore::NodeRenderingContext::NodeRenderingContext): 19 * dom/ShadowRoot.h: 20 (WebCore): 21 (WebCore::TreeScope::isShadowRoot): 22 * dom/TreeScope.h: 23 (TreeScope): 24 * html/shadow/HTMLContentElement.h: 25 * html/shadow/InsertionPoint.cpp: 26 (WebCore::InsertionPoint::isShadowBoundary): 27 (WebCore): 28 * html/shadow/InsertionPoint.h: 29 (InsertionPoint): 30 (WebCore::isShadowBoundary): 31 (WebCore): 32 1 33 2012-02-28 Daniel Cheng <dcheng@chromium.org> 2 34 -
trunk/Source/WebCore/dom/NodeRenderingContext.cpp
r109096 r109179 88 88 } 89 89 90 if (is InsertionPoint(parent)) {90 if (isShadowBoundary(parent)) { 91 91 if (toInsertionPoint(parent)->hasSelection()) 92 92 m_phase = AttachingNotFallbacked; -
trunk/Source/WebCore/dom/ShadowRoot.h
r109096 r109179 103 103 } 104 104 105 // Put this TreeScope method here to inline it. 106 inline bool TreeScope::isShadowRoot() const 107 { 108 return m_rootNode->isShadowRoot(); 109 } 110 105 111 } // namespace 106 112 -
trunk/Source/WebCore/dom/TreeScope.h
r106530 r109179 61 61 void removeNodeListCache() { ASSERT(m_numNodeListCaches > 0); --m_numNodeListCaches; } 62 62 bool hasNodeListCaches() const { return m_numNodeListCaches; } 63 bool isShadowRoot() const; 63 64 64 65 // Find first anchor with the given name. -
trunk/Source/WebCore/html/shadow/HTMLContentElement.h
r108303 r109179 64 64 private: 65 65 virtual bool isContentElement() const { return true; } 66 virtual bool rendererIsNeeded(const NodeRenderingContext&) { return false; }67 virtual RenderObject* createRenderer(RenderArena*, RenderStyle*) { return 0; }68 69 66 virtual void parseAttribute(Attribute*) OVERRIDE; 70 67 }; -
trunk/Source/WebCore/html/shadow/InsertionPoint.cpp
r108303 r109179 32 32 #include "InsertionPoint.h" 33 33 34 #include "ShadowRoot.h" 35 34 36 namespace WebCore { 35 37 … … 44 46 } 45 47 48 bool InsertionPoint::isShadowBoundary() const 49 { 50 if (TreeScope* scope = treeScope()) 51 return scope->isShadowRoot(); 52 return false; 53 } 54 55 bool InsertionPoint::rendererIsNeeded(const NodeRenderingContext& context) 56 { 57 return !isShadowBoundary() && HTMLElement::rendererIsNeeded(context); 58 } 59 46 60 } // namespace WebCore -
trunk/Source/WebCore/html/shadow/InsertionPoint.h
r108480 r109179 43 43 const HTMLContentSelectionList* selections() const { return &m_selections; } 44 44 bool hasSelection() const { return m_selections.first(); } 45 bool isShadowBoundary() const; 45 46 46 47 protected: 47 48 InsertionPoint(const QualifiedName&, Document*); 49 virtual bool rendererIsNeeded(const NodeRenderingContext&) OVERRIDE; 50 48 51 HTMLContentSelectionList m_selections; 49 52 }; … … 65 68 } 66 69 70 inline bool isShadowBoundary(Node* node) 71 { 72 if (!isInsertionPoint(node)) 73 return false; 74 return toInsertionPoint(node)->isShadowBoundary(); 75 } 76 67 77 } // namespace WebCore 68 78
Note: See TracChangeset
for help on using the changeset viewer.