| Index: third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
|
| diff --git a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
|
| index c203467ba4fa2fc68bee0534f95a68392d6216a0..585ca0d0cbd7eaf14a4eb28019d479f965879438 100644
|
| --- a/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
|
| +++ b/third_party/WebKit/Source/core/layout/line/BreakingContextInlineHeaders.h
|
| @@ -1159,6 +1159,13 @@ inline void BreakingContext::commitAndUpdateLineBreakIfNeeded()
|
|
|
| if (m_width.committedWidth()) {
|
| m_atEnd = true;
|
| + // When the leading or trailing space of text is collapsed and a line break is inserted instead of it,
|
| + // we need to restore the space while the text is copied(ctrl+c). See http://crbug.com/318925
|
| + if (m_lastObject && m_lastObject.isText() && m_current.getLineLayoutItem().isText()) {
|
| + LineLayoutText lastLayoutText(m_lastObject);
|
| + if (lastLayoutText.text().endsWith(' '))
|
| + lastLayoutText.setNeedToRestoreCollapsedSpace(true);
|
| + }
|
| return;
|
| }
|
|
|
|
|