chromium/third_party/blink/renderer/core/layout/layout_object_test.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/351564777): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "third_party/blink/renderer/core/layout/layout_object.h"

#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
#include "third_party/blink/renderer/core/css/resolver/style_resolver.h"
#include "third_party/blink/renderer/core/css/style_sheet_contents.h"
#include "third_party/blink/renderer/core/dom/dom_token_list.h"
#include "third_party/blink/renderer/core/frame/event_handler_registry.h"
#include "third_party/blink/renderer/core/frame/local_frame_view.h"
#include "third_party/blink/renderer/core/html/html_frame_owner_element.h"
#include "third_party/blink/renderer/core/html/html_style_element.h"
#include "third_party/blink/renderer/core/layout/layout_object_inlines.h"
#include "third_party/blink/renderer/core/layout/layout_text_fragment.h"
#include "third_party/blink/renderer/core/layout/layout_view.h"
#include "third_party/blink/renderer/core/loader/resource/image_resource_content.h"
#include "third_party/blink/renderer/core/svg/svg_g_element.h"
#include "third_party/blink/renderer/core/testing/core_unit_test_helper.h"
#include "third_party/blink/renderer/core/testing/sim/sim_request.h"
#include "third_party/blink/renderer/core/testing/sim/sim_test.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/json/json_values.h"
#include "ui/gfx/geometry/decomposed_transform.h"

namespace blink {

Return;
MatchesRegex;

class LayoutObjectTest : public RenderingTest {};

class LayoutObjectTestWithCompositing : public LayoutObjectTest {};

template <bool should_have_wrapper>
void LayoutObjectTest::ExpectAnonymousInlineWrapperFor(Node* node) {}

TEST_F(LayoutObjectTest, CommonAncestor) {}

TEST_F(LayoutObjectTest, LayoutDecoratedNameCalledWithPositionedObject) {}

// Some display checks.
TEST_F(LayoutObjectTest, DisplayNoneCreateObject) {}

TEST_F(LayoutObjectTest, DisplayBlockCreateObject) {}

TEST_F(LayoutObjectTest, DisplayInlineBlockCreateObject) {}

TEST_F(LayoutObjectTest, BackdropFilterAsGroupingProperty) {}

TEST_F(LayoutObjectTest, BlendModeAsGroupingProperty) {}

TEST_F(LayoutObjectTest, CSSClipAsGroupingProperty) {}

TEST_F(LayoutObjectTest, ClipPathAsGroupingProperty) {}

TEST_F(LayoutObjectTest, IsolationAsGroupingProperty) {}

TEST_F(LayoutObjectTest, MaskAsGroupingProperty) {}

TEST_F(LayoutObjectTest, UseCountContainWithoutContentVisibility) {}

// Containing block test.
TEST_F(LayoutObjectTest, ContainingBlockLayoutViewShouldBeNull) {}

TEST_F(LayoutObjectTest, ContainingBlockBodyShouldBeDocumentElement) {}

TEST_F(LayoutObjectTest, ContainingBlockDocumentElementShouldBeLayoutView) {}

TEST_F(LayoutObjectTest, ContainingBlockStaticLayoutObjectShouldBeParent) {}

TEST_F(LayoutObjectTest,
       ContainingBlockAbsoluteLayoutObjectShouldBeLayoutView) {}

TEST_F(
    LayoutObjectTest,
    ContainingBlockAbsoluteLayoutObjectShouldBeNonStaticallyPositionedBlockAncestor) {}

TEST_F(LayoutObjectTest, ContainingBlockFixedPosUnderFlattened3D) {}

TEST_F(LayoutObjectTest, ContainingBlockFixedLayoutObjectInTransformedDiv) {}

TEST_F(LayoutObjectTest, ContainingBlockFixedLayoutObjectInBody) {}

TEST_F(LayoutObjectTest, ContainingBlockAbsoluteLayoutObjectInBody) {}

TEST_F(
    LayoutObjectTest,
    ContainingBlockAbsoluteLayoutObjectShouldNotBeNonStaticallyPositionedInlineAncestor) {}

TEST_F(LayoutObjectTest, PaintingLayerOfOverflowClipLayerUnderColumnSpanAll) {}

TEST_F(LayoutObjectTest, FloatUnderBlock) {}

TEST_F(LayoutObjectTest, InlineFloatMismatch) {}

TEST_F(LayoutObjectTest, FloatUnderInline) {}

TEST_F(LayoutObjectTest, MutableForPaintingClearPaintFlags) {}

TEST_F(LayoutObjectTest, DelayFullPaintInvalidation) {}

TEST_F(LayoutObjectTest, SubtreeAndDelayFullPaintInvalidation) {}

TEST_F(LayoutObjectTest, SubtreePaintPropertyUpdateReasons) {}

TEST_F(LayoutObjectTest, ShouldCheckLayoutForPaintInvalidation) {}

TEST_F(LayoutObjectTest, AssociatedLayoutObjectOfFirstLetterPunctuations) {}

TEST_F(LayoutObjectTest, AssociatedLayoutObjectOfFirstLetterSplit) {}

TEST_F(LayoutObjectTest,
       AssociatedLayoutObjectOfFirstLetterWithTrailingWhitespace) {}

TEST_F(LayoutObjectTest, VisualRect) {}

TEST_F(LayoutObjectTest, DisplayContentsInlineWrapper) {}

TEST_F(LayoutObjectTest, DisplayContentsNoInlineWrapper) {}

TEST_F(LayoutObjectTest, DisplayContentsAddInlineWrapper) {}

TEST_F(LayoutObjectTest, DisplayContentsRemoveInlineWrapper) {}

TEST_F(LayoutObjectTest, DisplayContentsWrapperPerTextNode) {}

TEST_F(LayoutObjectTest, DisplayContentsWrapperInTable) {}

TEST_F(LayoutObjectTest, DisplayContentsWrapperInTableSection) {}

TEST_F(LayoutObjectTest, DisplayContentsWrapperInTableRow) {}

TEST_F(LayoutObjectTest, DisplayContentsWrapperInTableCell) {}

#if DCHECK_IS_ON()
TEST_F(LayoutObjectTest, DumpLayoutObject) {}
#endif  // DCHECK_IS_ON()

TEST_F(LayoutObjectTest, DisplayContentsSVGGElementInHTML) {}

TEST_F(LayoutObjectTest, HasDistortingVisualEffects) {}

TEST_F(LayoutObjectTest, DistortingVisualEffectsUnaliases) {}

TEST_F(LayoutObjectTest, UpdateVisualRectAfterAncestorLayout) {}

class LayoutObjectSimTest : public SimTest {};

TEST_F(LayoutObjectSimTest, TouchActionUpdatesSubframeEventHandler) {}

TEST_F(LayoutObjectSimTest, HitTestForOcclusionInIframe) {}

TEST_F(LayoutObjectSimTest, FirstLineBackgroundImage) {}

TEST_F(LayoutObjectTest, FirstLineBackgroundImageNestedCrash) {}

TEST_F(LayoutObjectTest, FirstLineBackgroundImageAddBlockBackgroundImageCrash) {}

TEST_F(LayoutObjectTest, FirstLineBackgroundImageChangeStyleCrash) {}

TEST_F(LayoutObjectSimTest, FirstLineBackgroundImageDirtyStyleCrash) {}

TEST_F(LayoutObjectTest, NeedsScrollableOverflowRecalc) {}

TEST_F(LayoutObjectTest, ContainValueIsRelayoutBoundary) {}

TEST_F(LayoutObjectTest, PerspectiveIsNotParent) {}

TEST_F(LayoutObjectTest, PerspectiveWithAnonymousTable) {}

TEST_F(LayoutObjectTest, LocalToAncestoRectIgnoreAncestorScroll) {}

TEST_F(LayoutObjectTest, LocalToAncestoRectViewIgnoreAncestorScroll) {}

TEST_F(LayoutObjectTest,
       LocalToAncestoRectIgnoreAncestorScrollIntermediateScroller) {}

TEST_F(LayoutObjectTest,
       LocalToAncestoRectViewIgnoreAncestorScrollIntermediateScroller) {}

// crbug.com/1246619
TEST_F(LayoutObjectTest, SetNeedsCollectInlinesForSvgText) {}

// crbug.com/1247686
TEST_F(LayoutObjectTest, SetNeedsCollectInlinesForSvgInline) {}

TEST_F(LayoutObjectTest, RemovePendingTransformUpdatesCorrectly) {}

static const char* const kTransformsWith3D[] =;
static const char kTransformWithout3D[] =;
static const char kPreserve3D[] =;

TEST_F(LayoutObjectTestWithCompositing,
       UseCountDifferentPerspectiveCBOrParent) {}

TEST_F(LayoutObjectTest, HasTransformRelatedProperty) {}

TEST_F(LayoutObjectTest, ContainingScrollContainer) {}

}  // namespace blink