Changeset 206403 in webkit
- Timestamp:
- Sep 26, 2016, 4:45:21 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r206398 r206403 1 2016-09-26 Antti Koivisto <antti@apple.com> 2 3 Input elements don't work inside shadow tree 4 https://bugs.webkit.org/show_bug.cgi?id=160427 5 6 Reviewed by Darin Adler. 7 8 * fast/shadow-dom/composed-tree-shadow-child-subtree-expected.txt: Added. 9 * fast/shadow-dom/composed-tree-shadow-child-subtree.html: Added. 10 * fast/shadow-dom/input-element-in-shadow-expected.html: Added. 11 * fast/shadow-dom/input-element-in-shadow.html: Added. 12 1 13 2016-09-26 Ryan Haddad <ryanhaddad@apple.com> 2 14 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r206261 r206403 333 333 webkit.org/b/155233 fast/events/max-tabindex-focus.html [ Skip ] 334 334 fast/shadow-dom/shadow-host-removal-crash.html [ Skip ] 335 fast/shadow-dom/input-element-in-shadow.html [ Skip ] 335 336 336 337 # The file-wrapper part of <attachment> is not yet working on iOS -
trunk/Source/WebCore/ChangeLog
r206399 r206403 1 2016-09-26 Antti Koivisto <antti@apple.com> 2 3 Input elements don't work inside shadow tree 4 https://bugs.webkit.org/show_bug.cgi?id=160427 5 6 Reviewed by Darin Adler. 7 8 There is a bug in ComposedTreeIterator. If the iterator is initialized with an initial state where the root 9 is inside a shadow tree it won't iterate into slots. 10 11 If an input element is in a shadow tree it generates narrowly scoped style updates. When RenderTreeUpdater 12 applies such an update the update root will be inside the shadow tree and the bug will prevent the render tree 13 for slotted content from updating. 14 15 Added tests for both the iterator behavior and the specific symptom with input elements. 16 17 Tests: fast/shadow-dom/composed-tree-shadow-child-subtree.html 18 fast/shadow-dom/input-element-in-shadow.html 19 20 * dom/ComposedTreeIterator.cpp: 21 (WebCore::ComposedTreeIterator::ComposedTreeIterator): 22 23 Check and cache if the root is inside shadow tree. 24 25 (WebCore::ComposedTreeIterator::traverseNextInShadowTree): 26 * dom/ComposedTreeIterator.h: 27 (WebCore::ComposedTreeIterator::traverseNext): 28 29 If it is, always use the shadow traversal code path. 30 1 31 2016-09-26 Wenson Hsieh <wenson_hsieh@apple.com> 2 32 -
trunk/Source/WebCore/dom/ComposedTreeIterator.cpp
r202091 r206403 54 54 55 55 ComposedTreeIterator::ComposedTreeIterator(ContainerNode& root, FirstChildTag) 56 : m_rootIsInShadowTree(root.isInShadowTree()) 56 57 { 57 58 ASSERT(!is<ShadowRoot>(root)); … … 74 75 75 76 ComposedTreeIterator::ComposedTreeIterator(ContainerNode& root, Node& current) 77 : m_rootIsInShadowTree(root.isInShadowTree()) 76 78 { 77 79 ASSERT(!is<ShadowRoot>(root)); … … 156 158 void ComposedTreeIterator::traverseNextInShadowTree() 157 159 { 158 ASSERT(m_contextStack.size() > 1 );160 ASSERT(m_contextStack.size() > 1 || m_rootIsInShadowTree); 159 161 160 162 if (is<HTMLSlotElement>(current())) { … … 176 178 void ComposedTreeIterator::traverseNextLeavingContext() 177 179 { 178 ASSERT(m_contextStack.size() > 1);179 180 180 while (context().iterator == context().end && m_contextStack.size() > 1) { 181 181 m_contextStack.removeLast(); -
trunk/Source/WebCore/dom/ComposedTreeIterator.h
r202091 r206403 81 81 Node& current() { return *context().iterator; } 82 82 83 bool m_rootIsInShadowTree { false }; 83 84 bool m_didDropAssertions { false }; 84 85 Vector<Context, 8> m_contextStack; … … 97 98 } 98 99 99 if (m_contextStack.size() > 1 ) {100 if (m_contextStack.size() > 1 || m_rootIsInShadowTree) { 100 101 traverseNextInShadowTree(); 101 102 return *this; … … 110 111 context().iterator.traverseNextSkippingChildren(); 111 112 112 if (context().iterator == context().end && m_contextStack.size() > 1)113 if (context().iterator == context().end) 113 114 traverseNextLeavingContext(); 114 115
Note:
See TracChangeset
for help on using the changeset viewer.