#include "third_party/blink/renderer/core/paint/paint_layer_scrollable_area.h"
#include "build/build_config.h"
#include "cc/layers/picture_layer.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/renderer/core/animation/scroll_timeline.h"
#include "third_party/blink/renderer/core/css/css_numeric_literal_value.h"
#include "third_party/blink/renderer/core/frame/frame_test_helpers.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/frame/visual_viewport.h"
#include "third_party/blink/renderer/core/layout/hit_test_location.h"
#include "third_party/blink/renderer/core/layout/layout_box_model_object.h"
#include "third_party/blink/renderer/core/page/scrolling/snap_coordinator.h"
#include "third_party/blink/renderer/core/paint/paint_controller_paint_test.h"
#include "third_party/blink/renderer/core/paint/paint_layer.h"
#include "third_party/blink/renderer/core/scroll/scroll_types.h"
#include "third_party/blink/renderer/core/scroll/scrollbar_theme.h"
#include "third_party/blink/renderer/core/testing/color_scheme_helper.h"
#include "third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h"
_;
namespace blink {
namespace {
class ScrollableAreaMockChromeClient : public RenderingTestChromeClient { … };
}
class PaintLayerScrollableAreaTest : public PaintControllerPaintTest { … };
INSTANTIATE_PAINT_TEST_SUITE_P(…);
TEST_P(PaintLayerScrollableAreaTest, OpaqueContainedLayersPromoted) { … }
TEST_P(PaintLayerScrollableAreaTest, NonStackingContextScrollerPromoted) { … }
TEST_P(PaintLayerScrollableAreaTest, TransparentLayersNotPromoted) { … }
TEST_P(PaintLayerScrollableAreaTest, OpaqueLayersDepromotedOnStyleChange) { … }
TEST_P(PaintLayerScrollableAreaTest, OpaqueLayersPromotedOnStyleChange) { … }
TEST_P(PaintLayerScrollableAreaTest,
TransformDoesNotPreventCompositedScrolling) { … }
TEST_P(PaintLayerScrollableAreaTest,
PromoteLayerRegardlessOfSelfAndAncestorOpacity) { … }
TEST_P(PaintLayerScrollableAreaTest, CompositedScrollOnWillChangeTransform) { … }
TEST_P(PaintLayerScrollableAreaTest, ScrollLayerOnPointerEvents) { … }
TEST_P(PaintLayerScrollableAreaTest, InputElementPromotionTest) { … }
TEST_P(PaintLayerScrollableAreaTest, SelectElementPromotionTest) { … }
TEST_P(PaintLayerScrollableAreaTest, OverlayScrollbarColorThemeUpdated) { … }
TEST_P(PaintLayerScrollableAreaTest,
RecalculatesScrollbarOverlayIfBackgroundChanges) { … }
TEST_P(PaintLayerScrollableAreaTest, PreferredOverlayScrollbarColorTheme) { … }
TEST_P(PaintLayerScrollableAreaTest, HideTooltipWhenScrollPositionChanges) { … }
TEST_P(PaintLayerScrollableAreaTest, IncludeOverlayScrollbarsInVisibleWidth) { … }
TEST_P(PaintLayerScrollableAreaTest, ShowAutoScrollbarsForVisibleContent) { … }
TEST_P(PaintLayerScrollableAreaTest, FloatOverflowInRtlContainer) { … }
TEST_P(PaintLayerScrollableAreaTest, ScrollOriginInRtlContainer) { … }
TEST_P(PaintLayerScrollableAreaTest, OverflowHiddenScrollOffsetInvalidation) { … }
TEST_P(PaintLayerScrollableAreaTest, ScrollDoesNotInvalidate) { … }
TEST_P(PaintLayerScrollableAreaTest, ScrollWithStickyNeedsCompositingUpdate) { … }
TEST_P(PaintLayerScrollableAreaTest,
ScrollWithFixedDoesNotNeedCompositingUpdate) { … }
TEST_P(PaintLayerScrollableAreaTest,
ScrollWithLocalAttachmentBackgroundInScrollingContents) { … }
TEST_P(PaintLayerScrollableAreaTest, ScrollWith3DPreserveParent) { … }
TEST_P(PaintLayerScrollableAreaTest,
ScrollWithLocalAttachmentBackgroundInMainLayer) { … }
TEST_P(PaintLayerScrollableAreaTest, ViewScrollWithFixedAttachmentBackground) { … }
TEST_P(PaintLayerScrollableAreaTest,
ViewScrollWithSolidColorFixedAttachmentBackground) { … }
TEST_P(PaintLayerScrollableAreaTest,
ViewScrollWithFixedAttachmentBackgroundPreferCompositingToLCDText) { … }
TEST_P(PaintLayerScrollableAreaTest, ViewScrollWithScrollAttachmentBackground) { … }
TEST_P(PaintLayerScrollableAreaTest, ViewScrollWithLocalAttachmentBackground) { … }
TEST_P(PaintLayerScrollableAreaTest, HitTestOverlayScrollbars) { … }
TEST_P(PaintLayerScrollableAreaTest,
ShowNonCompositedScrollbarOnCompositorScroll) { … }
TEST_P(PaintLayerScrollableAreaTest, CompositedStickyDescendant) { … }
TEST_P(PaintLayerScrollableAreaTest, StickyPositionUseCounter) { … }
TEST_P(PaintLayerScrollableAreaTest, IgnoreDelayedScrollOnDestroyedLayer) { … }
TEST_P(PaintLayerScrollableAreaTest, ScrollbarMaximum) { … }
TEST_P(PaintLayerScrollableAreaTest, ScrollingBackgroundVisualRect) { … }
TEST_P(PaintLayerScrollableAreaTest, RtlScrollOriginSnapping) { … }
TEST_P(PaintLayerScrollableAreaTest, ShowCustomResizerInTextarea) { … }
TEST_P(PaintLayerScrollableAreaTest,
ApplyPendingHistoryRestoreScrollOffsetTwice) { … }
TEST_P(PaintLayerScrollableAreaTest, CompositeWithTrivial3D) { … }
class PaintLayerScrollableAreaTestLowEndPlatform
: public TestingPlatformSupport { … };
TEST_P(PaintLayerScrollableAreaTest, LowEndCompositeWithTrivial3D) { … }
TEST_P(PaintLayerScrollableAreaTest,
RootScrollbarShouldUseParentOfOverscrollNodeAsTransformNode) { … }
TEST_P(PaintLayerScrollableAreaTest,
ResizeSmallerToBeScrollableWithResizerAndStackedChild) { … }
TEST_P(PaintLayerScrollableAreaTest, RemoveAddResizerWithoutScrollbars) { … }
TEST_P(PaintLayerScrollableAreaTest, UsedColorSchemeRootScrollbarsDark) { … }
TEST_P(PaintLayerScrollableAreaTest,
UsedColorSchemeRootScrollbarsMetaLightDark) { … }
TEST_P(PaintLayerScrollableAreaTest, UsedColorSchemeRootScrollbarsHtmlLight) { … }
TEST_P(PaintLayerScrollableAreaTest, UsedColorSchemeRootScrollbarsBodyLight) { … }
TEST_P(PaintLayerScrollableAreaTest,
UsedColorSchemeRootScrollbarsInvalidateOnPreferredColorSchemeChange) { … }
TEST_P(PaintLayerScrollableAreaTest,
UsedColorSchemeRootScrollbarsInvalidateOnNormalToLightChange) { … }
TEST_P(PaintLayerScrollableAreaTest,
UsedColorSchemeRootScrollbarsInvalidateOnLightToNormalChange) { … }
TEST_P(PaintLayerScrollableAreaTest,
UsedColorSchemeRootScrollbarsUseCounterUpdated) { … }
TEST_P(PaintLayerScrollableAreaTest,
NotScrollsOverflowWithScrollableScrollbar) { … }
TEST_P(PaintLayerScrollableAreaTest,
ScrollbarGutterBothEdgesWithHorizontalScrollbar) { … }
TEST_P(PaintLayerScrollableAreaTest,
ScrollbarGutterBothEdgesWithVerticalScrollbars) { … }
TEST_P(PaintLayerScrollableAreaTest,
ScrollbarGutterBothEdgesWithBothScrollbars) { … }
TEST_P(PaintLayerScrollableAreaTest,
ScrollbarGutterBothEdgesOverflowIntoGutter) { … }
TEST_P(PaintLayerScrollableAreaTest,
ScrollbarGutterBothEdgesRtlWithHorizontalScrollbar) { … }
TEST_P(PaintLayerScrollableAreaTest,
ScrollbarGutterBothEdgesRtlWithVerticalScrollbar) { … }
TEST_P(PaintLayerScrollableAreaTest,
ScrollbarGutterBothEdgesRtlWithBothScrollbars) { … }
class PaintLayerScrollableAreaWithWebFrameTest : public ::testing::Test { … };
TEST_F(PaintLayerScrollableAreaWithWebFrameTest,
UpdateShouldAnimateScrollOnMainThread) { … }
}