layout/generic/nsIScrollableFrame.h
author Matt Woodrow <mwoodrow@mozilla.com>
Sun, 05 Sep 2021 22:36:45 +0000 (2021-09-05)
changeset 591057 1b49e7328ae43c6565d167f4c391430575097fd3
parent 591009 6f9a4f3a3c3669ad589be8f586feb17dd5ba996b
child 591146 414aa7ff05fe93b7925ed2173f9e12fd1feb5dd5
permissions -rw-r--r--
Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel Differential Revision: https://phabricator.services.mozilla.com/D124433
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
388790
905239391e05483e8fb221378dd2092c5a0df8b7 Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
Daniel Holbert <dholbert@cs.stanford.edu>
parents: 388277
diff changeset
     1
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
905239391e05483e8fb221378dd2092c5a0df8b7 Bug 1412346 part 5: (automated patch) Switch a bunch of C++ files in layout to use our standard mode lines. r=jfkthame
Daniel Holbert <dholbert@cs.stanford.edu>
parents: 388277
diff changeset
     2
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
94475
Gervase Markham <gerv@gerv.net>
parents: 93967
diff changeset
     3
/* This Source Code Form is subject to the terms of the Mozilla Public
Gervase Markham <gerv@gerv.net>
parents: 93967
diff changeset
     4
 * License, v. 2.0. If a copy of the MPL was not distributed with this
Gervase Markham <gerv@gerv.net>
parents: 93967
diff changeset
     5
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
     6
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
     7
/*
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
     8
 * interface that provides scroll APIs implemented by scrollable frames
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
     9
 */
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    10
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    11
#ifndef nsIScrollFrame_h___
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    12
#define nsIScrollFrame_h___
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    13
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    14
#include "nsCoord.h"
542991
e0fcac18ed9a92c1ce55f9a95af9580c6ec88b26 Bug 1531609 part 2 - Implement overflow:clip/visible combinations. r=emilio
Mats Palmgren <mats@mozilla.com>
parents: 542980
diff changeset
    15
#include "mozilla/dom/WindowBinding.h"  // for mozilla::dom::ScrollBehavior
245723
caa1f99747316e792750094f182199de9eb3498f Use Maybe to communicate the APZ scrollframe clip. (bug 1148582 part 1, r=mstange)
David Anderson <danderson@mozilla.com>
parents: 235776
diff changeset
    16
#include "mozilla/Maybe.h"
534115
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
    17
#include "mozilla/ScrollOrigin.h"
548426
98fb30c331e23e9f2435229f57a62e918e407da0 Bug 1662013 - Introduce a ScrollPositionUpdate and plumb it in. r=tnikkel,botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 544002
diff changeset
    18
#include "mozilla/ScrollPositionUpdate.h"
429676
d363b70ff752caef217571f42fa71a92ca81a401 Bug 1479995 - Rename ScrollbarStyles to ScrollStyles. r=mstange
Xidorn Quan <me@upsuper.org>
parents: 415523
diff changeset
    19
#include "mozilla/ScrollStyles.h"
466413
57847959cfa67e7d36d0d18e09a006197e154c5e Bug 1538511 - Move nsIScrollableFrame::ScrollMode into a separate file. r=kats
Botond Ballo <botond@mozilla.com>
parents: 465835
diff changeset
    20
#include "mozilla/ScrollTypes.h"
114061
523f2e2189d7524965f9040cfbba320e95f23445 Bug 812517. Part 1: Add nsIScrollableFrame::ScrollToCSSPixelsApproximate. r=mats
Robert O'Callahan <robert@ocallahan.org>
parents: 111658
diff changeset
    21
#include "mozilla/gfx/Point.h"
201256
249dae95ea83149bdc1e82df00afbac10ee38c6b Bug 957445: Part 2 - nsHTML/XULScrollFrame implement nsIScrollbarMediator, r=mats
Miranda Emery <miranda.j.emery@gmail.com>
parents: 196770
diff changeset
    22
#include "nsIScrollbarMediator.h"
133572
5bb24851fd4aaf06cc23c088c091b9942cb33ec7 Bug 877726 - Convert FrameMetrics.mScrollOffset to be a CSSPoint. r=kentuckyfriedtakahe
Kartikaya Gupta <kgupta@mozilla.com>
parents: 133017
diff changeset
    23
#include "Units.h"
203060
ea4cfd84e417f7a0763a808d83183b1e508fd363 Bug 967844. Part 3: Setup FrameMetrics from FrameLayerBuilder based on animated geometry roots. r=mattwoodrow
Robert O'Callahan <robert@ocallahan.org>
parents: 202902
diff changeset
    24
#include "FrameMetrics.h"
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    25
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
    26
#define NS_DEFAULT_VERTICAL_SCROLL_DISTANCE 3
111658
49fdae25aac952dc7db9b6c9f3234a3c640668d1 Bug 804486 - Add toolkit.scrollbox.horizontalScrollDistance pref, default 5. Change horizontal scroll increment from 10px to horizontalScrollDistance * GetLineScrollAmount().width(). Make GetLineScrollAmount() use the font's AveCharWidth() for the horizontal amount rather than MaxHeight(). r=roc
Mats Palmgren <matspal@gmail.com>
parents: 107897
diff changeset
    27
#define NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE 5
87411
74cb4c127dc1a38805a3de989ec1dfc9988e8c09 Bug 725700 - Keyboard arrow keys and scrollbar buttons should have consistent scrolling distances.
Jared Wein <jwein@mozilla.com>
parents: 77799
diff changeset
    28
363742
5e5dda793c3e0a93fa8a0f2c377dcb28a113e3e7 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
Alexis Beingessner <a.beingessner@gmail.com>
parents: 363605
diff changeset
    29
class gfxContext;
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    30
class nsBoxLayoutState;
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
    31
class nsIScrollPositionListener;
101526
b398d42e2f116a73d2a19ee53be0c11c08191b68 [Bug 780439] Kill off the remains of nsIBox r=roc
David Zbarsky <dzbarsky@gmail.com>
parents: 100844
diff changeset
    32
class nsIFrame;
144168
5a9fb1ce1de5678dba6f363a92e16bdd0192f219 Bug 908724 - Avoid #including nsPresContext.h in nsIScrollableFrame.h; r=mats
Ehsan Akhgari <ehsan.akhgari@gmail.com>
parents: 141953
diff changeset
    33
class nsPresContext;
5a9fb1ce1de5678dba6f363a92e16bdd0192f219 Bug 908724 - Avoid #including nsPresContext.h in nsIScrollableFrame.h; r=mats
Ehsan Akhgari <ehsan.akhgari@gmail.com>
parents: 141953
diff changeset
    34
class nsIContent;
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    35
203060
ea4cfd84e417f7a0763a808d83183b1e508fd363 Bug 967844. Part 3: Setup FrameMetrics from FrameLayerBuilder based on animated geometry roots. r=mattwoodrow
Robert O'Callahan <robert@ocallahan.org>
parents: 202902
diff changeset
    36
namespace mozilla {
513166
5edfca9532a086db51558e8d72fa2da2f4fc6352 Bug 1614208 - Remove some include dependencies in nsStyleConsts.h. r=jfkthame,jgilbert
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 512124
diff changeset
    37
class DisplayItemClip;
585914
77c96f7183eb3f44c101c112fba35fbfe98c3c41 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Miko Mynttinen <mikokm@gmail.com>
parents: 585695
diff changeset
    38
class nsDisplayListBuilder;
77c96f7183eb3f44c101c112fba35fbfe98c3c41 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Miko Mynttinen <mikokm@gmail.com>
parents: 585695
diff changeset
    39
203060
ea4cfd84e417f7a0763a808d83183b1e508fd363 Bug 967844. Part 3: Setup FrameMetrics from FrameLayerBuilder based on animated geometry roots. r=mattwoodrow
Robert O'Callahan <robert@ocallahan.org>
parents: 202902
diff changeset
    40
namespace layers {
444295
ad0782d7c503f33cfb554d08dedc96287e1ed3f2 Bug 1504220 - Move ScrollableLayerGuid, ViewID, ZoomConstraints from FrameMetrics.h r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442909
diff changeset
    41
struct ScrollMetadata;
203060
ea4cfd84e417f7a0763a808d83183b1e508fd363 Bug 967844. Part 3: Setup FrameMetrics from FrameLayerBuilder based on animated geometry roots. r=mattwoodrow
Robert O'Callahan <robert@ocallahan.org>
parents: 202902
diff changeset
    42
class Layer;
591057
1b49e7328ae43c6565d167f4c391430575097fd3 Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel
Matt Woodrow <mwoodrow@mozilla.com>
parents: 591009
diff changeset
    43
class WebRenderLayerManager;
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
    44
}  // namespace layers
453385
52a6a35a238d2ea87c60cc387d12e7348fcf821a Bug 1305957 part 4 - Add basic ScrollAnchorContainer implementation. r=hiro
Ryan Hunt <rhunt@eqrion.net>
parents: 453275
diff changeset
    45
namespace layout {
52a6a35a238d2ea87c60cc387d12e7348fcf821a Bug 1305957 part 4 - Add basic ScrollAnchorContainer implementation. r=hiro
Ryan Hunt <rhunt@eqrion.net>
parents: 453275
diff changeset
    46
class ScrollAnchorContainer;
52a6a35a238d2ea87c60cc387d12e7348fcf821a Bug 1305957 part 4 - Add basic ScrollAnchorContainer implementation. r=hiro
Ryan Hunt <rhunt@eqrion.net>
parents: 453275
diff changeset
    47
}  // namespace layout
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
    48
}  // namespace mozilla
203060
ea4cfd84e417f7a0763a808d83183b1e508fd363 Bug 967844. Part 3: Setup FrameMetrics from FrameLayerBuilder based on animated geometry roots. r=mattwoodrow
Robert O'Callahan <robert@ocallahan.org>
parents: 202902
diff changeset
    49
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
    50
/**
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
    51
 * Interface for frames that are scrollable. This interface exposes
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
    52
 * APIs for examining scroll state, observing changes to scroll state,
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
    53
 * and triggering scrolling.
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
    54
 */
201257
4ef03db1385b282ade9a48d302ce2eb081bbe855 Bug 957445: Part 3 - combines nsIScrollbarOwner with nsIScrollbarMediator, r=mats
Miranda Emery <miranda.j.emery@gmail.com>
parents: 201256
diff changeset
    55
class nsIScrollableFrame : public nsIScrollbarMediator {
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
    56
 public:
137747
e98229cb45f31a3f7c7c6014918a59eddf7f16a5 Bug 890821 - Make nsIScrollableFrame::GetScrollPositionCSSPixels return CSSIntPoint; r=roc
Ms2ger <ms2ger@gmail.com>
parents: 136985
diff changeset
    57
  typedef mozilla::CSSIntPoint CSSIntPoint;
291364
8e167bb3d4f573179bb6ccc700b713d5cbd0f5a0 Bug 1219296 - Ship scroll snap information to the compositor. r=kats
Botond Ballo <botond@mozilla.com>
parents: 291358
diff changeset
    58
  typedef mozilla::layers::ScrollSnapInfo ScrollSnapInfo;
453385
52a6a35a238d2ea87c60cc387d12e7348fcf821a Bug 1305957 part 4 - Add basic ScrollAnchorContainer implementation. r=hiro
Ryan Hunt <rhunt@eqrion.net>
parents: 453275
diff changeset
    59
  typedef mozilla::layout::ScrollAnchorContainer ScrollAnchorContainer;
466413
57847959cfa67e7d36d0d18e09a006197e154c5e Bug 1538511 - Move nsIScrollableFrame::ScrollMode into a separate file. r=kats
Botond Ballo <botond@mozilla.com>
parents: 465835
diff changeset
    60
  typedef mozilla::ScrollMode ScrollMode;
534115
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
    61
  typedef mozilla::ScrollOrigin ScrollOrigin;
137747
e98229cb45f31a3f7c7c6014918a59eddf7f16a5 Bug 890821 - Make nsIScrollableFrame::GetScrollPositionCSSPixels return CSSIntPoint; r=roc
Ms2ger <ms2ger@gmail.com>
parents: 136985
diff changeset
    62
32423
7df4c375164fd13c2290e178f0e11dc5559b81b0 Bug 497495 part 3: Add methods to every nsFrame subclass that expose the as-allocated identity of every frame object. Also some cleanups to the QueryFrame implementation. r=dbaron sr=roc
Zack Weinberg <zweinberg@mozilla.com>
parents: 32009
diff changeset
    63
  NS_DECL_QUERYFRAME_TARGET(nsIScrollableFrame)
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    64
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    65
  /**
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
    66
   * Get the frame for the content that we are scrolling within
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
    67
   * this scrollable frame.
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    68
   */
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    69
  virtual nsIFrame* GetScrolledFrame() const = 0;
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    70
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
    71
  /**
498542
a8089b1fa5c4f678f64ae07102ee3863a63d8c31 Bug 1590281 - Don't propagate overscroll-behavior from body to viewport. r=hiro
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 493295
diff changeset
    72
   * Get the overflow styles (StyleOverflow::Scroll, StyleOverflow::Hidden, or
a8089b1fa5c4f678f64ae07102ee3863a63d8c31 Bug 1590281 - Don't propagate overscroll-behavior from body to viewport. r=hiro
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 493295
diff changeset
    73
   * StyleOverflow::Auto) governing the horizontal and vertical scrollbars for
a8089b1fa5c4f678f64ae07102ee3863a63d8c31 Bug 1590281 - Don't propagate overscroll-behavior from body to viewport. r=hiro
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 493295
diff changeset
    74
   * this frame.
a8089b1fa5c4f678f64ae07102ee3863a63d8c31 Bug 1590281 - Don't propagate overscroll-behavior from body to viewport. r=hiro
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 493295
diff changeset
    75
   *
a8089b1fa5c4f678f64ae07102ee3863a63d8c31 Bug 1590281 - Don't propagate overscroll-behavior from body to viewport. r=hiro
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 493295
diff changeset
    76
   * This is special because they can be propagated from the <body> element,
a8089b1fa5c4f678f64ae07102ee3863a63d8c31 Bug 1590281 - Don't propagate overscroll-behavior from body to viewport. r=hiro
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 493295
diff changeset
    77
   * unlike other styles.
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
    78
   */
429676
d363b70ff752caef217571f42fa71a92ca81a401 Bug 1479995 - Rename ScrollbarStyles to ScrollStyles. r=mstange
Xidorn Quan <me@upsuper.org>
parents: 415523
diff changeset
    79
  virtual mozilla::ScrollStyles GetScrollStyles() const = 0;
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    80
498542
a8089b1fa5c4f678f64ae07102ee3863a63d8c31 Bug 1590281 - Don't propagate overscroll-behavior from body to viewport. r=hiro
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 493295
diff changeset
    81
  /**
515961
ff3125134c9355727730c53561d2b29144270e25 Bug 1617342 - Don't treat scrollable boxes inside input elements as focusable. r=bzbarsky
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 513166
diff changeset
    82
   * Returns whether this scroll frame is for a text control element with no
ff3125134c9355727730c53561d2b29144270e25 Bug 1617342 - Don't treat scrollable boxes inside input elements as focusable. r=bzbarsky
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 513166
diff changeset
    83
   * scrollbars (for <input>, basically).
ff3125134c9355727730c53561d2b29144270e25 Bug 1617342 - Don't treat scrollable boxes inside input elements as focusable. r=bzbarsky
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 513166
diff changeset
    84
   */
ff3125134c9355727730c53561d2b29144270e25 Bug 1617342 - Don't treat scrollable boxes inside input elements as focusable. r=bzbarsky
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 513166
diff changeset
    85
  virtual bool IsForTextControlWithNoScrollbars() const = 0;
ff3125134c9355727730c53561d2b29144270e25 Bug 1617342 - Don't treat scrollable boxes inside input elements as focusable. r=bzbarsky
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 513166
diff changeset
    86
ff3125134c9355727730c53561d2b29144270e25 Bug 1617342 - Don't treat scrollable boxes inside input elements as focusable. r=bzbarsky
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 513166
diff changeset
    87
  /**
498542
a8089b1fa5c4f678f64ae07102ee3863a63d8c31 Bug 1590281 - Don't propagate overscroll-behavior from body to viewport. r=hiro
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 493295
diff changeset
    88
   * Get the overscroll-behavior styles.
a8089b1fa5c4f678f64ae07102ee3863a63d8c31 Bug 1590281 - Don't propagate overscroll-behavior from body to viewport. r=hiro
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 493295
diff changeset
    89
   */
a8089b1fa5c4f678f64ae07102ee3863a63d8c31 Bug 1590281 - Don't propagate overscroll-behavior from body to viewport. r=hiro
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 493295
diff changeset
    90
  virtual mozilla::layers::OverscrollBehaviorInfo GetOverscrollBehaviorInfo()
a8089b1fa5c4f678f64ae07102ee3863a63d8c31 Bug 1590281 - Don't propagate overscroll-behavior from body to viewport. r=hiro
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 493295
diff changeset
    91
      const = 0;
a8089b1fa5c4f678f64ae07102ee3863a63d8c31 Bug 1590281 - Don't propagate overscroll-behavior from body to viewport. r=hiro
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 493295
diff changeset
    92
37292
51292fe9e5a94e5f004cb28d90a9337d038a8a44 Bug 539331 - browser_sanitizeDialog.js is failing, r=matspal
Robert O'Callahan <roc@ocallahan.org>
parents: 37083
diff changeset
    93
  /**
51292fe9e5a94e5f004cb28d90a9337d038a8a44 Bug 539331 - browser_sanitizeDialog.js is failing, r=matspal
Robert O'Callahan <roc@ocallahan.org>
parents: 37083
diff changeset
    94
   * Return the scrollbars which are visible. It's OK to call this during reflow
51292fe9e5a94e5f004cb28d90a9337d038a8a44 Bug 539331 - browser_sanitizeDialog.js is failing, r=matspal
Robert O'Callahan <roc@ocallahan.org>
parents: 37083
diff changeset
    95
   * of the scrolled contents, in which case it will reflect the current
51292fe9e5a94e5f004cb28d90a9337d038a8a44 Bug 539331 - browser_sanitizeDialog.js is failing, r=matspal
Robert O'Callahan <roc@ocallahan.org>
parents: 37083
diff changeset
    96
   * assumptions about scrollbar visibility.
51292fe9e5a94e5f004cb28d90a9337d038a8a44 Bug 539331 - browser_sanitizeDialog.js is failing, r=matspal
Robert O'Callahan <roc@ocallahan.org>
parents: 37083
diff changeset
    97
   */
564136
572a833231a144f7606a74f7853080937e8b9c21 Bug 1677643 - Replace nsIScrollableFrame::{HORIZONTAL, VERTICAL} with ScrollDirections. r=botond
nirmay <nirmay.dhruv@gmail.com>
parents: 558107
diff changeset
    98
  virtual mozilla::layers::ScrollDirections GetScrollbarVisibility() const = 0;
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    99
  /**
484113
d3b65ecc2afb84a09d2728a04a14ac6bf68028ce Bug 1567237 - Only use scroll range to select scrollable frames to scroll to, don't use scrollbar visibility. r=tnikkel
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 484067
diff changeset
   100
   * Returns the directions in which scrolling is allowed (if the scroll range
d3b65ecc2afb84a09d2728a04a14ac6bf68028ce Bug 1567237 - Only use scroll range to select scrollable frames to scroll to, don't use scrollbar visibility. r=tnikkel
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 484067
diff changeset
   101
   * is at least one device pixel in that direction).
107897
46fce5a9890f2fef138ed96b7065aad0a1c67948 Bug 791616. Part 1: Add nsIScrollableFrame::GetPerceivedScrollingDirections to consolidate logic for whether UI actions should be allowed to scroll in a given direction. r=mats
Robert O'Callahan <robert@ocallahan.org>
parents: 107895
diff changeset
   102
   */
564136
572a833231a144f7606a74f7853080937e8b9c21 Bug 1677643 - Replace nsIScrollableFrame::{HORIZONTAL, VERTICAL} with ScrollDirections. r=botond
nirmay <nirmay.dhruv@gmail.com>
parents: 558107
diff changeset
   103
  mozilla::layers::ScrollDirections GetAvailableScrollingDirections() const;
107897
46fce5a9890f2fef138ed96b7065aad0a1c67948 Bug 791616. Part 1: Add nsIScrollableFrame::GetPerceivedScrollingDirections to consolidate logic for whether UI actions should be allowed to scroll in a given direction. r=mats
Robert O'Callahan <robert@ocallahan.org>
parents: 107895
diff changeset
   104
  /**
505954
329340b1608d79266217ae37b098fa270f444c89 Bug 1601185. Add a function that returns if a user can scroll on a given scroll frame in either direction and use it in EventStateManager::ComputeScrollTargetAndMayAdjustWheelEvent. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 504968
diff changeset
   105
   * Returns the directions in which scrolling is allowed when taking into
329340b1608d79266217ae37b098fa270f444c89 Bug 1601185. Add a function that returns if a user can scroll on a given scroll frame in either direction and use it in EventStateManager::ComputeScrollTargetAndMayAdjustWheelEvent. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 504968
diff changeset
   106
   * account the visual viewport size and overflow hidden. (An (apz) zoomed in
329340b1608d79266217ae37b098fa270f444c89 Bug 1601185. Add a function that returns if a user can scroll on a given scroll frame in either direction and use it in EventStateManager::ComputeScrollTargetAndMayAdjustWheelEvent. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 504968
diff changeset
   107
   * overflow hidden scrollframe is actually user scrollable.)
329340b1608d79266217ae37b098fa270f444c89 Bug 1601185. Add a function that returns if a user can scroll on a given scroll frame in either direction and use it in EventStateManager::ComputeScrollTargetAndMayAdjustWheelEvent. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 504968
diff changeset
   108
   */
564136
572a833231a144f7606a74f7853080937e8b9c21 Bug 1677643 - Replace nsIScrollableFrame::{HORIZONTAL, VERTICAL} with ScrollDirections. r=botond
nirmay <nirmay.dhruv@gmail.com>
parents: 558107
diff changeset
   109
  virtual mozilla::layers::ScrollDirections
572a833231a144f7606a74f7853080937e8b9c21 Bug 1677643 - Replace nsIScrollableFrame::{HORIZONTAL, VERTICAL} with ScrollDirections. r=botond
nirmay <nirmay.dhruv@gmail.com>
parents: 558107
diff changeset
   110
  GetAvailableScrollingDirectionsForUserInputEvents() const = 0;
505954
329340b1608d79266217ae37b098fa270f444c89 Bug 1601185. Add a function that returns if a user can scroll on a given scroll frame in either direction and use it in EventStateManager::ComputeScrollTargetAndMayAdjustWheelEvent. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 504968
diff changeset
   111
  /**
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   112
   * Return the actual sizes of all possible scrollbars. Returns 0 for scrollbar
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   113
   * positions that don't have a scrollbar or where the scrollbar is not
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   114
   * visible. Do not call this while this frame's descendants are being
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   115
   * reflowed, it won't be accurate.
544002
7b93758ae83e7a9cef0102849a56f9244d873afa Bug 1656802. Make visual viewport only layout scrollbars affect the composition bounds/visual viewport. r=emilio,kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 543745
diff changeset
   116
   * INCLUDE_VISUAL_VIEWPORT_SCROLLBARS means we include the size of layout
7b93758ae83e7a9cef0102849a56f9244d873afa Bug 1656802. Make visual viewport only layout scrollbars affect the composition bounds/visual viewport. r=emilio,kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 543745
diff changeset
   117
   * scrollbars that are only visible to scroll the visual viewport inside the
7b93758ae83e7a9cef0102849a56f9244d873afa Bug 1656802. Make visual viewport only layout scrollbars affect the composition bounds/visual viewport. r=emilio,kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 543745
diff changeset
   118
   * layout viewport (ie the layout viewport cannot be scrolled) even though
7b93758ae83e7a9cef0102849a56f9244d873afa Bug 1656802. Make visual viewport only layout scrollbars affect the composition bounds/visual viewport. r=emilio,kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 543745
diff changeset
   119
   * there is no layout space set aside for these scrollbars.
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   120
   */
544002
7b93758ae83e7a9cef0102849a56f9244d873afa Bug 1656802. Make visual viewport only layout scrollbars affect the composition bounds/visual viewport. r=emilio,kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 543745
diff changeset
   121
  enum class ScrollbarSizesOptions { NONE, INCLUDE_VISUAL_VIEWPORT_SCROLLBARS };
7b93758ae83e7a9cef0102849a56f9244d873afa Bug 1656802. Make visual viewport only layout scrollbars affect the composition bounds/visual viewport. r=emilio,kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 543745
diff changeset
   122
  virtual nsMargin GetActualScrollbarSizes(
7b93758ae83e7a9cef0102849a56f9244d873afa Bug 1656802. Make visual viewport only layout scrollbars affect the composition bounds/visual viewport. r=emilio,kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 543745
diff changeset
   123
      ScrollbarSizesOptions aOptions = ScrollbarSizesOptions::NONE) const = 0;
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   124
  /**
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   125
   * Return the sizes of all scrollbars assuming that any scrollbars that could
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   126
   * be visible due to overflowing content, are. This can be called during
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   127
   * reflow of the scrolled contents.
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   128
   */
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   129
  virtual nsMargin GetDesiredScrollbarSizes(nsBoxLayoutState* aState) = 0;
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   130
  /**
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   131
   * Return the sizes of all scrollbars assuming that any scrollbars that could
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   132
   * be visible due to overflowing content, are. This can be called during
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   133
   * reflow of the scrolled contents.
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   134
   */
14159
3d8dbcce108f8b11d5b6b5c40d89cf91a4b110bc Bug 425253. Propagate reflow-depth tracking through XUL box layout. r+sr=dbaron,a=damon
roc+@cs.cmu.edu
parents: 1
diff changeset
   135
  virtual nsMargin GetDesiredScrollbarSizes(nsPresContext* aPresContext,
363742
5e5dda793c3e0a93fa8a0f2c377dcb28a113e3e7 Bug 1088760 - Remove nsRenderingContext, replacing all of its uses with gfxContext. r=jwatt,jrmuizel
Alexis Beingessner <a.beingessner@gmail.com>
parents: 363605
diff changeset
   136
                                            gfxContext* aRC) = 0;
133017
0167b5e0a389cb52882fa49aa8394cd02aa7e0f0 Bug 869314: Fix missing dropmarkers in non-native styled combobox controls when overlay scrollbars are used. r=roc
Stephen Pohl <spohl.mozilla.bugs@gmail.com>
parents: 133016
diff changeset
   137
  /**
0167b5e0a389cb52882fa49aa8394cd02aa7e0f0 Bug 869314: Fix missing dropmarkers in non-native styled combobox controls when overlay scrollbars are used. r=roc
Stephen Pohl <spohl.mozilla.bugs@gmail.com>
parents: 133016
diff changeset
   138
   * Return the width for non-disappearing scrollbars.
0167b5e0a389cb52882fa49aa8394cd02aa7e0f0 Bug 869314: Fix missing dropmarkers in non-native styled combobox controls when overlay scrollbars are used. r=roc
Stephen Pohl <spohl.mozilla.bugs@gmail.com>
parents: 133016
diff changeset
   139
   */
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   140
  virtual nscoord GetNondisappearingScrollbarWidth(
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   141
      nsPresContext* aPresContext, gfxContext* aRC,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   142
      mozilla::WritingMode aWM) = 0;
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   143
  /**
458971
2ae0011bb82c88c2da0842dfda9c850a0f05b070 Bug 1525075 - Use the ICB size for Element.{clientWidth, clientHeight} instead of expanded the layout viewport size. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 453555
diff changeset
   144
   * Get the layout size of this frame.
2ae0011bb82c88c2da0842dfda9c850a0f05b070 Bug 1525075 - Use the ICB size for Element.{clientWidth, clientHeight} instead of expanded the layout viewport size. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 453555
diff changeset
   145
   * Note that this is a value which is not expanded by the minimum scale size.
2ae0011bb82c88c2da0842dfda9c850a0f05b070 Bug 1525075 - Use the ICB size for Element.{clientWidth, clientHeight} instead of expanded the layout viewport size. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 453555
diff changeset
   146
   * For scroll frames other than the root content document's scroll frame, this
2ae0011bb82c88c2da0842dfda9c850a0f05b070 Bug 1525075 - Use the ICB size for Element.{clientWidth, clientHeight} instead of expanded the layout viewport size. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 453555
diff changeset
   147
   * value will be the same as GetScrollPortRect().Size().
2ae0011bb82c88c2da0842dfda9c850a0f05b070 Bug 1525075 - Use the ICB size for Element.{clientWidth, clientHeight} instead of expanded the layout viewport size. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 453555
diff changeset
   148
   *
2ae0011bb82c88c2da0842dfda9c850a0f05b070 Bug 1525075 - Use the ICB size for Element.{clientWidth, clientHeight} instead of expanded the layout viewport size. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 453555
diff changeset
   149
   * This value is used for Element.clientWidth and clientHeight.
2ae0011bb82c88c2da0842dfda9c850a0f05b070 Bug 1525075 - Use the ICB size for Element.{clientWidth, clientHeight} instead of expanded the layout viewport size. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 453555
diff changeset
   150
   */
2ae0011bb82c88c2da0842dfda9c850a0f05b070 Bug 1525075 - Use the ICB size for Element.{clientWidth, clientHeight} instead of expanded the layout viewport size. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 453555
diff changeset
   151
  virtual nsSize GetLayoutSize() const = 0;
2ae0011bb82c88c2da0842dfda9c850a0f05b070 Bug 1525075 - Use the ICB size for Element.{clientWidth, clientHeight} instead of expanded the layout viewport size. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 453555
diff changeset
   152
  /**
139595
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   153
   * GetScrolledRect is designed to encapsulate deciding which
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   154
   * directions of overflow should be reachable by scrolling and which
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   155
   * should not.  Callers should NOT depend on it having any particular
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   156
   * behavior (although nsXULScrollFrame currently does).
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   157
   *
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   158
   * This should only be called when the scrolled frame has been
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   159
   * reflowed with the scroll port size given in mScrollPort.
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   160
   *
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   161
   * Currently it allows scrolling down and to the right for
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   162
   * nsHTMLScrollFrames with LTR directionality and for all
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   163
   * nsXULScrollFrames, and allows scrolling down and to the left for
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   164
   * nsHTMLScrollFrames with RTL directionality.
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   165
   */
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   166
  virtual nsRect GetScrolledRect() const = 0;
8c2e8714201fc9083b909fe34d6431115afce2d2 Bug 483446 - CSS3 'background-attachment: local' support. r=roc
Simon Sapin <simon.sapin@exyr.org>
parents: 138685
diff changeset
   167
  /**
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   168
   * Get the area of the scrollport relative to the origin of this frame's
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   169
   * border-box.
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   170
   * This is the area of this frame minus border and scrollbars.
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   171
   */
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   172
  virtual nsRect GetScrollPortRect() const = 0;
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   173
  /**
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   174
   * Get the offset of the scrollport origin relative to the scrolled
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   175
   * frame origin. Typically the position will be non-negative.
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   176
   * This will always be a multiple of device pixels.
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   177
   */
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   178
  virtual nsPoint GetScrollPosition() const = 0;
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   179
  /**
367722
6a629adbb62a299d7208373d1c6f375149d2afdb Bug 1378712 - Remove all trailing whitespaces r=Ehsan
Sylvestre Ledru <sledru@mozilla.com>
parents: 363742
diff changeset
   180
   * As GetScrollPosition(), but uses the top-right as origin for RTL frames.
115698
dd737056538ae6370453c62c2d3b53c143b3245a Bug 780692; throttle OMTA (rollup patch). r=dbaron,bz
Nicholas Cameron <ncameron@mozilla.com>
parents: 114061
diff changeset
   181
   */
dd737056538ae6370453c62c2d3b53c143b3245a Bug 780692; throttle OMTA (rollup patch). r=dbaron,bz
Nicholas Cameron <ncameron@mozilla.com>
parents: 114061
diff changeset
   182
  virtual nsPoint GetLogicalScrollPosition() const = 0;
442909
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   183
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   184
  /**
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   185
   * Get the area that must contain the scroll position. Typically
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   186
   * (but not always, e.g. for RTL content) x and y will be 0, and
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   187
   * width or height will be nonzero if the content can be scrolled in
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   188
   * that direction. Since scroll positions must be a multiple of
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   189
   * device pixels, the range extrema will also be a multiple of
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   190
   * device pixels.
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   191
   */
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   192
  virtual nsRect GetScrollRange() const = 0;
96331
b7f3236f127b6f8d455efa6ad75f82a3a3c5f3d4 Revert c39d36167b99 due to a horribly munged backout.
Ryan VanderMeulen <ryanvm@gmail.com>
parents: 96330
diff changeset
   193
  /**
430277
69862af7f7d231976331783f0c4711bcb04466ce Bug 1471708 - Rename the "scroll-position clamping scroll port size" to "visual viewport size". r=botond
Jeremy Lempereur <jeremy.lempereur@gmail.com>
parents: 430177
diff changeset
   194
   * Get the size of the view port to use when clamping the scroll
96331
b7f3236f127b6f8d455efa6ad75f82a3a3c5f3d4 Revert c39d36167b99 due to a horribly munged backout.
Ryan VanderMeulen <ryanvm@gmail.com>
parents: 96330
diff changeset
   195
   * position.
b7f3236f127b6f8d455efa6ad75f82a3a3c5f3d4 Revert c39d36167b99 due to a horribly munged backout.
Ryan VanderMeulen <ryanvm@gmail.com>
parents: 96330
diff changeset
   196
   */
430277
69862af7f7d231976331783f0c4711bcb04466ce Bug 1471708 - Rename the "scroll-position clamping scroll port size" to "visual viewport size". r=botond
Jeremy Lempereur <jeremy.lempereur@gmail.com>
parents: 430177
diff changeset
   197
  virtual nsSize GetVisualViewportSize() const = 0;
179603
290e0e14312ffe31ef215fafe77a0e7f084b2e31 Bug 611556 - Add persistent zoom history sessions. r=roc, r=snorp
Eugen Sawin <esawin@mozilla.com>
parents: 178223
diff changeset
   198
  /**
438187
262dc187bc8e37200d71a7a137ac83661b5d294b Bug 1484597 - Expose visual viewport information more conveniently in Layout. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 430277
diff changeset
   199
   * Returns the offset of the visual viewport relative to
262dc187bc8e37200d71a7a137ac83661b5d294b Bug 1484597 - Expose visual viewport information more conveniently in Layout. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 430277
diff changeset
   200
   * the origin of the scrolled content. Note that only the RCD-RSF
262dc187bc8e37200d71a7a137ac83661b5d294b Bug 1484597 - Expose visual viewport information more conveniently in Layout. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 430277
diff changeset
   201
   * has a distinct visual viewport; for other scroll frames, the
262dc187bc8e37200d71a7a137ac83661b5d294b Bug 1484597 - Expose visual viewport information more conveniently in Layout. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 430277
diff changeset
   202
   * visual viewport always coincides with the layout viewport, and
262dc187bc8e37200d71a7a137ac83661b5d294b Bug 1484597 - Expose visual viewport information more conveniently in Layout. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 430277
diff changeset
   203
   * consequently the offset this function returns is equal to
262dc187bc8e37200d71a7a137ac83661b5d294b Bug 1484597 - Expose visual viewport information more conveniently in Layout. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 430277
diff changeset
   204
   * GetScrollPosition().
262dc187bc8e37200d71a7a137ac83661b5d294b Bug 1484597 - Expose visual viewport information more conveniently in Layout. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 430277
diff changeset
   205
   */
262dc187bc8e37200d71a7a137ac83661b5d294b Bug 1484597 - Expose visual viewport information more conveniently in Layout. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 430277
diff changeset
   206
  virtual nsPoint GetVisualViewportOffset() const = 0;
262dc187bc8e37200d71a7a137ac83661b5d294b Bug 1484597 - Expose visual viewport information more conveniently in Layout. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 430277
diff changeset
   207
  /**
552273
9a36ab15f9daf0ee8fef1130a90a07ff0a79760f Bug 1669625. Avoid extra, unneeded SchedulePaint calls with the new scrollbar code. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 548435
diff changeset
   208
   * Set the visual viewport offset associated with a root scroll frame. This is
9a36ab15f9daf0ee8fef1130a90a07ff0a79760f Bug 1669625. Avoid extra, unneeded SchedulePaint calls with the new scrollbar code. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 548435
diff changeset
   209
   * only valid when called on a root scroll frame and will assert otherwise.
9a36ab15f9daf0ee8fef1130a90a07ff0a79760f Bug 1669625. Avoid extra, unneeded SchedulePaint calls with the new scrollbar code. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 548435
diff changeset
   210
   * aRepaint indicates if we need to ask for a main thread paint if this
9a36ab15f9daf0ee8fef1130a90a07ff0a79760f Bug 1669625. Avoid extra, unneeded SchedulePaint calls with the new scrollbar code. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 548435
diff changeset
   211
   * changes scrollbar positions or not. For example, if the compositor has
9a36ab15f9daf0ee8fef1130a90a07ff0a79760f Bug 1669625. Avoid extra, unneeded SchedulePaint calls with the new scrollbar code. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 548435
diff changeset
   212
   * already put the scrollbars at this position then they don't need to move so
9a36ab15f9daf0ee8fef1130a90a07ff0a79760f Bug 1669625. Avoid extra, unneeded SchedulePaint calls with the new scrollbar code. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 548435
diff changeset
   213
   * we can skip the repaint. Returns true if the offset changed and the scroll
9a36ab15f9daf0ee8fef1130a90a07ff0a79760f Bug 1669625. Avoid extra, unneeded SchedulePaint calls with the new scrollbar code. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 548435
diff changeset
   214
   * frame is still alive after this call.
9a36ab15f9daf0ee8fef1130a90a07ff0a79760f Bug 1669625. Avoid extra, unneeded SchedulePaint calls with the new scrollbar code. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 548435
diff changeset
   215
   */
9a36ab15f9daf0ee8fef1130a90a07ff0a79760f Bug 1669625. Avoid extra, unneeded SchedulePaint calls with the new scrollbar code. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 548435
diff changeset
   216
  virtual bool SetVisualViewportOffset(const nsPoint& aOffset,
9a36ab15f9daf0ee8fef1130a90a07ff0a79760f Bug 1669625. Avoid extra, unneeded SchedulePaint calls with the new scrollbar code. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 548435
diff changeset
   217
                                       bool aRepaint) = 0;
9a36ab15f9daf0ee8fef1130a90a07ff0a79760f Bug 1669625. Avoid extra, unneeded SchedulePaint calls with the new scrollbar code. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 548435
diff changeset
   218
  /**
504968
bf8c6a53bbe56388731282350b7f1b6406b842c9 Bug 1591799. In WheelHandlingUtils::CanScrollOn use scroll range related functions that are aware of the visual viewport of a scroll frame. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 498542
diff changeset
   219
   * Get the area that must contain the visual viewport offset.
bf8c6a53bbe56388731282350b7f1b6406b842c9 Bug 1591799. In WheelHandlingUtils::CanScrollOn use scroll range related functions that are aware of the visual viewport of a scroll frame. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 498542
diff changeset
   220
   */
bf8c6a53bbe56388731282350b7f1b6406b842c9 Bug 1591799. In WheelHandlingUtils::CanScrollOn use scroll range related functions that are aware of the visual viewport of a scroll frame. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 498542
diff changeset
   221
  virtual nsRect GetVisualScrollRange() const = 0;
bf8c6a53bbe56388731282350b7f1b6406b842c9 Bug 1591799. In WheelHandlingUtils::CanScrollOn use scroll range related functions that are aware of the visual viewport of a scroll frame. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 498542
diff changeset
   222
  /**
507659
392f9daee09b10177a1ea4c37ee390b8e0b5e817 Bug 1602258. Use GetAvailableScrollingDirectionsForUserInputEvents in WheelHandlingUtils::CanScrollOn. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 505954
diff changeset
   223
   * Like GetVisualScrollRange but also takes into account overflow: hidden.
392f9daee09b10177a1ea4c37ee390b8e0b5e817 Bug 1602258. Use GetAvailableScrollingDirectionsForUserInputEvents in WheelHandlingUtils::CanScrollOn. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 505954
diff changeset
   224
   */
392f9daee09b10177a1ea4c37ee390b8e0b5e817 Bug 1602258. Use GetAvailableScrollingDirectionsForUserInputEvents in WheelHandlingUtils::CanScrollOn. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 505954
diff changeset
   225
  virtual nsRect GetScrollRangeForUserInputEvents() const = 0;
392f9daee09b10177a1ea4c37ee390b8e0b5e817 Bug 1602258. Use GetAvailableScrollingDirectionsForUserInputEvents in WheelHandlingUtils::CanScrollOn. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 505954
diff changeset
   226
  /**
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   227
   * Return how much we would try to scroll by in each direction if
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   228
   * asked to scroll by one "line" vertically and horizontally.
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   229
   */
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   230
  virtual nsSize GetLineScrollAmount() const = 0;
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   231
  /**
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   232
   * Return how much we would try to scroll by in each direction if
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   233
   * asked to scroll by one "page" vertically and horizontally.
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   234
   */
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   235
  virtual nsSize GetPageScrollAmount() const = 0;
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   236
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   237
  /**
468952
b723c3a2cae2c8d0b6aa94200afe36c0b6b9acfd Bug 1534070 - Factor scroll-padding into the position calculation where nsIPresShell::ScrollContentIntoView() is going to scroll if necessary. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 468941
diff changeset
   238
   * Return scroll-padding value of this frame.
b723c3a2cae2c8d0b6aa94200afe36c0b6b9acfd Bug 1534070 - Factor scroll-padding into the position calculation where nsIPresShell::ScrollContentIntoView() is going to scroll if necessary. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 468941
diff changeset
   239
   */
b723c3a2cae2c8d0b6aa94200afe36c0b6b9acfd Bug 1534070 - Factor scroll-padding into the position calculation where nsIPresShell::ScrollContentIntoView() is going to scroll if necessary. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 468941
diff changeset
   240
  virtual nsMargin GetScrollPadding() const = 0;
b723c3a2cae2c8d0b6aa94200afe36c0b6b9acfd Bug 1534070 - Factor scroll-padding into the position calculation where nsIPresShell::ScrollContentIntoView() is going to scroll if necessary. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 468941
diff changeset
   241
  /**
232149
4f18d0348d0c57ea2109db1ca79a2b43cf00f7ac Bug 945584: Part 3 - Enable cancellation of OSX synthesized mousewheel scrolling events (v2 Patch),r=roc
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 230738
diff changeset
   242
   * Some platforms (OSX) may generate additional scrolling events even
4f18d0348d0c57ea2109db1ca79a2b43cf00f7ac Bug 945584: Part 3 - Enable cancellation of OSX synthesized mousewheel scrolling events (v2 Patch),r=roc
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 230738
diff changeset
   243
   * after the user has stopped scrolling, simulating a momentum scrolling
4f18d0348d0c57ea2109db1ca79a2b43cf00f7ac Bug 945584: Part 3 - Enable cancellation of OSX synthesized mousewheel scrolling events (v2 Patch),r=roc
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 230738
diff changeset
   244
   * effect resulting from fling gestures.
4f18d0348d0c57ea2109db1ca79a2b43cf00f7ac Bug 945584: Part 3 - Enable cancellation of OSX synthesized mousewheel scrolling events (v2 Patch),r=roc
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 230738
diff changeset
   245
   * SYNTHESIZED_MOMENTUM_EVENT indicates that the scrolling is being requested
4f18d0348d0c57ea2109db1ca79a2b43cf00f7ac Bug 945584: Part 3 - Enable cancellation of OSX synthesized mousewheel scrolling events (v2 Patch),r=roc
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 230738
diff changeset
   246
   * by such a synthesized event and may be ignored if another scroll has
4f18d0348d0c57ea2109db1ca79a2b43cf00f7ac Bug 945584: Part 3 - Enable cancellation of OSX synthesized mousewheel scrolling events (v2 Patch),r=roc
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 230738
diff changeset
   247
   * been started since the last actual user input.
4f18d0348d0c57ea2109db1ca79a2b43cf00f7ac Bug 945584: Part 3 - Enable cancellation of OSX synthesized mousewheel scrolling events (v2 Patch),r=roc
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 230738
diff changeset
   248
   */
4f18d0348d0c57ea2109db1ca79a2b43cf00f7ac Bug 945584: Part 3 - Enable cancellation of OSX synthesized mousewheel scrolling events (v2 Patch),r=roc
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 230738
diff changeset
   249
  enum ScrollMomentum { NOT_MOMENTUM, SYNTHESIZED_MOMENTUM_EVENT };
4f18d0348d0c57ea2109db1ca79a2b43cf00f7ac Bug 945584: Part 3 - Enable cancellation of OSX synthesized mousewheel scrolling events (v2 Patch),r=roc
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 230738
diff changeset
   250
  /**
141953
1cb028ae400b05145f257845347d8319d295d8ff Bug 898871 - Add more nsWeakFrame checks around scroll operations. r=roc
Mats Palmgren <matspal@gmail.com>
parents: 139595
diff changeset
   251
   * @note This method might destroy the frame, pres shell and other objects.
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   252
   * Clamps aScrollPosition to GetScrollRange and sets the scroll position
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   253
   * to that value.
93685
9e1f8d125acc569c0f6483268f1d997e8d26d32f Bug 681192. Part 1: Add "allowed scroll destination range" to nsIScrollableFrame::ScrollTo and nsGfxScrollFrame implementation. r=roc,matspal
Oleg Romashin <romaxa@gmail.com>
parents: 90451
diff changeset
   254
   * @param aRange If non-null, specifies area which contains aScrollPosition
9e1f8d125acc569c0f6483268f1d997e8d26d32f Bug 681192. Part 1: Add "allowed scroll destination range" to nsIScrollableFrame::ScrollTo and nsGfxScrollFrame implementation. r=roc,matspal
Oleg Romashin <romaxa@gmail.com>
parents: 90451
diff changeset
   255
   * and can be used for choosing a performance-optimized scroll position.
9e1f8d125acc569c0f6483268f1d997e8d26d32f Bug 681192. Part 1: Add "allowed scroll destination range" to nsIScrollableFrame::ScrollTo and nsGfxScrollFrame implementation. r=roc,matspal
Oleg Romashin <romaxa@gmail.com>
parents: 90451
diff changeset
   256
   * Any point within this area can be chosen.
9e1f8d125acc569c0f6483268f1d997e8d26d32f Bug 681192. Part 1: Add "allowed scroll destination range" to nsIScrollableFrame::ScrollTo and nsGfxScrollFrame implementation. r=roc,matspal
Oleg Romashin <romaxa@gmail.com>
parents: 90451
diff changeset
   257
   * The choosen point will be as close as possible to aScrollPosition.
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   258
   */
93685
9e1f8d125acc569c0f6483268f1d997e8d26d32f Bug 681192. Part 1: Add "allowed scroll destination range" to nsIScrollableFrame::ScrollTo and nsGfxScrollFrame implementation. r=roc,matspal
Oleg Romashin <romaxa@gmail.com>
parents: 90451
diff changeset
   259
  virtual void ScrollTo(nsPoint aScrollPosition, ScrollMode aMode,
232152
b96d3d51d4b4ef17c35ac3429a455730e0bd2854 Bug 945584: Part 6 - Implementation of scroll snapping (v10 Patch), r=roc, r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 232149
diff changeset
   260
                        const nsRect* aRange = nullptr,
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   261
                        nsIScrollbarMediator::ScrollSnapMode aSnap =
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   262
                            nsIScrollbarMediator::DISABLE_SNAP) = 0;
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   263
  /**
141953
1cb028ae400b05145f257845347d8319d295d8ff Bug 898871 - Add more nsWeakFrame checks around scroll operations. r=roc
Mats Palmgren <matspal@gmail.com>
parents: 139595
diff changeset
   264
   * @note This method might destroy the frame, pres shell and other objects.
93967
3bd87d01b52eede7e2b364fa0904f58cdaabe25e Bug 754556. Ensure that setting scroll positions in CSS pixels doesn't unexpectedly move the scroll position, especially not in the wrong direction. r=matspal
Robert O'Callahan <robert@ocallahan.org>
parents: 93685
diff changeset
   265
   * Scrolls to a particular position in integer CSS pixels.
3bd87d01b52eede7e2b364fa0904f58cdaabe25e Bug 754556. Ensure that setting scroll positions in CSS pixels doesn't unexpectedly move the scroll position, especially not in the wrong direction. r=matspal
Robert O'Callahan <robert@ocallahan.org>
parents: 93685
diff changeset
   266
   * Keeps the exact current horizontal or vertical position if the current
3bd87d01b52eede7e2b364fa0904f58cdaabe25e Bug 754556. Ensure that setting scroll positions in CSS pixels doesn't unexpectedly move the scroll position, especially not in the wrong direction. r=matspal
Robert O'Callahan <robert@ocallahan.org>
parents: 93685
diff changeset
   267
   * position, rounded to CSS pixels, matches aScrollPosition. If
3bd87d01b52eede7e2b364fa0904f58cdaabe25e Bug 754556. Ensure that setting scroll positions in CSS pixels doesn't unexpectedly move the scroll position, especially not in the wrong direction. r=matspal
Robert O'Callahan <robert@ocallahan.org>
parents: 93685
diff changeset
   268
   * aScrollPosition.x/y is different from the current CSS pixel position,
3bd87d01b52eede7e2b364fa0904f58cdaabe25e Bug 754556. Ensure that setting scroll positions in CSS pixels doesn't unexpectedly move the scroll position, especially not in the wrong direction. r=matspal
Robert O'Callahan <robert@ocallahan.org>
parents: 93685
diff changeset
   269
   * makes sure we only move in the direction given by the difference.
196767
68dbb23d5a13a6d951d6edb5e4bdeaf26d2f2cb5 Bug 1026023 - Part 3: Integrate MSD movement with nsGfxScrollFrame. r=mattwoodrow
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 187366
diff changeset
   270
   *
68dbb23d5a13a6d951d6edb5e4bdeaf26d2f2cb5 Bug 1026023 - Part 3: Integrate MSD movement with nsGfxScrollFrame. r=mattwoodrow
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 187366
diff changeset
   271
   * When aMode is SMOOTH, INSTANT, or NORMAL, GetScrollPositionCSSPixels (the
68dbb23d5a13a6d951d6edb5e4bdeaf26d2f2cb5 Bug 1026023 - Part 3: Integrate MSD movement with nsGfxScrollFrame. r=mattwoodrow
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 187366
diff changeset
   272
   * scroll position after rounding to CSS pixels) will be exactly
68dbb23d5a13a6d951d6edb5e4bdeaf26d2f2cb5 Bug 1026023 - Part 3: Integrate MSD movement with nsGfxScrollFrame. r=mattwoodrow
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 187366
diff changeset
   273
   * aScrollPosition at the end of the scroll animation.
68dbb23d5a13a6d951d6edb5e4bdeaf26d2f2cb5 Bug 1026023 - Part 3: Integrate MSD movement with nsGfxScrollFrame. r=mattwoodrow
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 187366
diff changeset
   274
   *
68dbb23d5a13a6d951d6edb5e4bdeaf26d2f2cb5 Bug 1026023 - Part 3: Integrate MSD movement with nsGfxScrollFrame. r=mattwoodrow
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 187366
diff changeset
   275
   * When aMode is SMOOTH_MSD, intermediate animation frames may be outside the
68dbb23d5a13a6d951d6edb5e4bdeaf26d2f2cb5 Bug 1026023 - Part 3: Integrate MSD movement with nsGfxScrollFrame. r=mattwoodrow
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 187366
diff changeset
   276
   * range and / or moving in any direction; GetScrollPositionCSSPixels will be
68dbb23d5a13a6d951d6edb5e4bdeaf26d2f2cb5 Bug 1026023 - Part 3: Integrate MSD movement with nsGfxScrollFrame. r=mattwoodrow
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 187366
diff changeset
   277
   * exactly aScrollPosition at the end of the scroll animation unless the
68dbb23d5a13a6d951d6edb5e4bdeaf26d2f2cb5 Bug 1026023 - Part 3: Integrate MSD movement with nsGfxScrollFrame. r=mattwoodrow
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 187366
diff changeset
   278
   * SMOOTH_MSD animation is interrupted.
468941
ab5811341092040b0c2301ed7be2fd0248180263 Bug 1373835 - Enable scroll snap for programatic scrolls. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 466413
diff changeset
   279
   *
ab5811341092040b0c2301ed7be2fd0248180263 Bug 1373835 - Enable scroll snap for programatic scrolls. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 466413
diff changeset
   280
   * FIXME: Drop |aSnap| argument once after we finished the migration to the
ab5811341092040b0c2301ed7be2fd0248180263 Bug 1373835 - Enable scroll snap for programatic scrolls. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 466413
diff changeset
   281
   * Scroll Snap Module v1. We should alway use ENABLE_SNAP.
93967
3bd87d01b52eede7e2b364fa0904f58cdaabe25e Bug 754556. Ensure that setting scroll positions in CSS pixels doesn't unexpectedly move the scroll position, especially not in the wrong direction. r=matspal
Robert O'Callahan <robert@ocallahan.org>
parents: 93685
diff changeset
   282
   */
534115
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   283
  virtual void ScrollToCSSPixels(
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   284
      const CSSIntPoint& aScrollPosition,
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   285
      ScrollMode aMode = ScrollMode::Instant,
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   286
      nsIScrollbarMediator::ScrollSnapMode aSnap =
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   287
          nsIScrollbarMediator::DEFAULT,
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   288
      ScrollOrigin aOrigin = ScrollOrigin::NotSpecified) = 0;
93967
3bd87d01b52eede7e2b364fa0904f58cdaabe25e Bug 754556. Ensure that setting scroll positions in CSS pixels doesn't unexpectedly move the scroll position, especially not in the wrong direction. r=matspal
Robert O'Callahan <robert@ocallahan.org>
parents: 93685
diff changeset
   289
  /**
141953
1cb028ae400b05145f257845347d8319d295d8ff Bug 898871 - Add more nsWeakFrame checks around scroll operations. r=roc
Mats Palmgren <matspal@gmail.com>
parents: 139595
diff changeset
   290
   * @note This method might destroy the frame, pres shell and other objects.
114061
523f2e2189d7524965f9040cfbba320e95f23445 Bug 812517. Part 1: Add nsIScrollableFrame::ScrollToCSSPixelsApproximate. r=mats
Robert O'Callahan <robert@ocallahan.org>
parents: 111658
diff changeset
   291
   * Scrolls to a particular position in float CSS pixels.
523f2e2189d7524965f9040cfbba320e95f23445 Bug 812517. Part 1: Add nsIScrollableFrame::ScrollToCSSPixelsApproximate. r=mats
Robert O'Callahan <robert@ocallahan.org>
parents: 111658
diff changeset
   292
   * This does not guarantee that GetScrollPositionCSSPixels equals
523f2e2189d7524965f9040cfbba320e95f23445 Bug 812517. Part 1: Add nsIScrollableFrame::ScrollToCSSPixelsApproximate. r=mats
Robert O'Callahan <robert@ocallahan.org>
parents: 111658
diff changeset
   293
   * aScrollPosition afterward. It tries to scroll as close to
523f2e2189d7524965f9040cfbba320e95f23445 Bug 812517. Part 1: Add nsIScrollableFrame::ScrollToCSSPixelsApproximate. r=mats
Robert O'Callahan <robert@ocallahan.org>
parents: 111658
diff changeset
   294
   * aScrollPosition as possible while scrolling by an integer
523f2e2189d7524965f9040cfbba320e95f23445 Bug 812517. Part 1: Add nsIScrollableFrame::ScrollToCSSPixelsApproximate. r=mats
Robert O'Callahan <robert@ocallahan.org>
parents: 111658
diff changeset
   295
   * number of layer pixels (so the operation is fast and looks clean).
523f2e2189d7524965f9040cfbba320e95f23445 Bug 812517. Part 1: Add nsIScrollableFrame::ScrollToCSSPixelsApproximate. r=mats
Robert O'Callahan <robert@ocallahan.org>
parents: 111658
diff changeset
   296
   */
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   297
  virtual void ScrollToCSSPixelsApproximate(
534115
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   298
      const mozilla::CSSPoint& aScrollPosition,
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   299
      ScrollOrigin aOrigin = ScrollOrigin::NotSpecified) = 0;
133572
5bb24851fd4aaf06cc23c088c091b9942cb33ec7 Bug 877726 - Convert FrameMetrics.mScrollOffset to be a CSSPoint. r=kentuckyfriedtakahe
Kartikaya Gupta <kgupta@mozilla.com>
parents: 133017
diff changeset
   300
114061
523f2e2189d7524965f9040cfbba320e95f23445 Bug 812517. Part 1: Add nsIScrollableFrame::ScrollToCSSPixelsApproximate. r=mats
Robert O'Callahan <robert@ocallahan.org>
parents: 111658
diff changeset
   301
  /**
102187
2d6fd808c2b072736a0ae452cf87acedf80c9c4a Bug 383026. Centralize code that converts DOM scroll offsets to/from layout scroll positions. r=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 102111
diff changeset
   302
   * Returns the scroll position in integer CSS pixels, rounded to the nearest
2d6fd808c2b072736a0ae452cf87acedf80c9c4a Bug 383026. Centralize code that converts DOM scroll offsets to/from layout scroll positions. r=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 102111
diff changeset
   303
   * pixel.
2d6fd808c2b072736a0ae452cf87acedf80c9c4a Bug 383026. Centralize code that converts DOM scroll offsets to/from layout scroll positions. r=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 102111
diff changeset
   304
   */
137747
e98229cb45f31a3f7c7c6014918a59eddf7f16a5 Bug 890821 - Make nsIScrollableFrame::GetScrollPositionCSSPixels return CSSIntPoint; r=roc
Ms2ger <ms2ger@gmail.com>
parents: 136985
diff changeset
   305
  virtual CSSIntPoint GetScrollPositionCSSPixels() = 0;
102187
2d6fd808c2b072736a0ae452cf87acedf80c9c4a Bug 383026. Centralize code that converts DOM scroll offsets to/from layout scroll positions. r=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 102111
diff changeset
   306
  /**
141953
1cb028ae400b05145f257845347d8319d295d8ff Bug 898871 - Add more nsWeakFrame checks around scroll operations. r=roc
Mats Palmgren <matspal@gmail.com>
parents: 139595
diff changeset
   307
   * @note This method might destroy the frame, pres shell and other objects.
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   308
   * Modifies the current scroll position by aDelta units given by aUnit,
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   309
   * clamping it to GetScrollRange. If WHOLE is specified as the unit,
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   310
   * content is scrolled all the way in the direction(s) given by aDelta.
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   311
   * @param aOverflow if non-null, returns the amount that scrolling
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   312
   * was clamped by in each direction (how far we moved the scroll position
37083
4ccff5df452cf08d29a430ff40d15fa6f3920c7f Bug 526394. Part 31: Move scroll implementation into nsGfxScrollFrame. r=mats
Robert O'Callahan <robert@ocallahan.org>
parents: 37080
diff changeset
   313
   * to bring it back into the legal range). This is never negative. The
4ccff5df452cf08d29a430ff40d15fa6f3920c7f Bug 526394. Part 31: Move scroll implementation into nsGfxScrollFrame. r=mats
Robert O'Callahan <robert@ocallahan.org>
parents: 37080
diff changeset
   314
   * values are in device pixels.
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   315
   */
512124
4ba3576a07615d1dadedf55d3cbdb9bee0df8a33 Bug 1602088 - Move nsIScrollableFrame::ScrollUnit to namespace scope. r=botond
Kousuke Takaki <u7693@protonmail.com>
parents: 512122
diff changeset
   316
  virtual void ScrollBy(nsIntPoint aDelta, mozilla::ScrollUnit aUnit,
4ba3576a07615d1dadedf55d3cbdb9bee0df8a33 Bug 1602088 - Move nsIScrollableFrame::ScrollUnit to namespace scope. r=botond
Kousuke Takaki <u7693@protonmail.com>
parents: 512122
diff changeset
   317
                        ScrollMode aMode, nsIntPoint* aOverflow = nullptr,
534115
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   318
                        ScrollOrigin aOrigin = ScrollOrigin::NotSpecified,
232152
b96d3d51d4b4ef17c35ac3429a455730e0bd2854 Bug 945584: Part 6 - Implementation of scroll snapping (v10 Patch), r=roc, r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 232149
diff changeset
   319
                        ScrollMomentum aMomentum = NOT_MOMENTUM,
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   320
                        nsIScrollbarMediator::ScrollSnapMode aSnap =
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   321
                            nsIScrollbarMediator::DISABLE_SNAP) = 0;
232152
b96d3d51d4b4ef17c35ac3429a455730e0bd2854 Bug 945584: Part 6 - Implementation of scroll snapping (v10 Patch), r=roc, r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 232149
diff changeset
   322
468941
ab5811341092040b0c2301ed7be2fd0248180263 Bug 1373835 - Enable scroll snap for programatic scrolls. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 466413
diff changeset
   323
  /**
ab5811341092040b0c2301ed7be2fd0248180263 Bug 1373835 - Enable scroll snap for programatic scrolls. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 466413
diff changeset
   324
   * FIXME: Drop |aSnap| argument once after we finished the migration to the
ab5811341092040b0c2301ed7be2fd0248180263 Bug 1373835 - Enable scroll snap for programatic scrolls. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 466413
diff changeset
   325
   * Scroll Snap Module v1. We should alway use ENABLE_SNAP.
ab5811341092040b0c2301ed7be2fd0248180263 Bug 1373835 - Enable scroll snap for programatic scrolls. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 466413
diff changeset
   326
   */
534115
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   327
  virtual void ScrollByCSSPixels(
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   328
      const CSSIntPoint& aDelta, ScrollMode aMode = ScrollMode::Instant,
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   329
      ScrollOrigin aOrigin = ScrollOrigin::NotSpecified,
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   330
      nsIScrollbarMediator::ScrollSnapMode aSnap =
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   331
          nsIScrollbarMediator::DEFAULT) = 0;
442908
214cc7e7efb60b79fda610e02f4f24c50616ba9d Bug 1453425 - Use ScrollByCSSPixels in relative scrolling DOM API's. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442158
diff changeset
   332
232152
b96d3d51d4b4ef17c35ac3429a455730e0bd2854 Bug 945584: Part 6 - Implementation of scroll snapping (v10 Patch), r=roc, r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 232149
diff changeset
   333
  /**
b96d3d51d4b4ef17c35ac3429a455730e0bd2854 Bug 945584: Part 6 - Implementation of scroll snapping (v10 Patch), r=roc, r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 232149
diff changeset
   334
   * Perform scroll snapping, possibly resulting in a smooth scroll to
b96d3d51d4b4ef17c35ac3429a455730e0bd2854 Bug 945584: Part 6 - Implementation of scroll snapping (v10 Patch), r=roc, r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 232149
diff changeset
   335
   * maintain the scroll snap position constraints.  Velocity sampled from
b96d3d51d4b4ef17c35ac3429a455730e0bd2854 Bug 945584: Part 6 - Implementation of scroll snapping (v10 Patch), r=roc, r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 232149
diff changeset
   336
   * main thread scrolling is used to determine best matching snap point
b96d3d51d4b4ef17c35ac3429a455730e0bd2854 Bug 945584: Part 6 - Implementation of scroll snapping (v10 Patch), r=roc, r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 232149
diff changeset
   337
   * when called after a fling gesture on a trackpad or mouse wheel.
b96d3d51d4b4ef17c35ac3429a455730e0bd2854 Bug 945584: Part 6 - Implementation of scroll snapping (v10 Patch), r=roc, r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 232149
diff changeset
   338
   */
b96d3d51d4b4ef17c35ac3429a455730e0bd2854 Bug 945584: Part 6 - Implementation of scroll snapping (v10 Patch), r=roc, r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 232149
diff changeset
   339
  virtual void ScrollSnap() = 0;
b96d3d51d4b4ef17c35ac3429a455730e0bd2854 Bug 945584: Part 6 - Implementation of scroll snapping (v10 Patch), r=roc, r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 232149
diff changeset
   340
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   341
  /**
141953
1cb028ae400b05145f257845347d8319d295d8ff Bug 898871 - Add more nsWeakFrame checks around scroll operations. r=roc
Mats Palmgren <matspal@gmail.com>
parents: 139595
diff changeset
   342
   * @note This method might destroy the frame, pres shell and other objects.
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   343
   * This tells the scroll frame to try scrolling to the scroll
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   344
   * position that was restored from the history. This must be called
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   345
   * at least once after state has been restored. It is called by the
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   346
   * scrolled frame itself during reflow, but sometimes state can be
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   347
   * restored after reflows are done...
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   348
   * XXX should we take an aMode parameter here? Currently it's instant.
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   349
   */
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   350
  virtual void ScrollToRestoredPosition() = 0;
34480
4c63a655eac6e080619ac6ebf6882e94ef4a788f Fire MozScrolledAreaChanged from nsDocShell::RestoreFromHistory() in case document root scroll frame isn't reflowed by the restore. r=roc
Roy Frostig <froystig@cs.stanford.edu>
parents: 32423
diff changeset
   351
4c63a655eac6e080619ac6ebf6882e94ef4a788f Fire MozScrolledAreaChanged from nsDocShell::RestoreFromHistory() in case document root scroll frame isn't reflowed by the restore. r=roc
Roy Frostig <froystig@cs.stanford.edu>
parents: 32423
diff changeset
   352
  /**
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   353
   * Add a scroll position listener. This listener must be removed
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   354
   * before it is destroyed.
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   355
   */
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   356
  virtual void AddScrollPositionListener(
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   357
      nsIScrollPositionListener* aListener) = 0;
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   358
  /**
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   359
   * Remove a scroll position listener.
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   360
   */
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   361
  virtual void RemoveScrollPositionListener(
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   362
      nsIScrollPositionListener* aListener) = 0;
37055
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   363
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   364
  /**
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   365
   * Internal method used by scrollbars to notify their scrolling
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   366
   * container of changes.
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   367
   */
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   368
  virtual void CurPosAttributeChanged(nsIContent* aChild) = 0;
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   369
eb1ae9aabeccef89e922a39dc9df97a2493c5678 Bug 526394. Part 3: Add all necessary new APIs to nsIScrollableFrame. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 34480
diff changeset
   370
  /**
34480
4c63a655eac6e080619ac6ebf6882e94ef4a788f Fire MozScrolledAreaChanged from nsDocShell::RestoreFromHistory() in case document root scroll frame isn't reflowed by the restore. r=roc
Roy Frostig <froystig@cs.stanford.edu>
parents: 32423
diff changeset
   371
   * Allows the docshell to request that the scroll frame post an event
4c63a655eac6e080619ac6ebf6882e94ef4a788f Fire MozScrolledAreaChanged from nsDocShell::RestoreFromHistory() in case document root scroll frame isn't reflowed by the restore. r=roc
Roy Frostig <froystig@cs.stanford.edu>
parents: 32423
diff changeset
   372
   * after being restored from history.
4c63a655eac6e080619ac6ebf6882e94ef4a788f Fire MozScrolledAreaChanged from nsDocShell::RestoreFromHistory() in case document root scroll frame isn't reflowed by the restore. r=roc
Roy Frostig <froystig@cs.stanford.edu>
parents: 32423
diff changeset
   373
   */
4c63a655eac6e080619ac6ebf6882e94ef4a788f Fire MozScrolledAreaChanged from nsDocShell::RestoreFromHistory() in case document root scroll frame isn't reflowed by the restore. r=roc
Roy Frostig <froystig@cs.stanford.edu>
parents: 32423
diff changeset
   374
  NS_IMETHOD PostScrolledAreaEventForCurrentArea() = 0;
47742
177b05c97d8490d1b7aef31655335b7ff2a52000 Bug 564991. Part 14: Scroll using the layer system. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 37292
diff changeset
   375
177b05c97d8490d1b7aef31655335b7ff2a52000 Bug 564991. Part 14: Scroll using the layer system. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 37292
diff changeset
   376
  /**
177b05c97d8490d1b7aef31655335b7ff2a52000 Bug 564991. Part 14: Scroll using the layer system. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 37292
diff changeset
   377
   * Returns true if this scrollframe is being "actively scrolled".
177b05c97d8490d1b7aef31655335b7ff2a52000 Bug 564991. Part 14: Scroll using the layer system. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 37292
diff changeset
   378
   * This basically means that we should allocate resources in the
177b05c97d8490d1b7aef31655335b7ff2a52000 Bug 564991. Part 14: Scroll using the layer system. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 37292
diff changeset
   379
   * expectation that scrolling is going to happen.
177b05c97d8490d1b7aef31655335b7ff2a52000 Bug 564991. Part 14: Scroll using the layer system. r=mats,sr=dbaron
Robert O'Callahan <robert@ocallahan.org>
parents: 37292
diff changeset
   380
   */
584138
3e263a35732b01e9645059bf78f3e5b31ed23567 Bug 1494676 - Always consider scrollframes with will-change: scroll active r=tnikkel
Miko Mynttinen <mikokm@gmail.com>
parents: 565961
diff changeset
   381
  virtual bool IsScrollingActive() = 0;
387564
5584bf011ce4acdcb5437377b80c2ece95e6a3a5 Bug 1404181 - Part 1: Make AnimatedGeometryRoot/ActiveScrolledRoot retained and refcounted on the heap. r=mstange
Matt Woodrow <mwoodrow@mozilla.com>, Miko Mynttinen <mikokm@gmail.com>, Timothy Nikkel <tnikkel@gmail.com>
parents: 387190
diff changeset
   382
5584bf011ce4acdcb5437377b80c2ece95e6a3a5 Bug 1404181 - Part 1: Make AnimatedGeometryRoot/ActiveScrolledRoot retained and refcounted on the heap. r=mstange
Matt Woodrow <mwoodrow@mozilla.com>, Miko Mynttinen <mikokm@gmail.com>, Timothy Nikkel <tnikkel@gmail.com>
parents: 387190
diff changeset
   383
  /**
565961
8c822bc949907cdb3dcaa8f7066dd0ef6a0e8274 Bug 1690433. Update code that looks for the presence of a display port for new minimal display ports. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 565892
diff changeset
   384
   * The same as IsScrollingActive but minimal display ports are not considered
8c822bc949907cdb3dcaa8f7066dd0ef6a0e8274 Bug 1690433. Update code that looks for the presence of a display port for new minimal display ports. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 565892
diff changeset
   385
   * active.
8c822bc949907cdb3dcaa8f7066dd0ef6a0e8274 Bug 1690433. Update code that looks for the presence of a display port for new minimal display ports. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 565892
diff changeset
   386
   */
584138
3e263a35732b01e9645059bf78f3e5b31ed23567 Bug 1494676 - Always consider scrollframes with will-change: scroll active r=tnikkel
Miko Mynttinen <mikokm@gmail.com>
parents: 565961
diff changeset
   387
  virtual bool IsScrollingActiveNotMinimalDisplayPort() = 0;
565961
8c822bc949907cdb3dcaa8f7066dd0ef6a0e8274 Bug 1690433. Update code that looks for the presence of a display port for new minimal display ports. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 565892
diff changeset
   388
8c822bc949907cdb3dcaa8f7066dd0ef6a0e8274 Bug 1690433. Update code that looks for the presence of a display port for new minimal display ports. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 565892
diff changeset
   389
  /**
387564
5584bf011ce4acdcb5437377b80c2ece95e6a3a5 Bug 1404181 - Part 1: Make AnimatedGeometryRoot/ActiveScrolledRoot retained and refcounted on the heap. r=mstange
Matt Woodrow <mwoodrow@mozilla.com>, Miko Mynttinen <mikokm@gmail.com>, Timothy Nikkel <tnikkel@gmail.com>
parents: 387190
diff changeset
   390
   * Returns true if this scroll frame might be scrolled
5584bf011ce4acdcb5437377b80c2ece95e6a3a5 Bug 1404181 - Part 1: Make AnimatedGeometryRoot/ActiveScrolledRoot retained and refcounted on the heap. r=mstange
Matt Woodrow <mwoodrow@mozilla.com>, Miko Mynttinen <mikokm@gmail.com>, Timothy Nikkel <tnikkel@gmail.com>
parents: 387190
diff changeset
   391
   * asynchronously by the compositor.
5584bf011ce4acdcb5437377b80c2ece95e6a3a5 Bug 1404181 - Part 1: Make AnimatedGeometryRoot/ActiveScrolledRoot retained and refcounted on the heap. r=mstange
Matt Woodrow <mwoodrow@mozilla.com>, Miko Mynttinen <mikokm@gmail.com>, Timothy Nikkel <tnikkel@gmail.com>
parents: 387190
diff changeset
   392
   */
401360
93bc1205d13607ff8c2fc6c6e9703f9f392f1f8e Bug 1411129 - Rename MayBeAsynchronouslyScrolled to IsMaybeAsynchronouslyScrolled to follow our naming conventions. r=mats
abhinav <dvabhinav31@gmail.com>
parents: 394312
diff changeset
   393
  virtual bool IsMaybeAsynchronouslyScrolled() = 0;
387564
5584bf011ce4acdcb5437377b80c2ece95e6a3a5 Bug 1404181 - Part 1: Make AnimatedGeometryRoot/ActiveScrolledRoot retained and refcounted on the heap. r=mstange
Matt Woodrow <mwoodrow@mozilla.com>, Miko Mynttinen <mikokm@gmail.com>, Timothy Nikkel <tnikkel@gmail.com>
parents: 387190
diff changeset
   394
107364
2e2c7ed818d6f352bbce323909d3a6e0b0b8415d Bug 777194. Part 5: When choosing a subpixel position to scroll to, align the new position with the position that was most recently used to rerender the scrolled layer(s). r=tnikkel
Robert O'Callahan <robert@ocallahan.org>
parents: 106706
diff changeset
   395
  /**
123810
bd280c980a1b57a167aad7ae2010d5cc80ad8ee6 Bug 842853 - Scroll position lost after page reload on url with anchor. r=roc
Mats Palmgren <matspal@gmail.com>
parents: 115698
diff changeset
   396
   * Was the current presentation state for this frame restored from history?
bd280c980a1b57a167aad7ae2010d5cc80ad8ee6 Bug 842853 - Scroll position lost after page reload on url with anchor. r=roc
Mats Palmgren <matspal@gmail.com>
parents: 115698
diff changeset
   397
   */
181771
7a96c878cdf89866226b58fd104413cd55276e89 Bug 1002426 - Check restore status before overriding zoom. r=kats
Eugen Sawin <esawin@mozilla.com>
parents: 179603
diff changeset
   398
  virtual bool DidHistoryRestore() const = 0;
124989
6ce79dc8036bd1e104e9b259b0be6c1b2734d4fd Bug 851485 - Restoring scroll position from history should only suppress one scroll-to-anchor. r=bzbarsky
Mats Palmgren <matspal@gmail.com>
parents: 123810
diff changeset
   399
  /**
6ce79dc8036bd1e104e9b259b0be6c1b2734d4fd Bug 851485 - Restoring scroll position from history should only suppress one scroll-to-anchor. r=bzbarsky
Mats Palmgren <matspal@gmail.com>
parents: 123810
diff changeset
   400
   * Clear the flag so that DidHistoryRestore() returns false until the next
6ce79dc8036bd1e104e9b259b0be6c1b2734d4fd Bug 851485 - Restoring scroll position from history should only suppress one scroll-to-anchor. r=bzbarsky
Mats Palmgren <matspal@gmail.com>
parents: 123810
diff changeset
   401
   * RestoreState call.
6ce79dc8036bd1e104e9b259b0be6c1b2734d4fd Bug 851485 - Restoring scroll position from history should only suppress one scroll-to-anchor. r=bzbarsky
Mats Palmgren <matspal@gmail.com>
parents: 123810
diff changeset
   402
   * @see nsIStatefulFrame::RestoreState
6ce79dc8036bd1e104e9b259b0be6c1b2734d4fd Bug 851485 - Restoring scroll position from history should only suppress one scroll-to-anchor. r=bzbarsky
Mats Palmgren <matspal@gmail.com>
parents: 123810
diff changeset
   403
   */
6ce79dc8036bd1e104e9b259b0be6c1b2734d4fd Bug 851485 - Restoring scroll position from history should only suppress one scroll-to-anchor. r=bzbarsky
Mats Palmgren <matspal@gmail.com>
parents: 123810
diff changeset
   404
  virtual void ClearDidHistoryRestore() = 0;
147243
15151e852274a7808332612ed7dc951f26f3c2c0 Bug 847223. Part 3. Factor out the expand the scrollport code so we can use it on individual images later. r=mats
Timothy Nikkel <tnikkel@gmail.com>
parents: 144168
diff changeset
   405
  /**
453555
a99bf382e5f7a2e784f6aaad31e1ca7a502666f6 Bug 1498812 - Part 11: Use Visual Viewport for storing scroll position in the PresState. r=botond,tnikkel
Jan Henning <jh+bugzilla@buttercookie.de>
parents: 453385
diff changeset
   406
   * Mark the frame as having been scrolled at least once, so that it remains
a99bf382e5f7a2e784f6aaad31e1ca7a502666f6 Bug 1498812 - Part 11: Use Visual Viewport for storing scroll position in the PresState. r=botond,tnikkel
Jan Henning <jh+bugzilla@buttercookie.de>
parents: 453385
diff changeset
   407
   * active and we can also start storing its scroll position when saving state.
a99bf382e5f7a2e784f6aaad31e1ca7a502666f6 Bug 1498812 - Part 11: Use Visual Viewport for storing scroll position in the PresState. r=botond,tnikkel
Jan Henning <jh+bugzilla@buttercookie.de>
parents: 453385
diff changeset
   408
   */
a99bf382e5f7a2e784f6aaad31e1ca7a502666f6 Bug 1498812 - Part 11: Use Visual Viewport for storing scroll position in the PresState. r=botond,tnikkel
Jan Henning <jh+bugzilla@buttercookie.de>
parents: 453385
diff changeset
   409
  virtual void MarkEverScrolled() = 0;
a99bf382e5f7a2e784f6aaad31e1ca7a502666f6 Bug 1498812 - Part 11: Use Visual Viewport for storing scroll position in the PresState. r=botond,tnikkel
Jan Henning <jh+bugzilla@buttercookie.de>
parents: 453385
diff changeset
   410
  /**
290446
2d171d75b7464583358fcfb7524617ad5dce6a6f Bug 1157546 - Replace the image visibility API with a more general API that tracks visibility for any kind of frame. r=mstange
Seth Fowler <mark.seth.fowler@gmail.com>
parents: 290285
diff changeset
   411
   * Determine if the passed in rect is nearly visible according to the frame
147243
15151e852274a7808332612ed7dc951f26f3c2c0 Bug 847223. Part 3. Factor out the expand the scrollport code so we can use it on individual images later. r=mats
Timothy Nikkel <tnikkel@gmail.com>
parents: 144168
diff changeset
   412
   * visibility heuristics for how close it is to the visible scrollport.
15151e852274a7808332612ed7dc951f26f3c2c0 Bug 847223. Part 3. Factor out the expand the scrollport code so we can use it on individual images later. r=mats
Timothy Nikkel <tnikkel@gmail.com>
parents: 144168
diff changeset
   413
   */
15151e852274a7808332612ed7dc951f26f3c2c0 Bug 847223. Part 3. Factor out the expand the scrollport code so we can use it on individual images later. r=mats
Timothy Nikkel <tnikkel@gmail.com>
parents: 144168
diff changeset
   414
  virtual bool IsRectNearlyVisible(const nsRect& aRect) = 0;
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   415
  /**
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   416
   * Expand the given rect taking into account which directions we can scroll
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   417
   * and how far we want to expand for frame visibility purposes.
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   418
   */
187366
47fcf180a0b99542403949b98460d805f94d08b2 Bug 1002992. Part 6. Rename ExpandRect to ExpandToNearlyVisibleRect. r=addressingreviewcomment
Timothy Nikkel <tnikkel@gmail.com>
parents: 187362
diff changeset
   419
  virtual nsRect ExpandRectToNearlyVisible(const nsRect& aRect) const = 0;
160631
d49be6bd6378e1906472430697735f97f5ab0c33 Bug 949132 - Add a flag to FrameMetrics indicating a non-APZ scroll (original patch by mstange). r=tn
Kartikaya Gupta <kgupta@mozilla.com>
parents: 148312
diff changeset
   420
  /**
203652
9deef72c48d6fc061d242b4856a30fe3ad75b249 Bug 1022825 - Implement Asynchronous Smooth Scrolling on Compositor Thread. r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 203060
diff changeset
   421
   * Returns the origin that triggered the last instant scroll. Will equal
534115
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   422
   * ScrollOrigin::Apz when the compositor's replica frame metrics includes the
203652
9deef72c48d6fc061d242b4856a30fe3ad75b249 Bug 1022825 - Implement Asynchronous Smooth Scrolling on Compositor Thread. r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 203060
diff changeset
   423
   * latest instant scroll.
160631
d49be6bd6378e1906472430697735f97f5ab0c33 Bug 949132 - Add a flag to FrameMetrics indicating a non-APZ scroll (original patch by mstange). r=tn
Kartikaya Gupta <kgupta@mozilla.com>
parents: 148312
diff changeset
   424
   */
534115
aa8fe25a871527045ee41c61f1cbe16c1b318ccc Bug 1643042 - Turn the scroll origin parameter into a strongly-typed enum. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 515961
diff changeset
   425
  virtual ScrollOrigin LastScrollOrigin() = 0;
543032
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   426
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   427
  /**
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   428
   * Returns whether there's an async scroll going on.
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   429
   *
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   430
   * The argument allows a subtle distinction that's needed for APZ. When
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   431
   * `IncludeApzAnimation::No` is given, ongoing APZ animations that have
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   432
   * already been synced to the main thread are not included, which is needed so
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   433
   * that APZ can keep syncing the scroll offset properly.
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   434
   */
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   435
  enum class IncludeApzAnimation : bool { No, Yes };
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   436
  virtual bool IsScrollAnimating(
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   437
      IncludeApzAnimation = IncludeApzAnimation::Yes) = 0;
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   438
160631
d49be6bd6378e1906472430697735f97f5ab0c33 Bug 949132 - Add a flag to FrameMetrics indicating a non-APZ scroll (original patch by mstange). r=tn
Kartikaya Gupta <kgupta@mozilla.com>
parents: 148312
diff changeset
   439
  /**
557250
4424cf5d56cd861688a734514b873dc9dec630ff Bug 1662019 - Replace the uint32_t scroll generation with ScrollGeneration. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 554090
diff changeset
   440
   * Returns the current generation counter for the scrollframe. This counter
167109
319abcb8c59e5c1481cedee173702a7a484681ed Bug 963278 - Better fix to deal with concurrent scroll updates from APZ and other places. r=tn,botond,jimm
Kartikaya Gupta <kgupta@mozilla.com>
parents: 165663
diff changeset
   441
   * increments every time the scroll position is set.
160631
d49be6bd6378e1906472430697735f97f5ab0c33 Bug 949132 - Add a flag to FrameMetrics indicating a non-APZ scroll (original patch by mstange). r=tn
Kartikaya Gupta <kgupta@mozilla.com>
parents: 148312
diff changeset
   442
   */
558107
025750e9ce492c014743fd74fec70de81850502b Bug 1678334 - Mark some functions as const. r=tnikkel
Kartikaya Gupta <kats@pancake.staktrace.com>
parents: 557250
diff changeset
   443
  virtual mozilla::ScrollGeneration CurrentScrollGeneration() const = 0;
167109
319abcb8c59e5c1481cedee173702a7a484681ed Bug 963278 - Better fix to deal with concurrent scroll updates from APZ and other places. r=tn,botond,jimm
Kartikaya Gupta <kgupta@mozilla.com>
parents: 165663
diff changeset
   444
  /**
203652
9deef72c48d6fc061d242b4856a30fe3ad75b249 Bug 1022825 - Implement Asynchronous Smooth Scrolling on Compositor Thread. r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 203060
diff changeset
   445
   * LastScrollDestination returns the destination of the most recently
9deef72c48d6fc061d242b4856a30fe3ad75b249 Bug 1022825 - Implement Asynchronous Smooth Scrolling on Compositor Thread. r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 203060
diff changeset
   446
   * requested smooth scroll animation.
9deef72c48d6fc061d242b4856a30fe3ad75b249 Bug 1022825 - Implement Asynchronous Smooth Scrolling on Compositor Thread. r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 203060
diff changeset
   447
   */
9deef72c48d6fc061d242b4856a30fe3ad75b249 Bug 1022825 - Implement Asynchronous Smooth Scrolling on Compositor Thread. r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 203060
diff changeset
   448
  virtual nsPoint LastScrollDestination() = 0;
9deef72c48d6fc061d242b4856a30fe3ad75b249 Bug 1022825 - Implement Asynchronous Smooth Scrolling on Compositor Thread. r=kats
Kearwood (Kip) Gilbert <kgilbert@mozilla.com>
parents: 203060
diff changeset
   449
  /**
548426
98fb30c331e23e9f2435229f57a62e918e407da0 Bug 1662013 - Introduce a ScrollPositionUpdate and plumb it in. r=tnikkel,botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 544002
diff changeset
   450
   * Returns the list of scroll position updates since the last call to
98fb30c331e23e9f2435229f57a62e918e407da0 Bug 1662013 - Introduce a ScrollPositionUpdate and plumb it in. r=tnikkel,botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 544002
diff changeset
   451
   * NotifyApzTransaction().
98fb30c331e23e9f2435229f57a62e918e407da0 Bug 1662013 - Introduce a ScrollPositionUpdate and plumb it in. r=tnikkel,botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 544002
diff changeset
   452
   */
98fb30c331e23e9f2435229f57a62e918e407da0 Bug 1662013 - Introduce a ScrollPositionUpdate and plumb it in. r=tnikkel,botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 544002
diff changeset
   453
  virtual nsTArray<mozilla::ScrollPositionUpdate> GetScrollUpdates() const = 0;
98fb30c331e23e9f2435229f57a62e918e407da0 Bug 1662013 - Introduce a ScrollPositionUpdate and plumb it in. r=tnikkel,botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 544002
diff changeset
   454
  /**
554090
b0f29632ca854dd8a0ed2347bf2d537b22dd735b Bug 1669588 - Delay the ZoomToRect call in ZoomToFocusedInput until after a refresh if appropriate. r=kats
Botond Ballo <botond@mozilla.com>
parents: 553970
diff changeset
   455
   * Returns true if the scroll frame has any scroll position updates since
b0f29632ca854dd8a0ed2347bf2d537b22dd735b Bug 1669588 - Delay the ZoomToRect call in ZoomToFocusedInput until after a refresh if appropriate. r=kats
Botond Ballo <botond@mozilla.com>
parents: 553970
diff changeset
   456
   * the last call to NotifyApzTransaction().
b0f29632ca854dd8a0ed2347bf2d537b22dd735b Bug 1669588 - Delay the ZoomToRect call in ZoomToFocusedInput until after a refresh if appropriate. r=kats
Botond Ballo <botond@mozilla.com>
parents: 553970
diff changeset
   457
   */
b0f29632ca854dd8a0ed2347bf2d537b22dd735b Bug 1669588 - Delay the ZoomToRect call in ZoomToFocusedInput until after a refresh if appropriate. r=kats
Botond Ballo <botond@mozilla.com>
parents: 553970
diff changeset
   458
  virtual bool HasScrollUpdates() const = 0;
b0f29632ca854dd8a0ed2347bf2d537b22dd735b Bug 1669588 - Delay the ZoomToRect call in ZoomToFocusedInput until after a refresh if appropriate. r=kats
Botond Ballo <botond@mozilla.com>
parents: 553970
diff changeset
   459
  /**
167109
319abcb8c59e5c1481cedee173702a7a484681ed Bug 963278 - Better fix to deal with concurrent scroll updates from APZ and other places. r=tn,botond,jimm
Kartikaya Gupta <kgupta@mozilla.com>
parents: 165663
diff changeset
   460
   * Clears the "origin of last scroll" property stored in this frame, if
319abcb8c59e5c1481cedee173702a7a484681ed Bug 963278 - Better fix to deal with concurrent scroll updates from APZ and other places. r=tn,botond,jimm
Kartikaya Gupta <kgupta@mozilla.com>
parents: 165663
diff changeset
   461
   * the generation counter passed in matches the current scroll generation
543032
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   462
   * counter, and clears the "origin of last smooth scroll" property if the
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   463
   * generation counter matches. It also resets whether there's an ongoing apz
ae6e361aaef17dc6ddf7fcb471c444aff1eab7b8 Bug 1650502 - Plumb whether an async APZ animation is in progress via RepaintRequest. r=botond
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 543030
diff changeset
   464
   * animation.
167109
319abcb8c59e5c1481cedee173702a7a484681ed Bug 963278 - Better fix to deal with concurrent scroll updates from APZ and other places. r=tn,botond,jimm
Kartikaya Gupta <kgupta@mozilla.com>
parents: 165663
diff changeset
   465
   */
557250
4424cf5d56cd861688a734514b873dc9dec630ff Bug 1662019 - Replace the uint32_t scroll generation with ScrollGeneration. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 554090
diff changeset
   466
  virtual void ResetScrollInfoIfNeeded(
4424cf5d56cd861688a734514b873dc9dec630ff Bug 1662019 - Replace the uint32_t scroll generation with ScrollGeneration. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 554090
diff changeset
   467
      const mozilla::ScrollGeneration& aGeneration,
4424cf5d56cd861688a734514b873dc9dec630ff Bug 1662019 - Replace the uint32_t scroll generation with ScrollGeneration. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 554090
diff changeset
   468
      bool aApzAnimationInProgress) = 0;
178223
5f35c0238eda2fa2debf3d10b23b3cd4fdd3f615 Bug 982141 - Expose the logic used to decide whether a scrollable frame should be async scrollable. r=tn
Botond Ballo <botond@mozilla.com>
parents: 178033
diff changeset
   469
  /**
5f35c0238eda2fa2debf3d10b23b3cd4fdd3f615 Bug 982141 - Expose the logic used to decide whether a scrollable frame should be async scrollable. r=tn
Botond Ballo <botond@mozilla.com>
parents: 178033
diff changeset
   470
   * Determine whether it is desirable to be able to asynchronously scroll this
5f35c0238eda2fa2debf3d10b23b3cd4fdd3f615 Bug 982141 - Expose the logic used to decide whether a scrollable frame should be async scrollable. r=tn
Botond Ballo <botond@mozilla.com>
parents: 178033
diff changeset
   471
   * scroll frame.
5f35c0238eda2fa2debf3d10b23b3cd4fdd3f615 Bug 982141 - Expose the logic used to decide whether a scrollable frame should be async scrollable. r=tn
Botond Ballo <botond@mozilla.com>
parents: 178033
diff changeset
   472
   */
5f35c0238eda2fa2debf3d10b23b3cd4fdd3f615 Bug 982141 - Expose the logic used to decide whether a scrollable frame should be async scrollable. r=tn
Botond Ballo <botond@mozilla.com>
parents: 178033
diff changeset
   473
  virtual bool WantAsyncScroll() const = 0;
203060
ea4cfd84e417f7a0763a808d83183b1e508fd363 Bug 967844. Part 3: Setup FrameMetrics from FrameLayerBuilder based on animated geometry roots. r=mattwoodrow
Robert O'Callahan <robert@ocallahan.org>
parents: 202902
diff changeset
   474
  /**
415523
e9b1d02e24f0f461032e80005d32aa00ec87d775 Bug 1449608 - Avoid calling ComputeScrollMetadata repeatedly for same scroll frame and clip. r=mstange
Jamie Nicol <jnicol@mozilla.com>
parents: 415451
diff changeset
   475
   * Returns the ScrollMetadata contributed by this frame, if there is one.
203060
ea4cfd84e417f7a0763a808d83183b1e508fd363 Bug 967844. Part 3: Setup FrameMetrics from FrameLayerBuilder based on animated geometry roots. r=mattwoodrow
Robert O'Callahan <robert@ocallahan.org>
parents: 202902
diff changeset
   476
   */
291358
cb2023f50288a63554771510ff603df10c403180 Bug 1219296 - Split fields not needed for repaints out from FrameMetrics. r=kats
Botond Ballo <botond@mozilla.com>
parents: 290446
diff changeset
   477
  virtual mozilla::Maybe<mozilla::layers::ScrollMetadata> ComputeScrollMetadata(
591057
1b49e7328ae43c6565d167f4c391430575097fd3 Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel
Matt Woodrow <mwoodrow@mozilla.com>
parents: 591009
diff changeset
   478
      mozilla::layers::WebRenderLayerManager* aLayerManager,
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   479
      const nsIFrame* aContainerReferenceFrame,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   480
      const mozilla::DisplayItemClip* aClip) const = 0;
207043
de388c070eafe57bca0ae84d79e51056c9373587 Bug 1056340 - Clip viewport fixed position overflow to scroll frame. r=roc
Mason Chang <mchang@mozilla.com>
parents: 203652
diff changeset
   481
de388c070eafe57bca0ae84d79e51056c9373587 Bug 1056340 - Clip viewport fixed position overflow to scroll frame. r=roc
Mason Chang <mchang@mozilla.com>
parents: 203652
diff changeset
   482
  /**
209514
7fce65c28e7cc2a899e2043e233b81c0e83526e9 Bug 1078316 - Tweaks for root-frame overlay scrollbars so they don't oscillate while panning around. r=botond,tn
Kartikaya Gupta <kgupta@mozilla.com>
parents: 207043
diff changeset
   483
   * Mark the scrollbar frames for reflow.
7fce65c28e7cc2a899e2043e233b81c0e83526e9 Bug 1078316 - Tweaks for root-frame overlay scrollbars so they don't oscillate while panning around. r=botond,tn
Kartikaya Gupta <kgupta@mozilla.com>
parents: 207043
diff changeset
   484
   */
7fce65c28e7cc2a899e2043e233b81c0e83526e9 Bug 1078316 - Tweaks for root-frame overlay scrollbars so they don't oscillate while panning around. r=botond,tn
Kartikaya Gupta <kgupta@mozilla.com>
parents: 207043
diff changeset
   485
  virtual void MarkScrollbarsDirtyForReflow() const = 0;
230738
23b9a091e98100dcf615038ec6f7bbe0d1818039 Bug 990907 - Add a flag on nsIScrollableFrame to indicate if it is actively being scrolled by APZ. r=tn
Kartikaya Gupta <kgupta@mozilla.com>
parents: 222514
diff changeset
   486
565892
67faf54a31a1c497dd144faf4cb30bc4b5c8aeaf Bug 259640, add chrome only method to add scrollbar tick marks to a window, r=smaug,tnikkel
Neil Deakin <neil@mozilla.com>
parents: 564136
diff changeset
   487
  /**
67faf54a31a1c497dd144faf4cb30bc4b5c8aeaf Bug 259640, add chrome only method to add scrollbar tick marks to a window, r=smaug,tnikkel
Neil Deakin <neil@mozilla.com>
parents: 564136
diff changeset
   488
   * Invalidate the scrollbar after the marks have been changed.
67faf54a31a1c497dd144faf4cb30bc4b5c8aeaf Bug 259640, add chrome only method to add scrollbar tick marks to a window, r=smaug,tnikkel
Neil Deakin <neil@mozilla.com>
parents: 564136
diff changeset
   489
   */
67faf54a31a1c497dd144faf4cb30bc4b5c8aeaf Bug 259640, add chrome only method to add scrollbar tick marks to a window, r=smaug,tnikkel
Neil Deakin <neil@mozilla.com>
parents: 564136
diff changeset
   490
  virtual void InvalidateVerticalScrollbar() const = 0;
67faf54a31a1c497dd144faf4cb30bc4b5c8aeaf Bug 259640, add chrome only method to add scrollbar tick marks to a window, r=smaug,tnikkel
Neil Deakin <neil@mozilla.com>
parents: 564136
diff changeset
   491
541722
8309d62060f015ef83c67da5b6cee8e2a000840f Bug 1651332. Update scrollbar position when the visual viewport offset changes. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 534115
diff changeset
   492
  virtual void UpdateScrollbarPosition() = 0;
8309d62060f015ef83c67da5b6cee8e2a000840f Bug 1651332. Update scrollbar position when the visual viewport offset changes. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 534115
diff changeset
   493
230738
23b9a091e98100dcf615038ec6f7bbe0d1818039 Bug 990907 - Add a flag on nsIScrollableFrame to indicate if it is actively being scrolled by APZ. r=tn
Kartikaya Gupta <kgupta@mozilla.com>
parents: 222514
diff changeset
   494
  virtual void SetTransformingByAPZ(bool aTransforming) = 0;
23b9a091e98100dcf615038ec6f7bbe0d1818039 Bug 990907 - Add a flag on nsIScrollableFrame to indicate if it is actively being scrolled by APZ. r=tn
Kartikaya Gupta <kgupta@mozilla.com>
parents: 222514
diff changeset
   495
  virtual bool IsTransformingByAPZ() const = 0;
246871
4acac1be1f6beddc41ea8e4c18d9f2e5a63dc6eb Fix asynchronously scrolling containerful subframes. (bug 1148582 part 6.1, r=tn)
David Anderson <danderson@mozilla.com>
parents: 245725
diff changeset
   496
4acac1be1f6beddc41ea8e4c18d9f2e5a63dc6eb Fix asynchronously scrolling containerful subframes. (bug 1148582 part 6.1, r=tn)
David Anderson <danderson@mozilla.com>
parents: 245725
diff changeset
   497
  /**
288006
c9af0a0c37968953daf1bfcd94c0f2b078be5327 Bug 1253860 - Add a flag on scroll frames indicating if they have an APZ counterpart. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 282968
diff changeset
   498
   * Notify this scroll frame that it can be scrolled by APZ. In particular,
c9af0a0c37968953daf1bfcd94c0f2b078be5327 Bug 1253860 - Add a flag on scroll frames indicating if they have an APZ counterpart. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 282968
diff changeset
   499
   * this is called *after* the APZ code has created an APZC for this scroll
c9af0a0c37968953daf1bfcd94c0f2b078be5327 Bug 1253860 - Add a flag on scroll frames indicating if they have an APZ counterpart. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 282968
diff changeset
   500
   * frame and verified that it is not a scrollinfo layer. Therefore, setting an
c9af0a0c37968953daf1bfcd94c0f2b078be5327 Bug 1253860 - Add a flag on scroll frames indicating if they have an APZ counterpart. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 282968
diff changeset
   501
   * async transform on it is actually user visible.
c9af0a0c37968953daf1bfcd94c0f2b078be5327 Bug 1253860 - Add a flag on scroll frames indicating if they have an APZ counterpart. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 282968
diff changeset
   502
   */
c9af0a0c37968953daf1bfcd94c0f2b078be5327 Bug 1253860 - Add a flag on scroll frames indicating if they have an APZ counterpart. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 282968
diff changeset
   503
  virtual void SetScrollableByAPZ(bool aScrollable) = 0;
c9af0a0c37968953daf1bfcd94c0f2b078be5327 Bug 1253860 - Add a flag on scroll frames indicating if they have an APZ counterpart. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 282968
diff changeset
   504
c9af0a0c37968953daf1bfcd94c0f2b078be5327 Bug 1253860 - Add a flag on scroll frames indicating if they have an APZ counterpart. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 282968
diff changeset
   505
  /**
262091
10cbae31c4b7af412519f1d5c6c9ee9ec9cdb6f5 Bug 1201529 - Ensure that zoomable scrollframes return true from WantAsyncScroll(). r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 261667
diff changeset
   506
   * Notify this scroll frame that it can be zoomed by APZ.
10cbae31c4b7af412519f1d5c6c9ee9ec9cdb6f5 Bug 1201529 - Ensure that zoomable scrollframes return true from WantAsyncScroll(). r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 261667
diff changeset
   507
   */
10cbae31c4b7af412519f1d5c6c9ee9ec9cdb6f5 Bug 1201529 - Ensure that zoomable scrollframes return true from WantAsyncScroll(). r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 261667
diff changeset
   508
  virtual void SetZoomableByAPZ(bool aZoomable) = 0;
10cbae31c4b7af412519f1d5c6c9ee9ec9cdb6f5 Bug 1201529 - Ensure that zoomable scrollframes return true from WantAsyncScroll(). r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 261667
diff changeset
   509
10cbae31c4b7af412519f1d5c6c9ee9ec9cdb6f5 Bug 1201529 - Ensure that zoomable scrollframes return true from WantAsyncScroll(). r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 261667
diff changeset
   510
  /**
394312
dd40ae15d5bc1604164541aaa302202934fc15d0 Bug 1300864 - Disable paint skipping for scroll frames that contain out-of-flow content inside a CSS filter. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 388790
diff changeset
   511
   * Mark this scroll frame as having out-of-flow content inside a CSS filter.
dd40ae15d5bc1604164541aaa302202934fc15d0 Bug 1300864 - Disable paint skipping for scroll frames that contain out-of-flow content inside a CSS filter. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 388790
diff changeset
   512
   * Such content will move incorrectly during async-scrolling; to mitigate
dd40ae15d5bc1604164541aaa302202934fc15d0 Bug 1300864 - Disable paint skipping for scroll frames that contain out-of-flow content inside a CSS filter. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 388790
diff changeset
   513
   * this, paint skipping is disabled for such scroll frames.
dd40ae15d5bc1604164541aaa302202934fc15d0 Bug 1300864 - Disable paint skipping for scroll frames that contain out-of-flow content inside a CSS filter. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 388790
diff changeset
   514
   */
dd40ae15d5bc1604164541aaa302202934fc15d0 Bug 1300864 - Disable paint skipping for scroll frames that contain out-of-flow content inside a CSS filter. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 388790
diff changeset
   515
  virtual void SetHasOutOfFlowContentInsideFilter() = 0;
dd40ae15d5bc1604164541aaa302202934fc15d0 Bug 1300864 - Disable paint skipping for scroll frames that contain out-of-flow content inside a CSS filter. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 388790
diff changeset
   516
dd40ae15d5bc1604164541aaa302202934fc15d0 Bug 1300864 - Disable paint skipping for scroll frames that contain out-of-flow content inside a CSS filter. r=mstange
Botond Ballo <botond@mozilla.com>
parents: 388790
diff changeset
   517
  /**
267390
001f7d3139ce06e63075cb46bc4c6cbb607e4be4 Bug 1210578. Part 3. Create DecideScrollableLayer that encapsulates all logic to create display ports and build scrollable layers. r=mstange
Timothy Nikkel <tnikkel@gmail.com>
parents: 262091
diff changeset
   518
   * Determine if we should build a scrollable layer for this scroll frame and
001f7d3139ce06e63075cb46bc4c6cbb607e4be4 Bug 1210578. Part 3. Create DecideScrollableLayer that encapsulates all logic to create display ports and build scrollable layers. r=mstange
Timothy Nikkel <tnikkel@gmail.com>
parents: 262091
diff changeset
   519
   * return the result. It will also record this result on the scroll frame.
387565
ce1bfa06c117258cc3b7541349610a589c2cb942 Bug 1404181 - Part 2: Track a 'visible' rect for display list building as well as the 'dirty' rect, so that we can do partial building by specifying a smaller 'dirty' rect. r=mstange
Matt Woodrow <mwoodrow@mozilla.com>, Miko Mynttinen <mikokm@gmail.com>, Timothy Nikkel <tnikkel@gmail.com>
parents: 387564
diff changeset
   520
   * Pass the visible rect in aVisibleRect. On return it will be set to the
ce1bfa06c117258cc3b7541349610a589c2cb942 Bug 1404181 - Part 2: Track a 'visible' rect for display list building as well as the 'dirty' rect, so that we can do partial building by specifying a smaller 'dirty' rect. r=mstange
Matt Woodrow <mwoodrow@mozilla.com>, Miko Mynttinen <mikokm@gmail.com>, Timothy Nikkel <tnikkel@gmail.com>
parents: 387564
diff changeset
   521
   * displayport if there is one.
267390
001f7d3139ce06e63075cb46bc4c6cbb607e4be4 Bug 1210578. Part 3. Create DecideScrollableLayer that encapsulates all logic to create display ports and build scrollable layers. r=mstange
Timothy Nikkel <tnikkel@gmail.com>
parents: 262091
diff changeset
   522
   * Pass the dirty rect in aDirtyRect. On return it will be set to the
387565
ce1bfa06c117258cc3b7541349610a589c2cb942 Bug 1404181 - Part 2: Track a 'visible' rect for display list building as well as the 'dirty' rect, so that we can do partial building by specifying a smaller 'dirty' rect. r=mstange
Matt Woodrow <mwoodrow@mozilla.com>, Miko Mynttinen <mikokm@gmail.com>, Timothy Nikkel <tnikkel@gmail.com>
parents: 387564
diff changeset
   523
   * dirty rect inside the displayport (ie the dirty rect that should be used).
384118
4c8b85e80aebb27cf3a5334c2c183e49636b9ece Bug 1364295. Simplify some code now that we don't create displayports during display list building. r=mstange
Timothy Nikkel <tnikkel@gmail.com>
parents: 383556
diff changeset
   524
   * This function will set the display port base rect if aSetBase is true.
4c8b85e80aebb27cf3a5334c2c183e49636b9ece Bug 1364295. Simplify some code now that we don't create displayports during display list building. r=mstange
Timothy Nikkel <tnikkel@gmail.com>
parents: 383556
diff changeset
   525
   * aSetBase is only allowed to be false if there has been a call with it
4c8b85e80aebb27cf3a5334c2c183e49636b9ece Bug 1364295. Simplify some code now that we don't create displayports during display list building. r=mstange
Timothy Nikkel <tnikkel@gmail.com>
parents: 383556
diff changeset
   526
   * set to true before on the same paint.
267390
001f7d3139ce06e63075cb46bc4c6cbb607e4be4 Bug 1210578. Part 3. Create DecideScrollableLayer that encapsulates all logic to create display ports and build scrollable layers. r=mstange
Timothy Nikkel <tnikkel@gmail.com>
parents: 262091
diff changeset
   527
   */
585914
77c96f7183eb3f44c101c112fba35fbfe98c3c41 Bug 1720804 - Part 1: Move majority of the display list code inside mozilla namespace r=mattwoodrow
Miko Mynttinen <mikokm@gmail.com>
parents: 585695
diff changeset
   528
  virtual bool DecideScrollableLayer(mozilla::nsDisplayListBuilder* aBuilder,
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   529
                                     nsRect* aVisibleRect, nsRect* aDirtyRect,
384118
4c8b85e80aebb27cf3a5334c2c183e49636b9ece Bug 1364295. Simplify some code now that we don't create displayports during display list building. r=mstange
Timothy Nikkel <tnikkel@gmail.com>
parents: 383556
diff changeset
   530
                                     bool aSetBase) = 0;
281138
7a7def04840d39b33423c8466ef1c5fbd4b1e941 Bug 1241371. Properly update mLastUpdateImagesPos on scrollframes when the image visibility pass encounters them. r=mats
Timothy Nikkel <tnikkel@gmail.com>
parents: 277397
diff changeset
   531
7a7def04840d39b33423c8466ef1c5fbd4b1e941 Bug 1241371. Properly update mLastUpdateImagesPos on scrollframes when the image visibility pass encounters them. r=mats
Timothy Nikkel <tnikkel@gmail.com>
parents: 277397
diff changeset
   532
  /**
442909
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   533
   * Notify the scrollframe that the current scroll offset and origin have been
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   534
   * sent over in a layers transaction.
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   535
   *
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   536
   * This sets a flag on the scrollframe that indicates subsequent changes
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   537
   * to the scroll position by "weaker" origins are permitted to overwrite the
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   538
   * the scroll origin. Scroll origins that
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   539
   * nsLayoutUtils::CanScrollOriginClobberApz returns false for are considered
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   540
   * "weaker" than scroll origins for which that function returns true.
442909
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   541
   *
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   542
   * This function must be called for a scrollframe after all calls to
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   543
   * ComputeScrollMetadata in a layers transaction have been completed.
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   544
   *
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   545
   */
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   546
  virtual void NotifyApzTransaction() = 0;
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   547
0b8e2732f2a52453c4450cc22dba292f1d2ce8b6 Bug 1453425 - Add relative scroll offset updates using nsGkAtoms::relative. r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442908
diff changeset
   548
  /**
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   549
   * Notification that this scroll frame is getting its frame visibility
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   550
   * updated. aIgnoreDisplayPort indicates that the display port was ignored
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   551
   * (because there was no suitable base rect)
281138
7a7def04840d39b33423c8466ef1c5fbd4b1e941 Bug 1241371. Properly update mLastUpdateImagesPos on scrollframes when the image visibility pass encounters them. r=mats
Timothy Nikkel <tnikkel@gmail.com>
parents: 277397
diff changeset
   552
   */
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   553
  virtual void NotifyApproximateFrameVisibilityUpdate(
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   554
      bool aIgnoreDisplayPort) = 0;
281189
0947272393af5b921b4b1fbd888478536010d7b4 Bug 1241371. Don't schedule an image visibility update every time display port margins change. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 281138
diff changeset
   555
0947272393af5b921b4b1fbd888478536010d7b4 Bug 1241371. Don't schedule an image visibility update every time display port margins change. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 281138
diff changeset
   556
  /**
290446
2d171d75b7464583358fcfb7524617ad5dce6a6f Bug 1157546 - Replace the image visibility API with a more general API that tracks visibility for any kind of frame. r=mstange
Seth Fowler <mark.seth.fowler@gmail.com>
parents: 290285
diff changeset
   557
   * Returns true if this scroll frame had a display port at the last frame
281189
0947272393af5b921b4b1fbd888478536010d7b4 Bug 1241371. Don't schedule an image visibility update every time display port margins change. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 281138
diff changeset
   558
   * visibility update and fills in aDisplayPort with that displayport. Returns
0947272393af5b921b4b1fbd888478536010d7b4 Bug 1241371. Don't schedule an image visibility update every time display port margins change. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 281138
diff changeset
   559
   * false otherwise, and doesn't touch aDisplayPort.
0947272393af5b921b4b1fbd888478536010d7b4 Bug 1241371. Don't schedule an image visibility update every time display port margins change. r=kats
Timothy Nikkel <tnikkel@gmail.com>
parents: 281138
diff changeset
   560
   */
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   561
  virtual bool GetDisplayPortAtLastApproximateFrameVisibilityUpdate(
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   562
      nsRect* aDisplayPort) = 0;
282968
8df453ece1d461aa58d1b9969a971bf5eec76da5 Bug 990916 - When setting a displayport, schedule a timer to remove it as well. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 281189
diff changeset
   563
8df453ece1d461aa58d1b9969a971bf5eec76da5 Bug 990916 - When setting a displayport, schedule a timer to remove it as well. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 281189
diff changeset
   564
  /**
8df453ece1d461aa58d1b9969a971bf5eec76da5 Bug 990916 - When setting a displayport, schedule a timer to remove it as well. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 281189
diff changeset
   565
   * This is called when a descendant scrollframe's has its displayport expired.
8df453ece1d461aa58d1b9969a971bf5eec76da5 Bug 990916 - When setting a displayport, schedule a timer to remove it as well. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 281189
diff changeset
   566
   * This function will check to see if this scrollframe may safely expire its
8df453ece1d461aa58d1b9969a971bf5eec76da5 Bug 990916 - When setting a displayport, schedule a timer to remove it as well. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 281189
diff changeset
   567
   * own displayport and schedule a timer to do that if it is safe.
8df453ece1d461aa58d1b9969a971bf5eec76da5 Bug 990916 - When setting a displayport, schedule a timer to remove it as well. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 281189
diff changeset
   568
   */
8df453ece1d461aa58d1b9969a971bf5eec76da5 Bug 990916 - When setting a displayport, schedule a timer to remove it as well. r=tnikkel
Kartikaya Gupta <kgupta@mozilla.com>
parents: 281189
diff changeset
   569
  virtual void TriggerDisplayPortExpiration() = 0;
291364
8e167bb3d4f573179bb6ccc700b713d5cbd0f5a0 Bug 1219296 - Ship scroll snap information to the compositor. r=kats
Botond Ballo <botond@mozilla.com>
parents: 291358
diff changeset
   570
8e167bb3d4f573179bb6ccc700b713d5cbd0f5a0 Bug 1219296 - Ship scroll snap information to the compositor. r=kats
Botond Ballo <botond@mozilla.com>
parents: 291358
diff changeset
   571
  /**
8e167bb3d4f573179bb6ccc700b713d5cbd0f5a0 Bug 1219296 - Ship scroll snap information to the compositor. r=kats
Botond Ballo <botond@mozilla.com>
parents: 291358
diff changeset
   572
   * Returns information required to determine where to snap to after a scroll.
8e167bb3d4f573179bb6ccc700b713d5cbd0f5a0 Bug 1219296 - Ship scroll snap information to the compositor. r=kats
Botond Ballo <botond@mozilla.com>
parents: 291358
diff changeset
   573
   */
8e167bb3d4f573179bb6ccc700b713d5cbd0f5a0 Bug 1219296 - Ship scroll snap information to the compositor. r=kats
Botond Ballo <botond@mozilla.com>
parents: 291358
diff changeset
   574
  virtual ScrollSnapInfo GetScrollSnapInfo() const = 0;
304929
1d26ac38f26ded12a7ca0fb56a67db5eef8f2c20 Bug 1284586 - Disable paint-skipping for scrollframes that we detect as having a CSS-clipped descendant. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 296013
diff changeset
   575
326653
b352c7f6bc15bcfe4e8f933045878aa5f1238c55 Bug 41708, support scrolling when hovering over the edge of a scrollframe while dragging, r=smaug
Neil Deakin <neil@mozilla.com>
parents: 317790
diff changeset
   576
  /**
b352c7f6bc15bcfe4e8f933045878aa5f1238c55 Bug 41708, support scrolling when hovering over the edge of a scrollframe while dragging, r=smaug
Neil Deakin <neil@mozilla.com>
parents: 317790
diff changeset
   577
   * Given the drag event aEvent, determine whether the mouse is near the edge
b352c7f6bc15bcfe4e8f933045878aa5f1238c55 Bug 41708, support scrolling when hovering over the edge of a scrollframe while dragging, r=smaug
Neil Deakin <neil@mozilla.com>
parents: 317790
diff changeset
   578
   * of the scrollable area, and scroll the view in the direction of that edge
b352c7f6bc15bcfe4e8f933045878aa5f1238c55 Bug 41708, support scrolling when hovering over the edge of a scrollframe while dragging, r=smaug
Neil Deakin <neil@mozilla.com>
parents: 317790
diff changeset
   579
   * if so. If scrolling occurred, true is returned. When false is returned, the
b352c7f6bc15bcfe4e8f933045878aa5f1238c55 Bug 41708, support scrolling when hovering over the edge of a scrollframe while dragging, r=smaug
Neil Deakin <neil@mozilla.com>
parents: 317790
diff changeset
   580
   * caller should look for an ancestor to scroll.
b352c7f6bc15bcfe4e8f933045878aa5f1238c55 Bug 41708, support scrolling when hovering over the edge of a scrollframe while dragging, r=smaug
Neil Deakin <neil@mozilla.com>
parents: 317790
diff changeset
   581
   */
b352c7f6bc15bcfe4e8f933045878aa5f1238c55 Bug 41708, support scrolling when hovering over the edge of a scrollframe while dragging, r=smaug
Neil Deakin <neil@mozilla.com>
parents: 317790
diff changeset
   582
  virtual bool DragScroll(mozilla::WidgetEvent* aEvent) = 0;
340812
8f467ac2fa6c6733ad7c9e69cbed49d38184c1f0 Bug 1328658 - Notify main thread of a failed attempt to start an APZ scrollbar drag. r=kats,tnikkel
Botond Ballo <botond@mozilla.com>
parents: 332050
diff changeset
   583
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   584
  virtual void AsyncScrollbarDragInitiated(
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 447718
diff changeset
   585
      uint64_t aDragBlockId, mozilla::layers::ScrollDirection aDirection) = 0;
340812
8f467ac2fa6c6733ad7c9e69cbed49d38184c1f0 Bug 1328658 - Notify main thread of a failed attempt to start an APZ scrollbar drag. r=kats,tnikkel
Botond Ballo <botond@mozilla.com>
parents: 332050
diff changeset
   586
  virtual void AsyncScrollbarDragRejected() = 0;
347206
c2db4358a81ce0701b8374af5a6b38e7acc7c4b5 Bug 1346109. Allow asking an nsIScrollableFrame if it is the root scroll frame. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 340812
diff changeset
   587
c2db4358a81ce0701b8374af5a6b38e7acc7c4b5 Bug 1346109. Allow asking an nsIScrollableFrame if it is the root scroll frame. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 340812
diff changeset
   588
  /**
c2db4358a81ce0701b8374af5a6b38e7acc7c4b5 Bug 1346109. Allow asking an nsIScrollableFrame if it is the root scroll frame. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 340812
diff changeset
   589
   * Returns whether this scroll frame is the root scroll frame of the document
c2db4358a81ce0701b8374af5a6b38e7acc7c4b5 Bug 1346109. Allow asking an nsIScrollableFrame if it is the root scroll frame. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 340812
diff changeset
   590
   * that it is in. Note that some documents don't have root scroll frames at
c2db4358a81ce0701b8374af5a6b38e7acc7c4b5 Bug 1346109. Allow asking an nsIScrollableFrame if it is the root scroll frame. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 340812
diff changeset
   591
   * all (ie XUL documents) even though they may contain other scroll frames.
c2db4358a81ce0701b8374af5a6b38e7acc7c4b5 Bug 1346109. Allow asking an nsIScrollableFrame if it is the root scroll frame. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 340812
diff changeset
   592
   */
c2db4358a81ce0701b8374af5a6b38e7acc7c4b5 Bug 1346109. Allow asking an nsIScrollableFrame if it is the root scroll frame. r=botond
Timothy Nikkel <tnikkel@gmail.com>
parents: 340812
diff changeset
   593
  virtual bool IsRootScrollFrameOfDocument() const = 0;
453385
52a6a35a238d2ea87c60cc387d12e7348fcf821a Bug 1305957 part 4 - Add basic ScrollAnchorContainer implementation. r=hiro
Ryan Hunt <rhunt@eqrion.net>
parents: 453275
diff changeset
   594
52a6a35a238d2ea87c60cc387d12e7348fcf821a Bug 1305957 part 4 - Add basic ScrollAnchorContainer implementation. r=hiro
Ryan Hunt <rhunt@eqrion.net>
parents: 453275
diff changeset
   595
  /**
459352
eed5fd8bc3df0e551d7e2c748837fe575238b552 Bug 1520363 - Rename nsIScrollableFrame::GetAnchor() to Anchor(). r=dholbert
Ryan Hunt <rhunt@eqrion.net>
parents: 458971
diff changeset
   596
   * Returns the scroll anchor associated with this scrollable frame. This is
eed5fd8bc3df0e551d7e2c748837fe575238b552 Bug 1520363 - Rename nsIScrollableFrame::GetAnchor() to Anchor(). r=dholbert
Ryan Hunt <rhunt@eqrion.net>
parents: 458971
diff changeset
   597
   * never null.
453385
52a6a35a238d2ea87c60cc387d12e7348fcf821a Bug 1305957 part 4 - Add basic ScrollAnchorContainer implementation. r=hiro
Ryan Hunt <rhunt@eqrion.net>
parents: 453275
diff changeset
   598
   */
459352
eed5fd8bc3df0e551d7e2c748837fe575238b552 Bug 1520363 - Rename nsIScrollableFrame::GetAnchor() to Anchor(). r=dholbert
Ryan Hunt <rhunt@eqrion.net>
parents: 458971
diff changeset
   599
  virtual const ScrollAnchorContainer* Anchor() const = 0;
eed5fd8bc3df0e551d7e2c748837fe575238b552 Bug 1520363 - Rename nsIScrollableFrame::GetAnchor() to Anchor(). r=dholbert
Ryan Hunt <rhunt@eqrion.net>
parents: 458971
diff changeset
   600
  virtual ScrollAnchorContainer* Anchor() = 0;
465835
3d7514ac25e949e710a4cb597381207d7cc06c9c Bug 1531535 - Add visual smooth scroll support to nsIPresShell. r=kats
Botond Ballo <botond@mozilla.com>
parents: 459352
diff changeset
   601
3d7514ac25e949e710a4cb597381207d7cc06c9c Bug 1531535 - Add visual smooth scroll support to nsIPresShell. r=kats
Botond Ballo <botond@mozilla.com>
parents: 459352
diff changeset
   602
  virtual bool SmoothScrollVisual(
3d7514ac25e949e710a4cb597381207d7cc06c9c Bug 1531535 - Add visual smooth scroll support to nsIPresShell. r=kats
Botond Ballo <botond@mozilla.com>
parents: 459352
diff changeset
   603
      const nsPoint& aVisualViewportOffset,
3d7514ac25e949e710a4cb597381207d7cc06c9c Bug 1531535 - Add visual smooth scroll support to nsIPresShell. r=kats
Botond Ballo <botond@mozilla.com>
parents: 459352
diff changeset
   604
      mozilla::layers::FrameMetrics::ScrollOffsetUpdateType aUpdateType) = 0;
480239
065a45b8659dc25fb91738a7625dab916b76d0b6 Bug 1560237 - Introduce nsIScrollableFrame::IsSmoothScroll. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 471402
diff changeset
   605
065a45b8659dc25fb91738a7625dab916b76d0b6 Bug 1560237 - Introduce nsIScrollableFrame::IsSmoothScroll. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 471402
diff changeset
   606
  /**
065a45b8659dc25fb91738a7625dab916b76d0b6 Bug 1560237 - Introduce nsIScrollableFrame::IsSmoothScroll. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 471402
diff changeset
   607
   * Returns true if this scroll frame should perform smooth scroll with the
065a45b8659dc25fb91738a7625dab916b76d0b6 Bug 1560237 - Introduce nsIScrollableFrame::IsSmoothScroll. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 471402
diff changeset
   608
   * given |aBehavior|.
065a45b8659dc25fb91738a7625dab916b76d0b6 Bug 1560237 - Introduce nsIScrollableFrame::IsSmoothScroll. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 471402
diff changeset
   609
   */
065a45b8659dc25fb91738a7625dab916b76d0b6 Bug 1560237 - Introduce nsIScrollableFrame::IsSmoothScroll. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 471402
diff changeset
   610
  virtual bool IsSmoothScroll(mozilla::dom::ScrollBehavior aBehavior =
065a45b8659dc25fb91738a7625dab916b76d0b6 Bug 1560237 - Introduce nsIScrollableFrame::IsSmoothScroll. r=botond
Hiroyuki Ikezoe <hikezoe@mozilla.com>
parents: 471402
diff changeset
   611
                                  mozilla::dom::ScrollBehavior::Auto) const = 0;
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   612
};
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   613
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   614
#endif