Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Unified Diff: third_party/WebKit/Source/core/layout/LayoutObject.cpp

Issue 2904833002: LayoutObject::AbsoluteBoundingBoxRectForRange() should take EphemeralRange (Closed)
Patch Set: updaredPatch Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutObject.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutObject.cpp b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
index 341781f746caf16be76b722d4e73e32c6d572f76..6398bcd75b9ab8afd72e06ab31abac7bc1fa9b43 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -994,14 +994,15 @@ IntRect LayoutObject::AbsoluteElementBoundingBoxRect() const {
.EnclosingBoundingBox();
}
-FloatRect LayoutObject::AbsoluteBoundingBoxRectForRange(const Range* range) {
- if (!range || !range->startContainer())
+FloatRect LayoutObject::AbsoluteBoundingBoxRectForRange(
+ const EphemeralRange& range) {
+ if (range.IsNull() || !range.StartPosition().ComputeContainerNode())
return FloatRect();
- range->OwnerDocument().UpdateStyleAndLayout();
+ range.GetDocument().UpdateStyleAndLayout();
Vector<FloatQuad> quads;
- quads.AppendVector(ComputeTextQuads(EphemeralRange(range)));
+ quads.AppendVector(ComputeTextQuads(range));
FloatRect result;
for (size_t i = 0; i < quads.size(); ++i)

Powered by Google App Engine
This is Rietveld 408576698