[webkit-reviews] review granted: [Bug 79305] REGRESSION(r99076): WebKit pastes the trailing newline into a single-line text field : [Attachment 128348] Fixes the bug

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Feb 23 09:58:08 PST 2012


Tony Chang <tony at chromium.org> has granted Ryosuke Niwa <rniwa at webkit.org>'s
request for review:
Bug 79305: REGRESSION(r99076): WebKit pastes the trailing newline into a
single-line text field
https://bugs.webkit.org/show_bug.cgi?id=79305

Attachment 128348: Fixes the bug
https://bugs.webkit.org/attachment.cgi?id=128348&action=review

------- Additional Comments from Tony Chang <tony at chromium.org>
View in context: https://bugs.webkit.org/attachment.cgi?id=128348&action=review


> Source/WebCore/editing/ReplaceSelectionCommand.cpp:188
> +	   // New lines may have been pruned by text field's before text
inserted event.
> +	   m_hasInterchangeNewlineAtStart = false;
> +	   m_hasInterchangeNewlineAtEnd = false;

It looks like these can be set to true by removeInterchangeNodes().  Do we need
to reset these values after the call to removeInterchangeNodes() 2 lines down? 
I guess it's not obvious why we set the values at this spot.

> LayoutTests/resources/dump-as-markup.js:242
> +Markup._getShadowHostIfPossible = function (node, depth)

Nit: Remove the space between function and open parenthesis.


More information about the webkit-reviews mailing list