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

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

Issue 2775663008: LayoutObject::absoluteBoundingBoxRectForRange() should take EphemeralRange (Closed)
Patch Set: Y 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 f1a02b92ae994f4d8b3b39d222de81e8fa5572c3..6343ec972428d4a12b81550a5800ee7ea4aa2465 100644
--- a/third_party/WebKit/Source/core/layout/LayoutObject.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutObject.cpp
@@ -993,14 +993,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);
+ textQuad(quads, range);
Xiaocheng 2017/03/28 21:29:34 Let's make textQuad return |Vector<FloatQuad>| dir
tanvir 2017/03/30 19:11:06 Done.
FloatRect result;
for (size_t i = 0; i < quads.size(); ++i)

Powered by Google App Engine
This is Rietveld 408576698