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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/core/editing/VisibleUnits.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
3 * reserved. 3 * reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 4127 matching lines...) Expand 10 before | Expand all | Expand 10 after
4138 node == start_container ? start_position.OffsetInContainerNode() : 0; 4138 node == start_container ? start_position.OffsetInContainerNode() : 0;
4139 unsigned end_offset = node == end_container 4139 unsigned end_offset = node == end_container
4140 ? end_position.OffsetInContainerNode() 4140 ? end_position.OffsetInContainerNode()
4141 : std::numeric_limits<unsigned>::max(); 4141 : std::numeric_limits<unsigned>::max();
4142 CollectAbsoluteBoundsForRange(start_offset, end_offset, *layout_text, 4142 CollectAbsoluteBoundsForRange(start_offset, end_offset, *layout_text,
4143 result); 4143 result);
4144 } 4144 }
4145 return result; 4145 return result;
4146 } 4146 }
4147 4147
4148 Vector<IntRect> ComputeTextRects(const EphemeralRange& range) { 4148 IntRect ComputeTextRect(const EphemeralRange& range) {
4149 return ComputeTextBounds<IntRect>(range); 4149 IntRect result;
4150 const Vector<IntRect>& rects = ComputeTextBounds<IntRect>(range);
4151 for (const IntRect& rect : rects)
4152 result.Unite(rect);
4153 return result;
4150 } 4154 }
4151 4155
4152 Vector<FloatQuad> ComputeTextQuads(const EphemeralRange& range) { 4156 Vector<FloatQuad> ComputeTextQuads(const EphemeralRange& range) {
4153 return ComputeTextBounds<FloatQuad>(range); 4157 return ComputeTextBounds<FloatQuad>(range);
4154 } 4158 }
4155 4159
4156 } // namespace blink 4160 } // namespace blink
OLDNEW
« 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