| 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 | 509 |
| 510 void FrameSelection::InvalidatePaint(const LayoutBlock& block, | 510 void FrameSelection::InvalidatePaint(const LayoutBlock& block, |
| 511 const PaintInvalidatorContext& context) { | 511 const PaintInvalidatorContext& context) { |
| 512 frame_caret_->InvalidatePaint(block, context); | 512 frame_caret_->InvalidatePaint(block, context); |
| 513 } | 513 } |
| 514 | 514 |
| 515 bool FrameSelection::ShouldPaintCaret(const LayoutBlock& block) const { | 515 bool FrameSelection::ShouldPaintCaret(const LayoutBlock& block) const { |
| 516 DCHECK_GE(GetDocument().Lifecycle().GetState(), | 516 DCHECK_GE(GetDocument().Lifecycle().GetState(), |
| 517 DocumentLifecycle::kLayoutClean); | 517 DocumentLifecycle::kLayoutClean); |
| 518 bool result = frame_caret_->ShouldPaintCaret(block); | 518 bool result = frame_caret_->ShouldPaintCaret(block); |
| 519 DCHECK(!result || (ComputeVisibleSelectionInDOMTreeDeprecated().IsCaret() && | 519 DCHECK(!result || (ComputeVisibleSelectionInDOMTree().IsCaret() && |
| 520 ComputeVisibleSelectionInDOMTree().HasEditableStyle())); | 520 ComputeVisibleSelectionInDOMTree().HasEditableStyle())); |
| 521 return result; | 521 return result; |
| 522 } | 522 } |
| 523 | 523 |
| 524 IntRect FrameSelection::AbsoluteCaretBounds() { | 524 IntRect FrameSelection::AbsoluteCaretBounds() { |
| 525 DCHECK(ComputeVisibleSelectionInDOMTree().IsValidFor(*frame_->GetDocument())); | 525 DCHECK(ComputeVisibleSelectionInDOMTree().IsValidFor(*frame_->GetDocument())); |
| 526 return frame_caret_->AbsoluteCaretBounds(); | 526 return frame_caret_->AbsoluteCaretBounds(); |
| 527 } | 527 } |
| 528 | 528 |
| 529 void FrameSelection::PaintCaret(GraphicsContext& context, | 529 void FrameSelection::PaintCaret(GraphicsContext& context, |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1218 } | 1218 } |
| 1219 | 1219 |
| 1220 void showTree(const blink::FrameSelection* sel) { | 1220 void showTree(const blink::FrameSelection* sel) { |
| 1221 if (sel) | 1221 if (sel) |
| 1222 sel->ShowTreeForThis(); | 1222 sel->ShowTreeForThis(); |
| 1223 else | 1223 else |
| 1224 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; | 1224 LOG(INFO) << "Cannot showTree for <null> FrameSelection."; |
| 1225 } | 1225 } |
| 1226 | 1226 |
| 1227 #endif | 1227 #endif |
| OLD | NEW |