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

Unified Diff: third_party/WebKit/Source/core/editing/VisibleUnits.cpp

Issue 2891273003: Make VisibleUnits::ComputeTextRect() return unified IntRect (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleUnits.h ('k') | 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/editing/VisibleUnits.cpp
diff --git a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
index f953a2630b0faab92dc3a4259336e58aded96745..741375b47c535b1f2880fc0fb749292b79ad4294 100644
--- a/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
+++ b/third_party/WebKit/Source/core/editing/VisibleUnits.cpp
@@ -4145,8 +4145,12 @@ static Vector<RectType> ComputeTextBounds(const EphemeralRange& range) {
return result;
}
-Vector<IntRect> ComputeTextRects(const EphemeralRange& range) {
- return ComputeTextBounds<IntRect>(range);
+IntRect ComputeTextRect(const EphemeralRange& range) {
+ IntRect result;
+ const Vector<IntRect>& rects = ComputeTextBounds<IntRect>(range);
+ for (const IntRect& rect : rects)
+ result.Unite(rect);
+ return result;
}
Vector<FloatQuad> ComputeTextQuads(const EphemeralRange& range) {
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleUnits.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698