OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008, 2009, 2010 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 510 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 | 521 |
522 TextDirection FrameSelection::directionOfSelection() | 522 TextDirection FrameSelection::directionOfSelection() |
523 { | 523 { |
524 InlineBox* startBox = nullptr; | 524 InlineBox* startBox = nullptr; |
525 InlineBox* endBox = nullptr; | 525 InlineBox* endBox = nullptr; |
526 // Cache the VisiblePositions because visibleStart() and visibleEnd() | 526 // Cache the VisiblePositions because visibleStart() and visibleEnd() |
527 // can cause layout, which has the potential to invalidate lineboxes. | 527 // can cause layout, which has the potential to invalidate lineboxes. |
528 VisiblePosition startPosition = m_selection.visibleStart(); | 528 VisiblePosition startPosition = m_selection.visibleStart(); |
529 VisiblePosition endPosition = m_selection.visibleEnd(); | 529 VisiblePosition endPosition = m_selection.visibleEnd(); |
530 if (startPosition.isNotNull()) | 530 if (startPosition.isNotNull()) |
531 startBox = startPosition.computeInlineBoxPosition().inlineBox; | 531 startBox = computeInlineBoxPosition(startPosition).inlineBox; |
532 if (endPosition.isNotNull()) | 532 if (endPosition.isNotNull()) |
533 endBox = endPosition.computeInlineBoxPosition().inlineBox; | 533 endBox = computeInlineBoxPosition(endPosition).inlineBox; |
534 if (startBox && endBox && startBox->direction() == endBox->direction()) | 534 if (startBox && endBox && startBox->direction() == endBox->direction()) |
535 return startBox->direction(); | 535 return startBox->direction(); |
536 | 536 |
537 return directionOfEnclosingBlock(); | 537 return directionOfEnclosingBlock(); |
538 } | 538 } |
539 | 539 |
540 void FrameSelection::didChangeFocus() | 540 void FrameSelection::didChangeFocus() |
541 { | 541 { |
542 // Hits in virtual/gpu/compositedscrolling/scrollbars/scrollbar-miss-mousemo
ve-disabled.html | 542 // Hits in virtual/gpu/compositedscrolling/scrollbars/scrollbar-miss-mousemo
ve-disabled.html |
543 DisableCompositingQueryAsserts disabler; | 543 DisableCompositingQueryAsserts disabler; |
(...skipping 1513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2057 | 2057 |
2058 void showTree(const blink::FrameSelection* sel) | 2058 void showTree(const blink::FrameSelection* sel) |
2059 { | 2059 { |
2060 if (sel) | 2060 if (sel) |
2061 sel->showTreeForThis(); | 2061 sel->showTreeForThis(); |
2062 else | 2062 else |
2063 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); | 2063 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); |
2064 } | 2064 } |
2065 | 2065 |
2066 #endif | 2066 #endif |
OLD | NEW |