Changeset 208745 in webkit
- Timestamp:
- Nov 15, 2016 12:14:02 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r208743 r208745 1 2016-11-14 Brent Fulgham <bfulgham@apple.com> 2 3 Correct handling of changing input type 4 https://bugs.webkit.org/show_bug.cgi?id=164759 5 <rdar://problem/29211174> 6 7 Reviewed by Darin Adler. 8 9 * fast/forms/search-cancel-button-change-input-expected.txt: Added. 10 * fast/forms/search-cancel-button-change-input.html: Added. 11 1 12 2016-11-15 Antti Koivisto <antti@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r208744 r208745 1 2016-11-14 Brent Fulgham <bfulgham@apple.com> 2 3 Correct handling of changing input type 4 https://bugs.webkit.org/show_bug.cgi?id=164759 5 <rdar://problem/29211174> 6 7 Reviewed by Darin Adler. 8 9 Test: fast/forms/search-cancel-button-change-input.html 10 11 It is possible for JavaScript to change the type property of an input field. WebKit 12 needs to gracefully handle this case. 13 14 Add a type traits specialization so we can properly downcast InputType elements. 15 Use this to only call search functions on actual search input types. 16 17 * html/HTMLInputElement.cpp: 18 (WebCore::HTMLInputElement::onSearch): Only perform search functions if the 19 input type is actually a search field. 20 * html/InputType.h: Add type traits specialization for 'downcast' template. 21 * html/SearchInputType.h: Ditto. 22 1 23 2016-11-15 Zalan Bujtas <zalan@apple.com> 2 24 -
trunk/Source/WebCore/WebCore.order
r198074 r208745 5835 5835 __ZN7WebCore17MarkupAccumulator13appendOpenTagERN3WTF13StringBuilderEPNS_7ElementEPNS1_7HashMapIPNS1_16AtomicStringImplES8_NS1_7PtrHashIS8_EENS1_10HashTraitsIS8_EESC_EE 5836 5836 __ZNK7WebCore7Element22nodeNamePreservingCaseEv 5837 __ZNK7WebCore13QualifiedName8toStringEv5838 5837 __ZNK7WebCore7Element13hasAttributesEv 5839 5838 __ZN7WebCore17MarkupAccumulator22appendCustomAttributesERN3WTF13StringBuilderEPNS_7ElementEPNS1_7HashMapIPNS1_16AtomicStringImplES8_NS1_7PtrHashIS8_EENS1_10HashTraitsIS8_EESC_EE -
trunk/Source/WebCore/html/HTMLInputElement.cpp
r208653 r208745 1460 1460 void HTMLInputElement::onSearch() 1461 1461 { 1462 ASSERT(isSearchField()); 1462 // The type of the input element could have changed during event handling. If we are no longer 1463 // a search field, don't try to do search things. 1464 if (!isSearchField()) 1465 return; 1466 1463 1467 if (m_inputType) 1464 static_cast<SearchInputType*>(m_inputType.get())->stopSearchEventTimer();1468 downcast<SearchInputType>(*m_inputType.get()).stopSearchEventTimer(); 1465 1469 dispatchEvent(Event::create(eventNames().searchEvent, true, false)); 1466 1470 } -
trunk/Source/WebCore/html/InputType.h
r208659 r208745 323 323 324 324 } // namespace WebCore 325 326 #define SPECIALIZE_TYPE_TRAITS_INPUT_TYPE(ToValueTypeName, predicate) \ 327 SPECIALIZE_TYPE_TRAITS_BEGIN(WebCore::ToValueTypeName) \ 328 static bool isType(const WebCore::InputType& input) { return input.predicate; } \ 329 SPECIALIZE_TYPE_TRAITS_END() -
trunk/Source/WebCore/html/SearchInputType.h
r208179 r208745 71 71 72 72 } // namespace WebCore 73 74 SPECIALIZE_TYPE_TRAITS_INPUT_TYPE(SearchInputType, isSearchField())
Note: See TracChangeset
for help on using the changeset viewer.