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

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

#include "third_party/blink/renderer/core/paint/paint_and_raster_invalidation_test.h"

#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/loader/resource/image_resource_content.h"
#include "third_party/blink/renderer/core/svg_names.h"
#include "third_party/blink/renderer/platform/instrumentation/tracing/trace_event.h"
#include "third_party/blink/renderer/platform/testing/find_cc_layer.h"
#include "third_party/blink/renderer/platform/testing/runtime_enabled_features_test_helpers.h"

namespace blink {

MatchesRegex;
UnorderedElementsAre;
UnorderedElementsAreArray;

const RasterInvalidationTracking* GetRasterInvalidationTracking(
    const LocalFrameView& root_frame_view,
    wtf_size_t index,
    const String& name_regex) {}

void SetUpHTML(PaintAndRasterInvalidationTest& test) {}

INSTANTIATE_PAINT_TEST_SUITE_P();

class ScopedEnablePaintInvalidationTracing {};

TEST_P(PaintAndRasterInvalidationTest, TrackingForTracing) {}

TEST_P(PaintAndRasterInvalidationTest, IncrementalInvalidationExpand) {}

TEST_P(PaintAndRasterInvalidationTest, IncrementalInvalidationShrink) {}

TEST_P(PaintAndRasterInvalidationTest, IncrementalInvalidationMixed) {}

TEST_P(PaintAndRasterInvalidationTest, ResizeEmptyContent) {}

TEST_P(PaintAndRasterInvalidationTest, SubpixelChange) {}

TEST_P(PaintAndRasterInvalidationTest, SubpixelVisualRectChangeWithTransform) {}

TEST_P(PaintAndRasterInvalidationTest, SubpixelWithinPixelsChange) {}

TEST_P(PaintAndRasterInvalidationTest, ResizeRotated) {}

TEST_P(PaintAndRasterInvalidationTest, ResizeRotatedChild) {}

TEST_P(PaintAndRasterInvalidationTest, CompositedLayoutViewResize) {}

TEST_P(PaintAndRasterInvalidationTest, CompositedLayoutViewGradientResize) {}

TEST_P(PaintAndRasterInvalidationTest, NonCompositedLayoutViewResize) {}

TEST_P(PaintAndRasterInvalidationTest, FullInvalidationWithHTMLTransform) {}

TEST_P(PaintAndRasterInvalidationTest, NonCompositedLayoutViewGradientResize) {}

TEST_P(PaintAndRasterInvalidationTest,
       CompositedBackgroundAttachmentLocalResize) {}

TEST_P(PaintAndRasterInvalidationTest,
       CompositedBackgroundAttachmentLocalGradientResize) {}

TEST_P(PaintAndRasterInvalidationTest,
       NonCompositedBackgroundAttachmentLocalResize) {}

TEST_P(PaintAndRasterInvalidationTest, CompositedSolidBackgroundResize) {}

// Changing style in a way that changes overflow without layout should cause
// the layout view to possibly need a paint invalidation since we may have
// revealed additional background that can be scrolled into view.
TEST_P(PaintAndRasterInvalidationTest, RecalcOverflowInvalidatesBackground) {}

TEST_P(PaintAndRasterInvalidationTest, DelayedFullPaintInvalidation) {}

TEST_P(PaintAndRasterInvalidationTest, SVGHiddenContainer) {}

TEST_P(PaintAndRasterInvalidationTest, SVGWithFilterNoOpStyleUpdate) {}

TEST_P(PaintAndRasterInvalidationTest, PaintPropertyChange) {}

TEST_P(PaintAndRasterInvalidationTest, ResizeContainerOfFixedSizeSVG) {}

TEST_P(PaintAndRasterInvalidationTest, ScrollingInvalidatesStickyOffset) {}

TEST_P(PaintAndRasterInvalidationTest, NoDamageDueToFloatingPointError) {}

TEST_P(PaintAndRasterInvalidationTest, ResizeElementWhichHasNonCustomResizer) {}

TEST_P(PaintAndRasterInvalidationTest, VisibilityChange) {}

TEST_P(PaintAndRasterInvalidationTest,
       DelayedInvalidationImageChangedFromAnimatedToStatic) {}

TEST_P(PaintAndRasterInvalidationTest, RepaintScrollbarThumbOnHover) {}

// This tests an optimization for motionmark suits, where changing styles of
// elements with a clip path should not, by itself, require a full paint
// invalidation. For example, transform changes can skip paint invalidation.
TEST_P(PaintAndRasterInvalidationTest,
       StyleChangesWithClipPathDoNotInvalidate) {}

class PaintInvalidatorTestClient : public RenderingTestChromeClient {};

class PaintInvalidatorCustomClientTest : public RenderingTest {};

TEST_F(PaintInvalidatorCustomClientTest,
       NonCompositedInvalidationChangeOpacity) {}

TEST_F(PaintInvalidatorCustomClientTest,
       NoInvalidationRepeatedUpdateLifecyleExceptPaint) {}

}  // namespace blink