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

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

Issue 2853343003: Remove use_selection_height from LayoutText::AbsoluteQuadsForRange (Closed)
Patch Set: 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 | « third_party/WebKit/Source/core/layout/LayoutText.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/layout/LayoutText.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutText.cpp b/third_party/WebKit/Source/core/layout/LayoutText.cpp
index ca9647b0cbf9d4ccd0fe27939ad72f3b4707baff..52c55b12567bee58edd59858368a11b07255d004 100644
--- a/third_party/WebKit/Source/core/layout/LayoutText.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutText.cpp
@@ -485,8 +485,7 @@ void LayoutText::AbsoluteQuads(Vector<FloatQuad>& quads,
void LayoutText::AbsoluteQuadsForRange(Vector<FloatQuad>& quads,
unsigned start,
- unsigned end,
- bool use_selection_height) const {
+ unsigned end) const {
// Work around signed/unsigned issues. This function takes unsigneds, and is
// often passed UINT_MAX to mean "all the way to the end". InlineTextBox
// coordinates are unsigneds, so changing this function to take ints causes
@@ -517,16 +516,6 @@ void LayoutText::AbsoluteQuadsForRange(Vector<FloatQuad>& quads,
// past it
if (start <= box->Start() && box->end() < end) {
LayoutRect r(box->FrameRect());
- if (use_selection_height) {
- LayoutRect selection_rect = box->LocalSelectionRect(start, end);
- if (box->IsHorizontal()) {
- r.SetHeight(selection_rect.Height());
- r.SetY(selection_rect.Y());
- } else {
- r.SetWidth(selection_rect.Width());
- r.SetX(selection_rect.X());
- }
- }
if (!has_checked_box_in_range) {
has_checked_box_in_range = true;
quads.clear();
@@ -534,8 +523,7 @@ void LayoutText::AbsoluteQuadsForRange(Vector<FloatQuad>& quads,
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, use_selection_height);
+ FloatRect rect = LocalQuadForTextBox(box, start, end, false);
if (!rect.IsZero()) {
if (!has_checked_box_in_range) {
has_checked_box_in_range = true;
@@ -546,8 +534,7 @@ void LayoutText::AbsoluteQuadsForRange(Vector<FloatQuad>& quads,
} else if (!has_checked_box_in_range) {
// consider when the offset of range is area of leading or trailing
// whitespace
- FloatRect rect =
- LocalQuadForTextBox(box, start, end, use_selection_height);
+ FloatRect rect = LocalQuadForTextBox(box, start, end, false);
Xiaocheng 2017/05/03 14:51:17 Please also remove the parameter from LocalQuadFor
if (!rect.IsZero())
quads.push_back(LocalToAbsoluteQuad(rect).EnclosingBoundingBox());
}
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutText.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698