зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1526749 - Drop Element.scrollByNoFlush. r=kats,mccr8
It's no longer used since bug 970125. Differential Revision: https://phabricator.services.mozilla.com/D19289 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
6f58bd82bd
Коммит
7f39371579
|
@ -913,26 +913,6 @@ void Element::SetScrollLeft(int32_t aScrollLeft) {
|
|||
}
|
||||
}
|
||||
|
||||
bool Element::ScrollByNoFlush(int32_t aDx, int32_t aDy) {
|
||||
nsIScrollableFrame* sf = GetScrollFrame(nullptr, FlushType::None);
|
||||
if (!sf) {
|
||||
return false;
|
||||
}
|
||||
|
||||
AutoWeakFrame weakRef(sf->GetScrolledFrame());
|
||||
|
||||
CSSIntPoint before = sf->GetScrollPositionCSSPixels();
|
||||
sf->ScrollToCSSPixelsApproximate(CSSIntPoint(before.x + aDx, before.y + aDy));
|
||||
|
||||
// The frame was destroyed, can't keep on scrolling.
|
||||
if (!weakRef.IsAlive()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
CSSIntPoint after = sf->GetScrollPositionCSSPixels();
|
||||
return (before != after);
|
||||
}
|
||||
|
||||
void Element::MozScrollSnap() {
|
||||
nsIScrollableFrame* sf = GetScrollFrame(nullptr, FlushType::None);
|
||||
if (sf) {
|
||||
|
|
|
@ -1252,11 +1252,6 @@ class Element : public FragmentOrElement {
|
|||
MOZ_CAN_RUN_SCRIPT void ScrollTo(const ScrollToOptions& aOptions);
|
||||
MOZ_CAN_RUN_SCRIPT void ScrollBy(double aXScrollDif, double aYScrollDif);
|
||||
MOZ_CAN_RUN_SCRIPT void ScrollBy(const ScrollToOptions& aOptions);
|
||||
/* Scrolls without flushing the layout.
|
||||
* aDx is the x offset, aDy the y offset in CSS pixels.
|
||||
* Returns true if we actually scrolled.
|
||||
*/
|
||||
MOZ_CAN_RUN_SCRIPT bool ScrollByNoFlush(int32_t aDx, int32_t aDy);
|
||||
MOZ_CAN_RUN_SCRIPT int32_t ScrollTop();
|
||||
MOZ_CAN_RUN_SCRIPT void SetScrollTop(int32_t aScrollTop);
|
||||
MOZ_CAN_RUN_SCRIPT int32_t ScrollLeft();
|
||||
|
|
|
@ -147,13 +147,6 @@ interface Element : Node {
|
|||
[CEReactions, Throws]
|
||||
Attr? setAttributeNodeNS(Attr newAttr);
|
||||
|
||||
[ChromeOnly]
|
||||
/**
|
||||
* Scrolls the element by (dx, dy) CSS pixels without doing any
|
||||
* layout flushing.
|
||||
*/
|
||||
boolean scrollByNoFlush(long dx, long dy);
|
||||
|
||||
[ChromeOnly]
|
||||
DOMMatrixReadOnly getTransformToAncestor(Element ancestor);
|
||||
[ChromeOnly]
|
||||
|
|
Загрузка…
Ссылка в новой задаче