Changeset 245746 in webkit
- Timestamp:
- May 24, 2019 9:33:57 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r245742 r245746 1 2019-05-24 Ryosuke Niwa <rniwa@webkit.org> 2 3 Asssertion failure in dispatchSubtreeModifiedEvent due to TextFieldInputType updating UA shadow tree inside Element::removedFromAncestor 4 https://bugs.webkit.org/show_bug.cgi?id=198216 5 6 Reviewed by Brent Fulgham. 7 8 Added a regression test. 9 10 * fast/forms/datalist/datalist-removal-assertion-expected.txt: Added. 11 * fast/forms/datalist/datalist-removal-assertion.html: Added. 12 1 13 2019-05-23 Simon Fraser <simon.fraser@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r245745 r245746 1 2019-05-24 Ryosuke Niwa <rniwa@webkit.org> 2 3 Asssertion failure in dispatchSubtreeModifiedEvent due to TextFieldInputType updating UA shadow tree inside Element::removedFromAncestor 4 https://bugs.webkit.org/show_bug.cgi?id=198216 5 6 Reviewed by Brent Fulgham. 7 8 The bug was caused by ListAttributeTargetObserver::idTargetChanged() updating the shadow tree of an input element 9 within Element::removedFromAncestor via TextFieldInputType::createDataListDropdownIndicator(). Fixed it by 10 supressing the assertions with ScriptDisallowedScope::EventAllowedScope since it's always safe to update 11 UA shadow trees of input elements as it's not exposed to author scripts. 12 13 Avoiding the creation of dropdown indicator in this particular scenario is a lot more involved and it's not 14 particularly correct because there could be another datalist element which matches the ID specified in list 15 content attribute after the removal of the old datalist element. 16 17 Test: fast/forms/datalist/datalist-removal-assertion.html 18 19 * html/TextFieldInputType.cpp: 20 (WebCore::TextFieldInputType::createDataListDropdownIndicator): 21 (WebCore::TextFieldInputType::createContainer): 22 * html/shadow/DataListButtonElement.cpp: 23 (WebCore::DataListButtonElement::DataListButtonElement): 24 1 25 2019-05-24 Saam barati <sbarati@apple.com> 2 26 -
trunk/Source/WebCore/html/TextFieldInputType.cpp
r242518 r245746 53 53 #include "RenderTheme.h" 54 54 #include "RuntimeEnabledFeatures.h" 55 #include "ScriptDisallowedScope.h" 55 56 #include "ShadowRoot.h" 56 57 #include "TextControlInnerElements.h" … … 453 454 if (!m_container) 454 455 createContainer(); 456 457 ScriptDisallowedScope::EventAllowedScope allowedScope(*m_container); 455 458 m_dataListDropdownIndicator = DataListButtonElement::create(element()->document(), *this); 459 m_container->appendChild(*m_dataListDropdownIndicator); 460 m_dataListDropdownIndicator->setPseudo(AtomicString("-webkit-list-button", AtomicString::ConstructFromLiteral)); 456 461 m_dataListDropdownIndicator->setInlineStyleProperty(CSSPropertyDisplay, CSSValueNone, true); 457 m_container->appendChild(*m_dataListDropdownIndicator); 462 458 463 } 459 464 #endif … … 774 779 ASSERT(element()); 775 780 781 ScriptDisallowedScope::EventAllowedScope allowedScope(*element()->userAgentShadowRoot()); 782 776 783 m_container = TextControlInnerContainer::create(element()->document()); 784 element()->userAgentShadowRoot()->appendChild(*m_container); 777 785 m_container->setPseudo(AtomicString("-webkit-textfield-decoration-container", AtomicString::ConstructFromLiteral)); 778 786 779 787 m_innerBlock = TextControlInnerElement::create(element()->document()); 788 m_container->appendChild(*m_innerBlock); 780 789 m_innerBlock->appendChild(*m_innerText); 781 m_container->appendChild(*m_innerBlock);782 783 element()->userAgentShadowRoot()->appendChild(*m_container);784 790 } 785 791 -
trunk/Source/WebCore/html/shadow/DataListButtonElement.cpp
r234898 r245746 50 50 , m_owner(owner) 51 51 { 52 setPseudo(AtomicString("-webkit-list-button", AtomicString::ConstructFromLiteral));53 52 } 54 53
Note: See TracChangeset
for help on using the changeset viewer.