Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
LayoutTests:
Reviewed by darin <rdar://problem/5002441> Pressing space key does nothing above quoted content or a signature Demonstrates the bug: * editing/inserting/5002441-expected.checksum: Added. * editing/inserting/5002441-expected.png: Added. * editing/inserting/5002441-expected.txt: Added. * editing/inserting/5002441.html: Added. Fixed. Spaces passed to execCommand("InsertText", ...) are no longer collapsed: * editing/inserting/editable-html-element-expected.checksum: * editing/inserting/editable-html-element-expected.png: * editing/inserting/editable-html-element-expected.txt: * editing/pasteboard/4989774-expected.checksum: * editing/pasteboard/4989774-expected.png: * editing/pasteboard/4989774-expected.txt: * editing/selection/4983858-expected.checksum: * editing/selection/4983858-expected.png: * editing/selection/4983858-expected.txt: WebCore: Reviewed by darin <rdar://problem/5002441> Pressing space key does nothing above quoted content or a signature Inserting a space under these circumstances inserts a single text node containing a regular space and then does a layout. That space isn't rendered (which is correct). Whitespace rebalancing is supposed to correct it but failed. It replaces the space with a non-breaking space, but that change doesn't dirty line boxes (9441) and so the space isn't rendered. This workaround turns all incoming spaces into non-breaking spaces before they're inserted (they're rebalanced after insertion and turned back into regular spaces if possible). * editing/InsertTextCommand.cpp: (WebCore::InsertTextCommand::prepareForTextInsertion): Removed an old irrelevant FIXME. (WebCore::InsertTextCommand::input): Turn incoming spaces into non breaking spaces before inserting them. Canonical link: https://commits.webkit.org/17713@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@21212 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Justin Garcia
committed
May 1, 2007
1 parent
a6e3c97
commit 205caec
Showing
16 changed files
with
98 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
8b38b5e23cc2dd94143e16a399ebda26 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
layer at (0,0) size 800x600 | ||
RenderView at (0,0) size 800x600 | ||
layer at (0,0) size 800x600 | ||
RenderBlock {HTML} at (0,0) size 800x600 | ||
RenderBody {BODY} at (8,8) size 784x584 | ||
RenderBlock {P} at (0,0) size 784x18 | ||
RenderText {#text} at (0,0) size 521x18 | ||
text run at (0,0) width 521: "This tests for a bug where spaces couldn't be inserted before signatures and replies." | ||
RenderBlock {DIV} at (0,34) size 784x36 | ||
RenderBlock (anonymous) at (0,0) size 784x18 | ||
RenderText {#text} at (0,0) size 4x18 | ||
text run at (0,0) width 4: " " | ||
RenderBR {BR} at (4,14) size 0x0 | ||
RenderBlock {DIV} at (0,18) size 784x18 | ||
RenderText {#text} at (0,0) size 345x18 | ||
text run at (0,0) width 345: "There should be a single space in the paragraph above." | ||
caret: position 1 of child 0 {#text} of child 2 {DIV} of child 0 {BODY} of child 0 {HTML} of document |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<p>This tests for a bug where spaces couldn't be inserted before signatures and replies.</p> | ||
<div id="div" contenteditable="true"><br><div>There should be a single space in the paragraph above.</div></div> | ||
<script> | ||
var div = document.getElementById("div"); | ||
var selection = window.getSelection(); | ||
selection.setPosition(div, 0); | ||
document.execCommand("InsertText", false, " "); | ||
</script> |
2 changes: 1 addition & 1 deletion
2
LayoutTests/editing/inserting/editable-html-element-expected.checksum
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
d53960e87b7f062db7c195bd7a7a7f9a | ||
1186e4514352fbbb37f6518c9093f1c3 |
Binary file modified
BIN
-3 Bytes
(100%)
LayoutTests/editing/inserting/editable-html-element-expected.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
6c03d26dbbfba19f07b9a4e4a1c322d0 | ||
be6fd52ad002752178c046831f449f1c |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
27a07777535624367be11a3a86abf096 | ||
28b7b7fc983f2d802da039a49859f928 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters