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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 } | 464 } |
465 | 465 |
466 void FrameSelection::LayoutBlockWillBeDestroyed(const LayoutBlock& block) { | 466 void FrameSelection::LayoutBlockWillBeDestroyed(const LayoutBlock& block) { |
467 frame_caret_->LayoutBlockWillBeDestroyed(block); | 467 frame_caret_->LayoutBlockWillBeDestroyed(block); |
468 } | 468 } |
469 | 469 |
470 void FrameSelection::UpdateStyleAndLayoutIfNeeded() { | 470 void FrameSelection::UpdateStyleAndLayoutIfNeeded() { |
471 frame_caret_->UpdateStyleAndLayoutIfNeeded(); | 471 frame_caret_->UpdateStyleAndLayoutIfNeeded(); |
472 } | 472 } |
473 | 473 |
474 void FrameSelection::InvalidatePaintIfNeeded( | 474 void FrameSelection::InvalidatePaint(const LayoutBlock& block, |
475 const LayoutBlock& block, | 475 const PaintInvalidatorContext& context) { |
476 const PaintInvalidatorContext& context) { | 476 frame_caret_->InvalidatePaint(block, context); |
477 frame_caret_->InvalidatePaintIfNeeded(block, context); | |
478 } | 477 } |
479 | 478 |
480 bool FrameSelection::ShouldPaintCaret(const LayoutBlock& block) const { | 479 bool FrameSelection::ShouldPaintCaret(const LayoutBlock& block) const { |
481 DCHECK_GE(GetDocument().Lifecycle().GetState(), | 480 DCHECK_GE(GetDocument().Lifecycle().GetState(), |
482 DocumentLifecycle::kLayoutClean); | 481 DocumentLifecycle::kLayoutClean); |
483 bool result = frame_caret_->ShouldPaintCaret(block); | 482 bool result = frame_caret_->ShouldPaintCaret(block); |
484 DCHECK(!result || (ComputeVisibleSelectionInDOMTreeDeprecated().IsCaret() && | 483 DCHECK(!result || (ComputeVisibleSelectionInDOMTreeDeprecated().IsCaret() && |
485 ComputeVisibleSelectionInDOMTree().HasEditableStyle())); | 484 ComputeVisibleSelectionInDOMTree().HasEditableStyle())); |
486 return result; | 485 return result; |
487 } | 486 } |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 } | 1180 } |
1182 | 1181 |
1183 void showTree(const blink::FrameSelection* sel) { | 1182 void showTree(const blink::FrameSelection* sel) { |
1184 if (sel) | 1183 if (sel) |
1185 sel->ShowTreeForThis(); | 1184 sel->ShowTreeForThis(); |
1186 else | 1185 else |
1187 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; | 1186 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; |
1188 } | 1187 } |
1189 | 1188 |
1190 #endif | 1189 #endif |
OLD | NEW |