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

Unified Diff: third_party/WebKit/Source/core/dom/Range.cpp

Issue 2827603006: Move ComputeTextRects before Range::BoundingBox() (Closed)
Patch Set: Review comments Addressed. Created 3 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Range.cpp
diff --git a/third_party/WebKit/Source/core/dom/Range.cpp b/third_party/WebKit/Source/core/dom/Range.cpp
index a34467ca556c983820440502773e6e3a72ab2688..7fbab73bbb2c8084c246ca3970544cc81f888dad 100644
--- a/third_party/WebKit/Source/core/dom/Range.cpp
+++ b/third_party/WebKit/Source/core/dom/Range.cpp
@@ -1440,18 +1440,6 @@ Node* Range::PastLastNode() const {
return EndPosition().NodeAsRangePastLastNode();
}
-// TODO(hs1217.lee):: we should move this implement to VisibleUnits and then
-// this function will remove.
-static Vector<IntRect> computeTextRects(const EphemeralRange&);
-
-IntRect Range::BoundingBox() const {
- IntRect result;
- const Vector<IntRect>& rects = computeTextRects(EphemeralRange(this));
- for (const IntRect& rect : rects)
- result.Unite(rect);
- return result;
-}
-
static Vector<IntRect> computeTextRects(const EphemeralRange& range) {
const Position& start_position = range.StartPosition();
const Position& end_position = range.EndPosition();
@@ -1476,6 +1464,14 @@ static Vector<IntRect> computeTextRects(const EphemeralRange& range) {
return rects;
}
+IntRect Range::BoundingBox() const {
+ IntRect result;
+ const Vector<IntRect>& rects = computeTextRects(EphemeralRange(this));
+ for (const IntRect& rect : rects)
+ result.Unite(rect);
+ return result;
+}
+
void Range::TextQuads(Vector<FloatQuad>& quads,
bool use_selection_height) const {
Node* start_container = &start_.Container();
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698