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. 15 Mar, 2008 1 commit
    • darin@apple.com's avatar
      WebCore: · f28fa1b0
      darin@apple.com authored
              Reviewed by Sam.
      
              - fix http://bugs.webkit.org/show_bug.cgi?id=11997
                Ranges are not fixed after mutation (affects Acid3 test 13)
      
              Test: fast/dom/Range/mutation.html
      
              * WebCore.xcodeproj/project.pbxproj: Added NodeWithIndex.h, NodeWithIndexAfter.h,
              and NodeWithIndexBefore.h.
      
              * dom/CharacterData.cpp:
              (WebCore::CharacterData::setData): Replaced call to Document::removeMarkers
              with call to Document::textRemoved.
              (WebCore::CharacterData::insertData): Replaced call to Document::shiftMarkers
              with call to Document::textInserted.
              (WebCore::CharacterData::deleteData): Replaced call to Document::removeMarkers
              and Document::shiftMarkers with call to Document::textRemoved.
              (WebCore::CharacterData::replaceData): Replaced call to Document::removeMarkers
              and Document::shiftMarkers with call to Document::textRemoved and
              Document::textInserted.
              (WebCore::CharacterData::containsOnlyWhitespace): Tweaked a bit.
      
              * dom/ContainerNode.cpp:
              (WebCore::ContainerNode::childrenChanged): Added a call to
              Document::nodeChildrenChanged when the nmber of children was changed (and not
              by the parser).
              (WebCore::dispatchChildRemovalEvents): Updated for name change.
      
              * dom/Document.cpp:
              (WebCore::Document::~Document): Assert that all ranges are gone.
              (WebCore::Document::nodeChildrenChanged): Added. Calls nodeChildrenChanged on
              all ranges.
              (WebCore::Document::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
              Added code to call nodeWillBeRemoved on all ranges.
              (WebCore::Document::textInserted): Added. Calls textInserted on all ranges and
              also calls shiftMarkers.
              (WebCore::Document::textRemoved): Added. Calls textRemoved on all ranges and also
              calls removeMarkers and shiftMarkers.
              (WebCore::Document::textNodesMerged): Added. Calls textNodesMerged on all ranges.
              (WebCore::Document::textNodeSplit): Added. Calls textNodeSplit on all ranges.
              (WebCore::Document::attachRange): Added. Adds range to the HashSet of all ranges
              for this document.
              (WebCore::Document::detachRange): Added. Removes range from the HashSet.
              * dom/Document.h: Added the new functions and the data member.
      
              * dom/Element.cpp:
              (WebCore::Element::normalizeAttributes): Added. Contains the part of the
              normalize function that's specific to Element. Better encapsulation to have it
              here rather than in Node::normalize.
              * dom/Element.h: Added the new function.
      
              * dom/Node.cpp:
              (WebCore::Node::normalize): Rewrote so it's no longer recursive. Also added
              a call to textNodesMerged after each pair of nodes is merged but before the
              second node is removed.
              (WebCore::Node::traverseNextNodePostOrder): Added. Helper function used by
              normalize, but also useful elsewhere.
              * dom/Node.h: Added the new function.
      
              * dom/NodeIterator.cpp:
              (WebCore::NodeIterator::nodeWillBeRemoved): Renamed from notifyBeforeNodeRemoval.
              * dom/NodeIterator.h: Ditto.
      
              * dom/ProcessingInstruction.cpp:
              (WebCore::ProcessingInstruction::setData): Call textRemoved.
      
              * dom/Range.cpp:
              (WebCore::NodeWithIndex::index): Added. Computes and stores index.
              (WebCore::NodeWithIndexBefore::indexBefore): Added. Computes and stores index.
              (WebCore::NodeWithIndexAfter::indexAfter): Added. Computes and stores index.
              (WebCore::Range::Range): Call attachRange.
              (WebCore::Range::~Range): Call detachRange unless the range is already detached.
              (WebCore::Range::commonAncestorContainer): Removed check for WRONG_DOCUMENT_ERR.
              It's no longer possible to create a range where the two containers are non-zero
              and have no common ancestor.
              (WebCore::Range::isPointInRange): Rewrote expression to be more readable.
              (WebCore::Range::compareNode): Changed local variable to use int for consistency.
              (WebCore::Range::compareBoundaryPoints): Replaced ASSERT with ASSERT_NOT_REACHED.
              (WebCore::Range::deleteContents): Removed check for INVALID_STATE_ERR and
              initialization of ec to 0; both are now inside checkDeleteExtract.
              (WebCore::Range::intersectsNode): Changed local variable to use int for consistency.
              Also changed comparison to use < 0 and >= 0 rather than checking explicitly for 1
              and -1.
              (WebCore::Range::processContents): Changed code to not get the nodeType multiple
              times on the same node, and tweaked formatting. Removed code to update the range
              on deletion, because the normal delete logic will take care of that now.
              (WebCore::Range::extractContents): Removed check for INVALID_STATE_ERR and
              initialization of ec to 0; both are now inside checkDeleteExtract.
              (WebCore::Range::insertNode): Changed local variable to use int for consistency.
              (WebCore::Range::toString): Changed variable name to pastLast.
              (WebCore::Range::detach): Call detachRange.
              (WebCore::Range::checkDeleteExtract): Added check for detached range and code to
              set ec to 0; moved here from the two callers. Also changed variable name to pastLast.
              (WebCore::endpointNodeChildrenChanged): Added.
              (WebCore::Range::nodeChildrenChanged): Added.
              (WebCore::endpointNodeWillBeRemoved): Added.
              (WebCore::Range::nodeWillBeRemoved): Added.
              (WebCore::endpointTextInserted): Added.
              (WebCore::Range::textInserted): Added.
              (WebCore::endpointTextRemoved): Added.
              (WebCore::Range::textRemoved): Added.
              (WebCore::endpointTextNodesMerged): Added.
              (WebCore::Range::textNodesMerged): Added.
              (WebCore::endpointTextNodesSplit): Added.
              (WebCore::Range::textNodeSplit): Added.
      
              * dom/Range.h: Added new member functions.
      
              * dom/NodeWithIndex.h: Added. Makes it so we won't find the index for the same
              node more than once.
              * dom/NodeWithIndexAfter.h: Added. Similar to NodeWithIndex but gives the index after a
              node and treats a node pointer of 0 as meaning "before first node in parent container".
              * dom/NodeWithIndexBefore.h: Added.  Similar to NodeWithIndex but treats a node pointer of 0
              as meaning "after last node in parent container".
      
              * dom/Text.cpp:
              (WebCore::Text::splitText): Call textNodeSplit.
      
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::applyInlineStyle): Changed variable name to pastLast.
      
      LayoutTests:
      
              Reviewed by Sam.
      
              - test changes for http://bugs.webkit.org/show_bug.cgi?id=11997
                Ranges are not fixed after mutation (affects Acid3 test 13)
      
              * fast/dom/Range/mutation-expected.txt: Added.
              * fast/dom/Range/mutation.html: Added.
              * fast/dom/Range/resources/mutation.js: Added.
      
              * editing/execCommand/4920742-2-expected.txt: Updated.
              * editing/execCommand/4920742-2.html: Updated this test. It was testing for a crash in a
              case that's no longer possible -- you can't make a range where one endpoint is in the
              document and the other is not.
      
              * platform/mac/editing/execCommand/4920488-expected.txt: Removed WRONG_DOCUMENT_ERR.
              The fact that a test was getting this exception was a bug, similar to the case above.
              * platform/qt/editing/execCommand/4920488-expected.txt: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@31075 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f28fa1b0
  3. 11 Mar, 2008 2 commits
    • darin@apple.com's avatar
      WebCore: · 8a24645f
      darin@apple.com authored
              - restored some code I removed in the Range change; this code can't go
                until the rest of the Range fix is in
      
              * dom/Range.cpp:
              (WebCore::Range::commonAncestorContainer): Added back the check for 0
              that I removed erroneously in the Range patch.
              (WebCore::Range::processContents): Left in assertions I used to debug
              this.
      
      LayoutTests:
      
              Reviewed by Beth Dakin.
      
              Update test to catch the SECURITY_ERR thrown by
              CanvasRenderingContext2D::getImageData() and
              HTMLCanvasElement::toDataURL() on a tainted canvas
      
              * http/tests/security/canvas-remote-read-remote-image-expected.txt:
              * http/tests/security/canvas-remote-read-remote-image.html:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30979 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8a24645f
    • darin@apple.com's avatar
      - update expected result changed by recent Range patch · afa70063
      darin@apple.com authored
              * platform/mac/editing/execCommand/4920488-expected.txt: Removed incorrect exception log.
              * platform/qt/editing/execCommand/4920488-expected.txt: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30978 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      afa70063
  4. 03 Oct, 2007 1 commit
  5. 06 Mar, 2007 1 commit
    • justing's avatar
      LayoutTests: · 2b981fc4
      justing authored
              Reviewed by kevin
              
              <http://bugs.webkit.org/show_bug.cgi?id=12245>
              FCKeditor: Remove Format sometimes doesn't work
              <rdar://problem/4786404>
              Underline style is not removed from selection after performing Remove Format
      
              Added:
              * editing/execCommand/4786404-1-expected.checksum: Added.
              * editing/execCommand/4786404-1-expected.png: Added.
              * editing/execCommand/4786404-1-expected.txt: Added.
              * editing/execCommand/4786404-1.html: Added.
              * editing/execCommand/4786404-2-expected.checksum: Added.
              * editing/execCommand/4786404-2-expected.png: Added.
              * editing/execCommand/4786404-2-expected.txt: Added.
              * editing/execCommand/4786404-2.html: Added.
              Demonstrate fixes:
              * editing/execCommand/4920488-expected.checksum:
              * editing/execCommand/4920488-expected.png:
              * editing/execCommand/4920488-expected.txt:
              * editing/execCommand/4920742-1-expected.checksum:
              * editing/execCommand/4920742-1-expected.png:
              * editing/execCommand/4920742-1-expected.txt:
              * editing/execCommand/remove-formatting-2-expected.checksum:
              * editing/execCommand/remove-formatting-2-expected.png:
              * editing/execCommand/remove-formatting-2-expected.txt:
              Ditto, also added a FIXME:
              * editing/execCommand/remove-formatting-expected.checksum:
              * editing/execCommand/remove-formatting-expected.png:
              * editing/execCommand/remove-formatting-expected.txt:
              * editing/execCommand/remove-formatting.html:
      
      WebCore:
      
              Reviewed by kevin
              
              <http://bugs.webkit.org/show_bug.cgi?id=12245>
              FCKeditor: Remove Format sometimes doesn't work
              <rdar://problem/4786404>
              Underline style is not removed from selection after performing Remove Format
      
              * editing/Editor.cpp:
              (WebCore::Editor::removeFormattingAndStyle): Re-wrote this.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19991 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2b981fc4
  6. 01 Feb, 2007 1 commit
    • andersca's avatar
      LayoutTests: · ae911848
      andersca authored
              Reviewed by Darin.
      
              Update test results that have console messages.
              
              * dom/html/level2/html/HTMLFrameElement09-expected.txt:
              * dom/html/level2/html/HTMLIFrameElement11-expected.txt:
              * dom/xhtml/level2/html/HTMLBaseElement01-expected.txt:
              * dom/xhtml/level2/html/HTMLBaseElement02-expected.txt:
              * dom/xhtml/level2/html/frame-expected.txt:
              * dom/xhtml/level2/html/iframe-expected.txt:
              * editing/execCommand/4920488-expected.txt:
              * editing/selection/contenteditable-click-inside-expected.txt:
              * editing/selection/contenteditable-click-outside-expected.txt:
              * fast/AppleScript/001-expected.txt:
              * fast/dynamic/015-expected.txt:
              * fast/events/iframe-object-onload-expected.txt:
              * fast/events/updateLayoutForHitTest-expected.txt:
              * fast/forms/display-none-in-onchange-keyboard-expected.txt:
              * fast/forms/input-text-click-inside-expected.txt:
              * fast/forms/input-text-click-outside-expected.txt:
              * fast/forms/selected-index-assert-expected.txt:
              * fast/js/array-foreach-expected.txt:
              * fast/js/array-some-expected.txt:
              * fast/js/kde/exception_propagation-expected.txt:
              * fast/js/kde/garbage-n-expected.txt:
              * fast/js/kde/string-1-n-expected.txt:
              * fast/js/kde/string-2-n-expected.txt:
              * fast/parser/script-tag-with-trailing-slash-expected.txt:
              * fast/table/click-near-anonymous-table-expected.txt:
              * fast/tokenizer/002-expected.txt:
              * fast/tokenizer/external-script-document-write_2-expected.txt:
              * fast/tokenizer/script_extra_close-expected.txt:
              * fast/xsl/transform-xhr-doc-expected.txt:
              * http/tests/navigation/error404-goback-expected.txt:
              * http/tests/xmlhttprequest/set-dangerous-headers-expected.txt:
              * svg/W3C-SVG-1.1/animate-elem-30-t-expected.txt:
              * svg/W3C-SVG-1.1/animate-elem-33-t-expected.txt:
              * svg/W3C-SVG-1.1/animate-elem-34-t-expected.txt:
              * svg/W3C-SVG-1.1/animate-elem-37-t-expected.txt:
              * svg/W3C-SVG-1.1/animate-elem-41-t-expected.txt:
              * svg/W3C-SVG-1.1/animate-elem-78-t-expected.txt:
              * svg/W3C-SVG-1.1/color-prop-03-t-expected.txt:
              * svg/W3C-SVG-1.1/interact-cursor-01-f-expected.txt:
              * svg/W3C-SVG-1.1/linking-uri-01-b-expected.txt:
              * svg/W3C-SVG-1.1/linking-uri-02-b-expected.txt:
              * svg/W3C-SVG-1.1/metadata-example-01-b-expected.txt:
              * svg/W3C-SVG-1.1/painting-marker-03-f-expected.txt:
              * svg/W3C-SVG-1.1/shapes-polygon-01-t-expected.txt:
              * svg/W3C-SVG-1.1/shapes-polyline-01-t-expected.txt:
              * svg/W3C-SVG-1.1/struct-group-03-t-expected.txt:
              * svg/W3C-SVG-1.1/struct-use-01-t-expected.txt:
              * svg/W3C-SVG-1.1/styling-css-01-b-expected.txt:
              * svg/W3C-SVG-1.1/styling-css-02-b-expected.txt:
              * svg/W3C-SVG-1.1/styling-css-03-b-expected.txt:
              * svg/custom/dynamic-empty-path-expected.txt:
              * svg/custom/js-update-container-expected.txt:
              * svg/custom/js-update-gradient-expected.txt:
              * svg/custom/js-update-polygon-changes-expected.txt:
              * svg/custom/js-update-polygon-removal-expected.txt:
              * svg/custom/path-bad-data-expected.txt:
              * svg/custom/polyline-hittest-expected.txt:
              * svg/custom/polyline-invalid-points-expected.txt:
              * svg/custom/polyline-setattribute-points-null-expected.txt:
              * svg/custom/svgpolyparser-extra-space-expected.txt:
              * svg/custom/use-modify-target-symbol-expected.txt:
              * svg/custom/viewbox-syntax-expected.txt:
              * tables/mozilla/bugs/bug53690-1-expected.txt:
              * tables/mozilla/bugs/bug9024-expected.txt:
              * tables/mozilla_expected_failures/bugs/bug3517-expected.txt:
              * tables/mozilla_expected_failures/bugs/bug92868_1-expected.txt:
              * tables/mozilla_expected_failures/core/captions1-expected.txt:
              * tables/mozilla_expected_failures/dom/appendCells1-expected.txt:
              * tables/mozilla_expected_failures/dom/appendCellsRebuild1-expected.txt:
              * tables/mozilla_expected_failures/dom/insertTbodyExpand1-expected.txt:
              * tables/mozilla_expected_failures/dom/insertTbodyRebuild1-expected.txt:
      
      WebKitTools:
      
              Reviewed by Darin.
      
              * DumpRenderTree/UIDelegate.m:
              (-[UIDelegate webView:addMessageToConsole:]):
              Dump console messages.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@19343 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ae911848
  7. 17 Jan, 2007 1 commit
    • justing's avatar
      LayoutTests: · bce8c795
      justing authored
              Reviewed by darin
      
              <rdar://problem/4920488>
              REGRESSION: A crash occurs at WebCore::Range::processContents () when removing formatting from selected text (that contains a link)
      
              * editing/execCommand/4920488-expected.checksum: Added.
              * editing/execCommand/4920488-expected.png: Added.
              * editing/execCommand/4920488-expected.txt: Added.
              * editing/execCommand/4920488.html: Added.
              * fast/dom/Range/compareBoundaryPoints-1-expected.txt: Added.
              * fast/dom/Range/compareBoundaryPoints-1.html: Added.
      
      WebCore:
      
              Reviewed by darin
              
              <rdar://problem/4920488>
              REGRESSION: A crash occurs at WebCore::Range::processContents () when removing formatting from selected text (that contains a link)
      
              * dom/Range.cpp:
              (WebCore::Range::commonAncestorContainer): Return null if the nodes
              don't have a common ancestor.  As a side effect, the public 
              commonAncestorContainer now sets an exception if the Range starts
              in one document and ends in another, or starts or ends in a tree
              that's been removed from the document.  The spec doesn't cover
              this and there is no precedent in other browsers for this case because
              they don't allow invalid Ranges (you can create one with WebCore
              by removing a node that contains the start/end of a Range).
              (WebCore::Range::compareBoundaryPoints): If the the two positions
              are in nodes that have no common ancestor, return null.  This doesn't
              change the behavior of the public compareBoundaryPoints: it already
              throws an exception if the two positions are in nodes that don't have
              a common ancestor.  This follows the spec.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@18924 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bce8c795