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

Side by Side Diff: third_party/WebKit/Source/core/dom/Range.cpp

Issue 2880273002: Remove Range::TextQuads() and instead use ComputeTextQuads. (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
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no) 3 * (C) 2000 Gunnstein Lye (gunnstein@netcom.no)
4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no) 4 * (C) 2000 Frederik Holljen (frederik.holljen@hig.no)
5 * (C) 2001 Peter Kelly (pmk@post.com) 5 * (C) 2001 Peter Kelly (pmk@post.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All
7 * rights reserved. 7 * rights reserved.
8 * Copyright (C) 2011 Motorola Mobility. All rights reserved. 8 * Copyright (C) 2011 Motorola Mobility. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after
1441 } 1441 }
1442 1442
1443 IntRect Range::BoundingBox() const { 1443 IntRect Range::BoundingBox() const {
1444 IntRect result; 1444 IntRect result;
1445 const Vector<IntRect>& rects = ComputeTextRects(EphemeralRange(this)); 1445 const Vector<IntRect>& rects = ComputeTextRects(EphemeralRange(this));
1446 for (const IntRect& rect : rects) 1446 for (const IntRect& rect : rects)
1447 result.Unite(rect); 1447 result.Unite(rect);
1448 return result; 1448 return result;
1449 } 1449 }
1450 1450
1451 // TODO(tanvir.rizvi): We will replace Range::TextQuads with
1452 // ComputeTextQuads(in VisibleUnits) and get rid of Range::TextQuads.
1453 void Range::TextQuads(Vector<FloatQuad>& quads) const {
1454 quads.AppendVector(ComputeTextQuads(EphemeralRange(this)));
1455 }
1456
1457 bool AreRangesEqual(const Range* a, const Range* b) { 1451 bool AreRangesEqual(const Range* a, const Range* b) {
1458 if (a == b) 1452 if (a == b)
1459 return true; 1453 return true;
1460 if (!a || !b) 1454 if (!a || !b)
1461 return false; 1455 return false;
1462 return a->StartPosition() == b->StartPosition() && 1456 return a->StartPosition() == b->StartPosition() &&
1463 a->EndPosition() == b->EndPosition(); 1457 a->EndPosition() == b->EndPosition();
1464 } 1458 }
1465 1459
1466 static inline void BoundaryNodeChildrenWillBeRemoved( 1460 static inline void BoundaryNodeChildrenWillBeRemoved(
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 .data() 1774 .data()
1781 << "start offset: " << range->startOffset() 1775 << "start offset: " << range->startOffset()
1782 << ", end offset: " << range->endOffset(); 1776 << ", end offset: " << range->endOffset();
1783 } else { 1777 } else {
1784 LOG(INFO) << "Cannot show tree if range is null, or if boundary points are " 1778 LOG(INFO) << "Cannot show tree if range is null, or if boundary points are "
1785 "invalid."; 1779 "invalid.";
1786 } 1780 }
1787 } 1781 }
1788 1782
1789 #endif 1783 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Range.h ('k') | third_party/WebKit/Source/core/dom/RangeTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698