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

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

Issue 2425543003: Ensure clean layout for VisibleSelection::selectionFromContentsOfNode (Closed)
Patch Set: 201610171619 Created 4 years, 2 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) 2005, 2006, 2008 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved.
3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved. 3 * Copyright (C) 2009, 2010, 2011 Google Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 } 308 }
309 309
310 HTMLElement* ReplacementFragment::insertFragmentForTestRendering( 310 HTMLElement* ReplacementFragment::insertFragmentForTestRendering(
311 Element* rootEditableElement) { 311 Element* rootEditableElement) {
312 TRACE_EVENT0("blink", "ReplacementFragment::insertFragmentForTestRendering"); 312 TRACE_EVENT0("blink", "ReplacementFragment::insertFragmentForTestRendering");
313 DCHECK(m_document); 313 DCHECK(m_document);
314 HTMLElement* holder = createDefaultParagraphElement(*m_document.get()); 314 HTMLElement* holder = createDefaultParagraphElement(*m_document.get());
315 315
316 holder->appendChild(m_fragment); 316 holder->appendChild(m_fragment);
317 rootEditableElement->appendChild(holder); 317 rootEditableElement->appendChild(holder);
318
319 // TODO(editing-dev): Hoist this call to the call sites.
318 m_document->updateStyleAndLayoutIgnorePendingStylesheets(); 320 m_document->updateStyleAndLayoutIgnorePendingStylesheets();
319 321
320 return holder; 322 return holder;
321 } 323 }
322 324
323 void ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment( 325 void ReplacementFragment::restoreAndRemoveTestRenderingNodesToFragment(
324 Element* holder) { 326 Element* holder) {
325 if (!holder) 327 if (!holder)
326 return; 328 return;
327 329
(...skipping 1754 matching lines...) Expand 10 before | Expand all | Expand 10 after
2082 visitor->trace(m_startOfInsertedContent); 2084 visitor->trace(m_startOfInsertedContent);
2083 visitor->trace(m_endOfInsertedContent); 2085 visitor->trace(m_endOfInsertedContent);
2084 visitor->trace(m_insertionStyle); 2086 visitor->trace(m_insertionStyle);
2085 visitor->trace(m_documentFragment); 2087 visitor->trace(m_documentFragment);
2086 visitor->trace(m_startOfInsertedRange); 2088 visitor->trace(m_startOfInsertedRange);
2087 visitor->trace(m_endOfInsertedRange); 2089 visitor->trace(m_endOfInsertedRange);
2088 CompositeEditCommand::trace(visitor); 2090 CompositeEditCommand::trace(visitor);
2089 } 2091 }
2090 2092
2091 } // namespace blink 2093 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698