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

Side by Side Diff: Source/core/editing/Caret.cpp

Issue 59963002: Unable to delete the first and the last characters of a contenteditable div with display: table. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Adding new method to preserve old behavior. Created 7 years, 1 month 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 clear(); 113 clear();
114 } 114 }
115 115
116 void CaretBase::clearCaretRect() 116 void CaretBase::clearCaretRect()
117 { 117 {
118 m_caretLocalRect = LayoutRect(); 118 m_caretLocalRect = LayoutRect();
119 } 119 }
120 120
121 static inline bool caretRendersInsideNode(Node* node) 121 static inline bool caretRendersInsideNode(Node* node)
122 { 122 {
123 return node && !isTableElement(node) && !editingIgnoresContent(node); 123 return node && !isRenderedTable(node) && !editingIgnoresContent(node);
124 } 124 }
125 125
126 RenderObject* CaretBase::caretRenderer(Node* node) 126 RenderObject* CaretBase::caretRenderer(Node* node)
127 { 127 {
128 if (!node) 128 if (!node)
129 return 0; 129 return 0;
130 130
131 RenderObject* renderer = node->renderer(); 131 RenderObject* renderer = node->renderer();
132 if (!renderer) 132 if (!renderer)
133 return 0; 133 return 0;
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 context->fillRect(caret, caretColor); 269 context->fillRect(caret, caretColor);
270 } 270 }
271 271
272 void DragCaretController::paintDragCaret(Frame* frame, GraphicsContext* p, const LayoutPoint& paintOffset, const LayoutRect& clipRect) const 272 void DragCaretController::paintDragCaret(Frame* frame, GraphicsContext* p, const LayoutPoint& paintOffset, const LayoutRect& clipRect) const
273 { 273 {
274 if (m_position.deepEquivalent().deprecatedNode()->document().frame() == fram e) 274 if (m_position.deepEquivalent().deprecatedNode()->document().frame() == fram e)
275 paintCaret(m_position.deepEquivalent().deprecatedNode(), p, paintOffset, clipRect); 275 paintCaret(m_position.deepEquivalent().deprecatedNode(), p, paintOffset, clipRect);
276 } 276 }
277 277
278 } 278 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698