RenderBlock {DIV} at (14,14) size 756x28
RenderText {TEXT} at (0,0) size 32x28
text run at (0,0) width 32: "foo"
- RenderBlock {P} at (14,42) size 756x28
+ RenderBlock {DIV} at (14,42) size 756x28
RenderBR {BR} at (0,0) size 0x28
RenderBlock (anonymous) at (14,70) size 756x0
RenderBlock {DIV} at (14,70) size 756x28
RenderText {TEXT} at (0,0) size 34x28
text run at (0,0) width 34: "baz"
selection is CARET:
-start: position 0 of child 1 {BR} of child 2 {P} of root {DIV}
-upstream: position 0 of child 2 {P} of root {DIV}
-downstream: position 0 of child 1 {BR} of child 2 {P} of root {DIV}
+start: position 0 of child 1 {BR} of child 2 {DIV} of root {DIV}
+upstream: position 0 of child 2 {DIV} of root {DIV}
+downstream: position 0 of child 1 {BR} of child 2 {DIV} of root {DIV}
RenderBlock {P} at (2,2) size 780x28
RenderText {TEXT} at (0,0) size 17x28
text run at (0,0) width 17: "A"
- RenderBlock {P} at (2,30) size 780x28
+ RenderBlock {DIV} at (2,30) size 780x28
RenderBR {BR} at (0,0) size 0x28
RenderBlock (anonymous) at (2,58) size 780x0
RenderBlock {P} at (2,58) size 780x28
RenderBR {BR} at (0,0) size 0x28
selection is CARET:
-start: position 0 of child 1 {BR} of child 3 {P} of child 1 {DIV} of root {DIV}
-upstream: position 0 of child 3 {P} of child 1 {DIV} of root {DIV}
-downstream: position 0 of child 1 {BR} of child 3 {P} of child 1 {DIV} of root {DIV}
+start: position 0 of child 1 {BR} of child 3 {DIV} of child 1 {DIV} of root {DIV}
+upstream: position 0 of child 3 {DIV} of child 1 {DIV} of root {DIV}
+downstream: position 0 of child 1 {BR} of child 3 {DIV} of child 1 {DIV} of root {DIV}
RenderBlock (anonymous) at (0,0) size 784x28
RenderText {TEXT} at (0,0) size 637x28
text run at (0,0) width 637: "Test inserting paragraphs: should see empty blue box above \"bar\""
- RenderBlock {DIV} at (0,28) size 784x12
- RenderBlock {DIV} at (0,40) size 784x56 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (0,28) size 784x36
+ RenderBlock {DIV} at (0,64) size 784x56 [border: (2px solid #FF0000)]
RenderText {TEXT} at (14,14) size 34x28
text run at (14,14) width 34: "baz"
- RenderBlock {P} at (0,96) size 784x56 [border: (2px solid #0000FF)]
+ RenderBlock {DIV} at (0,120) size 784x56 [border: (2px solid #0000FF)]
RenderBR {BR} at (14,14) size 0x28
- RenderBlock (anonymous) at (0,152) size 784x28
+ RenderBlock (anonymous) at (0,176) size 784x28
RenderText {TEXT} at (0,0) size 31x28
text run at (0,0) width 31: "bar"
- RenderBlock {DIV} at (0,180) size 784x56 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (0,204) size 784x56 [border: (2px solid #FF0000)]
RenderText {TEXT} at (14,14) size 32x28
text run at (14,14) width 32: "foo"
- RenderBlock {DIV} at (0,236) size 784x56 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (0,260) size 784x56 [border: (2px solid #FF0000)]
RenderBR {BR} at (14,14) size 0x28
selection is CARET:
start: position 0 of child 6 {TEXT} of root {BODY}
border: 2px solid red;
padding: 12px;
}
-p {
+div {
border: 2px solid blue;
padding: 12px;
}
Test inserting paragraphs: should see empty blue box above "bar"
-<div style="height: 12px"></div>
+<div style="border: none; height: 12px"></div>
<div class="editing" id="test">baz</div>bar<div class="editing">foo</div>
<div class="editing"><br class="khtml-block-placeholder"></div>
RenderBlock (anonymous) at (0,0) size 784x28
RenderText {TEXT} at (0,0) size 638x28
text run at (0,0) width 638: "Test inserting paragraphs: should see empty blue box below \"bar\""
- RenderBlock {DIV} at (0,28) size 784x12
- RenderBlock {DIV} at (0,40) size 784x56 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (0,28) size 784x36
+ RenderBlock {DIV} at (0,64) size 784x56 [border: (2px solid #FF0000)]
RenderText {TEXT} at (14,14) size 34x28
text run at (14,14) width 34: "baz"
- RenderBlock (anonymous) at (0,96) size 784x28
+ RenderBlock (anonymous) at (0,120) size 784x28
RenderText {TEXT} at (0,0) size 31x28
text run at (0,0) width 31: "bar"
- RenderBlock {P} at (0,124) size 784x56 [border: (2px solid #0000FF)]
+ RenderBlock {DIV} at (0,148) size 784x56 [border: (2px solid #0000FF)]
RenderBR {BR} at (14,14) size 0x28
- RenderBlock {DIV} at (0,180) size 784x56 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (0,204) size 784x56 [border: (2px solid #FF0000)]
RenderText {TEXT} at (14,14) size 32x28
text run at (14,14) width 32: "foo"
- RenderBlock {DIV} at (0,236) size 784x56 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (0,260) size 784x56 [border: (2px solid #FF0000)]
RenderBR {BR} at (14,14) size 0x28
selection is CARET:
-start: position 0 of child 1 {BR} of child 6 {P} of root {BODY}
-upstream: position 0 of child 6 {P} of root {BODY}
-downstream: position 0 of child 1 {BR} of child 6 {P} of root {BODY}
+start: position 0 of child 1 {BR} of child 6 {DIV} of root {BODY}
+upstream: position 0 of child 6 {DIV} of root {BODY}
+downstream: position 0 of child 1 {BR} of child 6 {DIV} of root {BODY}
border: 2px solid red;
padding: 12px;
}
-p {
+div {
border: 2px solid blue;
padding: 12px;
}
Test inserting paragraphs: should see empty blue box below "bar"
-<div style="height: 12px"></div>
+<div style="border: none; height: 12px"></div>
<div class="editing" id="test">baz</div>bar<div class="editing">foo</div>
<div class="editing"><br class="khtml-block-placeholder"></div>
RenderBlock (anonymous) at (0,0) size 784x28
RenderText {TEXT} at (0,0) size 667x28
text run at (0,0) width 667: "Test inserting paragraphs: should see an empty blue box below \"bar\""
- RenderBlock {DIV} at (0,28) size 784x12
- RenderBlock (anonymous) at (0,40) size 784x28
+ RenderBlock {DIV} at (0,28) size 784x36
+ RenderBlock (anonymous) at (0,64) size 784x28
RenderText {TEXT} at (0,0) size 31x28
text run at (0,0) width 31: "bar"
- RenderBlock {P} at (0,68) size 784x56 [border: (2px solid #0000FF)]
+ RenderBlock {DIV} at (0,92) size 784x56 [border: (2px solid #0000FF)]
RenderBR {BR} at (14,14) size 0x28
- RenderBlock {DIV} at (0,124) size 784x56 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (0,148) size 784x56 [border: (2px solid #FF0000)]
RenderText {TEXT} at (14,14) size 34x28
text run at (14,14) width 34: "baz"
selection is CARET:
-start: position 0 of child 1 {BR} of child 4 {P} of root {BODY}
-upstream: position 0 of child 4 {P} of root {BODY}
-downstream: position 0 of child 1 {BR} of child 4 {P} of root {BODY}
+start: position 0 of child 1 {BR} of child 4 {DIV} of root {BODY}
+upstream: position 0 of child 4 {DIV} of root {BODY}
+downstream: position 0 of child 1 {BR} of child 4 {DIV} of root {BODY}
border: 2px solid red;
padding: 12px;
}
-p {
+div {
border: 2px solid blue;
padding: 12px;
}
Test inserting paragraphs: should see an empty blue box below "bar"
-<div style="height: 12px"></div>
+<div style="border: none; height: 12px"></div>
bar<div class="editing" id="test">baz</div>
RenderText {TEXT} at (0,0) size 748x56
text run at (0,0) width 748: "Test inserting paragraphs: should see an empty blue box above an empty line"
text run at (0,28) width 237: "between \"foo\" and \"bar\""
- RenderBlock {DIV} at (0,56) size 784x12
- RenderBlock {P} at (0,92) size 784x56 [border: (2px solid #FF0000)]
+ RenderBlock {DIV} at (0,56) size 784x36
+ RenderBlock {P} at (0,116) size 784x56 [border: (2px solid #FF0000)]
RenderText {TEXT} at (14,14) size 32x28
text run at (14,14) width 32: "foo"
- RenderBlock {P} at (0,172) size 784x56 [border: (2px solid #0000FF)]
+ RenderBlock {DIV} at (0,196) size 784x56 [border: (2px solid #0000FF)]
RenderBR {BR} at (14,14) size 0x28
- RenderBlock (anonymous) at (0,228) size 784x28
+ RenderBlock (anonymous) at (0,252) size 784x28
RenderBR {BR} at (0,0) size 0x28
- RenderBlock {P} at (0,280) size 784x56 [border: (2px solid #FF0000)]
+ RenderBlock {P} at (0,304) size 784x56 [border: (2px solid #FF0000)]
RenderText {TEXT} at (14,14) size 31x28
text run at (14,14) width 31: "bar"
selection is CARET:
border: 2px solid red;
padding: 12px;
}
-p {
+div {
border: 2px solid blue;
padding: 12px;
}
Test inserting paragraphs: should see an empty blue box above an empty line between "foo" and "bar"
-<div style="height: 12px"></div>
+<div style="border: none; height: 12px"></div>
<p id="test" class="editing">foo</p><br><p class="editing">bar</p>
RenderText {TEXT} at (0,0) size 772x56
text run at (0,0) width 772: "Test inserting paragraphs: should see a blue box with \"bar\" in it, and two blank "
text run at (0,28) width 295: "lines between \"foo\" and \"bar\"."
- RenderBlock {DIV} at (0,56) size 784x12
- RenderBlock (anonymous) at (0,68) size 784x84
+ RenderBlock {DIV} at (0,56) size 784x36
+ RenderBlock (anonymous) at (0,92) size 784x84
RenderInline {SPAN} at (0,0) size 32x28
RenderText {TEXT} at (0,0) size 32x28
text run at (0,0) width 32: "foo"
RenderBR {BR} at (0,0) size 0x0
RenderBR {BR} at (0,28) size 0x28
RenderBR {BR} at (0,56) size 0x28
- RenderBlock {P} at (0,152) size 784x56 [border: (2px solid #0000FF)]
+ RenderBlock {DIV} at (0,176) size 784x56 [border: (2px solid #0000FF)]
RenderText {TEXT} at (14,14) size 31x28
text run at (14,14) width 31: "bar"
selection is CARET:
-start: position 0 of child 1 {TEXT} of child 8 {P} of root {BODY}
-upstream: position 0 of child 8 {P} of root {BODY}
-downstream: position 0 of child 1 {TEXT} of child 8 {P} of root {BODY}
+start: position 0 of child 1 {TEXT} of child 8 {DIV} of root {BODY}
+upstream: position 0 of child 8 {DIV} of root {BODY}
+downstream: position 0 of child 1 {TEXT} of child 8 {DIV} of root {BODY}
border: 2px solid red;
padding: 12px;
}
-p {
+div {
border: 2px solid blue;
padding: 12px;
}
-br {
- background-color: green;
-}
</style>
<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
Test inserting paragraphs: should see a blue box with "bar" in it, and two blank lines between "foo" and "bar".
-<div style="height: 12px"></div>
+<div style="border: none; height: 12px"></div>
<span id="test">foo</span><br><br>bar
text run at (670,28) width 6: " "
text run at (0,56) width 769: "REGRESSION (Mail): After deleting, hitting return key does not insert visible "
text run at (0,84) width 77: "newline"
- RenderBlock {DIV} at (0,112) size 784x12
- RenderBlock (anonymous) at (0,124) size 784x28
+ RenderBlock {DIV} at (0,112) size 784x36
+ RenderBlock (anonymous) at (0,148) size 784x28
RenderInline {SPAN} at (0,0) size 32x28
RenderText {TEXT} at (0,0) size 32x28
text run at (0,0) width 32: "foo"
- RenderBlock {P} at (0,152) size 784x56 [border: (2px solid #0000FF)]
+ RenderBlock {DIV} at (0,176) size 784x56 [border: (2px solid #0000FF)]
RenderBR {BR} at (14,14) size 0x28
- RenderBlock {P} at (0,208) size 784x56 [border: (2px solid #0000FF)]
+ RenderBlock {DIV} at (0,232) size 784x56 [border: (2px solid #0000FF)]
RenderText {TEXT} at (14,14) size 31x28
text run at (14,14) width 31: "bar"
selection is CARET:
-start: position 0 of child 1 {TEXT} of child 8 {P} of root {BODY}
-upstream: position 0 of child 8 {P} of root {BODY}
-downstream: position 0 of child 1 {TEXT} of child 8 {P} of root {BODY}
+start: position 0 of child 1 {TEXT} of child 8 {DIV} of root {BODY}
+upstream: position 0 of child 8 {DIV} of root {BODY}
+downstream: position 0 of child 1 {TEXT} of child 8 {DIV} of root {BODY}
border: 2px solid red;
padding: 12px;
}
-p {
+div {
border: 2px solid blue;
padding: 12px;
}
-br {
- background-color: green;
-}
</style>
<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
<a href="rdar://problem/3924579"><rdar://problem/3924579></a> REGRESSION (Mail): After deleting, hitting return key does not insert visible newline
-<div style="height: 12px"></div>
+<div style="border: none; height: 12px"></div>
<span id="test">foo</span><br>bar
text run at (0,0) width 78: "xxxxxx "
RenderText {TEXT} at (78,0) size 72x28
text run at (78,0) width 72: "xxxxxx"
- RenderBlock {P} at (14,42) size 756x28
+ RenderBlock {DIV} at (14,42) size 756x28
RenderText {TEXT} at (0,0) size 78x28
text run at (0,0) width 78: " xxxxxx"
RenderInline {SPAN} at (0,0) size 78x28
start: position 0 of child 5 {TEXT} of root {DIV}
upstream: position 7 of child 1 {TEXT} of child 4 {SPAN} of root {DIV}
downstream: position 0 of child 5 {TEXT} of root {DIV}
-end: position 7 of child 1 {TEXT} of child 6 {P} of root {DIV}
-upstream: position 7 of child 1 {TEXT} of child 6 {P} of root {DIV}
-downstream: position 0 of child 1 {TEXT} of child 2 {SPAN} of child 6 {P} of root {DIV}
+end: position 7 of child 1 {TEXT} of child 6 {DIV} of root {DIV}
+upstream: position 7 of child 1 {TEXT} of child 6 {DIV} of root {DIV}
+downstream: position 0 of child 1 {TEXT} of child 2 {SPAN} of child 6 {DIV} of root {DIV}
RenderText {TEXT} at (78,0) size 72x28
text run at (78,0) width 72: "xxxxxx"
RenderBlock (anonymous) at (14,42) size 756x28
- RenderBlock {P} at (0,0) size 756x28
+ RenderBlock {DIV} at (0,0) size 756x28
RenderText {TEXT} at (0,0) size 78x28
text run at (0,0) width 78: " xxxxxx"
RenderInline {SPAN} at (0,0) size 78x28
start: position 0 of child 1 {TEXT} of child 2 {B} of child 4 {SPAN} of root {DIV}
upstream: position 7 of child 1 {TEXT} of child 1 {B} of child 4 {SPAN} of root {DIV}
downstream: position 0 of child 1 {TEXT} of child 2 {B} of child 4 {SPAN} of root {DIV}
-end: position 7 of child 1 {TEXT} of child 2 {P} of child 2 {B} of child 4 {SPAN} of root {DIV}
-upstream: position 7 of child 1 {TEXT} of child 2 {P} of child 2 {B} of child 4 {SPAN} of root {DIV}
-downstream: position 0 of child 1 {TEXT} of child 2 {SPAN} of child 2 {P} of child 2 {B} of child 4 {SPAN} of root {DIV}
+end: position 7 of child 1 {TEXT} of child 2 {DIV} of child 2 {B} of child 4 {SPAN} of root {DIV}
+upstream: position 7 of child 1 {TEXT} of child 2 {DIV} of child 2 {B} of child 4 {SPAN} of root {DIV}
+downstream: position 0 of child 1 {TEXT} of child 2 {SPAN} of child 2 {DIV} of child 2 {B} of child 4 {SPAN} of root {DIV}
RenderText {TEXT} at (0,0) size 150x28
text run at (0,0) width 150: "xxxxxx xxxxxx"
RenderBlock (anonymous) at (14,42) size 756x28
- RenderBlock {P} at (0,0) size 756x28
+ RenderBlock {DIV} at (0,0) size 756x28
RenderText {TEXT} at (0,0) size 156x28
text run at (0,0) width 156: " xxxxxx xxxxxx"
RenderBlock (anonymous) at (14,70) size 756x0
RenderInline {SPAN} at (0,0) size 0x0
selection is CARET:
-start: position 14 of child 1 {TEXT} of child 2 {P} of child 4 {SPAN} of root {DIV}
-upstream: position 14 of child 1 {TEXT} of child 2 {P} of child 4 {SPAN} of root {DIV}
-downstream: position 14 of child 1 {TEXT} of child 2 {P} of child 4 {SPAN} of root {DIV}
+start: position 14 of child 1 {TEXT} of child 2 {DIV} of child 4 {SPAN} of root {DIV}
+upstream: position 14 of child 1 {TEXT} of child 2 {DIV} of child 4 {SPAN} of root {DIV}
+downstream: position 14 of child 1 {TEXT} of child 2 {DIV} of child 4 {SPAN} of root {DIV}
RenderText {TEXT} at (0,0) size 150x28
text run at (0,0) width 150: "xxxxxx xxxxxx"
RenderBlock (anonymous) at (14,42) size 756x28
- RenderBlock {P} at (0,0) size 756x28
+ RenderBlock {DIV} at (0,0) size 756x28
RenderText {TEXT} at (0,0) size 156x28
text run at (0,0) width 156: " xxxxxx xxxxxx"
RenderBlock (anonymous) at (14,70) size 756x0
RenderInline {SPAN} at (0,0) size 0x0
RenderInline {B} at (0,0) size 0x0
selection is CARET:
-start: position 14 of child 1 {TEXT} of child 2 {P} of child 1 {B} of child 4 {SPAN} of root {DIV}
-upstream: position 14 of child 1 {TEXT} of child 2 {P} of child 1 {B} of child 4 {SPAN} of root {DIV}
-downstream: position 14 of child 1 {TEXT} of child 2 {P} of child 1 {B} of child 4 {SPAN} of root {DIV}
+start: position 14 of child 1 {TEXT} of child 2 {DIV} of child 1 {B} of child 4 {SPAN} of root {DIV}
+upstream: position 14 of child 1 {TEXT} of child 2 {DIV} of child 1 {B} of child 4 {SPAN} of root {DIV}
+downstream: position 14 of child 1 {TEXT} of child 2 {DIV} of child 1 {B} of child 4 {SPAN} of root {DIV}
+2005-02-17 Ken Kocienda <kocienda@apple.com>
+
+ Reviewed by Hyatt
+
+ Fix for this bug:
+
+ <rdar://problem/3982183> Mail's HTML paragraphs appear with unintended margins in Entourage and Eudora
+
+ * khtml/editing/htmlediting.cpp:
+ (khtml::createDefaultParagraphElement): Change element we make from <p> to <div>.
+ This fixes the problem, as these other mailers show <div> elements without margins.
+
+ Some test files needed to change to preserve the ability to "eyeball" the results.
+ Many others changed just because their <p> elements changed to <div> elements.
+
+ * layout-tests/editing/deleting/delete-3928305-fix-expected.txt
+ * layout-tests/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt
+ * layout-tests/editing/inserting/insert-div-013-expected.txt
+ * layout-tests/editing/inserting/insert-div-013.html
+ * layout-tests/editing/inserting/insert-div-014-expected.txt
+ * layout-tests/editing/inserting/insert-div-014.html
+ * layout-tests/editing/inserting/insert-div-018-expected.txt
+ * layout-tests/editing/inserting/insert-div-018.html
+ * layout-tests/editing/inserting/insert-div-019-expected.txt
+ * layout-tests/editing/inserting/insert-div-019.html
+ * layout-tests/editing/inserting/insert-div-020-expected.txt
+ * layout-tests/editing/inserting/insert-div-020.html
+ * layout-tests/editing/inserting/insert-div-021-expected.txt
+ * layout-tests/editing/inserting/insert-div-021.html
+ * layout-tests/editing/style/remove-underline-across-paragraph-expected.txt
+ * layout-tests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt
+ * layout-tests/editing/style/remove-underline-after-paragraph-expected.txt
+ * layout-tests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt
+
2005-02-17 Ken Kocienda <kocienda@apple.com>
Reviewed by Hyatt
ElementImpl *createDefaultParagraphElement(DocumentImpl *document)
{
- static const DOMString defaultParagraphStyle("margin-top: 0; margin-bottom: 0");
+ // We would need this margin-zeroing and attribute-setter code back if we ever
+ // return to using <p> elements for default paragraphs.
+ //static const DOMString defaultParagraphStyle("margin-top: 0; margin-bottom: 0");
int exceptionCode = 0;
- ElementImpl *element = document->createHTMLElement("p", exceptionCode);
+ ElementImpl *element = document->createHTMLElement("div", exceptionCode);
ASSERT(exceptionCode == 0);
- element->setAttribute(ATTR_STYLE, defaultParagraphStyle);
+ //element->setAttribute(ATTR_STYLE, defaultParagraphStyle);
return element;
}