Chromium Code Reviews| 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 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1267 | 1267 |
| 1268 static inline LayoutPoint absoluteLineDirectionPointToLocalPointInBlock(RootInli neBox* root, LayoutUnit lineDirectionPoint) | 1268 static inline LayoutPoint absoluteLineDirectionPointToLocalPointInBlock(RootInli neBox* root, LayoutUnit lineDirectionPoint) |
| 1269 { | 1269 { |
| 1270 ASSERT(root); | 1270 ASSERT(root); |
| 1271 LayoutBlockFlow& containingBlock = root->block(); | 1271 LayoutBlockFlow& containingBlock = root->block(); |
| 1272 FloatPoint absoluteBlockPoint = containingBlock.localToAbsolute(FloatPoint() ); | 1272 FloatPoint absoluteBlockPoint = containingBlock.localToAbsolute(FloatPoint() ); |
| 1273 if (containingBlock.hasOverflowClip()) | 1273 if (containingBlock.hasOverflowClip()) |
| 1274 absoluteBlockPoint -= FloatSize(containingBlock.scrolledContentOffset()) ; | 1274 absoluteBlockPoint -= FloatSize(containingBlock.scrolledContentOffset()) ; |
| 1275 | 1275 |
| 1276 if (root->block().isHorizontalWritingMode()) | 1276 if (root->block().isHorizontalWritingMode()) |
| 1277 return LayoutPoint(lineDirectionPoint - absoluteBlockPoint.x(), root->bl ockDirectionPointInLine()); | 1277 return LayoutPoint(LayoutUnit(lineDirectionPoint - absoluteBlockPoint.x( )), root->blockDirectionPointInLine()); |
|
eae
2016/01/29 03:38:11
lineDirectionPoint - LayoutUnit(absoluteBlockPoint
leviw_travelin_and_unemployed
2016/01/29 03:47:27
This is actually different behavior, and likely ch
| |
| 1278 | 1278 |
| 1279 return LayoutPoint(root->blockDirectionPointInLine(), lineDirectionPoint - a bsoluteBlockPoint.y()); | 1279 return LayoutPoint(root->blockDirectionPointInLine(), LayoutUnit(lineDirecti onPoint - absoluteBlockPoint.y())); |
|
eae
2016/01/29 03:38:11
...and here:
return LayoutPoint(root->blockDirect
leviw_travelin_and_unemployed
2016/01/29 03:47:27
Ditto.
| |
| 1280 } | 1280 } |
| 1281 | 1281 |
| 1282 VisiblePosition previousLinePosition(const VisiblePosition& visiblePosition, Lay outUnit lineDirectionPoint, EditableType editableType) | 1282 VisiblePosition previousLinePosition(const VisiblePosition& visiblePosition, Lay outUnit lineDirectionPoint, EditableType editableType) |
| 1283 { | 1283 { |
| 1284 Position p = visiblePosition.deepEquivalent(); | 1284 Position p = visiblePosition.deepEquivalent(); |
| 1285 Node* node = p.anchorNode(); | 1285 Node* node = p.anchorNode(); |
| 1286 | 1286 |
| 1287 if (!node) | 1287 if (!node) |
| 1288 return VisiblePosition(); | 1288 return VisiblePosition(); |
| 1289 | 1289 |
| (...skipping 2037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3327 { | 3327 { |
| 3328 return previousPositionOfAlgorithm<EditingStrategy>(visiblePosition, rule); | 3328 return previousPositionOfAlgorithm<EditingStrategy>(visiblePosition, rule); |
| 3329 } | 3329 } |
| 3330 | 3330 |
| 3331 VisiblePositionInComposedTree previousPositionOf(const VisiblePositionInComposed Tree& visiblePosition, EditingBoundaryCrossingRule rule) | 3331 VisiblePositionInComposedTree previousPositionOf(const VisiblePositionInComposed Tree& visiblePosition, EditingBoundaryCrossingRule rule) |
| 3332 { | 3332 { |
| 3333 return previousPositionOfAlgorithm<EditingInComposedTreeStrategy>(visiblePos ition, rule); | 3333 return previousPositionOfAlgorithm<EditingInComposedTreeStrategy>(visiblePos ition, rule); |
| 3334 } | 3334 } |
| 3335 | 3335 |
| 3336 } // namespace blink | 3336 } // namespace blink |
| OLD | NEW |