Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: third_party/WebKit/Source/core/editing/DragCaret.cpp

Issue 2737043002: Fix caret paint invalidation issue on partial lifecycle updates (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 } 42 }
43 43
44 void DragCaret::clearPreviousVisualRect(const LayoutBlock& block) { 44 void DragCaret::clearPreviousVisualRect(const LayoutBlock& block) {
45 m_displayItemClient->clearPreviousVisualRect(block); 45 m_displayItemClient->clearPreviousVisualRect(block);
46 } 46 }
47 47
48 void DragCaret::layoutBlockWillBeDestroyed(const LayoutBlock& block) { 48 void DragCaret::layoutBlockWillBeDestroyed(const LayoutBlock& block) {
49 m_displayItemClient->layoutBlockWillBeDestroyed(block); 49 m_displayItemClient->layoutBlockWillBeDestroyed(block);
50 } 50 }
51 51
52 void DragCaret::updateStyleAndLayoutIfNeeded() { 52 void DragCaret::updateForPaintInvalidation() {
53 m_displayItemClient->updateStyleAndLayoutIfNeeded( 53 m_displayItemClient->updateForPaintInvalidation(
54 rootEditableElementOf(m_position.position()) ? m_position 54 rootEditableElementOf(m_position.position()) ? m_position
55 : PositionWithAffinity()); 55 : PositionWithAffinity());
56 } 56 }
57 57
58 void DragCaret::invalidatePaintIfNeeded(const LayoutBlock& block, 58 void DragCaret::invalidatePaintIfNeeded(const LayoutBlock& block,
59 const PaintInvalidatorContext& context, 59 const PaintInvalidatorContext& context,
60 PaintInvalidationReason reason) { 60 PaintInvalidationReason reason) {
61 m_displayItemClient->invalidatePaintIfNeeded(block, context, reason); 61 m_displayItemClient->invalidatePaintIfNeeded(block, context, reason);
62 } 62 }
63 63
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 void DragCaret::paintDragCaret(const LocalFrame* frame, 110 void DragCaret::paintDragCaret(const LocalFrame* frame,
111 GraphicsContext& context, 111 GraphicsContext& context,
112 const LayoutPoint& paintOffset) const { 112 const LayoutPoint& paintOffset) const {
113 if (m_position.anchorNode()->document().frame() != frame) 113 if (m_position.anchorNode()->document().frame() != frame)
114 return; 114 return;
115 m_displayItemClient->paintCaret(context, paintOffset, 115 m_displayItemClient->paintCaret(context, paintOffset,
116 DisplayItem::kDragCaret); 116 DisplayItem::kDragCaret);
117 } 117 }
118 118
119 } // namespace blink 119 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698