[Webkit-unassigned] [Bug 49288] REGRESSION (Safari 5?): Pasting a line into textarea inserts two newlines
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 26 00:22:21 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=49288
Ryosuke Niwa <rniwa at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|webkit-unassigned at lists.web |rniwa at webkit.org
|kit.org |
CC| |shezbaig.wk at gmail.com
--- Comment #4 from Ryosuke Niwa <rniwa at webkit.org> 2012-06-26 00:22:19 PST ---
Fix:
Index: Source/WebCore/editing/ReplaceSelectionCommand.cpp
===================================================================
--- Source/WebCore/editing/ReplaceSelectionCommand.cpp (revision 121106)
+++ Source/WebCore/editing/ReplaceSelectionCommand.cpp (working copy)
@@ -123,9 +123,12 @@
// The two positions above are the same visual position, but we want to stay in the same block.
Node* enclosingBlockNode = enclosingBlock(pos.containerNode());
for (Position nextPosition = pos; nextPosition.containerNode() != enclosingBlockNode; pos = nextPosition) {
+ if (lineBreakExistsAtPosition(pos))
+ break;
+
if (pos.containerNode()->nonShadowBoundaryParentNode())
nextPosition = positionInParentAfterNode(pos.containerNode());
-
+
if (nextPosition == pos
|| enclosingBlock(nextPosition.containerNode()) != enclosingBlockNode
|| VisiblePosition(pos) != VisiblePosition(nextPosition))
I'll post a patch tomorrow.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list