// Copyright 2023 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_GEOMETRY_INFINITE_INT_RECT_H_ #define THIRD_PARTY_BLINK_RENDERER_PLATFORM_GEOMETRY_INFINITE_INT_RECT_H_ #include <limits> #include "third_party/blink/renderer/platform/geometry/layout_unit.h" #include "ui/gfx/geometry/rect.h" namespace blink { // Returns a big enough rect that can contain all reasonable rendered results. // The rect can be used as a "non-clipping" clip rect. The rect can be // modified to clip at one or more sides, e.g. // gfx::Rect r = InfiniteIntRect(); // r.set_width(clip_right - r.x()); constexpr gfx::Rect InfiniteIntRect() { … } // See physical_rect_test.cc for tests. } // namespace blink #endif // THIRD_PARTY_BLINK_RENDERER_PLATFORM_GEOMETRY_INFINITE_INT_RECT_H_