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

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

Issue 2470233009: WTF/std normalization: replace WTF::Vector::first() with ::front() (Closed)
Patch Set: rebase Created 4 years 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 1668 matching lines...) Expand 10 before | Expand all | Expand 10 after
1679 1679
1680 Vector<FloatQuad> quads; 1680 Vector<FloatQuad> quads;
1681 getBorderAndTextQuads(quads); 1681 getBorderAndTextQuads(quads);
1682 1682
1683 FloatRect result; 1683 FloatRect result;
1684 for (const FloatQuad& quad : quads) 1684 for (const FloatQuad& quad : quads)
1685 result.unite(quad.boundingBox()); // Skips empty rects. 1685 result.unite(quad.boundingBox()); // Skips empty rects.
1686 1686
1687 // If all rects are empty, return the first rect. 1687 // If all rects are empty, return the first rect.
1688 if (result.isEmpty() && !quads.isEmpty()) 1688 if (result.isEmpty() && !quads.isEmpty())
1689 return quads.first().boundingBox(); 1689 return quads.front().boundingBox();
1690 1690
1691 return result; 1691 return result;
1692 } 1692 }
1693 1693
1694 DEFINE_TRACE(Range) { 1694 DEFINE_TRACE(Range) {
1695 visitor->trace(m_ownerDocument); 1695 visitor->trace(m_ownerDocument);
1696 visitor->trace(m_start); 1696 visitor->trace(m_start);
1697 visitor->trace(m_end); 1697 visitor->trace(m_end);
1698 } 1698 }
1699 1699
(...skipping 11 matching lines...) Expand all
1711 .data() 1711 .data()
1712 << "start offset: " << range->startOffset() 1712 << "start offset: " << range->startOffset()
1713 << ", end offset: " << range->endOffset(); 1713 << ", end offset: " << range->endOffset();
1714 } else { 1714 } else {
1715 LOG(INFO) << "Cannot show tree if range is null, or if boundary points are " 1715 LOG(INFO) << "Cannot show tree if range is null, or if boundary points are "
1716 "invalid."; 1716 "invalid.";
1717 } 1717 }
1718 } 1718 }
1719 1719
1720 #endif 1720 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/MutationObserver.cpp ('k') | third_party/WebKit/Source/core/dom/shadow/DistributedNodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698