gecko-dev/dom
Hiroyuki Ikezoe 7b600a0531 Bug 1534070 - Factor scroll-padding into the position calculation where nsIPresShell::ScrollContentIntoView() is going to scroll if necessary. r=botond
In the case where scroll-snap-type is specified for the scroll container, the
scroll-padding is also factored into in ScrollFrameHelper::ComputeScrollSnapInfo
which is called via ScrollFrameHelper::ScrollToWithOrigin.  It doesn't double
the scroll-padding value, but it's actually redundant, we should avoid it.
We could separate the functionality of ScrollToWithOrigin, one is to scroll
to a given element, the other is to scroll to a given position.  The former will
be used for Element.scrollIntoElement and relevant stuff, the latter will be
used for Element.scrollTo and relevant stuff.  That's being said, as of now, we
have still the old scroll snap implementation, so the separation will introduce
complexity, the separation should be done once after the old implementation
removed.

There are 9 call sites of nsIPresShell::ScrollContentIntoView:
  nsIPresShell::GoToAnchor
  nsIPresShell::ScrollToAnchor
  Element::ScrollIntoView
   We definitely needs scroll-padding and scroll-margin for these functions.

  nsCoreUtils::ScrollTo
   This is used for Accesible::ScrollTo which scrolls to a given accesible node,
   probably we should behave as what Element::ScrollIntoView does.

  Accessible::DispatchClickEvent
   Similar to the above, similated various mouse events on a given target node.

  PresShell::EventHandler::PrepareToUseCaretPosition
  PresShell::EventHandler::GetCurrentItemAndPositionForElement
   Both are for context menu, we shouldn't consider scroll-padding and
   scroll-margin.

  nsFormFillController::SetPopupOpen
   This is used for autocompletion popup, we shouldn't consider scroll-padding
   and scroll-margin.

  nsFocusManager::ScrollIntoView
   This is bit unfortunate, we should use scroll-padding and scroll-margin
   depending on call site of this function. Bug 1535232 is for this case.

cssom-view/scrollIntoView-scrollPadding.html which has some tests that is
actually testing scroll-padding with scrollIntoView passes with this change.

The reftest in this change is a test case that the browser navigates to an
element with specifying the anchor to the element.

Differential Revision: https://phabricator.services.mozilla.com/D23084

--HG--
extra : moz-landing-system : lando
2019-04-11 06:22:14 +00:00
..
abort Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop 2019-03-28 09:38:14 +00:00
animation Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio 2019-04-04 00:19:48 +00:00
audiochannel Bug 1445923 - Removed references of systemAppUrl along with meaningless code. r=gsvelto 2019-04-09 09:41:19 +00:00
base Bug 1534070 - Factor scroll-padding into the position calculation where nsIPresShell::ScrollContentIntoView() is going to scroll if necessary. r=botond 2019-04-11 06:22:14 +00:00
battery
bindings Bug 1543461. Add the missing newline after a static assert in Web IDL codegen. r=peterv 2019-04-10 19:05:15 +00:00
broadcastchannel Bug 1455020 - Extend CheckInnerWindowCorrectness() to check the state of the worker, r=smaug 2019-04-01 16:46:46 +00:00
browser-element Bug 1541479. Stop using AutoJSContext in BrowserElementParent. r=farre 2019-04-04 08:45:14 +00:00
cache Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
canvas Backed out changeset aa0feb50773a (bug 1540221) for WPT failures in /html/semantics/embedded-content/the-canvas-element/security.pattern.fillStyle.sub.html. CLOSED TREE 2019-04-11 05:28:34 +03:00
chrome-webidl Bug 1542782 - Expose currentRemoteType on CanonicalBrowsingContext, r=farre 2019-04-08 16:29:08 +00:00
clients Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
commandhandler Bug 1542352 - Restore zero-argument constructor of nsBaseCommandController. r=bz 2019-04-05 12:55:00 +03:00
console Bug 1442778 - Add "chromeContext" parameter to console API and console service messages. r=smaug 2019-04-01 22:42:34 +00:00
credentialmanagement Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop 2019-03-28 09:38:14 +00:00
crypto Bug 1539578 - Add telemetry for DH use in WebCrypto API r=keeler 2019-04-02 22:25:04 +00:00
encoding Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
events Bug 1532901 - Fix event.screenX and event.screenY inside out-of-process iframes. r=nika 2019-04-09 10:26:31 +00:00
fetch Backed out 2 changesets (bug 1539208) for causing bug 1540569 a=backout 2019-04-01 10:36:18 +03:00
file Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan 2019-03-31 15:12:55 +00:00
filehandle Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
filesystem Bug 1536336. Change MOZ_CAN_RUN_SCRIPT analysis to allow const members of "this" in addition to stack refptrs. r=andi 2019-03-21 11:47:22 +00:00
flex
gamepad Bug 1465643 - Part 2: Remapping DualShock 4 buttons and axes on Windows. r=qdot 2019-04-08 20:21:28 +00:00
geolocation Bug 1541017 - Update in-tree bugzilla components for geolocation and dom/commandhandler/. r=mossop 2019-04-02 16:39:03 +00:00
grid
html Merge mozilla-central to autoland. a=merge 2019-04-11 07:25:42 +03:00
imptests Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
indexedDB Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
interfaces Bug 1474902 - Part 5. Add mochitest. r=masayuki 2019-04-05 17:15:15 +09:00
ipc Backed out changeset d76b42f0d6ca (bug 1523636) for causing bug 1543015. a=backout 2019-04-10 18:46:01 +03:00
jsurl Bug 1522412 - P2. Remove nsIChannel.LOAD_CLASSIFY_URI flag. r=Ehsan 2019-03-25 12:47:57 +00:00
locales Bug 1534677 - Verify lang member in ManifestProcessor.jsm r=snorp 2019-04-11 01:35:21 +00:00
localstorage Bug 1539538 - Introduce UnsafePtr r=froydnj,janv 2019-04-09 14:41:57 +00:00
manifest Bug 1534677 - Verify lang member in ManifestProcessor.jsm r=snorp 2019-04-11 01:35:21 +00:00
mathml Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio 2019-04-04 00:19:48 +00:00
media Bug 1518609 - Add telemetry to legacy maxRetransmitTime DataChannel param r=jib,janerik 2019-04-11 01:42:51 +00:00
messagechannel Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio 2019-04-04 00:19:48 +00:00
midi
network Bug 1455020 - Extend CheckInnerWindowCorrectness() to check the state of the worker, r=smaug 2019-04-01 16:46:46 +00:00
notification Bug 1540088 - Require user interaction for push notification permission prompts in Nightly. r=Ehsan 2019-03-29 18:08:20 +00:00
offline
payments Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
performance Backed out changeset 3cd097a7b017 (bug 1539006) for po-observe.any.worker.html failures CLOSED TREE 2019-04-10 09:48:56 +03:00
permission Bug 1535353 - update Core :: DOM: * bugzilla product and component meta data in moz.build files after reorganization in bug 1533440 r=hsinyi 2019-03-17 23:13:22 +00:00
plugins Bug 1534967 - Part 1: use RootedIdVector. r=jonco 2019-04-08 10:46:53 +08:00
power Bug 1539029 - pt 1 - give RDD its own process selector. r=froydnj 2019-04-09 21:13:16 +00:00
presentation Bug 1535442 - Part 10: Fix bug in presentation API mochitest where ICE candidates were being sent to the wrong PC. r=smaug 2019-03-28 21:45:46 +00:00
prio Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi 2019-04-05 21:42:17 +00:00
promise Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop 2019-03-28 09:38:14 +00:00
prototype Backed out 2 changesets (bug 1543245) for frequently failing devtools at devtools/client/inspector/test/browser_inspector_highlighter-07.js on a CLOSED TREE 2019-04-11 05:21:18 +03:00
push Bug 1540141 - Distinguish broadcast trigger from startup trigger in Remote Settings Uptake events r=glasserc,lina 2019-04-10 16:55:52 +00:00
quota Bug 1539538 - Introduce UnsafePtr r=froydnj,janv 2019-04-09 14:41:57 +00:00
reporting Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi 2019-04-05 21:42:17 +00:00
res
script Bug 1542120 - Add js/public/Warnings.h for warning-related JSAPI. r=arai 2019-04-05 22:52:04 +00:00
security Bug 1513445: add tests r=ckerschb 2019-04-10 14:20:21 +00:00
serviceworkers Bug 1542146 - Apply the change with the option StatementMacros from clang-format-8 r=andi 2019-04-05 21:42:17 +00:00
simpledb
smil Bug 1540990 - Get rid of unnecessary nsIPresShell.h inclusions r=emilio 2019-04-04 00:19:48 +00:00
storage Bug 1533651 - Don't check result of PSessionStorageObserverChild::SendDeleteMe; r=asuth 2019-03-26 12:51:12 +01:00
svg Bug 1542646 Part 2 - Use default keyword instead of empty constructors and destructors r=dholbert 2019-04-10 05:34:35 +01:00
system Bug 1541017 - Update in-tree bugzilla components for geolocation and dom/commandhandler/. r=mossop 2019-04-02 16:39:03 +00:00
tests Bug 1324548 - Add MediaStreamTrackAudioSourceNode. r=pehrsons,baku 2019-04-10 12:14:17 +00:00
u2f Bug 1541085 - Web Authentication - Only reset mTransaction on cycle collection r=keeler 2019-04-02 17:56:47 +00:00
url Bug 1543321 - Use nsContentUtils::GetThreadSafeUTFOrigin in the URL API, r=smaug 2019-04-10 08:05:00 +00:00
vr Bug 1540206 - Fixing VRController gamepad id null terminator characters. r=kip 2019-04-02 19:35:46 +00:00
webauthn Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
webbrowserpersist Bug 1536530, let save-page-as work even if there are invalid urls, r=Gijs 2019-04-03 13:56:05 +00:00
webgpu Bug 1415265 - Remove now unnecessary .eslintrc.js files or entries. r=mossop 2019-03-28 09:38:14 +00:00
webidl Backed out changeset 3cd097a7b017 (bug 1539006) for po-observe.any.worker.html failures CLOSED TREE 2019-04-10 09:48:56 +03:00
websocket Bug 1442778 - Add "chromeContext" parameter to console API and console service messages. r=smaug 2019-04-01 22:42:34 +00:00
workers Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
worklet Bug 1539039 keep WorkletGlobalScope as long as its Worklet is usable r=baku 2019-04-01 16:54:58 +00:00
xbl Merge inbound to mozilla-central a=merge 2019-04-04 19:08:32 +03:00
xhr Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
xml Bug 1536582 - Autogenerate Servo_ binding functions with cbindgen. r=boris 2019-03-30 20:18:33 +00:00
xslt Bug 1519636 - clang-format-8: Reformat recent changes to the Google coding style r=Ehsan 2019-04-05 21:41:42 +00:00
xul Backed out changeset d76b42f0d6ca (bug 1523636) for causing bug 1543015. a=backout 2019-04-10 18:46:01 +03:00
jar.mn
moz.build Bug 1520931 - Remove dom/asmjscache (r=ttung) 2019-03-26 16:57:55 -05:00