Title: [240385] branches/safari-607-branch/Source/WebCore
- Revision
- 240385
- Author
- [email protected]
- Date
- 2019-01-23 17:21:50 -0800 (Wed, 23 Jan 2019)
Log Message
Cherry-pick r240122. rdar://problem/47458135
[Mac] Add a new quirk to HTMLFormControlElement::isMouseFocusable
https://bugs.webkit.org/show_bug.cgi?id=193478
<rdar://problem/34368591>
Reviewed by Brent Fulgham.
By default in macOS, submit buttons (controls) are not focusable. WebKit follows this system convention
as suggested by the spec: https://html.spec.whatwg.org/multipage/interaction.html#focusable-area. This
is also the convention Firefox respects. However, Chrome doesn't. ceac.state.gov is by far the only
website that assumes submit buttons are focusable, and will prohibit users from completing immigration
forms, such as DS160 if buttons are not. To help immigrations, we decide to add a new quirk to
HTMLFormControlElement::isMouseFocusable such that submit buttons are mouse focusable.
This quirk is for ceac.state.gov specifically, and therefore no tests.
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::isMouseFocusable const):
(WebCore::HTMLFormControlElement::needsSiteSpecificQuirks const):
* html/HTMLFormControlElement.h:
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-607-branch/Source/WebCore/ChangeLog (240384 => 240385)
--- branches/safari-607-branch/Source/WebCore/ChangeLog 2019-01-24 01:21:46 UTC (rev 240384)
+++ branches/safari-607-branch/Source/WebCore/ChangeLog 2019-01-24 01:21:50 UTC (rev 240385)
@@ -1,5 +1,54 @@
2019-01-23 Alan Coon <[email protected]>
+ Cherry-pick r240122. rdar://problem/47458135
+
+ [Mac] Add a new quirk to HTMLFormControlElement::isMouseFocusable
+ https://bugs.webkit.org/show_bug.cgi?id=193478
+ <rdar://problem/34368591>
+
+ Reviewed by Brent Fulgham.
+
+ By default in macOS, submit buttons (controls) are not focusable. WebKit follows this system convention
+ as suggested by the spec: https://html.spec.whatwg.org/multipage/interaction.html#focusable-area. This
+ is also the convention Firefox respects. However, Chrome doesn't. ceac.state.gov is by far the only
+ website that assumes submit buttons are focusable, and will prohibit users from completing immigration
+ forms, such as DS160 if buttons are not. To help immigrations, we decide to add a new quirk to
+ HTMLFormControlElement::isMouseFocusable such that submit buttons are mouse focusable.
+
+ This quirk is for ceac.state.gov specifically, and therefore no tests.
+
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::isMouseFocusable const):
+ (WebCore::HTMLFormControlElement::needsSiteSpecificQuirks const):
+ * html/HTMLFormControlElement.h:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@240122 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2019-01-17 Jiewen Tan <[email protected]>
+
+ [Mac] Add a new quirk to HTMLFormControlElement::isMouseFocusable
+ https://bugs.webkit.org/show_bug.cgi?id=193478
+ <rdar://problem/34368591>
+
+ Reviewed by Brent Fulgham.
+
+ By default in macOS, submit buttons (controls) are not focusable. WebKit follows this system convention
+ as suggested by the spec: https://html.spec.whatwg.org/multipage/interaction.html#focusable-area. This
+ is also the convention Firefox respects. However, Chrome doesn't. ceac.state.gov is by far the only
+ website that assumes submit buttons are focusable, and will prohibit users from completing immigration
+ forms, such as DS160 if buttons are not. To help immigrations, we decide to add a new quirk to
+ HTMLFormControlElement::isMouseFocusable such that submit buttons are mouse focusable.
+
+ This quirk is for ceac.state.gov specifically, and therefore no tests.
+
+ * html/HTMLFormControlElement.cpp:
+ (WebCore::HTMLFormControlElement::isMouseFocusable const):
+ (WebCore::HTMLFormControlElement::needsSiteSpecificQuirks const):
+ * html/HTMLFormControlElement.h:
+
+2019-01-23 Alan Coon <[email protected]>
+
Cherry-pick r240112. rdar://problem/47458291
[EME] Remove Amazon Prime Video from quirks list
Modified: branches/safari-607-branch/Source/WebCore/html/HTMLFormControlElement.cpp (240384 => 240385)
--- branches/safari-607-branch/Source/WebCore/html/HTMLFormControlElement.cpp 2019-01-24 01:21:46 UTC (rev 240384)
+++ branches/safari-607-branch/Source/WebCore/html/HTMLFormControlElement.cpp 2019-01-24 01:21:50 UTC (rev 240385)
@@ -40,6 +40,7 @@
#include "HTMLTextAreaElement.h"
#include "RenderBox.h"
#include "RenderTheme.h"
+#include "Settings.h"
#include "StyleTreeResolver.h"
#include "ValidationMessage.h"
#include <wtf/IsoMallocInlines.h>
@@ -372,6 +373,8 @@
#if PLATFORM(GTK)
return HTMLElement::isMouseFocusable();
#else
+ if (needsMouseFocusableQuirk())
+ return HTMLElement::isMouseFocusable();
return false;
#endif
}
@@ -655,4 +658,18 @@
return AutofillData::createFromHTMLFormControlElement(*this);
}
+// FIXME: We should remove the quirk once <rdar://problem/47334655> is fixed.
+bool HTMLFormControlElement::needsMouseFocusableQuirk() const
+{
+#if PLATFORM(MAC)
+ if (!document().settings().needsSiteSpecificQuirks())
+ return false;
+
+ auto host = document().url().host();
+ return equalLettersIgnoringASCIICase(host, "ceac.state.gov") || host.endsWithIgnoringASCIICase(".ceac.state.gov");
+#else
+ return false;
+#endif
+}
+
} // namespace Webcore
Modified: branches/safari-607-branch/Source/WebCore/html/HTMLFormControlElement.h (240384 => 240385)
--- branches/safari-607-branch/Source/WebCore/html/HTMLFormControlElement.h 2019-01-24 01:21:46 UTC (rev 240384)
+++ branches/safari-607-branch/Source/WebCore/html/HTMLFormControlElement.h 2019-01-24 01:21:50 UTC (rev 240385)
@@ -177,6 +177,8 @@
const HTMLFormControlElement& asHTMLElement() const final { return *this; }
HTMLFormControlElement* asFormNamedItem() final { return this; }
+ bool needsMouseFocusableQuirk() const;
+
std::unique_ptr<ValidationMessage> m_validationMessage;
unsigned m_disabled : 1;
unsigned m_isReadOnly : 1;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes