Chromium Code Reviews| 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 244af9b18523595cd0f673b34e8687372f453327..4b7a190bcc8f4fcd7cfb16c21e2298fc69e0996f 100644 |
| --- a/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp |
| +++ b/third_party/WebKit/Source/core/editing/commands/CompositeEditCommand.cpp |
| @@ -1972,6 +1972,9 @@ Position CompositeEditCommand::positionAvoidingSpecialElementBoundary( |
| if (!enclosingAnchor) |
| return original; |
| } |
| + |
| + document().updateStyleAndLayoutIgnorePendingStylesheets(); |
|
yosin_UTC9
2017/01/12 04:52:26
Could you add following comment as same as others:
Xiaocheng
2017/01/12 07:39:43
We don't use to put this notes in editing/commands
yosin_UTC9
2017/01/12 09:39:55
Talk offline. We don't need to have a comment ment
|
| + |
| // Don't insert outside an anchor if doing so would skip over a line |
| // break. It would probably be safe to move the line break so that we |
| // could still avoid the anchor here. |
| @@ -1984,8 +1987,6 @@ Position CompositeEditCommand::positionAvoidingSpecialElementBoundary( |
| result = Position::inParentAfterNode(*enclosingAnchor); |
| } |
| - document().updateStyleAndLayoutIgnorePendingStylesheets(); |
| - |
| // If visually just before an anchor, insert *outside* the anchor unless |
| // it's the first VisiblePosition in a paragraph, to match NSTextView. |
| if (visiblePos.deepEquivalent() == firstInAnchor.deepEquivalent()) { |