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 24 matching lines...) Expand all Loading... |
35 #include "core/dom/ProcessingInstruction.h" | 35 #include "core/dom/ProcessingInstruction.h" |
36 #include "core/dom/Text.h" | 36 #include "core/dom/Text.h" |
37 #include "core/editing/EditingUtilities.h" | 37 #include "core/editing/EditingUtilities.h" |
38 #include "core/editing/VisiblePosition.h" | 38 #include "core/editing/VisiblePosition.h" |
39 #include "core/editing/VisibleUnits.h" | 39 #include "core/editing/VisibleUnits.h" |
40 #include "core/editing/iterators/TextIterator.h" | 40 #include "core/editing/iterators/TextIterator.h" |
41 #include "core/editing/serializers/Serialization.h" | 41 #include "core/editing/serializers/Serialization.h" |
42 #include "core/events/ScopedEventQueue.h" | 42 #include "core/events/ScopedEventQueue.h" |
43 #include "core/html/HTMLBodyElement.h" | 43 #include "core/html/HTMLBodyElement.h" |
44 #include "core/html/HTMLElement.h" | 44 #include "core/html/HTMLElement.h" |
45 #include "core/layout/LayoutBoxModelObject.h" | 45 #include "core/layout/LayoutObject.h" |
46 #include "core/layout/LayoutText.h" | 46 #include "core/layout/LayoutText.h" |
47 #include "core/svg/SVGSVGElement.h" | 47 #include "core/svg/SVGSVGElement.h" |
48 #include "platform/geometry/FloatQuad.h" | 48 #include "platform/geometry/FloatQuad.h" |
49 #include "wtf/text/CString.h" | 49 #include "wtf/text/CString.h" |
50 #include "wtf/text/StringBuilder.h" | 50 #include "wtf/text/StringBuilder.h" |
51 #ifndef NDEBUG | 51 #ifndef NDEBUG |
52 #include <stdio.h> | 52 #include <stdio.h> |
53 #endif | 53 #endif |
54 | 54 |
55 namespace blink { | 55 namespace blink { |
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1544 | 1544 |
1545 HeapHashSet<Member<Node>> nodeSet; | 1545 HeapHashSet<Member<Node>> nodeSet; |
1546 for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next(
*node)) { | 1546 for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next(
*node)) { |
1547 if (node->isElementNode()) | 1547 if (node->isElementNode()) |
1548 nodeSet.add(node); | 1548 nodeSet.add(node); |
1549 } | 1549 } |
1550 | 1550 |
1551 for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next(
*node)) { | 1551 for (Node* node = firstNode(); node != stopNode; node = NodeTraversal::next(
*node)) { |
1552 if (node->isElementNode()) { | 1552 if (node->isElementNode()) { |
1553 if (!nodeSet.contains(node->parentNode())) { | 1553 if (!nodeSet.contains(node->parentNode())) { |
1554 if (LayoutBoxModelObject* layoutBoxModelObject = toElement(node)
->layoutBoxModelObject()) { | 1554 if (LayoutObject* layoutObject = toElement(node)->layoutObject()
) { |
1555 Vector<FloatQuad> elementQuads; | 1555 Vector<FloatQuad> elementQuads; |
1556 layoutBoxModelObject->absoluteQuads(elementQuads); | 1556 layoutObject->absoluteQuads(elementQuads); |
1557 m_ownerDocument->adjustFloatQuadsForScrollAndAbsoluteZoom(el
ementQuads, *layoutBoxModelObject); | 1557 m_ownerDocument->adjustFloatQuadsForScrollAndAbsoluteZoom(el
ementQuads, *layoutObject); |
1558 | 1558 |
1559 quads.appendVector(elementQuads); | 1559 quads.appendVector(elementQuads); |
1560 } | 1560 } |
1561 } | 1561 } |
1562 } else if (node->isTextNode()) { | 1562 } else if (node->isTextNode()) { |
1563 if (LayoutText* layoutText = toText(node)->layoutObject()) { | 1563 if (LayoutText* layoutText = toText(node)->layoutObject()) { |
1564 int startOffset = (node == startContainer) ? m_start.offset() :
0; | 1564 int startOffset = (node == startContainer) ? m_start.offset() :
0; |
1565 int endOffset = (node == endContainer) ? m_end.offset() : INT_MA
X; | 1565 int endOffset = (node == endContainer) ? m_end.offset() : INT_MA
X; |
1566 | 1566 |
1567 Vector<FloatQuad> textQuads; | 1567 Vector<FloatQuad> textQuads; |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1607 { | 1607 { |
1608 if (range && range->boundaryPointsValid()) { | 1608 if (range && range->boundaryPointsValid()) { |
1609 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r
ange->endContainer(), "E"); | 1609 range->startContainer()->showTreeAndMark(range->startContainer(), "S", r
ange->endContainer(), "E"); |
1610 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset
(), range->endOffset()); | 1610 fprintf(stderr, "start offset: %d, end offset: %d\n", range->startOffset
(), range->endOffset()); |
1611 } else { | 1611 } else { |
1612 fprintf(stderr, "Cannot show tree if range is null, or if boundary point
s are invalid.\n"); | 1612 fprintf(stderr, "Cannot show tree if range is null, or if boundary point
s are invalid.\n"); |
1613 } | 1613 } |
1614 } | 1614 } |
1615 | 1615 |
1616 #endif | 1616 #endif |
OLD | NEW |