Bug 277657
Summary: | Remove the indirection in isMouseFocusable() to call directly the quirk | ||
---|---|---|---|
Product: | WebKit | Reporter: | Karl Dubost <karlcow> |
Component: | WebKit Misc. | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED FIXED | ||
Severity: | Normal | CC: | webkit-bug-importer |
Priority: | P4 | Keywords: | GoodFirstBug, InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified |
Karl Dubost
On https://searchfox.org/wubkat/rev/b36cbce69fddb7da33823f316bd8ead5bebee970/Source/WebCore/html/HTMLFormControlElement.cpp#492
there is
```
// FIXME: We should remove the quirk once <rdar://problem/47334655> is fixed.
bool HTMLFormControlElement::needsMouseFocusableQuirk() const
{
return document().quirks().needsFormControlToBeMouseFocusable();
}
```
which is used in https://searchfox.org/wubkat/rev/b36cbce69fddb7da33823f316bd8ead5bebee970/Source/WebCore/html/HTMLFormControlElement.cpp#251-260
```
bool HTMLFormControlElement::isMouseFocusable() const
{
#if (PLATFORM(GTK) || PLATFORM(WPE))
return HTMLElement::isMouseFocusable();
#else
if (!!tabIndexSetExplicitly() || needsMouseFocusableQuirk())
return HTMLElement::isMouseFocusable();
return false;
#endif
}
```
it doesn't need the indirection.
1. The function should isMouseFocusable() should directly call document().quirks().needsFormControlToBeMouseFocusable()
2. Do not forget about moving the comment too.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Radar WebKit Bug Importer
<rdar://problem/133252329>
Nathan Solomon
Pull request: https://github.com/WebKit/WebKit/pull/31972
EWS
Committed 282062@main (76bcd3ed6795): <https://commits.webkit.org/282062@main>
Reviewed commits have been landed. Closing PR #31972 and removing active labels.