Title: [89145] trunk
- Revision
- 89145
- Author
- [email protected]
- Date
- 2011-06-17 11:01:00 -0700 (Fri, 17 Jun 2011)
Log Message
2011-06-17 Annie Sullivan <[email protected]>
Reviewed by Ryosuke Niwa.
div can be a child of span on InsertParagraph
https://bugs.webkit.org/show_bug.cgi?id=62687
Update layout test results with new code to prevent div inside of span.
* editing/inserting/return-key-span-start-expected.txt: The new result is the correct behavior.
* editing/inserting/return-with-object-element-expected.txt: An extra space has been added before the newline.
2011-06-17 Annie Sullivan <[email protected]>
Reviewed by Ryosuke Niwa.
div can be a child of span on InsertParagraph
https://bugs.webkit.org/show_bug.cgi?id=62687
Handle the special case where the insertion point is the first position in the enclosing block node.
The div for the new paragraph should be inserted as a child of the enclosing block node, otherwise
it could be inserted as a child of a span or other inline element.
* editing/InsertParagraphSeparatorCommand.cpp:
(WebCore::InsertParagraphSeparatorCommand::doApply):
Modified Paths
Diff
Modified: trunk/LayoutTests/ChangeLog (89144 => 89145)
--- trunk/LayoutTests/ChangeLog 2011-06-17 18:00:59 UTC (rev 89144)
+++ trunk/LayoutTests/ChangeLog 2011-06-17 18:01:00 UTC (rev 89145)
@@ -1,3 +1,15 @@
+2011-06-17 Annie Sullivan <[email protected]>
+
+ Reviewed by Ryosuke Niwa.
+
+ div can be a child of span on InsertParagraph
+ https://bugs.webkit.org/show_bug.cgi?id=62687
+
+ Update layout test results with new code to prevent div inside of span.
+
+ * editing/inserting/return-key-span-start-expected.txt: The new result is the correct behavior.
+ * editing/inserting/return-with-object-element-expected.txt: An extra space has been added before the newline.
+
2011-06-17 Yuta Kitamura <[email protected]>
Unreviewed, update Chromium test expectation for fast/dom/HTMLMeterElement/meter-writing-mode.html.
Modified: trunk/LayoutTests/editing/inserting/return-key-span-start-expected.txt (89144 => 89145)
--- trunk/LayoutTests/editing/inserting/return-key-span-start-expected.txt 2011-06-17 18:00:59 UTC (rev 89144)
+++ trunk/LayoutTests/editing/inserting/return-key-span-start-expected.txt 2011-06-17 18:01:00 UTC (rev 89145)
@@ -1,8 +1,8 @@
This sets the selection to the start of a span, and hits the enter key.
Expected behavior: when the span is split, its ID should not be duplicated. See bug 62621.
+| <div>
+| <span>
+| <br>
| <span>
| id="dupe"
-| <div>
-| <span>
-| <br>
| "<#selection-caret>hello"
Modified: trunk/LayoutTests/editing/inserting/return-with-object-element-expected.txt (89144 => 89145)
--- trunk/LayoutTests/editing/inserting/return-with-object-element-expected.txt 2011-06-17 18:00:59 UTC (rev 89144)
+++ trunk/LayoutTests/editing/inserting/return-with-object-element-expected.txt 2011-06-17 18:01:00 UTC (rev 89145)
@@ -1,6 +1,6 @@
+
-
This test is solely making sure we don't crash.
If this page loaded then no crash occured.
Modified: trunk/Source/WebCore/ChangeLog (89144 => 89145)
--- trunk/Source/WebCore/ChangeLog 2011-06-17 18:00:59 UTC (rev 89144)
+++ trunk/Source/WebCore/ChangeLog 2011-06-17 18:01:00 UTC (rev 89145)
@@ -1,3 +1,17 @@
+2011-06-17 Annie Sullivan <[email protected]>
+
+ Reviewed by Ryosuke Niwa.
+
+ div can be a child of span on InsertParagraph
+ https://bugs.webkit.org/show_bug.cgi?id=62687
+
+ Handle the special case where the insertion point is the first position in the enclosing block node.
+ The div for the new paragraph should be inserted as a child of the enclosing block node, otherwise
+ it could be inserted as a child of a span or other inline element.
+
+ * editing/InsertParagraphSeparatorCommand.cpp:
+ (WebCore::InsertParagraphSeparatorCommand::doApply):
+
2011-06-17 Eric Uhrhane <[email protected]>
Reviewed by Adam Barth.
Modified: trunk/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp (89144 => 89145)
--- trunk/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp 2011-06-17 18:00:59 UTC (rev 89144)
+++ trunk/Source/WebCore/editing/InsertParagraphSeparatorCommand.cpp 2011-06-17 18:01:00 UTC (rev 89145)
@@ -263,6 +263,11 @@
if (isFirstInBlock && !nestNewBlock)
refNode = startBlock;
+ else if (isFirstInBlock && nestNewBlock) {
+ // startBlock should always have children, otherwise isLastInBlock would be true and it's handled above.
+ ASSERT(startBlock->firstChild());
+ refNode = startBlock->firstChild();
+ }
else if (insertionPosition.deprecatedNode() == startBlock && nestNewBlock) {
refNode = startBlock->childNode(insertionPosition.deprecatedEditingOffset());
ASSERT(refNode); // must be true or we'd be in the end of block case
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes