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

Issue 9477008: REGRESSION(r99076): WebKit pastes the trailing newline into a single-line text field (Closed)

Created:
8 years, 10 months ago by rniwa-cr
Modified:
8 years, 10 months ago
Reviewers:
rniwa-cr
CC:
chromium-reviews
Base URL:
http://svn.webkit.org/repository/webkit/branches/chromium/963/
Visibility:
Public.

Description

REGRESSION(r99076): WebKit pastes the trailing newline into a single-line text field https://bugs.webkit.org/show_bug.cgi?id=79305 Reviewed by Tony Chang. LayoutTests: Add a regression test. Also make Markup.dump() dump the shadow DOM of the specififed node. * editing/input/paste-text-ending-with-interchange-newline-expected.txt: Added. * editing/input/paste-text-ending-with-interchange-newline.html: Added. * resources/dump-as-markup.js: (Markup._get): (Markup._getShadowHostIfPossible): Source/WebCore: The bug was caused by ReplacementFragment::m_hasInterchangeNewlineAtEnd not reset even when text field's beforeTextInserted event handler removed interchange new lines at the end. Because the event handler is responsible for trimming new lines, we need to recompute the values for m_hasInterchangeNewlineAt* after the event dispatch. Test: editing/input/paste-text-ending-with-interchange-newline.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::ReplacementFragment): Merge 108668 - REGRESSION(r99076): WebKit pastes the trailing newline into a single-line text field https://bugs.webkit.org/show_bug.cgi?id=79305 Reviewed by Tony Chang. Source/WebCore: The bug was caused by ReplacementFragment::m_hasInterchangeNewlineAtEnd not reset even when text field's beforeTextInserted event handler removed interchange new lines at the end. Because the event handler is responsible for trimming new lines, we need to recompute the values for m_hasInterchangeNewlineAt* after the event dispatch. Test: editing/input/paste-text-ending-with-interchange-newline.html * editing/ReplaceSelectionCommand.cpp: (WebCore::ReplacementFragment::ReplacementFragment): LayoutTests: Add a regression test. Also make Markup.dump() dump the shadow DOM of the specififed node. * editing/input/paste-text-ending-with-interchange-newline-expected.txt: Added. * editing/input/paste-text-ending-with-interchange-newline.html: Added. * resources/dump-as-markup.js: (Markup._get): (Markup._getShadowHostIfPossible): TBR=rniwa@webkit.org Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=109012

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+17 lines, -6 lines) Patch
A + LayoutTests/editing/input/paste-text-ending-with-interchange-newline.html View 0 chunks +-1 lines, --1 lines 0 comments Download
A + LayoutTests/editing/input/paste-text-ending-with-interchange-newline-expected.txt View 0 chunks +-1 lines, --1 lines 0 comments Download
M LayoutTests/resources/dump-as-markup.js View 3 chunks +16 lines, -8 lines 0 comments Download
M Source/WebCore/editing/ReplaceSelectionCommand.cpp View 1 chunk +3 lines, -0 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
rniwa-cr
8 years, 10 months ago (2012-02-27 19:51:56 UTC) #1

          

Powered by Google App Engine
This is Rietveld 408576698