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

Unified Diff: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp

Issue 2089993003: Get rid of EUpdateStyle parameter from isEditablePosition() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 2016-06-27T14:42:23 Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
diff --git a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
index 7e4d9ba1de11ff4b4f5c682fed2f7de3a6b92cc6..c0d9030727ba5011dc26aa0840f4266a819d1eea 100644
--- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
+++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp
@@ -342,7 +342,8 @@ void CompositeEditCommand::insertNodeAfter(Node* insertChild, Node* refChild, Ed
void CompositeEditCommand::insertNodeAt(Node* insertChild, const Position& editingPosition, EditingState* editingState)
{
- ABORT_EDITING_COMMAND_IF(!isEditablePosition(editingPosition, ContentIsEditable, DoNotUpdateStyle));
+ document().updateStyleAndLayoutIgnorePendingStylesheets();
+ ABORT_EDITING_COMMAND_IF(!isEditablePosition(editingPosition, ContentIsEditable));
// For editing positions like [table, 0], insert before the table,
// likewise for replaced elements, brs, etc.
Position p = editingPosition.parentAnchoredEquivalent();
@@ -964,7 +965,7 @@ HTMLElement* CompositeEditCommand::insertNewDefaultParagraphElementAt(const Posi
// it, and return that block. Otherwise return 0.
HTMLElement* CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary(const Position& pos, EditingState* editingState)
{
- DCHECK(isEditablePosition(pos, ContentIsEditable, DoNotUpdateStyle)) << pos;
+ DCHECK(isEditablePosition(pos, ContentIsEditable)) << pos;
// It's strange that this function is responsible for verifying that pos has not been invalidated
// by an earlier call to this function. The caller, applyBlockStyle, should do this.

Powered by Google App Engine
This is Rietveld 408576698