| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserv
ed. |
| 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 865 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 876 bool isLogicalEndOfLine(const VisiblePosition &p) | 876 bool isLogicalEndOfLine(const VisiblePosition &p) |
| 877 { | 877 { |
| 878 return p.isNotNull() && p == logicalEndOfLine(p); | 878 return p.isNotNull() && p == logicalEndOfLine(p); |
| 879 } | 879 } |
| 880 | 880 |
| 881 static inline IntPoint absoluteLineDirectionPointToLocalPointInBlock(RootInlineB
ox* root, int lineDirectionPoint) | 881 static inline IntPoint absoluteLineDirectionPointToLocalPointInBlock(RootInlineB
ox* root, int lineDirectionPoint) |
| 882 { | 882 { |
| 883 ASSERT(root); | 883 ASSERT(root); |
| 884 RenderBlockFlow& containingBlock = root->block(); | 884 RenderBlockFlow& containingBlock = root->block(); |
| 885 FloatPoint absoluteBlockPoint = containingBlock.localToAbsolute(FloatPoint()
); | 885 FloatPoint absoluteBlockPoint = containingBlock.localToAbsolute(FloatPoint()
); |
| 886 if (containingBlock.hasOverflowClip()) | |
| 887 absoluteBlockPoint -= containingBlock.scrolledContentOffset(); | |
| 888 return IntPoint(lineDirectionPoint - absoluteBlockPoint.x(), root->blockDire
ctionPointInLine()); | 886 return IntPoint(lineDirectionPoint - absoluteBlockPoint.x(), root->blockDire
ctionPointInLine()); |
| 889 } | 887 } |
| 890 | 888 |
| 891 VisiblePosition previousLinePosition(const VisiblePosition &visiblePosition, int
lineDirectionPoint, EditableType editableType) | 889 VisiblePosition previousLinePosition(const VisiblePosition &visiblePosition, int
lineDirectionPoint, EditableType editableType) |
| 892 { | 890 { |
| 893 Position p = visiblePosition.deepEquivalent(); | 891 Position p = visiblePosition.deepEquivalent(); |
| 894 Node* node = p.deprecatedNode(); | 892 Node* node = p.deprecatedNode(); |
| 895 | 893 |
| 896 if (!node) | 894 if (!node) |
| 897 return VisiblePosition(); | 895 return VisiblePosition(); |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1372 int caretOffset; | 1370 int caretOffset; |
| 1373 position.position().getInlineBoxAndOffset(position.affinity(), inlineBox, ca
retOffset); | 1371 position.position().getInlineBoxAndOffset(position.affinity(), inlineBox, ca
retOffset); |
| 1374 | 1372 |
| 1375 if (inlineBox) | 1373 if (inlineBox) |
| 1376 renderer = &inlineBox->renderer(); | 1374 renderer = &inlineBox->renderer(); |
| 1377 | 1375 |
| 1378 return renderer->localCaretRect(inlineBox, caretOffset); | 1376 return renderer->localCaretRect(inlineBox, caretOffset); |
| 1379 } | 1377 } |
| 1380 | 1378 |
| 1381 } | 1379 } |
| OLD | NEW |