| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions | 6 * modification, are permitted provided that the following conditions |
| 7 * are met: | 7 * are met: |
| 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 root->BlockDirectionPointInLine()); | 246 root->BlockDirectionPointInLine()); |
| 247 } | 247 } |
| 248 | 248 |
| 249 return LayoutPoint( | 249 return LayoutPoint( |
| 250 root->BlockDirectionPointInLine(), | 250 root->BlockDirectionPointInLine(), |
| 251 LayoutUnit(line_direction_point - absolute_block_point.Y())); | 251 LayoutUnit(line_direction_point - absolute_block_point.Y())); |
| 252 } | 252 } |
| 253 | 253 |
| 254 bool InSameLine(const Node& node, const VisiblePosition& visible_position) { | 254 bool InSameLine(const Node& node, const VisiblePosition& visible_position) { |
| 255 if (!node.GetLayoutObject()) | 255 if (!node.GetLayoutObject()) |
| 256 return false; | 256 return true; |
| 257 return InSameLine(CreateVisiblePosition( | 257 return InSameLine(CreateVisiblePosition( |
| 258 FirstPositionInOrBeforeNode(const_cast<Node*>(&node))), | 258 FirstPositionInOrBeforeNode(const_cast<Node*>(&node))), |
| 259 visible_position); | 259 visible_position); |
| 260 } | 260 } |
| 261 | 261 |
| 262 Node* FindNodeInPreviousLine(const Node& start_node, | 262 Node* FindNodeInPreviousLine(const Node& start_node, |
| 263 const VisiblePosition& visible_position, | 263 const VisiblePosition& visible_position, |
| 264 EditableType editable_type) { | 264 EditableType editable_type) { |
| 265 // TODO(editing-dev): We should make |PreviousLeafWithSameEditability()| to | 265 // TODO(editing-dev): We should make |PreviousLeafWithSameEditability()| to |
| 266 // take |const Node&|. | 266 // take |const Node&|. |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 741 // to the end of the line we're on. | 741 // to the end of the line we're on. |
| 742 Element* root_element = HasEditableStyle(*node, editable_type) | 742 Element* root_element = HasEditableStyle(*node, editable_type) |
| 743 ? RootEditableElement(*node, editable_type) | 743 ? RootEditableElement(*node, editable_type) |
| 744 : node->GetDocument().documentElement(); | 744 : node->GetDocument().documentElement(); |
| 745 if (!root_element) | 745 if (!root_element) |
| 746 return VisiblePosition(); | 746 return VisiblePosition(); |
| 747 return VisiblePosition::LastPositionInNode(root_element); | 747 return VisiblePosition::LastPositionInNode(root_element); |
| 748 } | 748 } |
| 749 | 749 |
| 750 } // namespace blink | 750 } // namespace blink |
| OLD | NEW |