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 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1246 { | 1246 { |
1247 return isLogicalEndOfLineAlgorithm<EditingInComposedTreeStrategy>(p); | 1247 return isLogicalEndOfLineAlgorithm<EditingInComposedTreeStrategy>(p); |
1248 } | 1248 } |
1249 | 1249 |
1250 static inline LayoutPoint absoluteLineDirectionPointToLocalPointInBlock(RootInli
neBox* root, LayoutUnit lineDirectionPoint) | 1250 static inline LayoutPoint absoluteLineDirectionPointToLocalPointInBlock(RootInli
neBox* root, LayoutUnit lineDirectionPoint) |
1251 { | 1251 { |
1252 ASSERT(root); | 1252 ASSERT(root); |
1253 LayoutBlockFlow& containingBlock = root->block(); | 1253 LayoutBlockFlow& containingBlock = root->block(); |
1254 FloatPoint absoluteBlockPoint = containingBlock.localToAbsolute(FloatPoint()
); | 1254 FloatPoint absoluteBlockPoint = containingBlock.localToAbsolute(FloatPoint()
); |
1255 if (containingBlock.hasOverflowClip()) | 1255 if (containingBlock.hasOverflowClip()) |
1256 absoluteBlockPoint -= containingBlock.scrolledContentOffset(); | 1256 absoluteBlockPoint -= FloatSize(containingBlock.scrolledContentOffset())
; |
1257 | 1257 |
1258 if (root->block().isHorizontalWritingMode()) | 1258 if (root->block().isHorizontalWritingMode()) |
1259 return LayoutPoint(lineDirectionPoint - absoluteBlockPoint.x(), root->bl
ockDirectionPointInLine()); | 1259 return LayoutPoint(lineDirectionPoint - absoluteBlockPoint.x(), root->bl
ockDirectionPointInLine()); |
1260 | 1260 |
1261 return LayoutPoint(root->blockDirectionPointInLine(), lineDirectionPoint - a
bsoluteBlockPoint.y()); | 1261 return LayoutPoint(root->blockDirectionPointInLine(), lineDirectionPoint - a
bsoluteBlockPoint.y()); |
1262 } | 1262 } |
1263 | 1263 |
1264 VisiblePosition previousLinePosition(const VisiblePosition& visiblePosition, Lay
outUnit lineDirectionPoint, EditableType editableType) | 1264 VisiblePosition previousLinePosition(const VisiblePosition& visiblePosition, Lay
outUnit lineDirectionPoint, EditableType editableType) |
1265 { | 1265 { |
1266 Position p = visiblePosition.deepEquivalent(); | 1266 Position p = visiblePosition.deepEquivalent(); |
(...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3298 { | 3298 { |
3299 return previousPositionOfAlgorithm<EditingStrategy>(visiblePosition, rule); | 3299 return previousPositionOfAlgorithm<EditingStrategy>(visiblePosition, rule); |
3300 } | 3300 } |
3301 | 3301 |
3302 VisiblePositionInComposedTree previousPositionOf(const VisiblePositionInComposed
Tree& visiblePosition, EditingBoundaryCrossingRule rule) | 3302 VisiblePositionInComposedTree previousPositionOf(const VisiblePositionInComposed
Tree& visiblePosition, EditingBoundaryCrossingRule rule) |
3303 { | 3303 { |
3304 return previousPositionOfAlgorithm<EditingInComposedTreeStrategy>(visiblePos
ition, rule); | 3304 return previousPositionOfAlgorithm<EditingInComposedTreeStrategy>(visiblePos
ition, rule); |
3305 } | 3305 } |
3306 | 3306 |
3307 } // namespace blink | 3307 } // namespace blink |
OLD | NEW |