OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
3 * reserved. | 3 * reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
7 * are met: | 7 * are met: |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1808 // it directly. However, this shouldn't happen and needs to be fixed. | 1808 // it directly. However, this shouldn't happen and needs to be fixed. |
1809 return ExpandEndToSentenceBoundary(EphemeralRange( | 1809 return ExpandEndToSentenceBoundary(EphemeralRange( |
1810 sentence_start.IsNotNull() && sentence_start < range.StartPosition() | 1810 sentence_start.IsNotNull() && sentence_start < range.StartPosition() |
1811 ? sentence_start | 1811 ? sentence_start |
1812 : range.StartPosition(), | 1812 : range.StartPosition(), |
1813 range.EndPosition())); | 1813 range.EndPosition())); |
1814 } | 1814 } |
1815 | 1815 |
1816 static bool NodeIsUserSelectAll(const Node* node) { | 1816 static bool NodeIsUserSelectAll(const Node* node) { |
1817 return node && node->GetLayoutObject() && | 1817 return node && node->GetLayoutObject() && |
1818 node->GetLayoutObject()->Style()->UserSelect() == SELECT_ALL; | 1818 node->GetLayoutObject()->Style()->UserSelect() == EUserSelect::kAll; |
1819 } | 1819 } |
1820 | 1820 |
1821 template <typename Strategy> | 1821 template <typename Strategy> |
1822 PositionTemplate<Strategy> StartOfParagraphAlgorithm( | 1822 PositionTemplate<Strategy> StartOfParagraphAlgorithm( |
1823 const PositionTemplate<Strategy>& position, | 1823 const PositionTemplate<Strategy>& position, |
1824 EditingBoundaryCrossingRule boundary_crossing_rule) { | 1824 EditingBoundaryCrossingRule boundary_crossing_rule) { |
1825 Node* const start_node = position.AnchorNode(); | 1825 Node* const start_node = position.AnchorNode(); |
1826 | 1826 |
1827 if (!start_node) | 1827 if (!start_node) |
1828 return PositionTemplate<Strategy>(); | 1828 return PositionTemplate<Strategy>(); |
(...skipping 2318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4147 | 4147 |
4148 Vector<IntRect> ComputeTextRects(const EphemeralRange& range) { | 4148 Vector<IntRect> ComputeTextRects(const EphemeralRange& range) { |
4149 return ComputeTextBounds<IntRect>(range); | 4149 return ComputeTextBounds<IntRect>(range); |
4150 } | 4150 } |
4151 | 4151 |
4152 Vector<FloatQuad> ComputeTextQuads(const EphemeralRange& range) { | 4152 Vector<FloatQuad> ComputeTextQuads(const EphemeralRange& range) { |
4153 return ComputeTextBounds<FloatQuad>(range); | 4153 return ComputeTextBounds<FloatQuad>(range); |
4154 } | 4154 } |
4155 | 4155 |
4156 } // namespace blink | 4156 } // namespace blink |
OLD | NEW |