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

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

Issue 2902053003: Refactor LayoutText::AbsoluteQuadsForRange()
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 | « 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/layout/LayoutText.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp
index 2908f01f8b76e703da0e447954512628f7bee342..7e8198a9094092a2d28e0c58b338e2dc71e1686c 100644
--- a/third_party/WebKit/Source/core/layout/LayoutText.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp
@@ -489,19 +489,13 @@ void LayoutText::AbsoluteQuadsForRange(Vector<FloatQuad>& quads,
// past it
if (start <= box->Start() && box->end() < end) {
LayoutRect r(box->FrameRect());
- if (!has_checked_box_in_range) {
- has_checked_box_in_range = true;
- quads.clear();
- }
+ has_checked_box_in_range = true;
quads.push_back(LocalToAbsoluteQuad(FloatRect(r)));
} else if ((box->Start() <= start && start <= box->end()) ||
(box->Start() < end && end <= box->end())) {
FloatRect rect = LocalQuadForTextBox(box, start, end);
if (!rect.IsZero()) {
- if (!has_checked_box_in_range) {
- has_checked_box_in_range = true;
- quads.clear();
- }
+ has_checked_box_in_range = true;
quads.push_back(LocalToAbsoluteQuad(rect));
}
} else if (!has_checked_box_in_range) {
« 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