| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004 Apple Computer, Inc. All rights reserved. | 2 * Copyright (C) 2004 Apple Computer, 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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 | 45 |
| 46 enum EWordSide { kRightWordIfOnBoundary = false, kLeftWordIfOnBoundary = true }; | 46 enum EWordSide { kRightWordIfOnBoundary = false, kLeftWordIfOnBoundary = true }; |
| 47 | 47 |
| 48 struct InlineBoxPosition { | 48 struct InlineBoxPosition { |
| 49 InlineBox* inline_box; | 49 InlineBox* inline_box; |
| 50 int offset_in_box; | 50 int offset_in_box; |
| 51 | 51 |
| 52 InlineBoxPosition() : inline_box(nullptr), offset_in_box(0) {} | 52 InlineBoxPosition() : inline_box(nullptr), offset_in_box(0) {} |
| 53 | 53 |
| 54 InlineBoxPosition(InlineBox* inline_box, int offset_in_box) | 54 InlineBoxPosition(InlineBox* inline_box, int offset_in_box) |
| 55 : inline_box(inline_box), offset_in_box(offset_in_box) {} | 55 : inline_box(inline_box), offset_in_box(offset_in_box) { |
| 56 DCHECK(inline_box); |
| 57 DCHECK_GE(offset_in_box, 0); |
| 58 } |
| 56 | 59 |
| 57 bool operator==(const InlineBoxPosition& other) const { | 60 bool operator==(const InlineBoxPosition& other) const { |
| 58 return inline_box == other.inline_box && | 61 return inline_box == other.inline_box && |
| 59 offset_in_box == other.offset_in_box; | 62 offset_in_box == other.offset_in_box; |
| 60 } | 63 } |
| 61 | 64 |
| 62 bool operator!=(const InlineBoxPosition& other) const { | 65 bool operator!=(const InlineBoxPosition& other) const { |
| 63 return !operator==(other); | 66 return !operator==(other); |
| 64 } | 67 } |
| 65 }; | 68 }; |
| (...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 const VisiblePosition&, | 386 const VisiblePosition&, |
| 384 EditableType); | 387 EditableType); |
| 385 | 388 |
| 386 Position PreviousRootInlineBoxCandidatePosition(Node*, | 389 Position PreviousRootInlineBoxCandidatePosition(Node*, |
| 387 const VisiblePosition&, | 390 const VisiblePosition&, |
| 388 EditableType); | 391 EditableType); |
| 389 | 392 |
| 390 } // namespace blink | 393 } // namespace blink |
| 391 | 394 |
| 392 #endif // VisibleUnits_h | 395 #endif // VisibleUnits_h |
| OLD | NEW |