Changeset 240122 in webkit
- Timestamp:
- Jan 17, 2019 11:34:29 AM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r240121 r240122 1 2019-01-17 Jiewen Tan <jiewen_tan@apple.com> 2 3 [Mac] Add a new quirk to HTMLFormControlElement::isMouseFocusable 4 https://bugs.webkit.org/show_bug.cgi?id=193478 5 <rdar://problem/34368591> 6 7 Reviewed by Brent Fulgham. 8 9 By default in macOS, submit buttons (controls) are not focusable. WebKit follows this system convention 10 as suggested by the spec: https://html.spec.whatwg.org/multipage/interaction.html#focusable-area. This 11 is also the convention Firefox respects. However, Chrome doesn't. ceac.state.gov is by far the only 12 website that assumes submit buttons are focusable, and will prohibit users from completing immigration 13 forms, such as DS160 if buttons are not. To help immigrations, we decide to add a new quirk to 14 HTMLFormControlElement::isMouseFocusable such that submit buttons are mouse focusable. 15 16 This quirk is for ceac.state.gov specifically, and therefore no tests. 17 18 * html/HTMLFormControlElement.cpp: 19 (WebCore::HTMLFormControlElement::isMouseFocusable const): 20 (WebCore::HTMLFormControlElement::needsSiteSpecificQuirks const): 21 * html/HTMLFormControlElement.h: 22 1 23 2019-01-17 Alex Christensen <achristensen@webkit.org> 2 24 -
trunk/Source/WebCore/html/HTMLFormControlElement.cpp
r238038 r240122 41 41 #include "RenderBox.h" 42 42 #include "RenderTheme.h" 43 #include "Settings.h" 43 44 #include "StyleTreeResolver.h" 44 45 #include "ValidationMessage.h" … … 373 374 return HTMLElement::isMouseFocusable(); 374 375 #else 376 if (needsMouseFocusableQuirk()) 377 return HTMLElement::isMouseFocusable(); 375 378 return false; 376 379 #endif … … 656 659 } 657 660 661 // FIXME: We should remove the quirk once <rdar://problem/47334655> is fixed. 662 bool HTMLFormControlElement::needsMouseFocusableQuirk() const 663 { 664 #if PLATFORM(MAC) 665 if (!document().settings().needsSiteSpecificQuirks()) 666 return false; 667 668 auto host = document().url().host(); 669 return equalLettersIgnoringASCIICase(host, "ceac.state.gov") || host.endsWithIgnoringASCIICase(".ceac.state.gov"); 670 #else 671 return false; 672 #endif 673 } 674 658 675 } // namespace Webcore -
trunk/Source/WebCore/html/HTMLFormControlElement.h
r232335 r240122 178 178 HTMLFormControlElement* asFormNamedItem() final { return this; } 179 179 180 bool needsMouseFocusableQuirk() const; 181 180 182 std::unique_ptr<ValidationMessage> m_validationMessage; 181 183 unsigned m_disabled : 1;
Note: See TracChangeset
for help on using the changeset viewer.