| 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 692 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 703 LayoutView* view = m_frame->document()->layoutView(); | 703 LayoutView* view = m_frame->document()->layoutView(); |
| 704 if (m_previousCaretNode && (shouldRepaintCaret(*m_previousCaretNode) || shou
ldRepaintCaret(view))) | 704 if (m_previousCaretNode && (shouldRepaintCaret(*m_previousCaretNode) || shou
ldRepaintCaret(view))) |
| 705 invalidateLocalCaretRect(m_previousCaretNode.get(), m_previousCaretRect)
; | 705 invalidateLocalCaretRect(m_previousCaretNode.get(), m_previousCaretRect)
; |
| 706 if (newNode && (shouldRepaintCaret(*newNode) || shouldRepaintCaret(view))) | 706 if (newNode && (shouldRepaintCaret(*newNode) || shouldRepaintCaret(view))) |
| 707 invalidateLocalCaretRect(newNode, newRect); | 707 invalidateLocalCaretRect(newNode, newRect); |
| 708 m_previousCaretNode = newNode; | 708 m_previousCaretNode = newNode; |
| 709 m_previousCaretRect = newRect; | 709 m_previousCaretRect = newRect; |
| 710 m_previousCaretVisibility = caretVisibility(); | 710 m_previousCaretVisibility = caretVisibility(); |
| 711 } | 711 } |
| 712 | 712 |
| 713 void FrameSelection::paintCaret(GraphicsContext* context, const LayoutPoint& pai
ntOffset) | 713 void FrameSelection::paintCaret(GraphicsContext& context, const LayoutPoint& pai
ntOffset) |
| 714 { | 714 { |
| 715 if (selection().isCaret() && m_shouldPaintCaret) { | 715 if (selection().isCaret() && m_shouldPaintCaret) { |
| 716 updateCaretRect(PositionWithAffinity(selection().start(), selection().af
finity())); | 716 updateCaretRect(PositionWithAffinity(selection().start(), selection().af
finity())); |
| 717 CaretBase::paintCaret(selection().start().anchorNode(), context, paintOf
fset); | 717 CaretBase::paintCaret(selection().start().anchorNode(), context, paintOf
fset); |
| 718 } | 718 } |
| 719 } | 719 } |
| 720 | 720 |
| 721 template <typename Strategy> | 721 template <typename Strategy> |
| 722 bool FrameSelection::containsAlgorithm(const LayoutPoint& point) | 722 bool FrameSelection::containsAlgorithm(const LayoutPoint& point) |
| 723 { | 723 { |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1406 | 1406 |
| 1407 void showTree(const blink::FrameSelection* sel) | 1407 void showTree(const blink::FrameSelection* sel) |
| 1408 { | 1408 { |
| 1409 if (sel) | 1409 if (sel) |
| 1410 sel->showTreeForThis(); | 1410 sel->showTreeForThis(); |
| 1411 else | 1411 else |
| 1412 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); | 1412 fprintf(stderr, "Cannot showTree for (nil) FrameSelection.\n"); |
| 1413 } | 1413 } |
| 1414 | 1414 |
| 1415 #endif | 1415 #endif |
| OLD | NEW |