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

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

Issue 2414263002: Audit the use of updateStyleAndLayoutIgnorePendingStylesheets in toNormalizedEphemeralRange (Closed)
Patch Set: fix nit 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 return; 172 return;
173 if (!m_fragment || !m_fragment->hasChildren()) 173 if (!m_fragment || !m_fragment->hasChildren())
174 return; 174 return;
175 175
176 TRACE_EVENT0("blink", "ReplacementFragment constructor"); 176 TRACE_EVENT0("blink", "ReplacementFragment constructor");
177 Element* editableRoot = selection.rootEditableElement(); 177 Element* editableRoot = selection.rootEditableElement();
178 DCHECK(editableRoot); 178 DCHECK(editableRoot);
179 if (!editableRoot) 179 if (!editableRoot)
180 return; 180 return;
181 181
182 m_document->updateStyleAndLayoutIgnorePendingStylesheets();
183
182 Element* shadowAncestorElement; 184 Element* shadowAncestorElement;
183 if (editableRoot->isInShadowTree()) 185 if (editableRoot->isInShadowTree())
184 shadowAncestorElement = editableRoot->ownerShadowHost(); 186 shadowAncestorElement = editableRoot->ownerShadowHost();
185 else 187 else
186 shadowAncestorElement = editableRoot; 188 shadowAncestorElement = editableRoot;
187 189
188 if (!editableRoot->getAttributeEventListener( 190 if (!editableRoot->getAttributeEventListener(
189 EventTypeNames::webkitBeforeTextInserted) 191 EventTypeNames::webkitBeforeTextInserted)
190 // FIXME: Remove these checks once textareas and textfields actually 192 // FIXME: Remove these checks once textareas and textfields actually
191 // register an event handler. 193 // register an event handler.
(...skipping 1888 matching lines...) Expand 10 before | Expand all | Expand 10 after
2080 visitor->trace(m_startOfInsertedContent); 2082 visitor->trace(m_startOfInsertedContent);
2081 visitor->trace(m_endOfInsertedContent); 2083 visitor->trace(m_endOfInsertedContent);
2082 visitor->trace(m_insertionStyle); 2084 visitor->trace(m_insertionStyle);
2083 visitor->trace(m_documentFragment); 2085 visitor->trace(m_documentFragment);
2084 visitor->trace(m_startOfInsertedRange); 2086 visitor->trace(m_startOfInsertedRange);
2085 visitor->trace(m_endOfInsertedRange); 2087 visitor->trace(m_endOfInsertedRange);
2086 CompositeEditCommand::trace(visitor); 2088 CompositeEditCommand::trace(visitor);
2087 } 2089 }
2088 2090
2089 } // namespace blink 2091 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698