Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 r ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. |
| 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. | 7 * Copyright (C) 2011 Motorola Mobility. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 1512 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1523 Node* stopNode = pastLastNode(); | 1523 Node* stopNode = pastLastNode(); |
| 1524 | 1524 |
| 1525 HeapHashSet<Member<Node>> nodeSet; | 1525 HeapHashSet<Member<Node>> nodeSet; |
| 1526 for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next( *node)) { | 1526 for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next( *node)) { |
| 1527 if (node->isElementNode()) | 1527 if (node->isElementNode()) |
| 1528 nodeSet.add(node); | 1528 nodeSet.add(node); |
| 1529 } | 1529 } |
| 1530 | 1530 |
| 1531 for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next( *node)) { | 1531 for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next( *node)) { |
| 1532 if (node->isElementNode()) { | 1532 if (node->isElementNode()) { |
| 1533 if (!nodeSet.contains(node->parentNode())) { | 1533 // Exclude start & end container if unless the entire corresponding |
|
yosin_UTC9
2016/08/16 01:37:01
s/if unless/unless/
| |
| 1534 // node is included in the range. | |
| 1535 if (!nodeSet.contains(node->parentNode()) | |
| 1536 && (startContainer == endContainer | |
| 1537 || (!node->contains(startContainer) && !node->contains(endContai ner)))) { | |
| 1534 if (LayoutObject* layoutObject = toElement(node)->layoutObject() ) { | 1538 if (LayoutObject* layoutObject = toElement(node)->layoutObject() ) { |
| 1535 Vector<FloatQuad> elementQuads; | 1539 Vector<FloatQuad> elementQuads; |
| 1536 layoutObject->absoluteQuads(elementQuads); | 1540 layoutObject->absoluteQuads(elementQuads); |
| 1537 m_ownerDocument->adjustFloatQuadsForScrollAndAbsoluteZoom(el ementQuads, *layoutObject); | 1541 m_ownerDocument->adjustFloatQuadsForScrollAndAbsoluteZoom(el ementQuads, *layoutObject); |
| 1538 | 1542 |
| 1539 quads.appendVector(elementQuads); | 1543 quads.appendVector(elementQuads); |
| 1540 } | 1544 } |
| 1541 } | 1545 } |
| 1542 } else if (node->isTextNode()) { | 1546 } else if (node->isTextNode()) { |
| 1543 if (LayoutText* layoutText = toText(node)->layoutObject()) { | 1547 if (LayoutText* layoutText = toText(node)->layoutObject()) { |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1587 { | 1591 { |
| 1588 if (range && range->boundaryPointsValid()) { | 1592 if (range && range->boundaryPointsValid()) { |
| 1589 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E"); | 1593 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r ange->endContainer(), "E"); |
| 1590 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset()); | 1594 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset (), range->endOffset()); |
| 1591 } else { | 1595 } else { |
| 1592 fprintf(stderr, "Cannot show tree if range is null, or if boundary point s are invalid.\n"); | 1596 fprintf(stderr, "Cannot show tree if range is null, or if boundary point s are invalid.\n"); |
| 1593 } | 1597 } |
| 1594 } | 1598 } |
| 1595 | 1599 |
| 1596 #endif | 1600 #endif |
| OLD | NEW |