[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
enrica at apple.com
enrica at apple.com
Tue Jan 5 23:58:01 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit aa0c26ed5d9884b12a1a85372ceba1b79bb8d239
Author: enrica at apple.com <enrica at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Dec 22 00:57:59 2009 +0000
WebCore: REGRESSION(4.0.4-ToT): Indent deletes non highlighted text in gmail.
<rdar://problem/7489326>
https://bugs.webkit.org/show_bug.cgi?id=32843
Reviewed by Maciej Stachowiak.
The fix for 7442387 did not handle the case where the end of paragraph
is not a descendant of the computed outer block.
Updated editing/execCommand/indent-with-style2.html to cover this case too.
* editing/CompositeEditCommand.cpp:
(WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
LayoutTests: REGRESSION(4.0.4-ToT): Indent deletes non highlighted text in gmail.
<rdar://problem/7489326>
https://bugs.webkit.org/show_bug.cgi?id=32843
Reviewed by Maciej Stachowiak.
The fix for 7442387 did not handle the case where the end of paragraph
is not a descendant of the computed outer block.
Updated editing/execCommand/indent-with-style2.html to cover this case too.
* editing/execCommand/indent-with-style2-expected.txt:
* editing/execCommand/indent-with-style2.html:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@52465 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index f7c2aa4..3496e32 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-21 Enrica Casucci <enrica at apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ REGRESSION(4.0.4-ToT): Indent deletes non highlighted text in gmail.
+ <rdar://problem/7489326>
+ https://bugs.webkit.org/show_bug.cgi?id=32843
+
+ The fix for 7442387 did not handle the case where the end of paragraph
+ is not a descendant of the computed outer block.
+ Updated editing/execCommand/indent-with-style2.html to cover this case too.
+
+ * editing/execCommand/indent-with-style2-expected.txt:
+ * editing/execCommand/indent-with-style2.html:
+
2009-12-21 Dirk Pranke <dpranke at chromium.org>
Reviewed by Adam Barth.
diff --git a/LayoutTests/editing/execCommand/indent-with-style2-expected.txt b/LayoutTests/editing/execCommand/indent-with-style2-expected.txt
index 4f961c3..c6ab572 100644
--- a/LayoutTests/editing/execCommand/indent-with-style2-expected.txt
+++ b/LayoutTests/editing/execCommand/indent-with-style2-expected.txt
@@ -1,10 +1,12 @@
This tests indenting paragraphs with different inline styles combinations.
-Bug 32233 Radar 7442387
+Bug 32233 Radar 7442387
+Bug 32843 Radar 7489326
one
two three
fourfive
four
foobar
-Before: one <div id="test1"><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">two</span> three</div> <div id="test2">four<span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">five</span></div> <div><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">four</span></div> <ul><li><b>foo</b>bar</li></ul>
-After: <blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"> one <div id="test1"><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">two</span> three</div><div id="test2">four<span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">five</span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">four</span></div></blockquote> <ul><ul><li><b>foo</b>bar</li></ul></ul>
+five six seven
+Before: one <div id="test1"><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">two</span> three</div> <div id="test2">four<span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">five</span></div> <div><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">four</span></div> <ul><li><b>foo</b>bar</li></ul> <span class="Apple-style-span" style="background-color: rgb(255, 0, 0);"><font class="Apple-style-span" color="#3333FF">five</font></span> six <b><i>seven</i></b>
+After: <blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"> one <div id="test1"><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">two</span> three</div><div id="test2">four<span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">five</span></div><div><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">four</span></div></blockquote> <ul><ul><li><b>foo</b>bar</li></ul></ul> <blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);"><font class="Apple-style-span" color="#3333FF">five</font></span> six <b><i>seven</i></b></blockquote>
diff --git a/LayoutTests/editing/execCommand/indent-with-style2.html b/LayoutTests/editing/execCommand/indent-with-style2.html
index 7a9c3cb..8192ced 100644
--- a/LayoutTests/editing/execCommand/indent-with-style2.html
+++ b/LayoutTests/editing/execCommand/indent-with-style2.html
@@ -4,6 +4,9 @@ This tests indenting paragraphs with different inline styles combinations.
<p>
<a href="https://bugs.webkit.org/show_bug.cgi?id=32233">Bug 32233</a>
<a href="rdar://problem/7442387"> Radar 7442387</a>
+<br>
+<a href="https://bugs.webkit.org/show_bug.cgi?id=32843">Bug 32843</a>
+<a href="rdar://problem/7489326"> Radar 7489326</a>
</p>
<div id="e" contenteditable="true">
one
@@ -11,6 +14,7 @@ This tests indenting paragraphs with different inline styles combinations.
<div id="test2">four<span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">five</span></div>
<div><span class="Apple-style-span" style="background-color: rgb(255, 0, 0);">four</span></div>
<ul><li><b>foo</b>bar</li></ul>
+ <span class="Apple-style-span" style="background-color: rgb(255, 0, 0);"><font class="Apple-style-span" color="#3333FF">five</font></span> six <b><i>seven</i></b>
</div>
<ul id="console"></ul>
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 1e383f6..39305ed 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2009-12-21 Enrica Casucci <enrica at apple.com>
+
+ Reviewed by Maciej Stachowiak.
+
+ REGRESSION(4.0.4-ToT): Indent deletes non highlighted text in gmail.
+ <rdar://problem/7489326>
+ https://bugs.webkit.org/show_bug.cgi?id=32843
+
+ The fix for 7442387 did not handle the case where the end of paragraph
+ is not a descendant of the computed outer block.
+ Updated editing/execCommand/indent-with-style2.html to cover this case too.
+
+ * editing/CompositeEditCommand.cpp:
+ (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement):
+
2009-12-21 Gavin Barraclough <barraclough at apple.com>
Reviewed by Darin Adler.
diff --git a/WebCore/editing/CompositeEditCommand.cpp b/WebCore/editing/CompositeEditCommand.cpp
index 2796690..4c858d0 100644
--- a/WebCore/editing/CompositeEditCommand.cpp
+++ b/WebCore/editing/CompositeEditCommand.cpp
@@ -771,9 +771,17 @@ void CompositeEditCommand::cloneParagraphUnderNewElement(Position& start, Positi
// cloning all the siblings until end.node() is reached.
if (start.node() != end.node() && !start.node()->isDescendantOf(end.node())) {
+ // If end is not a descendant of outerNode we need to
+ // find the first common ancestor and adjust the insertion
+ // point accordingly.
+ while (!end.node()->isDescendantOf(outerNode)) {
+ outerNode = outerNode->parentNode();
+ topNode = topNode->parentNode();
+ }
+
for (Node* n = start.node()->traverseNextSibling(outerNode); n; n = n->nextSibling()) {
if (n->parentNode() != start.node()->parentNode())
- lastNode = topNode->firstChild();
+ lastNode = topNode->lastChild();
RefPtr<Node> clonedNode = n->cloneNode(true);
insertNodeAfter(clonedNode, lastNode);
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list