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

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

Issue 2775663008: LayoutObject::absoluteBoundingBoxRectForRange() should take EphemeralRange (Closed)
Patch Set: Addressed Review comments Created 3 years, 9 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 77a4e3d57718b037499ec70e144e0487df158d69..f55786d5c01c48a69fc7a9653fc5bc1f625d0f1c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -1005,14 +1005,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.document().updateStyleAndLayout();
Vector<FloatQuad> quads;
- range->textQuads(quads);
+ textQuads(quads, range);
FloatRect result;
for (size_t i = 0; i < quads.size(); ++i)

Powered by Google App Engine
This is Rietveld 408576698