1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */ 3 /* This Source Code Form is subject to the terms of the Mozilla Public 4 * License, v. 2.0. If a copy of the MPL was not distributed with this 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 /* 8 * interface that provides scroll APIs implemented by scrollable frames 9 */ 10 11 #ifndef nsIScrollFrame_h___ 12 #define nsIScrollFrame_h___ 13 14 #include "nsCoord.h" 15 #include "mozilla/Maybe.h" 16 #include "mozilla/ScrollStyles.h" 17 #include "mozilla/ScrollTypes.h" 18 #include "mozilla/gfx/Point.h" 19 #include "nsIScrollbarMediator.h" 20 #include "Units.h" 21 #include "FrameMetrics.h" 22 23 #define NS_DEFAULT_VERTICAL_SCROLL_DISTANCE 3 24 #define NS_DEFAULT_HORIZONTAL_SCROLL_DISTANCE 5 25 26 class gfxContext; 27 class nsBoxLayoutState; 28 class nsIScrollPositionListener; 29 class nsIFrame; 30 class nsPresContext; 31 class nsIContent; 32 class nsAtom; 33 class nsDisplayListBuilder; 34 35 namespace mozilla { 36 struct ContainerLayerParameters; 37 class DisplayItemClip; 38 namespace layers { 39 struct ScrollMetadata; 40 class Layer; 41 class LayerManager; 42 } // namespace layers 43 namespace layout { 44 class ScrollAnchorContainer; 45 } // namespace layout 46 } // namespace mozilla 47 48 /** 49 * Interface for frames that are scrollable. This interface exposes 50 * APIs for examining scroll state, observing changes to scroll state, 51 * and triggering scrolling. 52 */ 53 class nsIScrollableFrame : public nsIScrollbarMediator { 54 public: 55 typedef mozilla::CSSIntPoint CSSIntPoint; 56 typedef mozilla::ContainerLayerParameters ContainerLayerParameters; 57 typedef mozilla::layers::ScrollSnapInfo ScrollSnapInfo; 58 typedef mozilla::layout::ScrollAnchorContainer ScrollAnchorContainer; 59 typedef mozilla::ScrollMode ScrollMode; 60 61 NS_DECL_QUERYFRAME_TARGET(nsIScrollableFrame) 62 63 /** 64 * Get the frame for the content that we are scrolling within 65 * this scrollable frame. 66 */ 67 virtual nsIFrame* GetScrolledFrame() const = 0; 68 69 /** 70 * Get the overflow styles (StyleOverflow::Scroll, StyleOverflow::Hidden, or 71 * StyleOverflow::Auto) governing the horizontal and vertical scrollbars for 72 * this frame. 73 * 74 * This is special because they can be propagated from the <body> element, 75 * unlike other styles. 76 */ 77 virtual mozilla::ScrollStyles GetScrollStyles() const = 0; 78 79 /** 80 * Returns whether this scroll frame is for a text control element with no 81 * scrollbars (for <input>, basically). 82 */ 83 virtual bool IsForTextControlWithNoScrollbars() const = 0; 84 85 /** 86 * Get the overscroll-behavior styles. 87 */ 88 virtual mozilla::layers::OverscrollBehaviorInfo GetOverscrollBehaviorInfo() 89 const = 0; 90 91 enum { HORIZONTAL = 0x01, VERTICAL = 0x02 }; 92 /** 93 * Return the scrollbars which are visible. It's OK to call this during reflow 94 * of the scrolled contents, in which case it will reflect the current 95 * assumptions about scrollbar visibility. 96 */ 97 virtual uint32_t GetScrollbarVisibility() const = 0; 98 /** 99 * Returns the directions in which scrolling is allowed (if the scroll range 100 * is at least one device pixel in that direction). 101 */ 102 uint32_t GetAvailableScrollingDirections() const; 103 /** 104 * Returns the directions in which scrolling is allowed when taking into 105 * account the visual viewport size and overflow hidden. (An (apz) zoomed in 106 * overflow hidden scrollframe is actually user scrollable.) 107 */ 108 virtual uint32_t GetAvailableScrollingDirectionsForUserInputEvents() 109 const = 0; 110 /** 111 * Return the actual sizes of all possible scrollbars. Returns 0 for scrollbar 112 * positions that don't have a scrollbar or where the scrollbar is not 113 * visible. Do not call this while this frame's descendants are being 114 * reflowed, it won't be accurate. 115 */ 116 virtual nsMargin GetActualScrollbarSizes() const = 0; 117 /** 118 * Return the sizes of all scrollbars assuming that any scrollbars that could 119 * be visible due to overflowing content, are. This can be called during 120 * reflow of the scrolled contents. 121 */ 122 virtual nsMargin GetDesiredScrollbarSizes(nsBoxLayoutState* aState) = 0; 123 /** 124 * Return the sizes of all scrollbars assuming that any scrollbars that could 125 * be visible due to overflowing content, are. This can be called during 126 * reflow of the scrolled contents. 127 */ 128 virtual nsMargin GetDesiredScrollbarSizes(nsPresContext* aPresContext, 129 gfxContext* aRC) = 0; 130 /** 131 * Return the width for non-disappearing scrollbars. 132 */ 133 virtual nscoord GetNondisappearingScrollbarWidth( 134 nsPresContext* aPresContext, gfxContext* aRC, 135 mozilla::WritingMode aWM) = 0; 136 /** 137 * Get the layout size of this frame. 138 * Note that this is a value which is not expanded by the minimum scale size. 139 * For scroll frames other than the root content document's scroll frame, this 140 * value will be the same as GetScrollPortRect().Size(). 141 * 142 * This value is used for Element.clientWidth and clientHeight. 143 */ 144 virtual nsSize GetLayoutSize() const = 0; 145 /** 146 * GetScrolledRect is designed to encapsulate deciding which 147 * directions of overflow should be reachable by scrolling and which 148 * should not. Callers should NOT depend on it having any particular 149 * behavior (although nsXULScrollFrame currently does). 150 * 151 * This should only be called when the scrolled frame has been 152 * reflowed with the scroll port size given in mScrollPort. 153 * 154 * Currently it allows scrolling down and to the right for 155 * nsHTMLScrollFrames with LTR directionality and for all 156 * nsXULScrollFrames, and allows scrolling down and to the left for 157 * nsHTMLScrollFrames with RTL directionality. 158 */ 159 virtual nsRect GetScrolledRect() const = 0; 160 /** 161 * Get the area of the scrollport relative to the origin of this frame's 162 * border-box. 163 * This is the area of this frame minus border and scrollbars. 164 */ 165 virtual nsRect GetScrollPortRect() const = 0; 166 /** 167 * Get the offset of the scrollport origin relative to the scrolled 168 * frame origin. Typically the position will be non-negative. 169 * This will always be a multiple of device pixels. 170 */ 171 virtual nsPoint GetScrollPosition() const = 0; 172 /** 173 * As GetScrollPosition(), but uses the top-right as origin for RTL frames. 174 */ 175 virtual nsPoint GetLogicalScrollPosition() const = 0; 176 /** 177 * Get the latest scroll position that the main thread has sent or received 178 * from APZ. 179 */ 180 virtual nsPoint GetApzScrollPosition() const = 0; 181 182 /** 183 * Get the area that must contain the scroll position. Typically 184 * (but not always, e.g. for RTL content) x and y will be 0, and 185 * width or height will be nonzero if the content can be scrolled in 186 * that direction. Since scroll positions must be a multiple of 187 * device pixels, the range extrema will also be a multiple of 188 * device pixels. 189 */ 190 virtual nsRect GetScrollRange() const = 0; 191 /** 192 * Get the size of the view port to use when clamping the scroll 193 * position. 194 */ 195 virtual nsSize GetVisualViewportSize() const = 0; 196 /** 197 * Returns the offset of the visual viewport relative to 198 * the origin of the scrolled content. Note that only the RCD-RSF 199 * has a distinct visual viewport; for other scroll frames, the 200 * visual viewport always coincides with the layout viewport, and 201 * consequently the offset this function returns is equal to 202 * GetScrollPosition(). 203 */ 204 virtual nsPoint GetVisualViewportOffset() const = 0; 205 /** 206 * Get the area that must contain the visual viewport offset. 207 */ 208 virtual nsRect GetVisualScrollRange() const = 0; 209 /** 210 * Like GetVisualScrollRange but also takes into account overflow: hidden. 211 */ 212 virtual nsRect GetScrollRangeForUserInputEvents() const = 0; 213 /** 214 * Return how much we would try to scroll by in each direction if 215 * asked to scroll by one "line" vertically and horizontally. 216 */ 217 virtual nsSize GetLineScrollAmount() const = 0; 218 /** 219 * Return how much we would try to scroll by in each direction if 220 * asked to scroll by one "page" vertically and horizontally. 221 */ 222 virtual nsSize GetPageScrollAmount() const = 0; 223 224 /** 225 * Return scroll-padding value of this frame. 226 */ 227 virtual nsMargin GetScrollPadding() const = 0; 228 /** 229 * Some platforms (OSX) may generate additional scrolling events even 230 * after the user has stopped scrolling, simulating a momentum scrolling 231 * effect resulting from fling gestures. 232 * SYNTHESIZED_MOMENTUM_EVENT indicates that the scrolling is being requested 233 * by such a synthesized event and may be ignored if another scroll has 234 * been started since the last actual user input. 235 */ 236 enum ScrollMomentum { NOT_MOMENTUM, SYNTHESIZED_MOMENTUM_EVENT }; 237 /** 238 * @note This method might destroy the frame, pres shell and other objects. 239 * Clamps aScrollPosition to GetScrollRange and sets the scroll position 240 * to that value. 241 * @param aRange If non-null, specifies area which contains aScrollPosition 242 * and can be used for choosing a performance-optimized scroll position. 243 * Any point within this area can be chosen. 244 * The choosen point will be as close as possible to aScrollPosition. 245 */ 246 virtual void ScrollTo(nsPoint aScrollPosition, ScrollMode aMode, 247 const nsRect* aRange = nullptr, 248 nsIScrollbarMediator::ScrollSnapMode aSnap = 249 nsIScrollbarMediator::DISABLE_SNAP) = 0; 250 /** 251 * @note This method might destroy the frame, pres shell and other objects. 252 * Scrolls to a particular position in integer CSS pixels. 253 * Keeps the exact current horizontal or vertical position if the current 254 * position, rounded to CSS pixels, matches aScrollPosition. If 255 * aScrollPosition.x/y is different from the current CSS pixel position, 256 * makes sure we only move in the direction given by the difference. 257 * 258 * When aMode is SMOOTH, INSTANT, or NORMAL, GetScrollPositionCSSPixels (the 259 * scroll position after rounding to CSS pixels) will be exactly 260 * aScrollPosition at the end of the scroll animation. 261 * 262 * When aMode is SMOOTH_MSD, intermediate animation frames may be outside the 263 * range and / or moving in any direction; GetScrollPositionCSSPixels will be 264 * exactly aScrollPosition at the end of the scroll animation unless the 265 * SMOOTH_MSD animation is interrupted. 266 * 267 * FIXME: Drop |aSnap| argument once after we finished the migration to the 268 * Scroll Snap Module v1. We should alway use ENABLE_SNAP. 269 */ 270 virtual void ScrollToCSSPixels(const CSSIntPoint& aScrollPosition, 271 ScrollMode aMode = ScrollMode::Instant, 272 nsIScrollbarMediator::ScrollSnapMode aSnap = 273 nsIScrollbarMediator::DEFAULT, 274 nsAtom* aOrigin = nullptr) = 0; 275 /** 276 * @note This method might destroy the frame, pres shell and other objects. 277 * Scrolls to a particular position in float CSS pixels. 278 * This does not guarantee that GetScrollPositionCSSPixels equals 279 * aScrollPosition afterward. It tries to scroll as close to 280 * aScrollPosition as possible while scrolling by an integer 281 * number of layer pixels (so the operation is fast and looks clean). 282 */ 283 virtual void ScrollToCSSPixelsApproximate( 284 const mozilla::CSSPoint& aScrollPosition, nsAtom* aOrigin = nullptr) = 0; 285 286 /** 287 * Returns the scroll position in integer CSS pixels, rounded to the nearest 288 * pixel. 289 */ 290 virtual CSSIntPoint GetScrollPositionCSSPixels() = 0; 291 /** 292 * @note This method might destroy the frame, pres shell and other objects. 293 * Modifies the current scroll position by aDelta units given by aUnit, 294 * clamping it to GetScrollRange. If WHOLE is specified as the unit, 295 * content is scrolled all the way in the direction(s) given by aDelta. 296 * @param aOverflow if non-null, returns the amount that scrolling 297 * was clamped by in each direction (how far we moved the scroll position 298 * to bring it back into the legal range). This is never negative. The 299 * values are in device pixels. 300 */ 301 virtual void ScrollBy(nsIntPoint aDelta, mozilla::ScrollUnit aUnit, 302 ScrollMode aMode, nsIntPoint* aOverflow = nullptr, 303 nsAtom* aOrigin = nullptr, 304 ScrollMomentum aMomentum = NOT_MOMENTUM, 305 nsIScrollbarMediator::ScrollSnapMode aSnap = 306 nsIScrollbarMediator::DISABLE_SNAP) = 0; 307 308 /** 309 * FIXME: Drop |aSnap| argument once after we finished the migration to the 310 * Scroll Snap Module v1. We should alway use ENABLE_SNAP. 311 */ 312 virtual void ScrollByCSSPixels(const CSSIntPoint& aDelta, 313 ScrollMode aMode = ScrollMode::Instant, 314 nsAtom* aOrigin = nullptr, 315 nsIScrollbarMediator::ScrollSnapMode aSnap = 316 nsIScrollbarMediator::DEFAULT) = 0; 317 318 /** 319 * Perform scroll snapping, possibly resulting in a smooth scroll to 320 * maintain the scroll snap position constraints. Velocity sampled from 321 * main thread scrolling is used to determine best matching snap point 322 * when called after a fling gesture on a trackpad or mouse wheel. 323 */ 324 virtual void ScrollSnap() = 0; 325 326 /** 327 * @note This method might destroy the frame, pres shell and other objects. 328 * This tells the scroll frame to try scrolling to the scroll 329 * position that was restored from the history. This must be called 330 * at least once after state has been restored. It is called by the 331 * scrolled frame itself during reflow, but sometimes state can be 332 * restored after reflows are done... 333 * XXX should we take an aMode parameter here? Currently it's instant. 334 */ 335 virtual void ScrollToRestoredPosition() = 0; 336 337 /** 338 * Add a scroll position listener. This listener must be removed 339 * before it is destroyed. 340 */ 341 virtual void AddScrollPositionListener( 342 nsIScrollPositionListener* aListener) = 0; 343 /** 344 * Remove a scroll position listener. 345 */ 346 virtual void RemoveScrollPositionListener( 347 nsIScrollPositionListener* aListener) = 0; 348 349 /** 350 * Internal method used by scrollbars to notify their scrolling 351 * container of changes. 352 */ 353 virtual void CurPosAttributeChanged(nsIContent* aChild) = 0; 354 355 /** 356 * Allows the docshell to request that the scroll frame post an event 357 * after being restored from history. 358 */ 359 NS_IMETHOD PostScrolledAreaEventForCurrentArea() = 0; 360 361 /** 362 * Returns true if this scrollframe is being "actively scrolled". 363 * This basically means that we should allocate resources in the 364 * expectation that scrolling is going to happen. 365 */ 366 virtual bool IsScrollingActive(nsDisplayListBuilder* aBuilder) = 0; 367 368 /** 369 * Returns true if this scroll frame might be scrolled 370 * asynchronously by the compositor. 371 */ 372 virtual bool IsMaybeAsynchronouslyScrolled() = 0; 373 374 /** 375 * Same as the above except doesn't take into account will-change budget, 376 * which means that it can be called during display list building. 377 */ 378 virtual bool IsMaybeScrollingActive() const = 0; 379 /** 380 * Returns true if the scrollframe is currently processing an async 381 * or smooth scroll. 382 */ 383 virtual bool IsProcessingAsyncScroll() = 0; 384 /** 385 * Call this when the layer(s) induced by active scrolling are being 386 * completely redrawn. 387 */ 388 virtual void ResetScrollPositionForLayerPixelAlignment() = 0; 389 /** 390 * Was the current presentation state for this frame restored from history? 391 */ 392 virtual bool DidHistoryRestore() const = 0; 393 /** 394 * Clear the flag so that DidHistoryRestore() returns false until the next 395 * RestoreState call. 396 * @see nsIStatefulFrame::RestoreState 397 */ 398 virtual void ClearDidHistoryRestore() = 0; 399 /** 400 * Mark the frame as having been scrolled at least once, so that it remains 401 * active and we can also start storing its scroll position when saving state. 402 */ 403 virtual void MarkEverScrolled() = 0; 404 /** 405 * Determine if the passed in rect is nearly visible according to the frame 406 * visibility heuristics for how close it is to the visible scrollport. 407 */ 408 virtual bool IsRectNearlyVisible(const nsRect& aRect) = 0; 409 /** 410 * Expand the given rect taking into account which directions we can scroll 411 * and how far we want to expand for frame visibility purposes. 412 */ 413 virtual nsRect ExpandRectToNearlyVisible(const nsRect& aRect) const = 0; 414 /** 415 * Returns the origin that triggered the last instant scroll. Will equal 416 * nsGkAtoms::apz when the compositor's replica frame metrics includes the 417 * latest instant scroll. 418 */ 419 virtual nsAtom* LastScrollOrigin() = 0; 420 /** 421 * Returns the origin that triggered the last smooth scroll. 422 * Will equal nsGkAtoms::apz when the compositor's replica frame 423 * metrics includes the latest smooth scroll. The compositor will always 424 * perform an instant scroll prior to instantiating any smooth scrolls 425 * if LastScrollOrigin and LastSmoothScrollOrigin indicate that 426 * an instant scroll and a smooth scroll have occurred since the last 427 * replication of the frame metrics. 428 * 429 * This is set to nullptr to when the compositor thread acknowledges that 430 * the smooth scroll has been started. If the smooth scroll has been stomped 431 * by an instant scroll before the smooth scroll could be started by the 432 * compositor, this is set to nullptr to clear the smooth scroll. 433 */ 434 virtual nsAtom* LastSmoothScrollOrigin() = 0; 435 /** 436 * Returns the current generation counter for the scroll. This counter 437 * increments every time the scroll position is set. 438 */ 439 virtual uint32_t CurrentScrollGeneration() = 0; 440 /** 441 * LastScrollDestination returns the destination of the most recently 442 * requested smooth scroll animation. 443 */ 444 virtual nsPoint LastScrollDestination() = 0; 445 /** 446 * Clears the "origin of last scroll" property stored in this frame, if 447 * the generation counter passed in matches the current scroll generation 448 * counter. 449 */ 450 virtual void ResetScrollInfoIfGeneration(uint32_t aGeneration) = 0; 451 /** 452 * Determine whether it is desirable to be able to asynchronously scroll this 453 * scroll frame. 454 */ 455 virtual bool WantAsyncScroll() const = 0; 456 /** 457 * Returns the ScrollMetadata contributed by this frame, if there is one. 458 */ 459 virtual mozilla::Maybe<mozilla::layers::ScrollMetadata> ComputeScrollMetadata( 460 mozilla::layers::LayerManager* aLayerManager, 461 const nsIFrame* aContainerReferenceFrame, 462 const mozilla::Maybe<ContainerLayerParameters>& aParameters, 463 const mozilla::DisplayItemClip* aClip) const = 0; 464 /** 465 * Ensure's aLayer is clipped to the display port. 466 */ 467 virtual void ClipLayerToDisplayPort( 468 mozilla::layers::Layer* aLayer, const mozilla::DisplayItemClip* aClip, 469 const ContainerLayerParameters& aParameters) const = 0; 470 471 /** 472 * Mark the scrollbar frames for reflow. 473 */ 474 virtual void MarkScrollbarsDirtyForReflow() const = 0; 475 476 virtual void SetTransformingByAPZ(bool aTransforming) = 0; 477 virtual bool IsTransformingByAPZ() const = 0; 478 479 /** 480 * Notify this scroll frame that it can be scrolled by APZ. In particular, 481 * this is called *after* the APZ code has created an APZC for this scroll 482 * frame and verified that it is not a scrollinfo layer. Therefore, setting an 483 * async transform on it is actually user visible. 484 */ 485 virtual void SetScrollableByAPZ(bool aScrollable) = 0; 486 487 /** 488 * Notify this scroll frame that it can be zoomed by APZ. 489 */ 490 virtual void SetZoomableByAPZ(bool aZoomable) = 0; 491 492 /** 493 * Mark this scroll frame as having out-of-flow content inside a CSS filter. 494 * Such content will move incorrectly during async-scrolling; to mitigate 495 * this, paint skipping is disabled for such scroll frames. 496 */ 497 virtual void SetHasOutOfFlowContentInsideFilter() = 0; 498 499 /** 500 * Determine if we should build a scrollable layer for this scroll frame and 501 * return the result. It will also record this result on the scroll frame. 502 * Pass the visible rect in aVisibleRect. On return it will be set to the 503 * displayport if there is one. 504 * Pass the dirty rect in aDirtyRect. On return it will be set to the 505 * dirty rect inside the displayport (ie the dirty rect that should be used). 506 * This function will set the display port base rect if aSetBase is true. 507 * aSetBase is only allowed to be false if there has been a call with it 508 * set to true before on the same paint. 509 */ 510 virtual bool DecideScrollableLayer(nsDisplayListBuilder* aBuilder, 511 nsRect* aVisibleRect, nsRect* aDirtyRect, 512 bool aSetBase) = 0; 513 514 /** 515 * Notify the scrollframe that the current scroll offset and origin have been 516 * sent over in a layers transaction. 517 * 518 * This sets a flag on the scrollframe that indicates subsequent changes 519 * to the scroll position by "weaker" origins are permitted to overwrite the 520 * the scroll origin. Scroll origins that 521 * nsLayoutUtils::CanScrollOriginClobberApz returns false for are considered 522 * "weaker" than scroll origins for which that function returns true. 523 * 524 * This function must be called for a scrollframe after all calls to 525 * ComputeScrollMetadata in a layers transaction have been completed. 526 * 527 */ 528 virtual void NotifyApzTransaction() = 0; 529 530 /** 531 * Notification that this scroll frame is getting its frame visibility 532 * updated. aIgnoreDisplayPort indicates that the display port was ignored 533 * (because there was no suitable base rect) 534 */ 535 virtual void NotifyApproximateFrameVisibilityUpdate( 536 bool aIgnoreDisplayPort) = 0; 537 538 /** 539 * Returns true if this scroll frame had a display port at the last frame 540 * visibility update and fills in aDisplayPort with that displayport. Returns 541 * false otherwise, and doesn't touch aDisplayPort. 542 */ 543 virtual bool GetDisplayPortAtLastApproximateFrameVisibilityUpdate( 544 nsRect* aDisplayPort) = 0; 545 546 /** 547 * This is called when a descendant scrollframe's has its displayport expired. 548 * This function will check to see if this scrollframe may safely expire its 549 * own displayport and schedule a timer to do that if it is safe. 550 */ 551 virtual void TriggerDisplayPortExpiration() = 0; 552 553 /** 554 * Returns information required to determine where to snap to after a scroll. 555 */ 556 virtual ScrollSnapInfo GetScrollSnapInfo() const = 0; 557 558 /** 559 * Given the drag event aEvent, determine whether the mouse is near the edge 560 * of the scrollable area, and scroll the view in the direction of that edge 561 * if so. If scrolling occurred, true is returned. When false is returned, the 562 * caller should look for an ancestor to scroll. 563 */ 564 virtual bool DragScroll(mozilla::WidgetEvent* aEvent) = 0; 565 566 virtual void AsyncScrollbarDragInitiated( 567 uint64_t aDragBlockId, mozilla::layers::ScrollDirection aDirection) = 0; 568 virtual void AsyncScrollbarDragRejected() = 0; 569 570 /** 571 * Returns whether this scroll frame is the root scroll frame of the document 572 * that it is in. Note that some documents don't have root scroll frames at 573 * all (ie XUL documents) even though they may contain other scroll frames. 574 */ 575 virtual bool IsRootScrollFrameOfDocument() const = 0; 576 577 /** 578 * Returns the scroll anchor associated with this scrollable frame. This is 579 * never null. 580 */ 581 virtual const ScrollAnchorContainer* Anchor() const = 0; 582 virtual ScrollAnchorContainer* Anchor() = 0; 583 584 virtual bool SmoothScrollVisual( 585 const nsPoint& aVisualViewportOffset, 586 mozilla::layers::FrameMetrics::ScrollOffsetUpdateType aUpdateType) = 0; 587 588 /** 589 * Returns true if this scroll frame should perform smooth scroll with the 590 * given |aBehavior|. 591 */ 592 virtual bool IsSmoothScroll(mozilla::dom::ScrollBehavior aBehavior = 593 mozilla::dom::ScrollBehavior::Auto) const = 0; 594 }; 595 596 #endif 597