--- /dev/null
+layer at (0,0) size 800x660
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x660
+ RenderBlock {HTML} at (0,0) size 800x660
+ RenderBody {BODY} at (8,8) size 784x628
+ RenderBlock (anonymous) at (0,0) size 784x84
+ RenderText {TEXT} at (0,0) size 760x56
+ text run at (0,0) width 760: "Test inserting paragraphs and managing typing style correctly: \"x\" under \"line"
+ text run at (0,28) width 344: "2\" should be bold. Fix for this bug: "
+ RenderInline {A} at (0,0) size 260x28 [color=#0000EE]
+ RenderText {TEXT} at (344,28) size 260x28
+ text run at (344,28) width 260: "<rdar://problem/3939523>"
+ RenderText {TEXT} at (604,28) size 749x56
+ text run at (604,28) width 145: " in some cases,"
+ text run at (0,56) width 543: "text does not retain style info after pressing return twice"
+ RenderBlock {DIV} at (0,84) size 784x12
+ RenderBlock {P} at (0,120) size 784x56 [border: (2px solid #0000FF)]
+ RenderText {TEXT} at (14,14) size 55x28
+ text run at (14,14) width 55: "line 1"
+ RenderBlock {P} at (0,200) size 784x56 [border: (2px solid #0000FF)]
+ RenderBR {BR} at (14,14) size 0x28
+ RenderBlock {P} at (0,280) size 784x56 [border: (2px solid #0000FF)]
+ RenderInline {B} at (0,0) size 56x28
+ RenderText {TEXT} at (14,14) size 56x28
+ text run at (14,14) width 56: "line 2"
+ RenderBlock {P} at (0,360) size 784x28 [border: (2px solid #0000FF)]
+ RenderBlock {P} at (0,412) size 784x56 [border: (2px solid #0000FF)]
+ RenderInline {B} at (0,0) size 12x28
+ RenderText {TEXT} at (14,14) size 12x28
+ text run at (14,14) width 12: "x"
+ RenderBlock {P} at (0,492) size 784x56 [border: (2px solid #0000FF)]
+ RenderBR {BR} at (14,14) size 0x28
+ RenderBlock {P} at (0,572) size 784x56 [border: (2px solid #0000FF)]
+ RenderText {TEXT} at (14,14) size 55x28
+ text run at (14,14) width 55: "line 3"
+selection is CARET:
+start: position 1 of child 1 {TEXT} of child 1 {B} of child 12 {P} of root {BODY}
+upstream: position 1 of child 1 {TEXT} of child 1 {B} of child 12 {P} of root {BODY}
+downstream: position 1 of child 1 {TEXT} of child 1 {B} of child 12 {P} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+body {
+ font-size: 24px;
+}
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+}
+p {
+ border: 2px solid blue;
+ padding: 12px;
+}
+br {
+ background-color: green;
+}
+
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 14; i++)
+ moveSelectionForwardByCharacterCommand();
+ insertParagraphCommand();
+ insertParagraphCommand();
+ typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+
+Test inserting paragraphs and managing typing style correctly: "x" under "line 2" should be bold. Fix for this bug:
+<a href="rdar://problem/3939523"><rdar://problem/3939523></a> in some cases, text does not retain style info after pressing return twice
+<div style="height: 12px"></div>
+
+<p id="test">line 1</p>
+<p><br class="khtml-block-placeholder"></p>
+<p><b>line 2</b></p>
+<p><br class="khtml-block-placeholder"></p>
+<p>line 3</p>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
--- /dev/null
+layer at (0,0) size 800x600
+ RenderCanvas at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x568
+ RenderBlock (anonymous) at (0,0) size 784x112
+ RenderText {TEXT} at (0,0) size 743x56
+ text run at (0,0) width 743: "Test inserting paragraphs and managing typing style correctly: Only \"line 1\""
+ text run at (0,28) width 621: "should be bold. Other lines should be non-bold. Fix for this bug:"
+ RenderInline {A} at (0,0) size 260x28 [color=#0000EE]
+ RenderText {TEXT} at (0,56) size 260x28
+ text run at (0,56) width 260: "<rdar://problem/3944492>"
+ RenderText {TEXT} at (260,56) size 718x56
+ text run at (260,56) width 458: " after pressing return twice, text is bold when it"
+ text run at (0,84) width 116: "shouldn't be"
+ RenderBlock {DIV} at (0,112) size 784x12
+ RenderBlock {P} at (0,148) size 784x56 [border: (2px solid #0000FF)]
+ RenderInline {B} at (0,0) size 56x28
+ RenderText {TEXT} at (14,14) size 56x28
+ text run at (14,14) width 56: "line 1"
+ RenderBlock {P} at (0,228) size 784x56 [border: (2px solid #0000FF)]
+ RenderText {TEXT} at (14,14) size 36x28
+ text run at (14,14) width 36: "xxx"
+ RenderBlock {P} at (0,308) size 784x28 [border: (2px solid #0000FF)]
+ RenderBlock {P} at (0,360) size 784x56 [border: (2px solid #0000FF)]
+ RenderText {TEXT} at (14,14) size 36x28
+ text run at (14,14) width 36: "xxx"
+selection is CARET:
+start: position 3 of child 1 {TEXT} of child 9 {P} of root {BODY}
+upstream: position 3 of child 1 {TEXT} of child 9 {P} of root {BODY}
+downstream: position 3 of child 1 {TEXT} of child 9 {P} of root {BODY}
--- /dev/null
+<html>
+<head>
+
+<style>
+body {
+ font-size: 24px;
+}
+.editing {
+ border: 2px solid red;
+ padding: 12px;
+}
+p {
+ border: 2px solid blue;
+ padding: 12px;
+}
+br {
+ background-color: green;
+}
+
+</style>
+<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
+
+<script>
+
+function editingTest() {
+ for (i = 0; i < 6; i++)
+ extendSelectionForwardByCharacterCommand();
+ boldCommand();
+ moveSelectionForwardByCharacterCommand();
+ insertParagraphCommand();
+ boldCommand();
+ for (i = 0; i < 3; i++)
+ typeCharacterCommand();
+ insertParagraphCommand();
+ insertParagraphCommand();
+ for (i = 0; i < 3; i++)
+ typeCharacterCommand();
+}
+
+</script>
+
+<title>Editing Test</title>
+</head>
+<body contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
+
+Test inserting paragraphs and managing typing style correctly: Only "line 1" should be bold. Other lines should be non-bold. Fix for this bug:
+<a href="rdar://problem/3944492"><rdar://problem/3944492></a> after pressing return twice, text is bold when it shouldn't be
+<div style="height: 12px"></div>
+
+<p id="test">line 1</p>
+
+<script>
+runEditingTest();
+</script>
+
+</body>
+</html>
+2005-01-07 Ken Kocienda <kocienda@apple.com>
+
+ Reviewed by Kevin
+
+ Fix for these bugs:
+
+ <rdar://problem/3939523> in some cases, text does not retain style info after pressing return twice
+ <rdar://problem/3944492> after pressing return twice, text is bold when it shouldn't be
+
+ * khtml/editing/htmlediting.cpp:
+ (khtml::InsertParagraphSeparatorCommand::setFullTypingStyleBeforeInsertion):
+ Merge the typing style with the computed style for the current position. Fixes both bugs.
+ * khtml/editing/htmlediting.h:
+ * layout-tests/editing/inserting/insert-div-023-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-023.html: Added.
+ * layout-tests/editing/inserting/insert-div-024-expected.txt: Added.
+ * layout-tests/editing/inserting/insert-div-024.html: Added.
+
2005-01-07 David Hyatt <hyatt@apple.com>
Fix for 3941364, make sure tables reset overflowWidth/Height when they lay out again. Fixes the odd scrolling
m_fullTypingStyle = computedStyle->copyInheritableProperties();
m_fullTypingStyle->ref();
computedStyle->deref();
+
+ CSSMutableStyleDeclarationImpl *typingStyle = document()->part()->typingStyle();
+ if (typingStyle)
+ m_fullTypingStyle->merge(typingStyle);
}
void InsertParagraphSeparatorCommand::calculateAndSetTypingStyleAfterInsertion()