Commit 1c59d5c2 authored by Kent Tamura's avatar Kent Tamura Committed by Commit Bot

Remove physical_rect.h from node.h

This CL reduces estimated pre-processed size of node.h from 2.89MB
to 2.17 MB.

Bug: 242216
Change-Id: I28936b13071364293b86b7692efc2bfca202911e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1772778
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Auto-Submit: Kent Tamura <tkent@chromium.org>
Reviewed-by: default avatarChristian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#691032}
parent ca844c0d
...@@ -120,6 +120,7 @@ class DocumentState; ...@@ -120,6 +120,7 @@ class DocumentState;
class DocumentTimeline; class DocumentTimeline;
class DocumentType; class DocumentType;
class DOMFeaturePolicy; class DOMFeaturePolicy;
class DoubleSize;
class Element; class Element;
class ElementDataCache; class ElementDataCache;
class ElementRegistrationOptions; class ElementRegistrationOptions;
......
...@@ -1065,6 +1065,10 @@ PhysicalRect Node::BoundingBox() const { ...@@ -1065,6 +1065,10 @@ PhysicalRect Node::BoundingBox() const {
return PhysicalRect(); return PhysicalRect();
} }
IntRect Node::PixelSnappedBoundingBox() const {
return PixelSnappedIntRect(BoundingBox());
}
PhysicalRect Node::BoundingBoxForScrollIntoView() const { PhysicalRect Node::BoundingBoxForScrollIntoView() const {
if (GetLayoutObject()) { if (GetLayoutObject()) {
return GetLayoutObject()->AbsoluteBoundingBoxRectForScrollIntoView(); return GetLayoutObject()->AbsoluteBoundingBoxRectForScrollIntoView();
......
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
#include "third_party/blink/renderer/core/dom/mutation_observer_options.h" #include "third_party/blink/renderer/core/dom/mutation_observer_options.h"
#include "third_party/blink/renderer/core/dom/node_rare_data.h" #include "third_party/blink/renderer/core/dom/node_rare_data.h"
#include "third_party/blink/renderer/core/dom/tree_scope.h" #include "third_party/blink/renderer/core/dom/tree_scope.h"
#include "third_party/blink/renderer/core/layout/geometry/physical_rect.h"
#include "third_party/blink/renderer/core/scroll/scroll_customization.h" #include "third_party/blink/renderer/core/scroll/scroll_customization.h"
#include "third_party/blink/renderer/core/style/computed_style_constants.h" #include "third_party/blink/renderer/core/style/computed_style_constants.h"
...@@ -78,6 +77,7 @@ class StringOrTrustedScript; ...@@ -78,6 +77,7 @@ class StringOrTrustedScript;
class StyleChangeReasonForTracing; class StyleChangeReasonForTracing;
class V8ScrollStateCallback; class V8ScrollStateCallback;
class WebPluginContainerImpl; class WebPluginContainerImpl;
struct PhysicalRect;
const int kNodeStyleChangeShift = 18; const int kNodeStyleChangeShift = 18;
const int kNodeCustomElementShift = 20; const int kNodeCustomElementShift = 20;
...@@ -581,9 +581,7 @@ class CORE_EXPORT Node : public EventTarget { ...@@ -581,9 +581,7 @@ class CORE_EXPORT Node : public EventTarget {
bool IsInert() const; bool IsInert() const;
virtual PhysicalRect BoundingBox() const; virtual PhysicalRect BoundingBox() const;
IntRect PixelSnappedBoundingBox() const { IntRect PixelSnappedBoundingBox() const;
return PixelSnappedIntRect(BoundingBox());
}
// BoundingBoxForScrollIntoView() is the node's scroll snap area. // BoundingBoxForScrollIntoView() is the node's scroll snap area.
// It is expanded from the BoundingBox() by scroll-margin. // It is expanded from the BoundingBox() by scroll-margin.
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_CUSTOM_CUSTOM_LAYOUT_EDGES_H_ #ifndef THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_CUSTOM_CUSTOM_LAYOUT_EDGES_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_CUSTOM_CUSTOM_LAYOUT_EDGES_H_ #define THIRD_PARTY_BLINK_RENDERER_CORE_LAYOUT_NG_CUSTOM_CUSTOM_LAYOUT_EDGES_H_
#include "third_party/blink/renderer/core/layout/ng/geometry/ng_box_strut.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h" #include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/geometry/layout_unit.h" #include "third_party/blink/renderer/platform/geometry/layout_unit.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment