Changeset 109290 in webkit
- Timestamp:
- Feb 29, 2012 5:55:08 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r109288 r109290 1 2012-02-29 Shinya Kawanaka <shinyak@chromium.org> 2 3 Methods in ShadowTree and TreeScopeAdopter should be multiple shadow roots aware. 4 https://bugs.webkit.org/show_bug.cgi?id=79768 5 6 Reviewed by Hajime Morita. 7 8 * fast/dom/shadow/multiple-shadowroot-adopt-expected.txt: Added. 9 * fast/dom/shadow/multiple-shadowroot-adopt.html: Added. 10 * platform/efl/Skipped: 11 * platform/mac/Skipped: 12 * platform/qt/Skipped: 13 * platform/win/Skipped: 14 * platform/wincairo/Skipped: 15 * platform/wk2/Skipped: 16 1 17 2012-02-29 David Levin <levin@chromium.org> 2 18 -
trunk/LayoutTests/platform/efl/Skipped
r109238 r109290 2095 2095 fast/dom/shadow/multiple-shadowroot.html 2096 2096 fast/dom/shadow/multiple-shadowroot-rendering.html 2097 fast/dom/shadow/multiple-shadowroot-adopt.html 2097 2098 2098 2099 # CSS Filters support not yet enabled (needs ENABLE_CSS_FILTERS). -
trunk/LayoutTests/platform/mac/Skipped
r109251 r109290 438 438 fast/dom/shadow/multiple-shadowroot.html 439 439 fast/dom/shadow/multiple-shadowroot-rendering.html 440 fast/dom/shadow/multiple-shadowroot-adopt.html 440 441 441 442 # JSC does not support setIsolatedWorldSecurityOrigin (http://webkit.org/b/61540) -
trunk/LayoutTests/platform/qt/Skipped
r109251 r109290 176 176 fast/dom/shadow/multiple-shadowroot.html 177 177 fast/dom/shadow/multiple-shadowroot-rendering.html 178 fast/dom/shadow/multiple-shadowroot-adopt.html 178 179 179 180 # CSS Regions support not yet enabled. http://webkit.org/b/57312 -
trunk/LayoutTests/platform/win/Skipped
r109251 r109290 1464 1464 fast/dom/shadow/multiple-shadowroot.html 1465 1465 fast/dom/shadow/multiple-shadowroot-rendering.html 1466 fast/dom/shadow/multiple-shadowroot-adopt.html 1466 1467 1467 1468 # CSS Regions support not yet enabled. http://webkit.org/b/57312 -
trunk/LayoutTests/platform/wincairo/Skipped
r109251 r109290 1977 1977 fast/dom/shadow/multiple-shadowroot.html 1978 1978 fast/dom/shadow/multiple-shadowroot-rendering.html 1979 fast/dom/shadow/multiple-shadowroot-adopt.html 1979 1980 1980 1981 # CSS Regions support not yet enabled. http://webkit.org/b/57312 -
trunk/LayoutTests/platform/wk2/Skipped
r109251 r109290 1075 1075 fast/dom/shadow/multiple-shadowroot.html 1076 1076 fast/dom/shadow/multiple-shadowroot-rendering.html 1077 fast/dom/shadow/multiple-shadowroot-adopt.html 1077 1078 1078 1079 # WTR needs an implementation for eventSender.continuousMouseScrollBy -
trunk/Source/WebCore/ChangeLog
r109288 r109290 1 2012-02-29 Shinya Kawanaka <shinyak@chromium.org> 2 3 Methods in ShadowTree and TreeScopeAdopter should be multiple shadow roots aware. 4 https://bugs.webkit.org/show_bug.cgi?id=79768 5 6 Reviewed by Hajime Morita. 7 8 Some methods in ShadowTree and TreeScopeAdopter were not multiple shadow roots aware. 9 They should consider multiple shadow roots. 10 11 Test: fast/dom/shadow/multiple-shadowroot-adopt.html 12 13 * dom/ShadowTree.cpp: 14 (WebCore::ShadowTree::setParentTreeScope): 15 (WebCore): 16 (WebCore::ShadowTree::childNeedsStyleRecalc): 17 (WebCore::ShadowTree::needsStyleRecalc): 18 * dom/ShadowTree.h: 19 (WebCore): 20 (ShadowTree): 21 * dom/TreeScopeAdopter.cpp: 22 (WebCore::shadowTreeFor): 23 (WebCore::TreeScopeAdopter::moveTreeToNewScope): 24 (WebCore::TreeScopeAdopter::moveTreeToNewDocument): 25 (WebCore::TreeScopeAdopter::moveShadowTreeToNewDocument): 26 (WebCore): 27 * dom/TreeScopeAdopter.h: 28 (TreeScopeAdopter): 29 1 30 2012-02-29 David Levin <levin@chromium.org> 2 31 -
trunk/Source/WebCore/dom/ShadowTree.cpp
r109203 r109290 152 152 } 153 153 154 void ShadowTree::setParentTreeScope(TreeScope* scope) 155 { 156 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot()) 157 root->setParentTreeScope(scope); 158 } 159 154 160 void ShadowTree::attach() 155 161 { … … 214 220 { 215 221 ASSERT(youngestShadowRoot()); 216 if (!youngestShadowRoot()) 217 return false; 218 219 return youngestShadowRoot()->childNeedsStyleRecalc(); 222 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot()) 223 if (root->childNeedsStyleRecalc()) 224 return true; 225 226 return false; 220 227 } 221 228 … … 223 230 { 224 231 ASSERT(youngestShadowRoot()); 225 if (!youngestShadowRoot()) 226 return false; 227 228 return youngestShadowRoot()->needsStyleRecalc(); 232 for (ShadowRoot* root = youngestShadowRoot(); root; root = root->olderShadowRoot()) 233 if (root->needsStyleRecalc()) 234 return true; 235 236 return false; 229 237 } 230 238 -
trunk/Source/WebCore/dom/ShadowTree.h
r109203 r109290 41 41 class HTMLContentSelector; 42 42 class InsertionPoint; 43 class TreeScope; 43 44 44 45 class ShadowTree { … … 59 60 void removedFromTree(bool deep); 60 61 void willRemove(); 62 63 void setParentTreeScope(TreeScope*); 61 64 62 65 void attach(); -
trunk/Source/WebCore/dom/TreeScopeAdopter.cpp
r108959 r109290 33 33 namespace WebCore { 34 34 35 static inline Shadow Root* shadowRootFor(Node* node)35 static inline ShadowTree* shadowTreeFor(Node* node) 36 36 { 37 return node->isElementNode() && toElement(node)->hasShadowRoot() ? toElement(node)->shadowTree()->youngestShadowRoot() : 0;37 return node->isElementNode() ? toElement(node)->shadowTree() : 0; 38 38 } 39 39 … … 64 64 moveNodeToNewDocument(node, oldDocument, newDocument); 65 65 66 if (Shadow Root* shadow = shadowRootFor(node)) {67 shadow->setParentTreeScope(m_newScope);66 if (ShadowTree* tree = shadowTreeFor(node)) { 67 tree->setParentTreeScope(m_newScope); 68 68 if (willMoveToNewDocument) 69 move TreeToNewDocument(shadow, oldDocument, newDocument);69 moveShadowTreeToNewDocument(tree, oldDocument, newDocument); 70 70 } 71 71 } … … 76 76 for (Node* node = root; node; node = node->traverseNextNode(root)) { 77 77 moveNodeToNewDocument(node, oldDocument, newDocument); 78 if (Shadow Root* shadow = shadowRootFor(node))79 move TreeToNewDocument(shadow, oldDocument, newDocument);78 if (ShadowTree* tree = shadowTreeFor(node)) 79 moveShadowTreeToNewDocument(tree, oldDocument, newDocument); 80 80 } 81 } 82 83 inline void TreeScopeAdopter::moveShadowTreeToNewDocument(ShadowTree* tree, Document* oldDocument, Document* newDocument) const 84 { 85 for (ShadowRoot* root = tree->youngestShadowRoot(); root; root = root->olderShadowRoot()) 86 moveTreeToNewDocument(root, oldDocument, newDocument); 81 87 } 82 88 -
trunk/Source/WebCore/dom/TreeScopeAdopter.h
r104528 r109290 47 47 void moveTreeToNewDocument(Node*, Document* oldDocument, Document* newDocument) const; 48 48 void moveNodeToNewDocument(Node*, Document* oldDocument, Document* newDocument) const; 49 void moveShadowTreeToNewDocument(ShadowTree*, Document* oldDocument, Document* newDocument) const; 49 50 50 51 Node* m_toAdopt;
Note: See TracChangeset
for help on using the changeset viewer.