1. 05 May, 2009 1 commit
    • ap@webkit.org's avatar
      Reviewed by Dave Hyatt. · d0295906
      ap@webkit.org authored
              <rdar://problem/6576889> REGRESSION (r35185): Cannot watch Flash movies on omg.yahoo.com
      
              The problem was caused by missing <head> element - we used to create it when moving a
              misplaced <style> element, but we now handle those in place. Other browsers always create
              a <head> element.
      
              There is no guarantee that a <head> element always exists - first, it can be removed with
              removeChild or innerHTML, and also, we don't currently create it for frameset documents, or
              for manually created ones (e.g. ImageDocument).
      
              Test: fast/parser/head-element-for-yahoo-player.html
      
      WebKit:
              * dom/Document.cpp: (WebCore::Document::implicitClose): Create a <head> element for about:blank.
              A removed comment talked about rdar://3758785, but that problem doesn't re-occur even if this
              code is removed completely.
      
              * html/HTMLHtmlElement.cpp: (WebCore::HTMLHtmlElement::checkDTD): No longer allow <script>
              elements as children of <html>. This isn't directly related to this bug, but it was easier
              to fix both at once (IE and Firefox both don't allow such mispositioned <script> elements).
      
              * html/HTMLParser.cpp:
              (WebCore::HTMLParser::handleError): Move <script> to <head> if <body> hasn't been created yet.
              Create a <head> it a <body> is created implicitly to contain some other element.
              (WebCore::HTMLParser::bodyCreateErrorCheck): Ensure that a <head> exists when <body> is
              explicitly present in source.
              (WebCore::HTMLParser::createHead): Do the work even if <html> element hasn't been created yet.
      
      LayoutTests:
              * fast/parser/head-element-for-yahoo-player-expected.txt: Added.
              * fast/parser/head-element-for-yahoo-player.html: Added.
              Test the regression case (a misplaced <style> that used to create <head> implicitly).
      
              * editing/selection/select-all-005.html: Use a new index when selecting the body.
      
              * fast/dom/Document/document-write-doctype-expected.txt:
              * fast/dom/Document/resources/document-write-doctype.js:
              Removed checks for "Gecko quirk" of implicitly adding HEAD - that not a quirk, but standard
              behavior per HTML5.
      
              * editing/execCommand/create-list-1-expected.txt:
              * platform/mac/editing/deleting/4845371-expected.txt:
              * platform/mac/editing/deleting/4866671-expected.txt:
              * platform/mac/editing/deleting/4875189-expected.txt:
              * platform/mac/editing/deleting/5026848-1-expected.txt:
              * platform/mac/editing/deleting/5026848-2-expected.txt:
              * platform/mac/editing/deleting/5026848-3-expected.txt:
              * platform/mac/editing/deleting/5032066-expected.txt:
              * platform/mac/editing/deleting/5091898-expected.txt:
              * platform/mac/editing/deleting/5099303-expected.txt:
              * platform/mac/editing/deleting/5115601-expected.txt:
              * platform/mac/editing/deleting/5126166-expected.txt:
              * platform/mac/editing/deleting/5156801-2-expected.txt:
              * platform/mac/editing/deleting/5168598-expected.txt:
              * platform/mac/editing/deleting/5272440-expected.txt:
              * platform/mac/editing/deleting/5300379-expected.txt:
              * platform/mac/editing/deleting/5390681-expected.txt:
              * platform/mac/editing/deleting/5408255-expected.txt:
              * platform/mac/editing/deleting/5433862-2-expected.txt:
              * platform/mac/editing/deleting/5483370-expected.txt:
              * platform/mac/editing/deleting/delete-at-start-or-end-expected.txt:
              * platform/mac/editing/deleting/delete-block-table-expected.txt:
              * platform/mac/editing/deleting/delete-hr-expected.txt:
              * platform/mac/editing/deleting/delete-mixed-editable-content-001-expected.txt:
              * platform/mac/editing/deleting/delete-to-select-table-expected.txt:
              * platform/mac/editing/deleting/deletionUI-single-instance-expected.txt:
              * platform/mac/editing/deleting/merge-endOfParagraph-expected.txt:
              * platform/mac/editing/deleting/merge-no-br-expected.txt:
              * platform/mac/editing/deleting/merge-whitespace-pre-expected.txt:
              * platform/mac/editing/execCommand/4641880-1-expected.txt:
              * platform/mac/editing/execCommand/4641880-2-expected.txt:
              * platform/mac/editing/execCommand/4747450-expected.txt:
              * platform/mac/editing/execCommand/4786404-1-expected.txt:
              * platform/mac/editing/execCommand/4786404-2-expected.txt:
              * platform/mac/editing/execCommand/4916402-expected.txt:
              * platform/mac/editing/execCommand/4916541-expected.txt:
              * platform/mac/editing/execCommand/4916583-expected.txt:
              * platform/mac/editing/execCommand/4920488-expected.txt:
              * platform/mac/editing/execCommand/4920742-1-expected.txt:
              * platform/mac/editing/execCommand/4924441-expected.txt:
              * platform/mac/editing/execCommand/5049671-expected.txt:
              * platform/mac/editing/execCommand/5080333-1-expected.txt:
              * platform/mac/editing/execCommand/5080333-2-expected.txt:
              * platform/mac/editing/execCommand/5119244-expected.txt:
              * platform/mac/editing/execCommand/5120591-expected.txt:
              * platform/mac/editing/execCommand/5136770-expected.txt:
              * platform/mac/editing/execCommand/5142012-1-expected.txt:
              * platform/mac/editing/execCommand/5142012-2-expected.txt:
              * platform/mac/editing/execCommand/5142012-3-expected.txt:
              * platform/mac/editing/execCommand/5144139-1-expected.txt:
              * platform/mac/editing/execCommand/5164796-expected.txt:
              * platform/mac/editing/execCommand/5207369-expected.txt:
              * platform/mac/editing/execCommand/5210032-expected.txt:
              * platform/mac/editing/execCommand/5432254-1-expected.txt:
              * platform/mac/editing/execCommand/5432254-2-expected.txt:
              * platform/mac/editing/execCommand/5481523-expected.txt:
              * platform/mac/editing/execCommand/5482524-expected.txt:
              * platform/mac/editing/execCommand/5569741-expected.txt:
              * platform/mac/editing/execCommand/5573879-expected.txt:
              * platform/mac/editing/execCommand/5700414-1-expected.txt:
              * platform/mac/editing/execCommand/5700414-2-expected.txt:
              * platform/mac/editing/execCommand/insert-list-empty-div-expected.txt:
              * platform/mac/editing/input/5576619-expected.txt:
              * platform/mac/editing/inserting/12882-expected.txt:
              * platform/mac/editing/inserting/4840662-expected.txt:
              * platform/mac/editing/inserting/4875189-1-expected.txt:
              * platform/mac/editing/inserting/4875189-2-expected.txt:
              * platform/mac/editing/inserting/4959067-expected.txt:
              * platform/mac/editing/inserting/4960120-1-expected.txt:
              * platform/mac/editing/inserting/4960120-2-expected.txt:
              * platform/mac/editing/inserting/5002441-expected.txt:
              * platform/mac/editing/inserting/5058163-2-expected.txt:
              * platform/mac/editing/inserting/5156401-2-expected.txt:
              * platform/mac/editing/inserting/5549929-2-expected.txt:
              * platform/mac/editing/inserting/5549929-3-expected.txt:
              * platform/mac/editing/inserting/5607069-2-expected.txt:
              * platform/mac/editing/inserting/5607069-3-expected.txt:
              * platform/mac/editing/inserting/editable-html-element-expected.txt:
              * platform/mac/editing/inserting/editable-inline-element-expected.txt:
              * platform/mac/editing/inserting/edited-whitespace-1-expected.txt:
              * platform/mac/editing/inserting/editing-empty-divs-expected.txt:
              * platform/mac/editing/inserting/typing-tab-designmode-forms-expected.txt:
              * platform/mac/editing/pasteboard/4806874-expected.txt:
              * platform/mac/editing/pasteboard/4861080-expected.txt:
              * platform/mac/editing/pasteboard/4944770-1-expected.txt:
              * platform/mac/editing/pasteboard/4944770-2-expected.txt:
              * platform/mac/editing/pasteboard/4947130-expected.txt:
              * platform/mac/editing/pasteboard/4989774-expected.txt:
              * platform/mac/editing/pasteboard/5027857-expected.txt:
              * platform/mac/editing/pasteboard/5032095-expected.txt:
              * platform/mac/editing/pasteboard/5065605-expected.txt:
              * platform/mac/editing/pasteboard/5071074-2-expected.txt:
              * platform/mac/editing/pasteboard/5071074-expected.txt:
              * platform/mac/editing/pasteboard/5075944-2-expected.txt:
              * platform/mac/editing/pasteboard/5075944-3-expected.txt:
              * platform/mac/editing/pasteboard/5075944-expected.txt:
              * platform/mac/editing/pasteboard/5134759-expected.txt:
              * platform/mac/editing/pasteboard/5156401-1-expected.txt:
              * platform/mac/editing/pasteboard/5247341-expected.txt:
              * platform/mac/editing/pasteboard/5387578-expected.txt:
              * platform/mac/editing/pasteboard/5478250-expected.txt:
              * platform/mac/editing/pasteboard/5483567-expected.txt:
              * platform/mac/editing/pasteboard/5601583-1-expected.txt:
              * platform/mac/editing/pasteboard/copy-paste-bidi-expected.txt:
              * platform/mac/editing/pasteboard/input-field-1-expected.txt:
              * platform/mac/editing/pasteboard/merge-after-delete-1-expected.txt:
              * platform/mac/editing/pasteboard/merge-after-delete-2-expected.txt:
              * platform/mac/editing/pasteboard/merge-after-delete-expected.txt:
              * platform/mac/editing/pasteboard/merge-start-blockquote-expected.txt:
              * platform/mac/editing/pasteboard/paste-unrendered-select-expected.txt:
              * platform/mac/editing/pasteboard/prevent-block-nesting-01-expected.txt:
              * platform/mac/editing/pasteboard/select-element-1-expected.txt:
              * platform/mac/editing/selection/13804-expected.txt:
              * platform/mac/editing/selection/14971-expected.txt:
              * platform/mac/editing/selection/4397952-expected.txt:
              * platform/mac/editing/selection/4818145-expected.txt:
              * platform/mac/editing/selection/4866671-expected.txt:
              * platform/mac/editing/selection/4889598-expected.txt:
              * platform/mac/editing/selection/4895428-1-expected.txt:
              * platform/mac/editing/selection/4895428-2-expected.txt:
              * platform/mac/editing/selection/4895428-3-expected.txt:
              * platform/mac/editing/selection/4895428-4-expected.txt:
              * platform/mac/editing/selection/4932260-1-expected.txt:
              * platform/mac/editing/selection/4932260-2-expected.txt:
              * platform/mac/editing/selection/4932260-3-expected.txt:
              * platform/mac/editing/selection/4947387-expected.txt:
              * platform/mac/editing/selection/4960116-expected.txt:
              * platform/mac/editing/selection/4975120-expected.txt:
              * platform/mac/editing/selection/4983858-expected.txt:
              * platform/mac/editing/selection/5007143-2-expected.txt:
              * platform/mac/editing/selection/5007143-expected.txt:
              * platform/mac/editing/selection/5057506-2-expected.txt:
              * platform/mac/editing/selection/5057506-expected.txt:
              * platform/mac/editing/selection/5076323-1-expected.txt:
              * platform/mac/editing/selection/5076323-2-expected.txt:
              * platform/mac/editing/selection/5076323-3-expected.txt:
              * platform/mac/editing/selection/5081257-1-expected.txt:
              * platform/mac/editing/selection/5081257-2-expected.txt:
              * platform/mac/editing/selection/5099303-expected.txt:
              * platform/mac/editing/selection/5109817-expected.txt:
              * platform/mac/editing/selection/5136696-expected.txt:
              * platform/mac/editing/selection/5195166-1-expected.txt:
              * platform/mac/editing/selection/5195166-2-expected.txt:
              * platform/mac/editing/selection/5234383-1-expected.txt:
              * platform/mac/editing/selection/5234383-2-expected.txt:
              * platform/mac/editing/selection/5240265-expected.txt:
              * platform/mac/editing/selection/5333725-expected.txt:
              * platform/mac/editing/selection/5354455-1-expected.txt:
              * platform/mac/editing/selection/addRange-expected.txt:
              * platform/mac/editing/selection/caret-before-select-expected.txt:
              * platform/mac/editing/selection/contains-boundaries-expected.txt:
              * platform/mac/editing/selection/drag-select-1-expected.txt:
              * platform/mac/editing/selection/editable-html-element-expected.txt:
              * platform/mac/editing/selection/inconsistent-in-removeChildNode-expected.txt:
              * platform/mac/editing/selection/inline-closest-leaf-child-expected.txt:
              * platform/mac/editing/selection/mixed-editability-6-expected.txt:
              * platform/mac/editing/selection/mixed-editability-7-expected.txt:
              * platform/mac/editing/selection/move-by-sentence-linebreak-expected.txt:
              * platform/mac/editing/selection/select-all-005-expected.txt:
              * platform/mac/editing/selection/table-caret-1-expected.txt:
              * platform/mac/editing/selection/table-caret-2-expected.txt:
              * platform/mac/editing/selection/table-caret-3-expected.txt:
              * platform/mac/editing/selection/wrapped-line-caret-1-expected.txt:
              * platform/mac/editing/selection/wrapped-line-caret-2-expected.txt:
              * platform/mac/editing/style/4916887-expected.txt:
              * platform/mac/editing/style/5017613-1-expected.txt:
              * platform/mac/editing/style/5017613-2-expected.txt:
              * platform/mac/editing/style/5046875-1-expected.txt:
              * platform/mac/editing/style/5046875-2-expected.txt:
              * platform/mac/editing/style/5065910-expected.txt:
              * platform/mac/editing/style/5084241-expected.txt:
              * platform/mac/editing/style/5091898-expected.txt:
              * platform/mac/editing/style/5228141-expected.txt:
              * platform/mac/editing/style/5279521-expected.txt:
              * platform/mac/editing/style/font-family-with-space-expected.txt:
              * platform/mac/editing/style/fontsize-1-expected.txt:
              * platform/mac/editing/style/highlight-expected.txt:
              * platform/mac/editing/style/non-inheritable-styles-expected.txt:
              * platform/mac/editing/undo/5378473-expected.txt:
              * platform/mac/fast/block/float/relative-painted-twice-expected.txt:
              * platform/mac/fast/dom/delete-contents-expected.txt:
              * platform/mac/fast/events/context-no-deselect-expected.txt:
              * platform/mac/fast/events/label-focus-expected.txt:
              * platform/mac/fast/forms/input-appearance-focus-expected.txt:
              * platform/mac/fast/forms/input-text-click-inside-expected.txt:
              * platform/mac/fast/forms/input-text-click-outside-expected.txt:
              * platform/mac/fast/forms/input-text-double-click-expected.txt:
              * platform/mac/fast/forms/input-text-drag-down-expected.txt:
              * platform/mac/fast/forms/input-text-option-delete-expected.txt:
              * platform/mac/fast/forms/input-text-scroll-left-on-blur-expected.txt:
              * platform/mac/fast/forms/input-text-self-emptying-click-expected.txt:
              * platform/mac/fast/forms/textfield-drag-into-disabled-expected.txt:
              * platform/mac/fast/forms/textfield-overflow-expected.txt:
              * platform/mac/fast/inline/25277-2-expected.txt:
              * platform/mac/fast/inline/25277-expected.txt:
              * platform/mac/fast/lists/drag-into-marker-expected.txt:
              * platform/mac/fast/overflow/overflow-focus-ring-expected.txt:
              * platform/mac/fast/repaint/4776765-expected.txt:
              * platform/mac/fast/repaint/selection-after-delete-expected.txt:
              * platform/mac/fast/repaint/selection-after-remove-expected.txt:
              * platform/qt/editing/deleting/4845371-expected.txt:
              * platform/qt/editing/deleting/4866671-expected.txt:
              * platform/qt/editing/deleting/4875189-expected.txt:
              * platform/qt/editing/deleting/5026848-1-expected.txt:
              * platform/qt/editing/deleting/5026848-2-expected.txt:
              * platform/qt/editing/deleting/5026848-3-expected.txt:
              * platform/qt/editing/deleting/5032066-expected.txt:
              * platform/qt/editing/deleting/5091898-expected.txt:
              * platform/qt/editing/deleting/5099303-expected.txt:
              * platform/qt/editing/deleting/5115601-expected.txt:
              * platform/qt/editing/deleting/5126166-expected.txt:
              * platform/qt/editing/deleting/5144139-2-expected.txt:
              * platform/qt/editing/deleting/5156801-2-expected.txt:
              * platform/qt/editing/deleting/5168598-expected.txt:
              * platform/qt/editing/deleting/5272440-expected.txt:
              * platform/qt/editing/deleting/5300379-expected.txt:
              * platform/qt/editing/deleting/5390681-expected.txt:
              * platform/qt/editing/deleting/5408255-expected.txt:
              * platform/qt/editing/deleting/delete-at-start-or-end-expected.txt:
              * platform/qt/editing/deleting/delete-block-table-expected.txt:
              * platform/qt/editing/deleting/delete-hr-expected.txt:
              * platform/qt/editing/deleting/delete-link-1-expected.txt:
              * platform/qt/editing/deleting/delete-mixed-editable-content-001-expected.txt:
              * platform/qt/editing/deleting/delete-to-select-table-expected.txt:
              * platform/qt/editing/deleting/deletionUI-single-instance-expected.txt:
              * platform/qt/editing/deleting/merge-endOfParagraph-expected.txt:
              * platform/qt/editing/deleting/merge-no-br-expected.txt:
              * platform/qt/editing/deleting/merge-whitespace-pre-expected.txt:
              * platform/qt/editing/execCommand/4641880-1-expected.txt:
              * platform/qt/editing/execCommand/4641880-2-expected.txt:
              * platform/qt/editing/execCommand/4747450-expected.txt:
              * platform/qt/editing/execCommand/4786404-1-expected.txt:
              * platform/qt/editing/execCommand/4786404-2-expected.txt:
              * platform/qt/editing/execCommand/4916402-expected.txt:
              * platform/qt/editing/execCommand/4916541-expected.txt:
              * platform/qt/editing/execCommand/4916583-expected.txt:
              * platform/qt/editing/execCommand/4920488-expected.txt:
              * platform/qt/editing/execCommand/4920742-1-expected.txt:
              * platform/qt/editing/execCommand/4924441-expected.txt:
              * platform/qt/editing/execCommand/5049671-expected.txt:
              * platform/qt/editing/execCommand/5062376-expected.txt:
              * platform/qt/editing/execCommand/5080333-1-expected.txt:
              * platform/qt/editing/execCommand/5080333-2-expected.txt:
              * platform/qt/editing/execCommand/5119244-expected.txt:
              * platform/qt/editing/execCommand/5120591-expected.txt:
              * platform/qt/editing/execCommand/5136770-expected.txt:
              * platform/qt/editing/execCommand/5142012-1-expected.txt:
              * platform/qt/editing/execCommand/5142012-2-expected.txt:
              * platform/qt/editing/execCommand/5142012-3-expected.txt:
              * platform/qt/editing/execCommand/5144139-1-expected.txt:
              * platform/qt/editing/execCommand/5164796-expected.txt:
              * platform/qt/editing/execCommand/5207369-expected.txt:
              * platform/qt/editing/execCommand/5210032-expected.txt:
              * platform/qt/editing/execCommand/5432254-1-expected.txt:
              * platform/qt/editing/execCommand/5432254-2-expected.txt:
              * platform/qt/editing/execCommand/insert-list-empty-div-expected.txt:
              * platform/qt/editing/inserting/12882-expected.txt:
              * platform/qt/editing/inserting/4840662-expected.txt:
              * platform/qt/editing/inserting/4875189-1-expected.txt:
              * platform/qt/editing/inserting/4875189-2-expected.txt:
              * platform/qt/editing/inserting/4959067-expected.txt:
              * platform/qt/editing/inserting/4960120-1-expected.txt:
              * platform/qt/editing/inserting/4960120-2-expected.txt:
              * platform/qt/editing/inserting/5002441-expected.txt:
              * platform/qt/editing/inserting/5058163-2-expected.txt:
              * platform/qt/editing/inserting/5156401-2-expected.txt:
              * platform/qt/editing/inserting/editable-html-element-expected.txt:
              * platform/qt/editing/inserting/editable-inline-element-expected.txt:
              * platform/qt/editing/inserting/edited-whitespace-1-expected.txt:
              * platform/qt/editing/inserting/editing-empty-divs-expected.txt:
              * platform/qt/editing/inserting/insert-before-link-1-expected.txt:
              * platform/qt/editing/pasteboard/4806874-expected.txt:
              * platform/qt/editing/pasteboard/4840662-expected.txt:
              * platform/qt/editing/pasteboard/4944770-1-expected.txt:
              * platform/qt/editing/pasteboard/4989774-expected.txt:
              * platform/qt/editing/pasteboard/5027857-expected.txt:
              * platform/qt/editing/pasteboard/5032095-expected.txt:
              * platform/qt/editing/pasteboard/5065605-expected.txt:
              * platform/qt/editing/pasteboard/5071074-2-expected.txt:
              * platform/qt/editing/pasteboard/5071074-expected.txt:
              * platform/qt/editing/pasteboard/5075944-2-expected.txt:
              * platform/qt/editing/pasteboard/5075944-3-expected.txt:
              * platform/qt/editing/pasteboard/5075944-expected.txt:
              * platform/qt/editing/pasteboard/5134759-expected.txt:
              * platform/qt/editing/pasteboard/5156401-1-expected.txt:
              * platform/qt/editing/pasteboard/5245519-expected.txt:
              * platform/qt/editing/pasteboard/5247341-expected.txt:
              * platform/qt/editing/pasteboard/5387578-expected.txt:
              * platform/qt/editing/pasteboard/5478250-expected.txt:
              * platform/qt/editing/pasteboard/5483567-expected.txt:
              * platform/qt/editing/pasteboard/copy-paste-bidi-expected.txt:
              * platform/qt/editing/pasteboard/merge-after-delete-1-expected.txt:
              * platform/qt/editing/pasteboard/merge-after-delete-2-expected.txt:
              * platform/qt/editing/pasteboard/merge-after-delete-expected.txt:
              * platform/qt/editing/pasteboard/merge-start-blockquote-expected.txt:
              * platform/qt/editing/pasteboard/paste-unrendered-select-expected.txt:
              * platform/qt/editing/pasteboard/prevent-block-nesting-01-expected.txt:
              * platform/qt/editing/selection/13804-expected.txt:
              * platform/qt/editing/selection/4397952-expected.txt:
              * platform/qt/editing/selection/4818145-expected.txt:
              * platform/qt/editing/selection/4866671-expected.txt:
              * platform/qt/editing/selection/4889598-expected.txt:
              * platform/qt/editing/selection/4895428-2-expected.txt:
              * platform/qt/editing/selection/4895428-3-expected.txt:
              * platform/qt/editing/selection/4932260-1-expected.txt:
              * platform/qt/editing/selection/4932260-2-expected.txt:
              * platform/qt/editing/selection/4932260-3-expected.txt:
              * platform/qt/editing/selection/4960116-expected.txt:
              * platform/qt/editing/selection/4983858-expected.txt:
              * platform/qt/editing/selection/5007143-2-expected.txt:
              * platform/qt/editing/selection/5007143-expected.txt:
              * platform/qt/editing/selection/5076323-1-expected.txt:
              * platform/qt/editing/selection/5076323-2-expected.txt:
              * platform/qt/editing/selection/5076323-3-expected.txt:
              * platform/qt/editing/selection/5081257-1-expected.txt:
              * platform/qt/editing/selection/5081257-2-expected.txt:
              * platform/qt/editing/selection/5099303-expected.txt:
              * platform/qt/editing/selection/5136696-expected.txt:
              * platform/qt/editing/selection/5195166-1-expected.txt:
              * platform/qt/editing/selection/5195166-2-expected.txt:
              * platform/qt/editing/selection/5234383-1-expected.txt:
              * platform/qt/editing/selection/5234383-2-expected.txt:
              * platform/qt/editing/selection/5240265-expected.txt:
              * platform/qt/editing/selection/addRange-expected.txt:
              * platform/qt/editing/selection/caret-before-select-expected.txt:
              * platform/qt/editing/selection/editable-html-element-expected.txt:
              * platform/qt/editing/selection/mixed-editability-6-expected.txt:
              * platform/qt/editing/selection/mixed-editability-7-expected.txt:
              * platform/qt/editing/selection/move-by-sentence-linebreak-expected.txt:
              * platform/qt/editing/selection/select-all-005-expected.txt:
              * platform/qt/editing/selection/table-caret-1-expected.txt:
              * platform/qt/editing/selection/table-caret-2-expected.txt:
              * platform/qt/editing/selection/table-caret-3-expected.txt:
              * platform/qt/editing/style/4916887-expected.txt:
              * platform/qt/editing/style/5017613-1-expected.txt:
              * platform/qt/editing/style/5017613-2-expected.txt:
              * platform/qt/editing/style/5046875-1-expected.txt:
              * platform/qt/editing/style/5046875-2-expected.txt:
              * platform/qt/editing/style/5065910-expected.txt:
              * platform/qt/editing/style/5084241-expected.txt:
              * platform/qt/editing/style/5228141-expected.txt:
              * platform/qt/editing/style/5279521-expected.txt:
              * platform/qt/editing/style/font-family-with-space-expected.txt:
              * platform/qt/editing/style/fontsize-1-expected.txt:
              * platform/qt/editing/style/highlight-expected.txt:
              * platform/qt/editing/style/non-inheritable-styles-expected.txt:
              * platform/qt/editing/undo/5378473-expected.txt:
              * platform/qt/fast/dom/delete-contents-expected.txt:
              * platform/qt/fast/events/label-focus-expected.txt:
              * platform/qt/fast/forms/input-appearance-focus-expected.txt:
              * platform/qt/fast/forms/input-maxlength-2-expected.txt:
              * platform/qt/fast/forms/input-text-click-inside-expected.txt:
              * platform/qt/fast/forms/input-text-option-delete-expected.txt:
              * platform/qt/fast/forms/input-text-self-emptying-click-expected.txt:
              * platform/qt/fast/forms/textfield-drag-into-disabled-expected.txt:
              * platform/qt/fast/forms/textfield-overflow-expected.txt:
              * platform/qt/fast/overflow/overflow-focus-ring-expected.txt:
              * platform/qt/fast/repaint/4776765-expected.txt:
              * platform/qt/fast/repaint/selection-after-delete-expected.txt:
              * platform/qt/fast/repaint/selection-after-remove-expected.txt:
              * platform/win/editing/deleting/5168598-expected.txt:
              * platform/win/editing/inserting/4960120-1-expected.txt:
              * platform/win/editing/inserting/5607069-2-expected.txt:
              * platform/win/editing/inserting/5607069-3-expected.txt:
              * platform/win/editing/inserting/typing-tab-designmode-forms-expected.txt:
              * platform/win/editing/pasteboard/4806874-expected.txt:
              * platform/win/editing/selection/4895428-3-expected.txt:
              * platform/win/editing/selection/5136696-expected.txt:
              * platform/win/editing/selection/drag-select-1-expected.txt:
              * platform/win/fast/events/context-no-deselect-expected.txt:
              * platform/win/fast/events/label-focus-expected.txt:
              * platform/win/fast/forms/input-appearance-focus-expected.txt:
              * platform/win/fast/forms/input-text-click-inside-expected.txt:
              * platform/win/fast/forms/input-text-click-outside-expected.txt:
              * platform/win/fast/forms/input-text-double-click-expected.txt:
              * platform/win/fast/forms/input-text-drag-down-expected.txt:
              * platform/win/fast/forms/input-text-option-delete-expected.txt:
              * platform/win/fast/forms/input-text-scroll-left-on-blur-expected.txt:
              * platform/win/fast/forms/input-text-self-emptying-click-expected.txt:
              * platform/win/fast/forms/textfield-drag-into-disabled-expected.txt:
              * platform/win/fast/forms/textfield-overflow-expected.txt:
              Updated BODY element index in test output (for some tests, it increased because of the
              implicitly added <head>, and for others, it decreased because mispositoned <script> is being
              moved into <head>).
      
              * webarchive/adopt-attribute-styled-body-webarchive-expected.webarchive:
              * webarchive/archive-empty-frame-dom-expected.webarchive:
              Updated to include the implicitly added <head> elements.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d0295906
  2. 24 Oct, 2006 1 commit
    • justing's avatar
      LayoutTests: · dc376ff5
      justing authored
              Reviewed by darin
      
              <http://bugs.webkit.org/show_bug.cgi?id=10993>
              GMail Editor: Caret doesn't always position itself after list marker
      
              * editing/execCommand/create-list-1-expected.checksum: Added.
              * editing/execCommand/create-list-1-expected.png: Added.
              * editing/execCommand/create-list-1-expected.txt: Added.
              * editing/execCommand/create-list-1.html: Added.
              
              Fixed:
              * editing/execCommand/create-list-with-hr-expected.checksum:
              * editing/execCommand/create-list-with-hr-expected.png:
              * editing/execCommand/create-list-with-hr-expected.txt:
              * editing/execCommand/create-list-with-hr.html:
              * editing/execCommand/remove-list-1-expected.checksum:
              * editing/execCommand/remove-list-1-expected.png:
              * editing/execCommand/remove-list-1-expected.txt:
              * fast/text/attributed-substring-from-range-001-expected.txt:
      
      WebCore:
      
              Reviewed by darin
      
              <http://bugs.webkit.org/show_bug.cgi?id=10993>
              GMail Editor: Caret doesn't always position itself after list marker
              
              List creation uses moveParagraphs to push content into list items.  
              moveParagraphs uses a TextIterator to restore selections after moves.
              Some characters emitted by the TextIterator had bad ranges associated
              with them.  rangeFromLocationAndLength would skip past the range it
              should have used when asked for ranges of length 0.
      
              * editing/TextIterator.cpp:
              (WebCore::TextIterator::TextIterator): No longer need to initialize a
              removed member variable.
              (WebCore::TextIterator::advance): An extra newline is emitted when leaving
              some blocks.  Use the same range for this newline as for the first newline.
              We should remove this code and just emit two '\n's.
              (WebCore::TextIterator::handleTextNode): Setup m_range.
              (WebCore::TextIterator::handleTextBox): Ditto.
              (WebCore::TextIterator::handleReplacedElement): Ditto.
              (WebCore::TextIterator::handleNonTextNode): Ditto.
              (WebCore::TextIterator::exitNode): Use an m_range from the last VisiblePosition
              in the block we're leaving to that VP after that one.
              (WebCore::TextIterator::emitCharacter): This function now takes in the start
              and the end of the range associated with the emited character, and sets up m_range.
              (WebCore::TextIterator::range): Return m_range.  If it is null (we are atEnd), 
              return the end of the range used to create the iterator, as a convenience to
              callers that use call range() on an iterator that is atEnd.
              (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator):
              Same as the changes made to TextIterator's constructor.
              (WebCore::SimplifiedBackwardsTextIterator::advance): Use a null m_range instead of
              a null m_positionNode to signal that we're finished.
              (WebCore::SimplifiedBackwardsTextIterator::handleTextNode): Ditto.
              (WebCore::SimplifiedBackwardsTextIterator::handleReplacedElement): Similar to changes
              made to TextIterator.
              (WebCore::SimplifiedBackwardsTextIterator::emitCharacter): Ditto.
              (WebCore::SimplifiedBackwardsTextIterator::emitNewline): Simplified.
              (WebCore::SimplifiedBackwardsTextIterator::range): Similar to the changes made to
              TextIterator::range.
              (WebCore::CharacterIterator::range): This function assumed that an iterator's
              range() was safe to modify.
              (WebCore::TextIterator::rangeFromLocationAndLength):
              If the range we're looking for starts in the current chunk, this function assumed
              that if the chunk started in a text node, it would end in the same text node.  This
              is no longer the case.
              If the range we're looking for starts in the middle of the current chunk, I assume
              that the chunk is inside a text node, because those are the only chunks with length
              greater than one at the moment.
              If the range we're looking for is a zero length range that starts/ends at the end of the
              current chunk, we used to return the start of the next chunk, but that's wrong and
              is what caused this bug.
              * editing/TextIterator.h:
              (WebCore::TextIterator::atEnd): The iterator is atEnd when m_range is null.
              (WebCore::SimplifiedBackwardsTextIterator::atEnd):
              * editing/visible_units.cpp:
              (WebCore::previousBoundary): Cleaned up by using a convenience function.
              (WebCore::nextBoundary): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@17276 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dc376ff5