chromium/third_party/blink/renderer/core/paint/paint_property_tree_update_tests.cc

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cc/input/scroll_snap_data.h"
#include "third_party/blink/renderer/core/animation/animation_clock.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/visual_viewport.h"
#include "third_party/blink/renderer/core/html/forms/html_select_element.h"
#include "third_party/blink/renderer/core/html/html_iframe_element.h"
#include "third_party/blink/renderer/core/layout/ink_overflow.h"
#include "third_party/blink/renderer/core/page/focus_controller.h"
#include "third_party/blink/renderer/core/page/page_animator.h"
#include "third_party/blink/renderer/core/paint/paint_property_tree_builder_test.h"
#include "third_party/blink/renderer/core/paint/paint_property_tree_printer.h"
#include "third_party/blink/renderer/core/svg_names.h"
#include "third_party/blink/renderer/platform/graphics/compositing/paint_artifact_compositor.h"
#include "third_party/blink/renderer/platform/graphics/paint/geometry_mapper.h"

namespace blink {

// Tests covering incremental updates of paint property trees.
class PaintPropertyTreeUpdateTest : public PaintPropertyTreeBuilderTest {};

INSTANTIATE_TEST_SUITE_P();

TEST_P(PaintPropertyTreeUpdateTest,
       BackgroundAttachmentFixedMainThreadScrollReasonsWithNestedScrollers) {}

TEST_P(PaintPropertyTreeUpdateTest, ParentFrameMainThreadScrollReasons) {}

TEST_P(PaintPropertyTreeUpdateTest, ChildFrameMainThreadScrollReasons) {}

TEST_P(PaintPropertyTreeUpdateTest,
       BackgroundAttachmentFixedMainThreadScrollReasonsWithFixedScroller) {}

TEST_P(PaintPropertyTreeUpdateTest, DescendantNeedsUpdateAcrossFrames) {}

TEST_P(PaintPropertyTreeUpdateTest, UpdatingFrameViewContentClip) {}

// There is also FrameThrottlingTest.UpdatePaintPropertiesOnUnthrottling
// testing with real frame viewport intersection observer. This one tests
// paint property update with or without AllowThrottlingScope.
TEST_P(PaintPropertyTreeUpdateTest, BuildingStopsAtThrottledFrames) {}

TEST_P(PaintPropertyTreeUpdateTest, ClipChangesUpdateOverflowClip) {}

TEST_P(PaintPropertyTreeUpdateTest, ContainPaintChangesUpdateOverflowClip) {}

// A basic sanity check for over-invalidation of paint properties.
TEST_P(PaintPropertyTreeUpdateTest, NoPaintPropertyUpdateOnBackgroundChange) {}

// Disabled due to stale scrollsOverflow values, see: https://crbug.com/675296.
TEST_P(PaintPropertyTreeUpdateTest,
       DISABLED_FrameVisibilityChangeUpdatesProperties) {}

TEST_P(PaintPropertyTreeUpdateTest,
       TransformNodeWithAnimationLosesNodeWhenAnimationRemoved) {}

TEST_P(PaintPropertyTreeUpdateTest,
       EffectNodeWithAnimationLosesNodeWhenAnimationRemoved) {}

TEST_P(PaintPropertyTreeUpdateTest,
       TransformNodeDoesNotLoseCompositorElementIdWhenAnimationRemoved) {}

TEST_P(PaintPropertyTreeUpdateTest,
       EffectNodeDoesNotLoseCompositorElementIdWhenAnimationRemoved) {}

TEST_P(PaintPropertyTreeUpdateTest, PerspectiveOriginUpdatesOnSizeChanges) {}

TEST_P(PaintPropertyTreeUpdateTest, TransformUpdatesOnRelativeLengthChanges) {}

TEST_P(PaintPropertyTreeUpdateTest, CSSClipDependingOnSize) {}

TEST_P(PaintPropertyTreeUpdateTest, ScrollBoundsChange) {}

// The scrollbars are attached to the visual viewport but created by (and have
// space saved by) the frame view. Conceptually, the scrollbars are part of the
// scrollable content so they must be included in the contents rect. They must
// also not be excluded from the container rect since they don't take away space
// from the viewport's viewable area.
TEST_P(PaintPropertyTreeUpdateTest,
       ViewportContentsAndContainerRectsIncludeScrollbar) {}

TEST_P(PaintPropertyTreeUpdateTest, ViewportAddRemoveDeviceEmulationNode) {}

TEST_P(PaintPropertyTreeUpdateTest, ScrollbarWidthChange) {}

TEST_P(PaintPropertyTreeUpdateTest, Preserve3DChange) {}

TEST_P(PaintPropertyTreeUpdateTest, MenuListControlClipChange) {}

TEST_P(PaintPropertyTreeUpdateTest, BoxAddRemoveMask) {}

TEST_P(PaintPropertyTreeUpdateTest, MaskClipNodeBoxSizeChange) {}

TEST_P(PaintPropertyTreeUpdateTest, InlineAddRemoveMask) {}

TEST_P(PaintPropertyTreeUpdateTest, MaskClipNodeInlineBoundsChange) {}

TEST_P(PaintPropertyTreeUpdateTest, AddRemoveSVGMask) {}

TEST_P(PaintPropertyTreeUpdateTest, SVGMaskTargetBoundsChange) {}

TEST_P(PaintPropertyTreeUpdateTest, WillTransformChangeAboveFixed) {}

TEST_P(PaintPropertyTreeUpdateTest, CompositingReasonForAnimation) {}

TEST_P(PaintPropertyTreeUpdateTest, SVGViewportContainerOverflowChange) {}

TEST_P(PaintPropertyTreeUpdateTest, SVGForeignObjectOverflowChange) {}

TEST_P(PaintPropertyTreeUpdateTest,
       PropertyTreesRebuiltAfterSVGBlendModeChange) {}

TEST_P(PaintPropertyTreeUpdateTest, EnsureSnapContainerData) {}

TEST_P(PaintPropertyTreeUpdateTest,
       EffectAndClipWithNonContainedOutOfFlowDescendant) {}

TEST_P(PaintPropertyTreeUpdateTest, ForwardReferencedSVGElementUpdate) {}

TEST_P(PaintPropertyTreeUpdateTest, OverflowClipUpdateForImage) {}

TEST_P(PaintPropertyTreeUpdateTest, OverflowClipUpdateForVideo) {}

TEST_P(PaintPropertyTreeUpdateTest, OverflowClipWithBorderRadiusForVideo) {}

TEST_P(PaintPropertyTreeUpdateTest, ChangingClipPath) {}

TEST_P(PaintPropertyTreeUpdateTest, SubpixelAccumulationAcrossIsolation) {}

TEST_P(PaintPropertyTreeUpdateTest, ChangeDuringAnimation) {}

TEST_P(PaintPropertyTreeUpdateTest, BackfaceVisibilityInvalidatesProperties) {}

TEST_P(PaintPropertyTreeUpdateTest, FixedPositionCompositing) {}

TEST_P(PaintPropertyTreeUpdateTest, InlineFilterReferenceBoxChange) {}

TEST_P(PaintPropertyTreeUpdateTest, StartSVGAnimation) {}

TEST_P(PaintPropertyTreeUpdateTest, ScrollNonStackingContextContainingStacked) {}

TEST_P(PaintPropertyTreeUpdateTest, ScrollOriginChange) {}

// A test case for http://crbug.com/1187815.
TEST_P(PaintPropertyTreeUpdateTest, IFrameContainStrictChangeBorderTopWidth) {}

TEST_P(PaintPropertyTreeUpdateTest, LocalBorderBoxPropertiesChange) {}

// Test that, for simple transform updates with an existing blink transform
// node, we can go from style change to updated blink transform node without
// running the blink property tree builder.
TEST_P(PaintPropertyTreeUpdateTest,
       DirectTransformUpdateSkipsPropertyTreeBuilder) {}

TEST_P(PaintPropertyTreeUpdateTest, ChangeMaskOutputClip) {}

TEST_P(PaintPropertyTreeUpdateTest,
       DirectOpacityUpdateSkipsPropertyTreeBuilder) {}

TEST_P(PaintPropertyTreeUpdateTest,
       DirectOpacityAndTransformUpdatesBothExecuted) {}

TEST_P(PaintPropertyTreeUpdateTest,
       DirectTransformUpdateSkipsPropertyTreeBuilderForAncestors) {}

TEST_P(PaintPropertyTreeUpdateTest, BackdropFilterBounds) {}

TEST_P(PaintPropertyTreeUpdateTest, UpdatesInLockedDisplayHandledCorrectly) {}

TEST_P(PaintPropertyTreeUpdateTest, AnchorPositioningScrollUpdate) {}

TEST_P(PaintPropertyTreeUpdateTest, ElementCaptureUpdate) {}

}  // namespace blink