| 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 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 void FrameSelection::layoutBlockWillBeDestroyed(const LayoutBlock& block) { | 476 void FrameSelection::layoutBlockWillBeDestroyed(const LayoutBlock& block) { |
| 477 m_frameCaret->layoutBlockWillBeDestroyed(block); | 477 m_frameCaret->layoutBlockWillBeDestroyed(block); |
| 478 } | 478 } |
| 479 | 479 |
| 480 void FrameSelection::updateStyleAndLayoutIfNeeded() { | 480 void FrameSelection::updateStyleAndLayoutIfNeeded() { |
| 481 m_frameCaret->updateStyleAndLayoutIfNeeded(); | 481 m_frameCaret->updateStyleAndLayoutIfNeeded(); |
| 482 } | 482 } |
| 483 | 483 |
| 484 void FrameSelection::invalidatePaintIfNeeded( | 484 void FrameSelection::invalidatePaintIfNeeded( |
| 485 const LayoutBlock& block, | 485 const LayoutBlock& block, |
| 486 const PaintInvalidatorContext& context, | 486 const PaintInvalidatorContext& context) { |
| 487 PaintInvalidationReason reason) { | 487 m_frameCaret->invalidatePaintIfNeeded(block, context); |
| 488 m_frameCaret->invalidatePaintIfNeeded(block, context, reason); | |
| 489 } | 488 } |
| 490 | 489 |
| 491 bool FrameSelection::shouldPaintCaret(const LayoutBlock& block) const { | 490 bool FrameSelection::shouldPaintCaret(const LayoutBlock& block) const { |
| 492 DCHECK_GE(document().lifecycle().state(), DocumentLifecycle::LayoutClean); | 491 DCHECK_GE(document().lifecycle().state(), DocumentLifecycle::LayoutClean); |
| 493 bool result = m_frameCaret->shouldPaintCaret(block); | 492 bool result = m_frameCaret->shouldPaintCaret(block); |
| 494 DCHECK(!result || | 493 DCHECK(!result || |
| 495 (computeVisibleSelectionInDOMTreeDeprecated().isCaret() && | 494 (computeVisibleSelectionInDOMTreeDeprecated().isCaret() && |
| 496 computeVisibleSelectionInDOMTree().hasEditableStyle())); | 495 computeVisibleSelectionInDOMTree().hasEditableStyle())); |
| 497 return result; | 496 return result; |
| 498 } | 497 } |
| (...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1200 } | 1199 } |
| 1201 | 1200 |
| 1202 void showTree(const blink::FrameSelection* sel) { | 1201 void showTree(const blink::FrameSelection* sel) { |
| 1203 if (sel) | 1202 if (sel) |
| 1204 sel->showTreeForThis(); | 1203 sel->showTreeForThis(); |
| 1205 else | 1204 else |
| 1206 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; | 1205 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; |
| 1207 } | 1206 } |
| 1208 | 1207 |
| 1209 #endif | 1208 #endif |
| OLD | NEW |