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

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

Issue 2741853009: Fix wrong display item type for drag caret (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
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/selection/drag-caret.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 const LayoutPoint& paintOffset, 253 const LayoutPoint& paintOffset,
254 DisplayItem::Type displayItemType) const { 254 DisplayItem::Type displayItemType) const {
255 if (DrawingRecorder::useCachedDrawingIfPossible(context, *this, 255 if (DrawingRecorder::useCachedDrawingIfPossible(context, *this,
256 displayItemType)) 256 displayItemType))
257 return; 257 return;
258 258
259 LayoutRect drawingRect = m_localRect; 259 LayoutRect drawingRect = m_localRect;
260 drawingRect.moveBy(paintOffset); 260 drawingRect.moveBy(paintOffset);
261 261
262 IntRect paintRect = pixelSnappedIntRect(drawingRect); 262 IntRect paintRect = pixelSnappedIntRect(drawingRect);
263 DrawingRecorder drawingRecorder(context, *this, DisplayItem::kCaret, 263 DrawingRecorder drawingRecorder(context, *this, displayItemType, paintRect);
264 paintRect);
265 context.fillRect(paintRect, m_color); 264 context.fillRect(paintRect, m_color);
266 } 265 }
267 266
268 String CaretDisplayItemClient::debugName() const { 267 String CaretDisplayItemClient::debugName() const {
269 return "Caret"; 268 return "Caret";
270 } 269 }
271 270
272 LayoutRect CaretDisplayItemClient::visualRect() const { 271 LayoutRect CaretDisplayItemClient::visualRect() const {
273 return m_visualRect; 272 return m_visualRect;
274 } 273 }
275 274
276 } // namespace blink 275 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/paint/selection/drag-caret.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698