The behavior of <pre> is broken so that the newline
authorhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jun 2005 22:37:11 +0000 (22:37 +0000)
committerhyatt <hyatt@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Jun 2005 22:37:11 +0000 (22:37 +0000)
commit32589e4bd101d84d7d8551baf85d2948ac71189e
tree30e6c5334fc687ff2bee3608f6b3f4c38c087921
parent94ba4f0331a0973f1f1ad4961ed938c2b62e985a
The behavior of <pre> is broken so that the newline
is not always properly being eaten after the open of the tag.  In addition we were eating the first newline
after all other tags.  This patch stops eating newlines after other tags and refines the behavior for pre
to catch all cases.

        Reviewed by sullivan

        Test cases added: fast/text/whitespace/030.html

        * khtml/html/htmltokenizer.cpp:
        (khtml::HTMLTokenizer::parseTag):
        (khtml::HTMLTokenizer::write):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@9396 268f45cc-cd09-0410-ab3c-d52691b4dbfc
290 files changed:
LayoutTests/css1/classification/white_space-expected.txt
LayoutTests/css1/text_properties/vertical_align-expected.txt
LayoutTests/editing/deleting/collapse-whitespace-3587601-fix-expected.txt
LayoutTests/editing/deleting/delete-3608430-fix-expected.txt
LayoutTests/editing/deleting/delete-3608445-fix-expected.txt
LayoutTests/editing/deleting/delete-3608462-fix-expected.txt
LayoutTests/editing/deleting/delete-3775172-fix-expected.txt
LayoutTests/editing/deleting/delete-3800834-fix-expected.txt
LayoutTests/editing/deleting/delete-3857753-fix-expected.txt
LayoutTests/editing/deleting/delete-3865854-fix-expected.txt
LayoutTests/editing/deleting/delete-3928305-fix-expected.txt
LayoutTests/editing/deleting/delete-3959464-fix-expected.txt
LayoutTests/editing/deleting/delete-4083333-fix-expected.txt
LayoutTests/editing/deleting/delete-after-span-ws-001-expected.txt
LayoutTests/editing/deleting/delete-after-span-ws-002-expected.txt
LayoutTests/editing/deleting/delete-after-span-ws-003-expected.txt
LayoutTests/editing/deleting/delete-and-undo-expected.txt
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-001-expected.txt
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-002-expected.txt
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-003-expected.txt
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-004-expected.txt
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-005-expected.txt
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-006-expected.txt
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-007-expected.txt
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-009-expected.txt
LayoutTests/editing/deleting/delete-at-paragraph-boundaries-010-expected.txt
LayoutTests/editing/deleting/delete-block-contents-001-expected.txt
LayoutTests/editing/deleting/delete-block-contents-002-expected.txt
LayoutTests/editing/deleting/delete-block-contents-003-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-001-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-002-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-003-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-004-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-005-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-006-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-007-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-008-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-009-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-010-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-011-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-012-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-013-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-014-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-015-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-016-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-017-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-018-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-019-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-020-expected.txt
LayoutTests/editing/deleting/delete-block-merge-contents-021-expected.txt
LayoutTests/editing/deleting/delete-br-001-expected.txt
LayoutTests/editing/deleting/delete-br-002-expected.txt
LayoutTests/editing/deleting/delete-br-003-expected.txt
LayoutTests/editing/deleting/delete-br-004-expected.txt
LayoutTests/editing/deleting/delete-br-005-expected.txt
LayoutTests/editing/deleting/delete-br-006-expected.txt
LayoutTests/editing/deleting/delete-br-007-expected.txt
LayoutTests/editing/deleting/delete-character-001-expected.txt
LayoutTests/editing/deleting/delete-contiguous-ws-001-expected.txt
LayoutTests/editing/deleting/delete-image-001-expected.txt
LayoutTests/editing/deleting/delete-image-002-expected.txt
LayoutTests/editing/deleting/delete-image-003-expected.txt
LayoutTests/editing/deleting/delete-image-004-expected.txt
LayoutTests/editing/deleting/delete-leading-ws-001-expected.txt
LayoutTests/editing/deleting/delete-line-001-expected.txt
LayoutTests/editing/deleting/delete-line-002-expected.txt
LayoutTests/editing/deleting/delete-line-003-expected.txt
LayoutTests/editing/deleting/delete-line-004-expected.txt
LayoutTests/editing/deleting/delete-line-005-expected.txt
LayoutTests/editing/deleting/delete-line-006-expected.txt
LayoutTests/editing/deleting/delete-line-007-expected.txt
LayoutTests/editing/deleting/delete-line-008-expected.txt
LayoutTests/editing/deleting/delete-line-009-expected.txt
LayoutTests/editing/deleting/delete-line-010-expected.txt
LayoutTests/editing/deleting/delete-line-011-expected.txt
LayoutTests/editing/deleting/delete-line-012-expected.txt
LayoutTests/editing/deleting/delete-line-013-expected.txt
LayoutTests/editing/deleting/delete-line-014-expected.txt
LayoutTests/editing/deleting/delete-line-015-expected.txt
LayoutTests/editing/deleting/delete-line-016-expected.txt
LayoutTests/editing/deleting/delete-line-017-expected.txt
LayoutTests/editing/deleting/delete-line-end-ws-001-expected.txt
LayoutTests/editing/deleting/delete-line-end-ws-002-expected.txt
LayoutTests/editing/deleting/delete-select-all-001-expected.txt
LayoutTests/editing/deleting/delete-select-all-002-expected.txt
LayoutTests/editing/deleting/delete-select-all-003-expected.txt
LayoutTests/editing/deleting/delete-selection-001-expected.txt
LayoutTests/editing/deleting/delete-tab-001-expected.txt
LayoutTests/editing/deleting/delete-tab-002-expected.txt
LayoutTests/editing/deleting/delete-tab-003-expected.txt
LayoutTests/editing/deleting/delete-tab-004-expected.txt
LayoutTests/editing/deleting/delete-trailing-ws-001-expected.txt
LayoutTests/editing/deleting/delete-trailing-ws-002-expected.txt
LayoutTests/editing/deleting/delete-ws-fixup-001-expected.txt
LayoutTests/editing/deleting/delete-ws-fixup-002-expected.txt
LayoutTests/editing/deleting/delete-ws-fixup-003-expected.txt
LayoutTests/editing/deleting/delete-ws-fixup-004-expected.txt
LayoutTests/editing/deleting/forward-delete-expected.txt
LayoutTests/editing/deleting/smart-delete-001-expected.txt
LayoutTests/editing/deleting/smart-delete-002-expected.txt
LayoutTests/editing/execCommand/boldSelection-expected.txt
LayoutTests/editing/execCommand/italicizeByCharacter-expected.txt
LayoutTests/editing/execCommand/modifyForeColorByCharacter-expected.txt
LayoutTests/editing/execCommand/print-expected.txt
LayoutTests/editing/execCommand/selectAll-expected.txt
LayoutTests/editing/inserting/insert-3659587-fix-expected.txt
LayoutTests/editing/inserting/insert-3775316-fix-expected.txt
LayoutTests/editing/inserting/insert-3778059-fix-expected.txt
LayoutTests/editing/inserting/insert-3786362-fix-expected.txt
LayoutTests/editing/inserting/insert-3800346-fix-expected.txt
LayoutTests/editing/inserting/insert-3907422-fix-expected.txt
LayoutTests/editing/inserting/insert-after-delete-001-expected.txt
LayoutTests/editing/inserting/insert-br-001-expected.txt
LayoutTests/editing/inserting/insert-br-002-expected.txt
LayoutTests/editing/inserting/insert-br-003-expected.txt
LayoutTests/editing/inserting/insert-br-004-expected.txt
LayoutTests/editing/inserting/insert-br-005-expected.txt
LayoutTests/editing/inserting/insert-br-006-expected.txt
LayoutTests/editing/inserting/insert-br-007-expected.txt
LayoutTests/editing/inserting/insert-br-008-expected.txt
LayoutTests/editing/inserting/insert-div-001-expected.txt
LayoutTests/editing/inserting/insert-div-002-expected.txt
LayoutTests/editing/inserting/insert-div-003-expected.txt
LayoutTests/editing/inserting/insert-div-004-expected.txt
LayoutTests/editing/inserting/insert-div-005-expected.txt
LayoutTests/editing/inserting/insert-div-006-expected.txt
LayoutTests/editing/inserting/insert-div-007-expected.txt
LayoutTests/editing/inserting/insert-div-008-expected.txt
LayoutTests/editing/inserting/insert-div-009-expected.txt
LayoutTests/editing/inserting/insert-div-010-expected.txt
LayoutTests/editing/inserting/insert-div-025-expected.txt
LayoutTests/editing/inserting/insert-div-026-expected.txt
LayoutTests/editing/inserting/insert-space-in-empty-doc-expected.txt
LayoutTests/editing/inserting/insert-tab-001-expected.txt
LayoutTests/editing/inserting/insert-tab-002-expected.txt
LayoutTests/editing/inserting/insert-tab-003-expected.txt
LayoutTests/editing/inserting/insert-tab-004-expected.txt
LayoutTests/editing/inserting/insert-text-with-newlines-expected.txt
LayoutTests/editing/inserting/return-key-with-selection-001-expected.txt
LayoutTests/editing/inserting/return-key-with-selection-002-expected.txt
LayoutTests/editing/inserting/return-key-with-selection-003-expected.txt
LayoutTests/editing/inserting/typing-001-expected.txt
LayoutTests/editing/inserting/typing-002-expected.txt
LayoutTests/editing/inserting/typing-003-expected.txt
LayoutTests/editing/inserting/typing-around-br-001-expected.txt
LayoutTests/editing/inserting/typing-around-image-001-expected.txt
LayoutTests/editing/pasteboard/cut-text-001-expected.txt
LayoutTests/editing/pasteboard/paste-4035648-fix-expected.txt
LayoutTests/editing/pasteboard/paste-4038267-fix-expected.txt
LayoutTests/editing/pasteboard/paste-line-endings-001-expected.txt
LayoutTests/editing/pasteboard/paste-line-endings-002-expected.txt
LayoutTests/editing/pasteboard/paste-line-endings-003-expected.txt
LayoutTests/editing/pasteboard/paste-line-endings-004-expected.txt
LayoutTests/editing/pasteboard/paste-line-endings-005-expected.txt
LayoutTests/editing/pasteboard/paste-line-endings-006-expected.txt
LayoutTests/editing/pasteboard/paste-line-endings-007-expected.txt
LayoutTests/editing/pasteboard/paste-line-endings-008-expected.txt
LayoutTests/editing/pasteboard/paste-line-endings-009-expected.txt
LayoutTests/editing/pasteboard/paste-line-endings-010-expected.txt
LayoutTests/editing/pasteboard/paste-match-style-001-expected.txt
LayoutTests/editing/pasteboard/paste-match-style-002-expected.txt
LayoutTests/editing/pasteboard/paste-pre-001-expected.txt
LayoutTests/editing/pasteboard/paste-text-001-expected.txt
LayoutTests/editing/pasteboard/paste-text-002-expected.txt
LayoutTests/editing/pasteboard/paste-text-003-expected.txt
LayoutTests/editing/pasteboard/paste-text-004-expected.txt
LayoutTests/editing/pasteboard/paste-text-005-expected.txt
LayoutTests/editing/pasteboard/paste-text-006-expected.txt
LayoutTests/editing/pasteboard/paste-text-011-expected.txt
LayoutTests/editing/pasteboard/paste-text-015-expected.txt
LayoutTests/editing/pasteboard/paste-text-016-expected.txt
LayoutTests/editing/pasteboard/paste-text-017-expected.txt
LayoutTests/editing/pasteboard/paste-text-018-expected.txt
LayoutTests/editing/pasteboard/smart-paste-001-expected.txt
LayoutTests/editing/pasteboard/smart-paste-002-expected.txt
LayoutTests/editing/pasteboard/smart-paste-003-expected.txt
LayoutTests/editing/pasteboard/smart-paste-004-expected.txt
LayoutTests/editing/pasteboard/smart-paste-005-expected.txt
LayoutTests/editing/pasteboard/smart-paste-006-expected.txt
LayoutTests/editing/pasteboard/smart-paste-007-expected.txt
LayoutTests/editing/selection/extend-by-character-001-expected.txt
LayoutTests/editing/selection/extend-by-character-002-expected.txt
LayoutTests/editing/selection/extend-by-character-003-expected.txt
LayoutTests/editing/selection/extend-by-character-004-expected.txt
LayoutTests/editing/selection/extend-by-character-005-expected.txt
LayoutTests/editing/selection/extend-by-character-006-expected.txt
LayoutTests/editing/selection/move-3875618-fix-expected.txt
LayoutTests/editing/selection/move-3875641-fix-expected.txt
LayoutTests/editing/selection/move-backwords-by-word-001-expected.txt
LayoutTests/editing/selection/move-between-blocks-no-001-expected.txt
LayoutTests/editing/selection/move-between-blocks-yes-001-expected.txt
LayoutTests/editing/selection/move-by-character-001-expected.txt
LayoutTests/editing/selection/move-by-character-002-expected.txt
LayoutTests/editing/selection/move-by-character-003-expected.txt
LayoutTests/editing/selection/move-by-character-004-expected.txt
LayoutTests/editing/selection/move-by-character-005-expected.txt
LayoutTests/editing/selection/move-by-line-001-expected.txt
LayoutTests/editing/selection/move-by-word-001-expected.txt
LayoutTests/editing/selection/select-all-001-expected.txt
LayoutTests/editing/selection/select-all-002-expected.txt
LayoutTests/editing/selection/select-all-003-expected.txt
LayoutTests/editing/selection/select-all-004-expected.txt
LayoutTests/editing/selection/selection-3748164-fix-expected.txt
LayoutTests/editing/selection/unrendered-001-expected.txt
LayoutTests/editing/selection/unrendered-002-expected.txt
LayoutTests/editing/selection/unrendered-003-expected.txt
LayoutTests/editing/selection/unrendered-004-expected.txt
LayoutTests/editing/selection/unrendered-005-expected.txt
LayoutTests/editing/style/block-style-001-expected.txt
LayoutTests/editing/style/block-style-002-expected.txt
LayoutTests/editing/style/block-style-003-expected.txt
LayoutTests/editing/style/block-style-004-expected.txt
LayoutTests/editing/style/block-style-005-expected.txt
LayoutTests/editing/style/block-style-006-expected.txt
LayoutTests/editing/style/block-styles-007-expected.txt
LayoutTests/editing/style/create-block-for-style-001-expected.txt
LayoutTests/editing/style/create-block-for-style-002-expected.txt
LayoutTests/editing/style/create-block-for-style-003-expected.txt
LayoutTests/editing/style/create-block-for-style-004-expected.txt
LayoutTests/editing/style/create-block-for-style-005-expected.txt
LayoutTests/editing/style/create-block-for-style-006-expected.txt
LayoutTests/editing/style/create-block-for-style-007-expected.txt
LayoutTests/editing/style/create-block-for-style-008-expected.txt
LayoutTests/editing/style/create-block-for-style-009-expected.txt
LayoutTests/editing/style/create-block-for-style-010-expected.txt
LayoutTests/editing/style/create-block-for-style-011-expected.txt
LayoutTests/editing/style/create-block-for-style-012-expected.txt
LayoutTests/editing/style/create-block-for-style-013-expected.txt
LayoutTests/editing/style/relative-font-size-change-001-expected.txt
LayoutTests/editing/style/relative-font-size-change-002-expected.txt
LayoutTests/editing/style/relative-font-size-change-003-expected.txt
LayoutTests/editing/style/relative-font-size-change-004-expected.txt
LayoutTests/editing/style/remove-underline-across-paragraph-expected.txt
LayoutTests/editing/style/remove-underline-across-paragraph-in-bold-expected.txt
LayoutTests/editing/style/remove-underline-after-paragraph-expected.txt
LayoutTests/editing/style/remove-underline-after-paragraph-in-bold-expected.txt
LayoutTests/editing/style/remove-underline-expected.txt
LayoutTests/editing/style/remove-underline-from-stylesheet-expected.txt
LayoutTests/editing/style/remove-underline-in-bold-expected.txt
LayoutTests/editing/style/smoosh-styles-001-expected.txt
LayoutTests/editing/style/smoosh-styles-002-expected.txt
LayoutTests/editing/style/smoosh-styles-003-expected.txt
LayoutTests/editing/style/style-3681552-fix-001-expected.txt
LayoutTests/editing/style/style-3681552-fix-002-expected.txt
LayoutTests/editing/style/style-3690704-fix-expected.txt
LayoutTests/editing/style/style-3998892-fix-expected.txt
LayoutTests/editing/style/style-boundary-001-expected.txt
LayoutTests/editing/style/style-boundary-002-expected.txt
LayoutTests/editing/style/style-boundary-003-expected.txt
LayoutTests/editing/style/style-boundary-004-expected.txt
LayoutTests/editing/style/typing-style-001-expected.txt
LayoutTests/editing/style/typing-style-002-expected.txt
LayoutTests/editing/style/typing-style-003-expected.txt
LayoutTests/editing/style/unbold-in-bold-expected.txt
LayoutTests/editing/style/underline-expected.txt
LayoutTests/editing/undo/redo-typing-001-expected.txt
LayoutTests/editing/undo/undo-typing-001-expected.txt
LayoutTests/editing/unsupported-content/list-delete-001-expected.txt
LayoutTests/editing/unsupported-content/list-delete-002-expected.txt
LayoutTests/editing/unsupported-content/list-delete-003-expected.txt
LayoutTests/editing/unsupported-content/list-type-after-expected.txt
LayoutTests/editing/unsupported-content/list-type-before-expected.txt
LayoutTests/editing/unsupported-content/table-delete-001-expected.txt
LayoutTests/editing/unsupported-content/table-delete-002-expected.txt
LayoutTests/editing/unsupported-content/table-delete-003-expected.txt
LayoutTests/editing/unsupported-content/table-type-after-expected.txt
LayoutTests/editing/unsupported-content/table-type-before-expected.txt
LayoutTests/fast/encoding/utf-16-big-endian-expected.txt
LayoutTests/fast/encoding/utf-16-little-endian-expected.txt
LayoutTests/fast/inline-block/001-expected.txt
LayoutTests/fast/inline-block/003-expected.txt
LayoutTests/fast/inline/002-expected.txt
LayoutTests/fast/invalid/018-expected.txt
LayoutTests/fast/table/003-expected.txt
LayoutTests/fast/table/nobr-expected.txt
LayoutTests/fast/text/whitespace/001-expected.txt
LayoutTests/fast/text/whitespace/013-expected.txt
LayoutTests/fast/text/whitespace/018-expected.txt
LayoutTests/fast/text/whitespace/019-expected.txt
LayoutTests/fast/text/whitespace/023-expected.txt
LayoutTests/fast/text/whitespace/030-expected.txt [new file with mode: 0644]
LayoutTests/fast/text/whitespace/030.html [new file with mode: 0644]
LayoutTests/traversal/tree-walker-001-expected.txt
LayoutTests/traversal/tree-walker-002-expected.txt
LayoutTests/traversal/tree-walker-003-expected.txt
LayoutTests/traversal/tree-walker-004-expected.txt
LayoutTests/traversal/tree-walker-005-expected.txt
WebCore/ChangeLog-2005-08-23
WebCore/khtml/html/htmltokenizer.cpp