| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 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 * | 7 * |
| 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 2140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2151 } | 2151 } |
| 2152 } | 2152 } |
| 2153 | 2153 |
| 2154 void AXLayoutObject::lineBreaks(Vector<int>& lineBreaks) const | 2154 void AXLayoutObject::lineBreaks(Vector<int>& lineBreaks) const |
| 2155 { | 2155 { |
| 2156 if (!isTextControl()) | 2156 if (!isTextControl()) |
| 2157 return; | 2157 return; |
| 2158 | 2158 |
| 2159 VisiblePosition visiblePos = visiblePositionForIndex(0); | 2159 VisiblePosition visiblePos = visiblePositionForIndex(0); |
| 2160 VisiblePosition prevVisiblePos = visiblePos; | 2160 VisiblePosition prevVisiblePos = visiblePos; |
| 2161 visiblePos = nextLinePosition(visiblePos, 0, HasEditableAXRole); | 2161 visiblePos = nextLinePosition(visiblePos, LayoutUnit(), HasEditableAXRole); |
| 2162 // nextLinePosition moves to the end of the current line when there are | 2162 // nextLinePosition moves to the end of the current line when there are |
| 2163 // no more lines. | 2163 // no more lines. |
| 2164 while (visiblePos.isNotNull() && !inSameLine(prevVisiblePos, visiblePos)) { | 2164 while (visiblePos.isNotNull() && !inSameLine(prevVisiblePos, visiblePos)) { |
| 2165 lineBreaks.append(indexForVisiblePosition(visiblePos)); | 2165 lineBreaks.append(indexForVisiblePosition(visiblePos)); |
| 2166 prevVisiblePos = visiblePos; | 2166 prevVisiblePos = visiblePos; |
| 2167 visiblePos = nextLinePosition(visiblePos, 0, HasEditableAXRole); | 2167 visiblePos = nextLinePosition(visiblePos, LayoutUnit(), HasEditableAXRol
e); |
| 2168 | 2168 |
| 2169 // Make sure we always make forward progress. | 2169 // Make sure we always make forward progress. |
| 2170 if (visiblePos.deepEquivalent().compareTo(prevVisiblePos.deepEquivalent(
)) < 0) | 2170 if (visiblePos.deepEquivalent().compareTo(prevVisiblePos.deepEquivalent(
)) < 0) |
| 2171 break; | 2171 break; |
| 2172 } | 2172 } |
| 2173 } | 2173 } |
| 2174 | 2174 |
| 2175 // | 2175 // |
| 2176 // Private. | 2176 // Private. |
| 2177 // | 2177 // |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2534 if (label && label->layoutObject()) { | 2534 if (label && label->layoutObject()) { |
| 2535 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); | 2535 LayoutRect labelRect = axObjectCache().getOrCreate(label)->elementRe
ct(); |
| 2536 result.unite(labelRect); | 2536 result.unite(labelRect); |
| 2537 } | 2537 } |
| 2538 } | 2538 } |
| 2539 | 2539 |
| 2540 return result; | 2540 return result; |
| 2541 } | 2541 } |
| 2542 | 2542 |
| 2543 } // namespace blink | 2543 } // namespace blink |
| OLD | NEW |