| 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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 445 void FrameSelection::layoutBlockWillBeDestroyed(const LayoutBlock& block) { | 445 void FrameSelection::layoutBlockWillBeDestroyed(const LayoutBlock& block) { |
| 446 m_frameCaret->layoutBlockWillBeDestroyed(block); | 446 m_frameCaret->layoutBlockWillBeDestroyed(block); |
| 447 } | 447 } |
| 448 | 448 |
| 449 void FrameSelection::updateStyleAndLayoutIfNeeded() { | 449 void FrameSelection::updateStyleAndLayoutIfNeeded() { |
| 450 m_frameCaret->updateStyleAndLayoutIfNeeded(); | 450 m_frameCaret->updateStyleAndLayoutIfNeeded(); |
| 451 } | 451 } |
| 452 | 452 |
| 453 void FrameSelection::invalidatePaintIfNeeded( | 453 void FrameSelection::invalidatePaintIfNeeded( |
| 454 const LayoutBlock& block, | 454 const LayoutBlock& block, |
| 455 const PaintInvalidatorContext& context, | 455 const PaintInvalidatorContext& context) { |
| 456 PaintInvalidationReason reason) { | 456 m_frameCaret->invalidatePaintIfNeeded(block, context); |
| 457 m_frameCaret->invalidatePaintIfNeeded(block, context, reason); | |
| 458 } | 457 } |
| 459 | 458 |
| 460 bool FrameSelection::shouldPaintCaret(const LayoutBlock& block) const { | 459 bool FrameSelection::shouldPaintCaret(const LayoutBlock& block) const { |
| 461 DCHECK_GE(document().lifecycle().state(), DocumentLifecycle::LayoutClean); | 460 DCHECK_GE(document().lifecycle().state(), DocumentLifecycle::LayoutClean); |
| 462 bool result = m_frameCaret->shouldPaintCaret(block); | 461 bool result = m_frameCaret->shouldPaintCaret(block); |
| 463 DCHECK(!result || | 462 DCHECK(!result || |
| 464 (computeVisibleSelectionInDOMTreeDeprecated().isCaret() && | 463 (computeVisibleSelectionInDOMTreeDeprecated().isCaret() && |
| 465 computeVisibleSelectionInDOMTree().hasEditableStyle())); | 464 computeVisibleSelectionInDOMTree().hasEditableStyle())); |
| 466 return result; | 465 return result; |
| 467 } | 466 } |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1158 } | 1157 } |
| 1159 | 1158 |
| 1160 void showTree(const blink::FrameSelection* sel) { | 1159 void showTree(const blink::FrameSelection* sel) { |
| 1161 if (sel) | 1160 if (sel) |
| 1162 sel->showTreeForThis(); | 1161 sel->showTreeForThis(); |
| 1163 else | 1162 else |
| 1164 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; | 1163 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; |
| 1165 } | 1164 } |
| 1166 | 1165 |
| 1167 #endif | 1166 #endif |
| OLD | NEW |