| 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 770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 781 if (selection.IsCaret()) { | 781 if (selection.IsCaret()) { |
| 782 ts << "caret: position " << selection.Start().ComputeEditingOffset() | 782 ts << "caret: position " << selection.Start().ComputeEditingOffset() |
| 783 << " of " << NodePosition(selection.Start().AnchorNode()); | 783 << " of " << NodePosition(selection.Start().AnchorNode()); |
| 784 if (selection.Affinity() == TextAffinity::kUpstream) | 784 if (selection.Affinity() == TextAffinity::kUpstream) |
| 785 ts << " (upstream affinity)"; | 785 ts << " (upstream affinity)"; |
| 786 ts << "\n"; | 786 ts << "\n"; |
| 787 } else if (selection.IsRange()) { | 787 } else if (selection.IsRange()) { |
| 788 ts << "selection start: position " | 788 ts << "selection start: position " |
| 789 << selection.Start().ComputeEditingOffset() << " of " | 789 << selection.Start().ComputeEditingOffset() << " of " |
| 790 << NodePosition(selection.Start().AnchorNode()) << "\n" | 790 << NodePosition(selection.Start().AnchorNode()) << "\n" |
| 791 << "selection end: position " << selection.end().ComputeEditingOffset() | 791 << "selection end: position " << selection.End().ComputeEditingOffset() |
| 792 << " of " << NodePosition(selection.end().AnchorNode()) << "\n"; | 792 << " of " << NodePosition(selection.End().AnchorNode()) << "\n"; |
| 793 } | 793 } |
| 794 } | 794 } |
| 795 | 795 |
| 796 static String ExternalRepresentation(LayoutBox* layout_object, | 796 static String ExternalRepresentation(LayoutBox* layout_object, |
| 797 LayoutAsTextBehavior behavior, | 797 LayoutAsTextBehavior behavior, |
| 798 const PaintLayer* marked_layer = nullptr) { | 798 const PaintLayer* marked_layer = nullptr) { |
| 799 TextStream ts; | 799 TextStream ts; |
| 800 if (!layout_object->HasLayer()) | 800 if (!layout_object->HasLayer()) |
| 801 return ts.Release(); | 801 return ts.Release(); |
| 802 | 802 |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 878 element->GetDocument().UpdateStyleAndLayout(); | 878 element->GetDocument().UpdateStyleAndLayout(); |
| 879 | 879 |
| 880 LayoutObject* layout_object = element->GetLayoutObject(); | 880 LayoutObject* layout_object = element->GetLayoutObject(); |
| 881 if (!layout_object || !layout_object->IsListItem()) | 881 if (!layout_object || !layout_object->IsListItem()) |
| 882 return String(); | 882 return String(); |
| 883 | 883 |
| 884 return ToLayoutListItem(layout_object)->MarkerText(); | 884 return ToLayoutListItem(layout_object)->MarkerText(); |
| 885 } | 885 } |
| 886 | 886 |
| 887 } // namespace blink | 887 } // namespace blink |
| OLD | NEW |