Bug 1535232 - Take account the scroll-snap-margin and scroll-snap-padding into the position where we scroll to on Element.focus() call. r=masayuki,botond
We also take account those values in the case of `Find in page`. The corresponding web platform tests will be coming from this PR. https://github.com/web-platform-tests/wpt/pull/8575 Though some of them will not be passed, the failure reason is not related to this change, I will take a look when the PR gets merged into mozilla-central. Differential Revision: https://phabricator.services.mozilla.com/D25915
This commit is contained in:
@@ -2332,7 +2332,8 @@ bool nsGenericHTMLElement::PerformAccesskey(bool aKeyCausesActivation,
|
||||
bool focused = true;
|
||||
nsFocusManager* fm = nsFocusManager::GetFocusManager();
|
||||
if (fm) {
|
||||
fm->SetFocus(this, nsIFocusManager::FLAG_BYKEY);
|
||||
fm->SetFocus(this, nsIFocusManager::FLAG_BYKEY |
|
||||
nsIFocusManager::FLAG_BYELEMENTFOCUS);
|
||||
|
||||
// Return true if the element became the current focus within its window.
|
||||
nsPIDOMWindowOuter* window = OwnerDoc()->GetWindow();
|
||||
|
||||
Reference in New Issue
Block a user