| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2008, 2009, 2010 Apple 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // (which is either the layoutObject we just found, or one of its containers). | 109 // (which is either the layoutObject we just found, or one of its containers). |
| 110 LayoutBlockItem caretPainterItem = | 110 LayoutBlockItem caretPainterItem = |
| 111 LayoutBlockItem(caretLayoutBlock(caretPosition.anchorNode())); | 111 LayoutBlockItem(caretLayoutBlock(caretPosition.anchorNode())); |
| 112 LayoutRect caretLocalRectWithWritingMode = caretLocalRect; | 112 LayoutRect caretLocalRectWithWritingMode = caretLocalRect; |
| 113 caretPainterItem.flipForWritingMode(caretLocalRectWithWritingMode); | 113 caretPainterItem.flipForWritingMode(caretLocalRectWithWritingMode); |
| 114 return mapCaretRectToCaretPainter(LayoutItem(layoutObject), caretPainterItem, | 114 return mapCaretRectToCaretPainter(LayoutItem(layoutObject), caretPainterItem, |
| 115 caretLocalRectWithWritingMode); | 115 caretLocalRectWithWritingMode); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void CaretDisplayItemClient::clearPreviousVisualRect(const LayoutBlock& block) { | 118 void CaretDisplayItemClient::clearPreviousVisualRect(const LayoutBlock& block) { |
| 119 if (block == m_layoutBlock) { | 119 if (block == m_layoutBlock) |
| 120 m_visualRect = LayoutRect(); | 120 m_visualRect = LayoutRect(); |
| 121 m_localRect = LayoutRect(); | |
| 122 } | |
| 123 if (block == m_previousLayoutBlock) | 121 if (block == m_previousLayoutBlock) |
| 124 m_visualRectInPreviousLayoutBlock = LayoutRect(); | 122 m_visualRectInPreviousLayoutBlock = LayoutRect(); |
| 125 } | 123 } |
| 126 | 124 |
| 127 void CaretDisplayItemClient::layoutBlockWillBeDestroyed( | 125 void CaretDisplayItemClient::layoutBlockWillBeDestroyed( |
| 128 const LayoutBlock& block) { | 126 const LayoutBlock& block) { |
| 129 if (block == m_layoutBlock) | 127 if (block == m_layoutBlock) |
| 130 m_layoutBlock = nullptr; | 128 m_layoutBlock = nullptr; |
| 131 if (block == m_previousLayoutBlock) | 129 if (block == m_previousLayoutBlock) |
| 132 m_previousLayoutBlock = nullptr; | 130 m_previousLayoutBlock = nullptr; |
| (...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 | 286 |
| 289 String CaretDisplayItemClient::debugName() const { | 287 String CaretDisplayItemClient::debugName() const { |
| 290 return "Caret"; | 288 return "Caret"; |
| 291 } | 289 } |
| 292 | 290 |
| 293 LayoutRect CaretDisplayItemClient::visualRect() const { | 291 LayoutRect CaretDisplayItemClient::visualRect() const { |
| 294 return m_visualRect; | 292 return m_visualRect; |
| 295 } | 293 } |
| 296 | 294 |
| 297 } // namespace blink | 295 } // namespace blink |
| OLD | NEW |