OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
749 return; | 749 return; |
750 | 750 |
751 Document* doc = toDocument(n); | 751 Document* doc = toDocument(n); |
752 LocalFrame* frame = doc->frame(); | 752 LocalFrame* frame = doc->frame(); |
753 if (!frame) | 753 if (!frame) |
754 return; | 754 return; |
755 | 755 |
756 VisibleSelection selection = frame->selection().selection(); | 756 VisibleSelection selection = frame->selection().selection(); |
757 if (selection.isCaret()) { | 757 if (selection.isCaret()) { |
758 ts << "caret: position " << selection.start().computeEditingOffset() <<
" of " << nodePositionAsStringForTesting(selection.start().anchorNode()); | 758 ts << "caret: position " << selection.start().computeEditingOffset() <<
" of " << nodePositionAsStringForTesting(selection.start().anchorNode()); |
759 if (selection.affinity() == UPSTREAM) | 759 if (selection.affinity() == TextAffinity::Upstream) |
760 ts << " (upstream affinity)"; | 760 ts << " (upstream affinity)"; |
761 ts << "\n"; | 761 ts << "\n"; |
762 } else if (selection.isRange()) { | 762 } else if (selection.isRange()) { |
763 ts << "selection start: position " << selection.start().computeEditingOf
fset() << " of " << nodePositionAsStringForTesting(selection.start().anchorNode(
)) << "\n" | 763 ts << "selection start: position " << selection.start().computeEditingOf
fset() << " of " << nodePositionAsStringForTesting(selection.start().anchorNode(
)) << "\n" |
764 << "selection end: position " << selection.end().computeEditingOff
set() << " of " << nodePositionAsStringForTesting(selection.end().anchorNode())
<< "\n"; | 764 << "selection end: position " << selection.end().computeEditingOff
set() << " of " << nodePositionAsStringForTesting(selection.end().anchorNode())
<< "\n"; |
765 } | 765 } |
766 } | 766 } |
767 | 767 |
768 static String externalRepresentation(LayoutBox* layoutObject, LayoutAsTextBehavi
or behavior) | 768 static String externalRepresentation(LayoutBox* layoutObject, LayoutAsTextBehavi
or behavior) |
769 { | 769 { |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
842 element->document().updateLayout(); | 842 element->document().updateLayout(); |
843 | 843 |
844 LayoutObject* layoutObject = element->layoutObject(); | 844 LayoutObject* layoutObject = element->layoutObject(); |
845 if (!layoutObject || !layoutObject->isListItem()) | 845 if (!layoutObject || !layoutObject->isListItem()) |
846 return String(); | 846 return String(); |
847 | 847 |
848 return toLayoutListItem(layoutObject)->markerText(); | 848 return toLayoutListItem(layoutObject)->markerText(); |
849 } | 849 } |
850 | 850 |
851 } // namespace blink | 851 } // namespace blink |
OLD | NEW |