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. 10 Mar, 2009 1 commit
    • bdakin@apple.com's avatar
      WebCore: · 01af3029
      bdakin@apple.com authored
      2009-03-10  Beth Dakin  <bdakin@apple.com>
      
              Reviewed by Darin Adler.
      
              Fix for <rdar://problem/6624769> REGRESSION (Safari 4 PB): No 
              scroll bar appears for long line of text with NOWRAP set
      
              This is a regression from http://trac.webkit.org/changeset/32226
              I talked with Dan about the original change, and we decided that 
              the best fix was to remove his small potential-optimization that 
              only created a separate line box for whitespace under certain 
              circumstances. This new code will always create a separate line 
              box.
      
              * rendering/bidi.cpp:
              (WebCore::RenderBlock::layoutInlineChildren):
      
      LayoutTests:
      
      2009-03-10  Beth Dakin  <bdakin@apple.com>
      
              Reviewed by Darin Adler.
      
              Test changes for <rdar://problem/6624769> REGRESSION (Safari 4 PB): 
              No scroll bar appears for long line of text with NOWRAP set
      
              New test:
              * fast/inline/long-wrapped-line.html: Added.
              * platform/mac/fast/inline/long-wrapped-line-expected.checksum: Added.
              * platform/mac/fast/inline/long-wrapped-line-expected.png: Added.
              * platform/mac/fast/inline/long-wrapped-line-expected.txt: Added.
      
              
              These tests all have changed results from the patch. Now trailing 
              whitespace always has its own linebox instead of sometimes sharing 
              a linebox with text.
              * platform/mac/editing/deleting/5206311-1-expected.txt:
              * platform/mac/editing/deleting/delete-block-merge-contents-018-expected.txt:
              * platform/mac/editing/deleting/delete-block-merge-contents-021-expected.txt:
              * platform/mac/editing/deleting/delete-block-merge-contents-022-expected.txt:
              * platform/mac/editing/deleting/delete-block-table-expected.txt:
              * platform/mac/editing/deleting/delete-leading-ws-001-expected.txt:
              * platform/mac/editing/deleting/delete-line-end-ws-001-expected.txt:
              * platform/mac/editing/deleting/delete-line-end-ws-002-expected.txt:
              * platform/mac/editing/deleting/delete-to-select-table-expected.txt:
              * platform/mac/editing/deleting/delete-ws-fixup-001-expected.txt:
              * platform/mac/editing/deleting/delete-ws-fixup-002-expected.txt:
              * platform/mac/editing/deleting/deletionUI-single-instance-expected.txt:
              * platform/mac/editing/deleting/forward-delete-expected.txt:
              * platform/mac/editing/execCommand/5482023-expected.txt:
              * platform/mac/editing/execCommand/boldSelection-expected.txt:
              * platform/mac/editing/execCommand/italicizeByCharacter-expected.txt:
              * platform/mac/editing/execCommand/modifyForeColorByCharacter-expected.txt:
              * platform/mac/editing/execCommand/print-expected.txt:
              * platform/mac/editing/execCommand/selectAll-expected.txt:
              * platform/mac/editing/execCommand/strikethroughSelection-expected.txt:
              * platform/mac/editing/input/emacs-ctrl-o-expected.txt:
              * platform/mac/editing/inserting/12882-expected.txt:
              * platform/mac/editing/inserting/editable-html-element-expected.txt:
              * platform/mac/editing/inserting/insert-div-019-expected.txt:
              * platform/mac/editing/inserting/insert-div-020-expected.txt:
              * platform/mac/editing/inserting/insert-div-021-expected.txt:
              * platform/mac/editing/inserting/insert-div-022-expected.txt:
              * platform/mac/editing/inserting/insert-div-023-expected.txt:
              * platform/mac/editing/inserting/insert-div-024-expected.txt:
              * platform/mac/editing/inserting/insert-div-025-expected.txt:
              * platform/mac/editing/inserting/insert-div-027-expected.txt:
              * platform/mac/editing/inserting/typing-003-expected.txt:
              * platform/mac/editing/pasteboard/4989774-expected.txt:
              * platform/mac/editing/pasteboard/5028447-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-3-expected.txt:
              * platform/mac/editing/pasteboard/paste-table-003-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-012-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-013-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-014-expected.txt:
              * platform/mac/editing/selection/4947387-expected.txt:
              * platform/mac/editing/selection/4983858-expected.txt:
              * platform/mac/editing/selection/5081257-1-expected.txt:
              * platform/mac/editing/selection/5081257-2-expected.txt:
              * platform/mac/editing/selection/5136696-expected.txt:
              * platform/mac/editing/selection/5234383-1-expected.txt:
              * platform/mac/editing/selection/5234383-2-expected.txt:
              * platform/mac/editing/selection/7152-1-expected.txt:
              * platform/mac/editing/selection/7152-2-expected.txt:
              * platform/mac/editing/selection/after-line-wrap-expected.txt:
              * platform/mac/editing/selection/click-start-of-line-expected.txt:
              * platform/mac/editing/selection/drag-in-iframe-expected.txt:
              * platform/mac/editing/selection/editable-html-element-expected.txt:
              * platform/mac/editing/selection/editable-non-editable-crash-expected.txt:
              * platform/mac/editing/selection/end-of-document-expected.txt:
              * platform/mac/editing/selection/extend-by-character-003-expected.txt:
              * platform/mac/editing/selection/extend-by-character-005-expected.txt:
              * platform/mac/editing/selection/extend-by-word-002-expected.txt:
              * platform/mac/editing/selection/mixed-editability-1-expected.txt:
              * platform/mac/editing/selection/move-by-character-003-expected.txt:
              * platform/mac/editing/selection/move-by-character-005-expected.txt:
              * platform/mac/editing/selection/select-all-001-expected.txt:
              * platform/mac/editing/selection/select-all-002-expected.txt:
              * platform/mac/editing/selection/select-all-003-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/apple-style-editable-mix-expected.txt:
              * platform/mac/editing/style/create-block-for-style-001-expected.txt:
              * platform/mac/editing/style/create-block-for-style-002-expected.txt:
              * platform/mac/editing/style/create-block-for-style-003-expected.txt:
              * platform/mac/editing/style/create-block-for-style-004-expected.txt:
              * platform/mac/editing/style/create-block-for-style-005-expected.txt:
              * platform/mac/editing/style/create-block-for-style-006-expected.txt:
              * platform/mac/editing/style/create-block-for-style-007-expected.txt:
              * platform/mac/editing/style/create-block-for-style-008-expected.txt:
              * platform/mac/editing/style/create-block-for-style-009-expected.txt:
              * platform/mac/editing/style/create-block-for-style-010-expected.txt:
              * platform/mac/editing/style/create-block-for-style-011-expected.txt:
              * platform/mac/editing/style/create-block-for-style-012-expected.txt:
              * platform/mac/editing/style/create-block-for-style-013-expected.txt:
              * platform/mac/editing/style/relative-font-size-change-001-expected.txt:
              * platform/mac/editing/style/relative-font-size-change-002-expected.txt:
              * platform/mac/editing/style/relative-font-size-change-003-expected.txt:
              * platform/mac/editing/style/relative-font-size-change-004-expected.txt:
              * platform/mac/editing/undo/undo-combined-delete-boundary-expected.txt:
              * platform/mac/editing/undo/undo-combined-delete-expected.txt:
              * platform/mac/editing/undo/undo-delete-boundary-expected.txt:
              * platform/mac/editing/undo/undo-delete-expected.txt:
              * platform/mac/editing/undo/undo-forward-delete-boundary-expected.txt:
              * platform/mac/editing/undo/undo-forward-delete-expected.txt:
              * platform/mac/fast/block/float/editable-text-overlapping-float-expected.txt:
              * platform/mac/fast/clip/outline-overflowClip-expected.txt:
              * platform/mac/fast/forms/negativeLineHeight-expected.txt:
              * platform/mac/fast/forms/textAreaLineHeight-expected.txt:
              * platform/mac/fast/forms/textarea-rows-cols-expected.txt:
              * platform/mac/fast/lists/drag-into-marker-expected.txt:
              * platform/mac/fast/parser/comment-in-textarea-expected.txt:
              * platform/mac/fast/parser/entity-comment-in-textarea-expected.txt:
              * platform/mac/fast/parser/open-comment-in-textarea-expected.txt:
              * platform/mac/fast/repaint/inline-outline-repaint-expected.txt:
              * platform/mac/fast/repaint/selection-after-delete-expected.txt:
              * platform/mac/fast/repaint/selection-after-remove-expected.txt:
              * platform/mac/fast/text/embed-at-end-of-pre-wrap-line-expected.txt:
              * platform/mac/fast/text/trailing-white-space-expected.txt:
              * platform/mac/fast/text/whitespace/pre-wrap-line-test-expected.txt:
              * platform/mac/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt:
              * platform/mac/fast/text/whitespace/pre-wrap-spaces-after-newline-expected.txt:
              * platform/mac/fast/text/whitespace/tab-character-basics-expected.txt:
              * platform/mac/http/tests/navigation/anchor-goback-expected.txt:
              * platform/mac/http/tests/navigation/javascriptlink-goback-expected.txt:
              * platform/mac/http/tests/navigation/metaredirect-goback-expected.txt:
              * platform/mac/http/tests/navigation/post-goback2-expected.txt:
              * platform/mac/http/tests/navigation/postredirect-goback2-expected.txt:
              * platform/mac/http/tests/navigation/redirect302-goback-expected.txt:
              * platform/mac/http/tests/navigation/success200-goback-expected.txt:
              * platform/mac/http/tests/navigation/timerredirect-goback-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41569 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      01af3029
  3. 16 Feb, 2009 2 commits
    • justin.garcia@apple.com's avatar
      WebCore: · 66fb4b04
      justin.garcia@apple.com authored
      2009-02-16  Justin Garcia  <justin.garcia@apple.com>
      
              Reviewed by Mark Rowe.
      
              https://bugs.webkit.org/show_bug.cgi?id=16309
              HTML5: The third execCommand argument for insert{un}orderedlist should be ignored
              
              When we originally implemented this command, MSDN documentation said that IE set the
              id attribute of inserted lists to the third argument to execCommand, but IE doesn't
              do this nor do any other browsers.
      
              * editing/EditorCommand.cpp:
              (WebCore::executeInsertOrderedList):
              (WebCore::executeInsertUnorderedList):
              * editing/IndentOutdentCommand.cpp:
              (WebCore::IndentOutdentCommand::outdentParagraph):
              * editing/InsertListCommand.cpp:
              (WebCore::InsertListCommand::insertList):
              (WebCore::InsertListCommand::InsertListCommand):
              (WebCore::InsertListCommand::doApply):
              * editing/InsertListCommand.h:
              (WebCore::InsertListCommand::create):
      
      LayoutTests:
      
      2009-02-16  Justin Garcia  <justin.garcia@apple.com>
      
              Reviewed by Mark Rowe.
              
              https://bugs.webkit.org/show_bug.cgi?id=16309
              HTML5: The third execCommand argument for insert{un}orderedlist should be ignored
      
              * editing/execCommand/insert-list-with-id-expected.txt: Added.
              * editing/execCommand/insert-list-with-id.html:
              * platform/mac/editing/execCommand/insert-list-with-id-expected.checksum: Removed.
              * platform/mac/editing/execCommand/insert-list-with-id-expected.png: Removed.
              * platform/mac/editing/execCommand/insert-list-with-id-expected.txt: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41034 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      66fb4b04
    • justin.garcia@apple.com's avatar
      WebCore: · e5d0a05b
      justin.garcia@apple.com authored
      2009-02-16  Justin Garcia  <justin.garcia@apple.com>
      
              Reviewed by Eric Seidel.
      
              https://bugs.webkit.org/show_bug.cgi?id=15381
              execCommand justify modifies the contentEditable node
      
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::moveParagraphContentsToNewBlockIfNecessary): Avoid modifying not just
              the body element, but any root editable element.
      
      LayoutTests:
      
      2009-02-16  Justin Garcia  <justin.garcia@apple.com>
      
              Reviewed by Eric Seidel.
              
              https://bugs.webkit.org/show_bug.cgi?id=15381
              execCommand justify modifies the contentEditable node
      
              * editing/execCommand/15381-expected.txt: Added.
              * editing/execCommand/15381.html: Added.
              
              Made this test cross platform and changed it to reflect the fix:
              * editing/execCommand/5062376-expected.txt: Added.
              * editing/execCommand/5062376.html:
              * platform/mac/editing/execCommand/5062376-expected.checksum: Removed.
              * platform/mac/editing/execCommand/5062376-expected.png: Removed.
              * platform/mac/editing/execCommand/5062376-expected.txt: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@41026 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e5d0a05b
  4. 01 Jan, 2009 1 commit
    • darin@apple.com's avatar
      WebCore: · 6366d465
      darin@apple.com authored
      2009-01-01  Darin Adler  <darin@apple.com>
      
              Reviewed by Dan Bernstein.
      
              Bug 23051: web page searching should use ICU's search so it can ignore diacritical differences
              https://bugs.webkit.org/show_bug.cgi?id=23051
              rdar://problem/3574497
      
              Test: editing/execCommand/findString-diacriticals.html
      
              * editing/TextIterator.cpp: Changed the CircularSearchBuffer class to have a new
              name, since it doesn't always use a circular buffer any more. Changed the interface
              so it can work well in the new chunky comparison mode for ICU search, and also
              added private data members for both the ICU-search and non-ICU-search code paths.
              (WebCore::TextIterator::TextIterator): Use the versions of the Range functions
              that don't take an exception code.
              (WebCore::TextIterator::handleTextBox): Added a special case to handle the position
              of a collapsed-away space better. This is not needed for search mechanism, but was
              helpful in an earlier version of this patch, and is still an improvement.
              (WebCore::SimplifiedBackwardsTextIterator::SimplifiedBackwardsTextIterator): Use the
              versions of the Range functions that don't take an exception code.
              (WebCore::CharacterIterator::range): Ditto.
              (WebCore::characterSubrange): Added. Helper function used in both places below where
              we want to convert a range and character offsets into a subrange.
              (WebCore::WordAwareIterator::advance): Use the versions of the Range functions that
              don't take an exception code.
              (WebCore::createSearcher): Added.
              (WebCore::searcher): Added.
              (WebCore::lockSearcher): Added.
              (WebCore::unlockSearcher): Added.
              (WebCore::SearchBuffer::SearchBuffer): Added.
              (WebCore::SearchBuffer::~SearchBuffer): Added.
              (WebCore::SearchBuffer::append): Added.
              (WebCore::SearchBuffer::atBreak): Added.
              (WebCore::SearchBuffer::reachedBreak): Added.
              (WebCore::SearchBuffer::search): Added.
              (WebCore::SearchBuffer::length): Added.
              (WebCore::TextIterator::subrange): Changed to call the characterSubrange
              function above.
              (WebCore::TextIterator::rangeFromLocationAndLength): Use the versions of the
              Range functions that don't take an exception code. Also tweak some other details
              of the code.
              (WebCore::isAllCollapsibleWhitespace): Added.
              (WebCore::collapsedToBoundary): Added.
              (WebCore::findPlainText): Rewrote to use new interface and streamline the
              logic a bit.
      
              Add the relevant files in the icu directory. As icu/README says, the "icu"
              directory is really just for Mac OS X, where we have the ICU library but not
              the headers installed. It should be moved inside platform/mac at some point
              to make this more clear (and the copy in JavaScriptCore should be moved
              somewhere similar for the same reason).
      
              * icu/unicode/ucoleitr.h: Added.
              * icu/unicode/usearch.h: Added.
      
      LayoutTests:
      
      2009-01-01  Darin Adler  <darin@apple.com>
      
              Reviewed by Dan Bernstein.
      
              Bug 23051: web page searching should use ICU's search so it can ignore diacritical differences
              https://bugs.webkit.org/show_bug.cgi?id=23051
              rdar://problem/3574497
      
              Currently this is only activated on the Mac platform, not including Tiger.
      
              * editing/execCommand/findString-diacriticals-expected.txt: Added. Expect failure.
              * editing/execCommand/findString-diacriticals.html: Added.
              * platform/mac-tiger/editing/execCommand: Added.
              * platform/mac-tiger/editing/execCommand/findString-diacriticals-expected.txt: Added. Expect failure.
              * platform/mac/editing/execCommand/findString-diacriticals-expected.txt: Added. Expect success.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@39536 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6366d465
  5. 05 Nov, 2008 1 commit
  6. 18 Apr, 2008 1 commit
    • mitz@apple.com's avatar
      WebCore: · c13ea5f8
      mitz@apple.com authored
              Reviewed by Darin Adler.
      
              - fix https://bugs.webkit.org/show_bug.cgi?id=17921
                Extra white space at the end of right-aligned or justified text with -webkit-line-break: after-white-space
      
              Test: fast/text/trailing-white-space.html
      
              Made trailing white space on the line always behave like it has the base
              bidi level of the block, meaning it will always go on the right (left)
              of the line in a left-to-right (right-to-left) block. Made the trailing
              white space vanish when it is next to a margin that the text should
              be touching, and made its width not count when computing the center
              point for center alignment.
      
              * platform/text/BidiResolver.h:
              (WebCore::::prependRun): Added.
              * rendering/RenderBlock.h:
              * rendering/bidi.cpp:
              (WebCore::RenderBlock::computeHorizontalPositionsForLine): Changed the
              logicallyLastRun parameter to an optional trailingSpaceRun and changed
              the alignment logic to implement the above rules.
              (WebCore::RenderBlock::layoutInlineChildren): Added code to identify
              when there is trailing white space that needs to be split into its own
              run and optionally re-ordered.
              (WebCore::RenderBlock::findNextLineBreak): Removed code that split some
              trailing space into a separate run in one special case.
      
      LayoutTests:
      
              Reviewed by Darin Adler.
      
              - test and updated results for https://bugs.webkit.org/show_bug.cgi?id=17921
                Extra white space at the end of right-aligned or justified text with -webkit-line-break: after-white-space
      
              * fast/text/trailing-white-space.html: Added.
              * http/tests/misc/acid3-expected.txt:
              * platform/mac/editing/deleting/delete-block-table-expected.txt:
              * platform/mac/editing/deleting/delete-to-select-table-expected.txt:
              * platform/mac/editing/deleting/deletionUI-single-instance-expected.txt:
              * platform/mac/editing/execCommand/5482023-expected.txt:
              * platform/mac/editing/execCommand/boldSelection-expected.txt:
              * platform/mac/editing/execCommand/italicizeByCharacter-expected.txt:
              * platform/mac/editing/execCommand/modifyForeColorByCharacter-expected.txt:
              * platform/mac/editing/execCommand/print-expected.txt:
              * platform/mac/editing/execCommand/selectAll-expected.txt:
              * platform/mac/editing/execCommand/strikethroughSelection-expected.txt:
              * platform/mac/editing/inserting/editable-html-element-expected.txt:
              * platform/mac/editing/inserting/insert-div-027-expected.txt:
              * platform/mac/editing/pasteboard/5028447-expected.txt:
              * platform/mac/editing/pasteboard/block-wrappers-necessary-expected.checksum:
              * platform/mac/editing/pasteboard/block-wrappers-necessary-expected.png:
              * platform/mac/editing/pasteboard/block-wrappers-necessary-expected.txt:
              * platform/mac/editing/pasteboard/nested-blocks-with-text-area-expected.checksum:
              * platform/mac/editing/pasteboard/nested-blocks-with-text-area-expected.png:
              * platform/mac/editing/pasteboard/nested-blocks-with-text-area-expected.txt:
              * platform/mac/editing/pasteboard/nested-blocks-with-text-field-expected.checksum:
              * platform/mac/editing/pasteboard/nested-blocks-with-text-field-expected.png:
              * platform/mac/editing/pasteboard/nested-blocks-with-text-field-expected.txt:
              * platform/mac/editing/selection/5081257-1-expected.txt:
              * platform/mac/editing/selection/after-line-wrap-expected.txt:
              * platform/mac/editing/selection/mixed-editability-1-expected.txt:
              * platform/mac/editing/selection/select-all-001-expected.txt:
              * platform/mac/editing/selection/select-all-002-expected.txt:
              * platform/mac/editing/selection/select-all-003-expected.txt:
              * platform/mac/editing/style/apple-style-editable-mix-expected.txt:
              * platform/mac/editing/style/create-block-for-style-012-expected.checksum:
              * platform/mac/editing/style/create-block-for-style-012-expected.png:
              * platform/mac/editing/style/create-block-for-style-012-expected.txt:
              * platform/mac/fast/clip/outline-overflowClip-expected.txt:
              * platform/mac/fast/forms/textarea-rows-cols-expected.txt:
              * platform/mac/fast/replaced/width100percent-textarea-expected.txt:
              * platform/mac/fast/text/embed-at-end-of-pre-wrap-line-expected.txt:
              * platform/mac/fast/text/justified-text-rect-expected.txt:
              * platform/mac/fast/text/trailing-white-space-expected.checksum: Added.
              * platform/mac/fast/text/trailing-white-space-expected.png: Added.
              * platform/mac/fast/text/trailing-white-space-expected.txt: Added.
              * platform/mac/fast/text/whitespace/pre-wrap-last-char-expected.txt:
              * platform/mac/fast/text/whitespace/pre-wrap-overflow-selection-expected.txt:
              * platform/mac/fast/text/whitespace/pre-wrap-spaces-after-newline-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@32226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c13ea5f8
  7. 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
  8. 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
  9. 28 Feb, 2008 1 commit
    • justin.garcia@apple.com's avatar
      WebCore: · 131b4fd5
      justin.garcia@apple.com authored
              Reviewed by Darin Adler.
      
              <rdar://problem/4930986> REGRESSION: Paste As Quotation pastes black text instead of blue
              
              Add a second style span at copy time to hold document default styles.  This helps us
              differentiate between those and user applied styles at paste time, where we'll want
              to let Mail's Paste As Quotation blockquote override document default styles, but
              not others.
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Changed the unit type used 
              for -webkit-text-stroke-width from CSS_NUMBER to CSS_PX, to match other properties that 
              are thick | medium | thin | <length>.  Before, there was a mismatch between the unit 
              type of -webkit-text-stroke-width property values in a CSSComputedStyleDeclaration for 
              an element and that element's inlineStyleDecl(), causing identical values to always appear 
              different to diff().
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::handlePasteAsQuotationNode): Fixed.  Don't just change
              the class to an empty string, completely remove it, it's no longer needed.
              (WebCore::handleStyleSpansBeforeInsertion): Moved the optimization from doApply here.
              (WebCore::ReplaceSelectionCommand::handleStyleSpans): 
              Added, replaces removeRedundantStyles.
              We aren't (yet) removing all redundant styles, just those on style spans, so I removed the
              unused code and renamed the function.
              There won't be more than two style spans that we need to consider, the one with the 
              source document's default styles and styles on the commonAncestor of the copied Range, 
              so don't look for more than two.
              Let elements that wrap the incoming fragment override the source document's styles.
              (WebCore::ReplaceSelectionCommand::doApply): Moved code to handleStyleSpansBeforeInsertion
              and call the renamed handleStyleSpans.
              * editing/ReplaceSelectionCommand.h:
              * editing/markup.cpp:
              (WebCore::removeDefaultStyles): Added.  Don't add document defaults to the style span
              that holds user applied styles, since they'll be added to their own style span.
              (WebCore::createMarkup):
              Add a second style span that holds just the document defaults. This lets us differentiate
              between those and user applied styles at paste time.
              Mail blockquotes are just another type of special element, moved their handling there. This
              also lets paste code make assumptions about the position of the two style spans (they are 
              *always* parent-child).
      
      LayoutTests:
      
              Reviewed by Darin Adler.
              
              <rdar://problem/4930986> REGRESSION: Paste As Quotation pastes black text instead of blue
      
              Demonstrates the bug:
              * editing/pasteboard/4930986-1-expected.txt: Added.
              * editing/pasteboard/4930986-1.html: Added.
              * editing/pasteboard/4930986-2-expected.txt: Added.
              * editing/pasteboard/4930986-2.html: Added.
              
              Demonstrates a problem with the first version of the patch:
              * editing/pasteboard/4930986-3-expected.txt: Added.
              * editing/pasteboard/4930986-3.html: Added.
              
              Visual problem fixed.  An anonymous renderer changed position, DOM remains unchanged:
              * editing/execCommand/5144139-1.html:
              * platform/mac/editing/execCommand/5144139-1-expected.checksum:
              * platform/mac/editing/execCommand/5144139-1-expected.png:
              * platform/mac/editing/execCommand/5144139-1-expected.txt:
      
              Removed unnecessary style spans, visual result unchanged:
              * platform/mac/editing/pasteboard/merge-end-blockquote-expected.checksum:
              * platform/mac/editing/pasteboard/merge-end-blockquote-expected.png:
              * platform/mac/editing/pasteboard/merge-end-blockquote-expected.txt:
              * platform/mac/editing/style/font-family-with-space-expected.checksum:
              * platform/mac/editing/style/font-family-with-space-expected.png:
              * platform/mac/editing/style/font-family-with-space-expected.txt:
              
              A style span isn't removed because at paste time because we don't anticipate 
              encountering styles on style spans that are non-inheritable, because we don't 
              create style spans like that at copy time. Turned this into a text only 
              test. Test remains visually unchanged:
              * editing/pasteboard/5245519-expected.txt: Added.
              * editing/pasteboard/5245519.html:
              * platform/mac/editing/pasteboard/5245519-expected.checksum: Removed.
              * platform/mac/editing/pasteboard/5245519-expected.png: Removed.
              * platform/mac/editing/pasteboard/5245519-expected.txt: Removed.
      
              Added an extra empty anonymous renderer, DOM and visual result remain unchanged:
              * platform/mac/editing/execCommand/create-list-with-hr-expected.checksum:
              * platform/mac/editing/execCommand/create-list-with-hr-expected.png:
              * platform/mac/editing/execCommand/create-list-with-hr-expected.txt:
              * platform/mac/editing/pasteboard/paste-list-001-expected.checksum:
              * platform/mac/editing/pasteboard/paste-list-001-expected.png:
              * platform/mac/editing/pasteboard/paste-list-001-expected.txt:
              * platform/mac/editing/pasteboard/paste-table-001-expected.checksum:
              * platform/mac/editing/pasteboard/paste-table-001-expected.png:
              * platform/mac/editing/pasteboard/paste-table-001-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-003-expected.checksum:
              * platform/mac/editing/pasteboard/paste-text-003-expected.png:
              * platform/mac/editing/pasteboard/paste-text-003-expected.txt:
              
              Reflects changes to CSSComputedStyleDeclaration::getPropertyCSSValue:
              * fast/css/computed-style-expected.txt:
              * fast/css/computed-style-without-renderer-expected.txt:
              
              We don't remove styles from style spans that are overridden by all of their 
              children, even though they are unnecessary. We've never done this, but now
              that there can be two style spans at paste time we are more likely to have 
              a style span left over because of this problem.  Mentioned this in the test 
              case and turned this into a text only test:
              * editing/pasteboard/4840662.html:
              * editing/pasteboard/4840662-expected.txt: Added.
              * platform/mac/editing/pasteboard/4840662-expected.checksum: Removed.
              * platform/mac/editing/pasteboard/4840662-expected.png: Removed.
              * platform/mac/editing/pasteboard/4840662-expected.txt: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      131b4fd5
  10. 15 Feb, 2008 1 commit
    • justin.garcia@apple.com's avatar
      WebCore: · 16711cb5
      justin.garcia@apple.com authored
              Reviewed by Dan Bernstein.
      
              <rdar://problem/5738768> REGRESSION (r30062): Crash in InlineTextBox::isLineBreak() when Undoing a replace
              
              Rolled out <http://trac.webkit.org/projects/webkit/changeset/29667>
      
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::nodeWillBeRemoved):
      
      LayoutTests:
      
              Reviewed by Dan Bernstein.
              
              <rdar://problem/5738768> REGRESSION (r30062): Crash in InlineTextBox::isLineBreak() when Undoing a replace
              
              Disabled:
              * editing/selection/inconsistent-in-removeChildNode.html: Removed.
              * editing/selection/inconsistent-in-removeChildNode.html-disabled: Added.
              
              Demonstrates fix:
              * editing/undo/5738768-expected.txt: Added.
              * editing/undo/5738768.html: Added.
              
              During a shouldChangeSelection call, the old selection is no longer null because
              nodeWillBeRemoved doesn't blow it away:
              * platform/mac/editing/style/remove-underline-across-paragraph-in-bold-expected.txt:
              * platform/mac/editing/style/remove-underline-after-paragraph-in-bold-expected.txt:
              * platform/mac/editing/style/remove-underline-in-bold-expected.txt:
      
              During a shouldChangeSelection call, the old selection is now null because
              nodeWillBeRemoved blows it away:
              * platform/mac/editing/style/remove-underline-across-paragraph-expected.txt:
              
              More instances of <rdar://problem/5729315>, where, during a shouldChangeSelection 
              call content that held the old selection is still around but it wouldn't make sense
              to leave the selection there, so we shouldn't call shouldChangeSelection at all:
              * platform/mac/editing/style/remove-underline-expected.txt:
              * platform/mac/editing/style/unbold-in-bold-expected.txt:
      
              Similar changes, but ones where I've also updated pixel results for old, unrelated fixes:
              * platform/mac-leopard/editing/pasteboard/paste-RTFD-expected.txt:
              * platform/mac/editing/deleting/delete-leading-ws-001-expected.checksum:
              * platform/mac/editing/deleting/delete-leading-ws-001-expected.txt:
              * platform/mac/editing/deleting/delete-line-011-expected.checksum:
              * platform/mac/editing/deleting/delete-line-011-expected.txt:
              * platform/mac/editing/execCommand/paste-1-expected.checksum:
              * platform/mac/editing/execCommand/paste-1-expected.txt:
              * platform/mac/editing/execCommand/paste-2-expected.checksum:
              * platform/mac/editing/execCommand/paste-2-expected.txt:
              * platform/mac/editing/pasteboard/emacs-ctrl-k-y-001-expected.checksum:
              * platform/mac/editing/pasteboard/emacs-ctrl-k-y-001-expected.txt:
              * platform/mac/editing/pasteboard/paste-RTFD-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-012-expected.checksum:
              * platform/mac/editing/selection/4960116-expected.checksum:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      16711cb5
  11. 07 Feb, 2008 1 commit
    • justin.garcia@apple.com's avatar
      WebCore: · 765eaa63
      justin.garcia@apple.com authored
              Reviewed by Darin Adler.
      
              <rdar://problem/5195056> Huge plain text pastes are slow
              
              This was fixed in r27369 and then r29367 and r29667 caused performance to
              regress.
      
              * editing/EditCommand.cpp:
              (WebCore::EditCommand::apply): Only updateLayout() for high level commands.
              (WebCore::EditCommand::unapply): Ditto.
              (WebCore::EditCommand::reapply): Ditto.
              * editing/Editor.cpp:
              (WebCore::Editor::appliedEditing): Added a note about shouldChangeSelection calls 
              that shouldn't be made, a bug I filed as <rdar://problem/5729315>.
              (WebCore::Editor::unappliedEditing): Ditto.
              (WebCore::Editor::reappliedEditing): Ditto.
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::nodeWillBeRemoved): Don't try to test the selection
              base and extent with the expensive isCandidate operation if the node that will
              be removed is in a fragment, since such a removal is guaranteed to have no effect
              on a selection.  This is to speed up the paste operation, which does many removes from
              a fragment.
      
      LayoutTests:
      
              Reviewed by Darin Adler.
              
              <rdar://problem/5195056> Huge plain text pastes are slow
              
              The changes made for this fix exposed several more cases of:
              <rdar://problem/5729315> Some shouldChangeSelectedDOMRange contain Ranges for selections that are no longer valid
      
              * platform/mac/editing/deleting/collapse-whitespace-3587601-fix-expected.txt:
              * platform/mac/editing/deleting/delete-3608462-fix-expected.txt:
              * platform/mac/editing/deleting/delete-4083333-fix-expected.txt:
              * platform/mac/editing/execCommand/find-after-replace-expected.txt:
              * platform/mac/editing/selection/move-between-blocks-no-001-expected.txt:
              * platform/mac/editing/selection/replace-selection-1-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@30062 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      765eaa63
  12. 30 Jan, 2008 1 commit
    • justin.garcia@apple.com's avatar
      WebCore: · c2c4e923
      justin.garcia@apple.com authored
              Reviewed by Darin Adler.
      
              <rdar://problem/5700414> REGRESSION (Adama-ToT): Selecting "Header 1" style in Leopard Server wiki inserts newline
      
              * editing/FormatBlockCommand.cpp:
              (WebCore::FormatBlockCommand::doApply): If the selected paragraph was empty,
              we may still need to call moveParagrah to remove the line break that holds that
              paragraph open because the new block of the requested type needs to to replace it.
      
      LayoutTests:
      
              Reviewed by Darin Adler.
              
              <rdar://problem/5700414> REGRESSION (Adama-ToT): Selecting "Header 1" style in Leopard Server wiki inserts newline
      
              * editing/execCommand/5700414-1.html: Added.
              * editing/execCommand/5700414-2.html: Added.
              * platform/mac/editing/execCommand/5700414-1-expected.checksum: Added.
              * platform/mac/editing/execCommand/5700414-1-expected.png: Added.
              * platform/mac/editing/execCommand/5700414-1-expected.txt: Added.
              * platform/mac/editing/execCommand/5700414-2-expected.checksum: Added.
              * platform/mac/editing/execCommand/5700414-2-expected.png: Added.
              * platform/mac/editing/execCommand/5700414-2-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29877 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c2c4e923
  13. 19 Jan, 2008 1 commit
    • mitz@apple.com's avatar
      WebCore: · 93dd3e6f
      mitz@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              - fix <rdar://problem/5645813> CrashTracer: [USER] 6 crashes in Safari at com.apple.WebCore: WebCore::RenderBox::destroy + 116
      
              Test: editing/selection/inconsistent-in-removeChildNode.html
      
              * editing/SelectionController.cpp:
              (WebCore::SelectionController::nodeWillBeRemoved): If the selection
              base or extent are not visible any more, adjust the selection.
      
      LayoutTests:
      
              Reviewed by Maciej Stachowiak.
      
              - test and updated results for <rdar://problem/5645813> CrashTracer: [USER] 6 crashes in Safari at com.apple.WebCore: WebCore::RenderBox::destroy + 116
      
              * editing/selection/inconsistent-in-removeChildNode.html: Added.
              * platform/mac-leopard/editing/pasteboard/paste-RTFD-expected.txt:
              * platform/mac-leopard/editing/selection: Added.
              * platform/mac-leopard/editing/selection/inconsistent-in-removeChildNode-expected.checksum: Added.
              * platform/mac-leopard/editing/selection/inconsistent-in-removeChildNode-expected.png: Added.
              * platform/mac/editing/deleting/collapse-whitespace-3587601-fix-expected.txt:
              * platform/mac/editing/deleting/delete-3608462-fix-expected.txt:
              * platform/mac/editing/deleting/delete-4083333-fix-expected.txt:
              * platform/mac/editing/deleting/delete-leading-ws-001-expected.txt:
              * platform/mac/editing/deleting/delete-line-011-expected.txt:
              * platform/mac/editing/execCommand/find-after-replace-expected.txt:
              * platform/mac/editing/execCommand/paste-1-expected.txt:
              * platform/mac/editing/execCommand/paste-2-expected.txt:
              * platform/mac/editing/pasteboard/emacs-ctrl-k-y-001-expected.txt:
              * platform/mac/editing/selection/inconsistent-in-removeChildNode-expected.txt: Added.
              * platform/mac/editing/selection/move-between-blocks-no-001-expected.txt:
              * platform/mac/editing/selection/replace-selection-1-expected.txt:
              * platform/mac/editing/style/remove-underline-across-paragraph-expected.txt:
              * platform/mac/editing/style/remove-underline-across-paragraph-in-bold-expected.txt:
              * platform/mac/editing/style/remove-underline-after-paragraph-in-bold-expected.txt:
              * platform/mac/editing/style/remove-underline-expected.txt:
              * platform/mac/editing/style/remove-underline-in-bold-expected.txt:
              * platform/mac/editing/style/unbold-in-bold-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@29667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      93dd3e6f
  14. 11 Dec, 2007 1 commit
    • justin.garcia@apple.com's avatar
      WebCore: · 08b1c80d
      justin.garcia@apple.com authored
              Reviewed by Oliver Hunt.
      
              <rdar://problem/5482023> GoogleDocs: After FormatBlock in an empty document, certain functions are disabled
              
              We were trying to insert a block of the requested type before the body element.
              
              * editing/FormatBlockCommand.cpp:
              (WebCore::FormatBlockCommand::doApply): 
              Removed unnecessary ()s in the if condition.
              Removed "|| !upstreamStart.node()->isDescendantOf(root)" from the if condition, since
              a) upstreamStart will never be outside the root editable element, since in that case
              there would be no block inside the editable root to Format, and b) if upstreamStart.node() 
              *is* the root, then refNode is the root, and we shouldn't insert before the root, we should insert
              at [root, 0].
              Added comments to explain the use of upstream() in the second if-clause.
              Added an early return for case where there is nothing selected, in that case, there is nothing
              to move.
      
      LayoutTests:
      
              Reviewed by Oliver Hunt.
              
              <rdar://problem/5482023> GoogleDocs: After performing FormatBlock in an empty document, certain functions are disabled
      
              * editing/execCommand/5482023.html: Added.
              * platform/mac/editing/execCommand/5482023-expected.checksum: Added.
              * platform/mac/editing/execCommand/5482023-expected.png: Added.
              * platform/mac/editing/execCommand/5482023-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28611 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      08b1c80d
  15. 28 Nov, 2007 1 commit
    • justin.garcia@apple.com's avatar
      WebCore: · 0ca5d705
      justin.garcia@apple.com authored
              Reviewed by Darin Adler.
      
              <rdar://problem/5573879> GMail Beta: Crash in when undoing Remove Formating
              
              In the new beta, Google has added some custom code on top of our RemoveFormat
              to work around a bug where fully selected lists aren't removed.  This code corrupts
              the undo stack and causes crashes.  This change fixes two problems with RemoveFormat
              so that Google doesn't have to have any custom code. After checking this in I'll 
              work on bulletproofing the undo stack
      
              * WebCore.xcodeproj/project.pbxproj: 
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::insertLineBreak): Added this convenience method.
              (WebCore::CompositeEditCommand::inputText): Added code to select all inserted text, not
              just the last paragraph.  Added code to support an input string with '\n's.
              * editing/CompositeEditCommand.h:
              * editing/Editor.cpp:
              (WebCore::Editor::removeFormattingAndStyle): Moved code to its own EditCommand.
              * editing/RemoveFormatCommand.cpp: Added. Moved code from removeFormattingAndStyle here.
              (WebCore::RemoveFormatCommand::RemoveFormatCommand):
              (WebCore::RemoveFormatCommand::doApply): Added code to remove fully selected lists.
              * editing/RemoveFormatCommand.h: Added.
              (WebCore::RemoveFormatCommand::editingAction):
      
      LayoutTests:
      
              Reviewed by Darin Adler.
              
              <rdar://problem/5573879> GMail Beta: Crash in when undoing Remove Formating
      
              Added to demonstrate fixes:
              * editing/execCommand/5573879.html: Added.
              * platform/mac/editing/execCommand/5573879-expected.checksum: Added.
              * platform/mac/editing/execCommand/5573879-expected.png: Added.
              * platform/mac/editing/execCommand/5573879-expected.txt: Added.
              
              Fixes (RemoveFormat now preserves the selection correctly):
              * platform/mac/editing/execCommand/4920742-1-expected.checksum:
              * platform/mac/editing/execCommand/4920742-1-expected.png:
              * platform/mac/editing/execCommand/4920742-1-expected.txt:
              * platform/mac/editing/execCommand/remove-formatting-2-expected.checksum:
              * platform/mac/editing/execCommand/remove-formatting-2-expected.png:
              * platform/mac/editing/execCommand/remove-formatting-2-expected.txt:
              * platform/mac/editing/execCommand/remove-formatting-expected.checksum:
              * platform/mac/editing/execCommand/remove-formatting-expected.png:
              * platform/mac/editing/execCommand/remove-formatting-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28126 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0ca5d705
  16. 31 Oct, 2007 1 commit
    • justing's avatar
      WebCore: · f3d7893d
      justing authored
              Reviewed by Dave Harrison.
      
              <rdar://problem/5569741> Pasting content with a line break into a list can remove the list
      
              * editing/htmlediting.cpp:
              (WebCore::enclosingEmptyListItem): A single list item can contain multiple 
              paragraphs, so if the incoming VisiblePosition is in an empty paragraph in a 
              list item, that list item isn't necessarily empty.
      
      LayoutTests:
      
              Reviewed by Dave Harrison.
      
              * editing/execCommand/5569741.html: Added.
              * platform/mac/editing/execCommand/5569741-expected.checksum: Added.
              * platform/mac/editing/execCommand/5569741-expected.png: Added.
              * platform/mac/editing/execCommand/5569741-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@27333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3d7893d
  17. 18 Oct, 2007 1 commit
    • justing's avatar
      WebCore: · a6c5dadd
      justing authored
              Reviewed by Kevin McCullough.
      
              <rdar://problem/5483526> 
              GoogleDocs: A hang occurs when applying list styling to a selection containing a table and line breaks
      
              * editing/TextIterator.cpp:
              (WebCore::TextIterator::exitNode): For selection preservation, we must emit a character
              between every VisiblePosition.  We weren't emitting a space after some tables, because
              we won't try to emit a space if shouldEmitNewlineAFterNode is true, even if no newline
              was emitted.
      
      LayoutTests:
      
              Reviewed by Kevin McCullough.
              
              <rdar://problem/5483526> 
              GoogleDocs: A hang occurs when applying list styling to a selection containing a table and line breaks
              
              Demonstrates fix for the hang:
              * editing/execCommand/5483526-expected.txt: Added.
              * editing/execCommand/5483526.html: Added.
              
              Fixed selection endpoint (problems with selection painting prevent this
              from being reflected in the pixel test results):
              * platform/mac/editing/execCommand/5432254-2-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@26761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a6c5dadd
  18. 17 Oct, 2007 1 commit
    • justing's avatar
      WebCore: · c2feaf85
      justing authored
              Reviewed by Harrison.
              
              <rdar://problem/5481523> 
              GoogleDocs: Safari hangs when indenting a particular table twice
              
              Fixed by fixing problems with the selection preservation done by IndentOutdentCommand.
              It is now more difficult to create selections that cause hangs.  Those are covered by:
              <rdar://problem/5543472>
      
              * editing/IndentOutdentCommand.cpp:
              (WebCore::indexForVisiblePosition): Compute indices from the first VisiblePosition
              in the document, instead of the first Position.
              Use rangeCompliantEquivalents when creating the Range that we pass to rangeLength.
              Tell TextIterator::rangeLength that we're doing selection preservation, so that it
              will emit characters between all VisiblePositions.
              (WebCore::IndentOutdentCommand::indentRegion): Fixed a bug where the range and location
              passed to rangeFromLocationAndLength were reversed.
              Tell rangeFromLocationAndLength that we're doing doing selection preservation, as
              above.
              * editing/TextIterator.cpp:
              (WebCore::CharacterIterator::CharacterIterator): 
              (WebCore::TextIterator::rangeLength): Rename emitSpacesForReplacedElements
              to forSelectionPreservation, to match the name of the boolean inside TextIterator and
              to match its meaning after r25522.
              (WebCore::TextIterator::rangeFromLocationAndLength): Ditto.
      
      LayoutTests:
      
              Reviewed by Harrison.
      
              <rdar://problem/5481523> 
              GoogleDocs: Safari hangs when indenting a particular table twice
      
              * editing/execCommand/5481523.html: Added.
              * platform/mac/editing/execCommand/5481523-expected.checksum: Added.
              * platform/mac/editing/execCommand/5481523-expected.png: Added.
              * platform/mac/editing/execCommand/5481523-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@26700 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c2feaf85
  19. 12 Oct, 2007 1 commit
    • justing's avatar
      WebCore: · 7d4a4343
      justing authored
              Reviewed by Harrison.
              
              <rdar://problem/5483370> GoogleDocs: Deleting cell text in a table row also removes any empty rows beneath the row being edited
              <rdar://problem/5482524> GoogleDocs: A hang occurs when applying list to selected table
              
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::removePreviouslySelectedEmptyTableRows):
              * editing/InsertListCommand.cpp:
              (WebCore::InsertListCommand::modifyRange):
              (WebCore::InsertListCommand::doApply):
      
      LayoutTests:
      
              Reviewed by Harrison.
              
              <rdar://problem/5483370> GoogleDocs: Deleting cell text in a table row also removes any empty rows beneath the row being edited
              <rdar://problem/5482524> GoogleDocs: A hang occurs when applying list to selected table
      
              * editing/deleting/5483370.html: Added.
              * editing/pasteboard/5483567.html-disabled: Removed.
              * editing/execCommand/5482524.html: Added.
              * platform/mac/editing/deleting/5483370-expected.checksum: Added.
              * platform/mac/editing/deleting/5483370-expected.png: Added.
              * platform/mac/editing/deleting/5483370-expected.txt: Added.
              * platform/mac/editing/execCommand/5482524-expected.checksum: Added.
              * platform/mac/editing/execCommand/5482524-expected.png: Added.
              * platform/mac/editing/execCommand/5482524-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@26558 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7d4a4343
  20. 03 Oct, 2007 2 commits
  21. 02 Oct, 2007 1 commit
    • justing's avatar
      Added a mention of a bug that this test demonstrates: · 26020265
      justing authored
              * editing/execCommand/5144139-1-expected.checksum: Removed.
              * editing/execCommand/5144139-1-expected.png: Removed.
              * editing/execCommand/5144139-1-expected.txt: Removed.
              * editing/execCommand/5144139-1.html:
              * platform/mac/editing/execCommand/5144139-1-expected.checksum: Added.
              * platform/mac/editing/execCommand/5144139-1-expected.png: Added.
              * platform/mac/editing/execCommand/5144139-1-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@25938 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      26020265
  22. 12 Sep, 2007 1 commit
    • justing's avatar
      WebCore: · e1934676
      justing authored
              Reviewed by Tristan.
      
              <rdar://problem/5469868> 
              GoogleDocs: A hang occurs when applying list styling to a selection in a <table>
              
              When list insertion moves selected paragraphs into list items, it relies on 
              the selection preservation code inside moveParagraphs to iterate over the 
              selected paragraphs.  If a selection is ever restored incorrectly (before
              the original, or inside the original) list insertion will go into an infinite loop.
              
              In this hang, a table was selected and the selection preservation code incorrectly
              restored a selection, placing it inside the table.
              
              The bug was that a TextIterator, when being used for selection preservation, must
              emit a character between every VisiblePosition in the Range used to create the
              iterator.
              
              * editing/TextIterator.cpp:
              (WebCore::TextIterator::TextIterator): Renamed the boolean that we use for 
              selection preservation.  It used to be m_emitForReplacedElements because
              we believed that replaced elements were the only case where TextIterators
              should have emitted differently when used for selection preservation.
              (WebCore::TextIterator::handleReplacedElement): Ditto.
              (WebCore::TextIterator::shouldRepresentNodeOffsetZero): Represent the 
              position before block tables, but only if we are emitting for selection 
              preservation.
              (WebCore::TextIterator::shouldEmitSpaceBeforeAndAfterNode): We should emit 
              a space before and after block tables if we are emitting for selection 
              preservation (because we have VisiblePositions before and after them).
              (WebCore::TextIterator::handleNonTextNode): Use a renamed variable.
              * editing/TextIterator.h: Made shouldEmitSpaceBeforeAndAfterNode a member
              function, because whether or not we emit spaces before and after a block
              table depends we're emitting for selection preservation.
      
      LayoutTests:
      
              Reviewed by Tristan.
      
              Demonstrates bug:
              * editing/execCommand/5469868-expected.txt: Added.
              * editing/execCommand/5469868.html: Added.
              
              Fixed (and moved expected results to platform/mac):
              * editing/style/table-selection-expected.checksum: Removed.
              * editing/style/table-selection-expected.png: Removed.
              * editing/style/table-selection-expected.txt: Removed.
              * platform/mac/editing/style: Added.
              * platform/mac/editing/style/table-selection-expected.checksum: Added.
              * platform/mac/editing/style/table-selection-expected.png: Added.
              * platform/mac/editing/style/table-selection-expected.txt: Added.
              
              Fixed:
              * platform/mac/editing/execCommand/5432254-2-expected.checksum:
              * platform/mac/editing/execCommand/5432254-2-expected.png:
              * platform/mac/editing/execCommand/5432254-2-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@25522 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e1934676
  23. 07 Sep, 2007 1 commit
    • oliver's avatar
      RS=Same · bb6c86a5
      oliver authored
              r25382 moved a number of tests from platform/mac back to the cross-platform
              directories, but did not commit the platform/mac changes themselves.
              
              This patch actually does.
              
              * platform/mac/editing/execCommand/nsresponder-outdent-expected.txt: Removed.
              * platform/mac/editing/execCommand/nsresponder-indent-expected.checksum: Removed.
              * platform/mac/editing/execCommand/nsresponder-outdent-expected.checksum: Removed.
              * platform/mac/editing/execCommand/nsresponder-indent-expected.png: Removed.
              * platform/mac/editing/execCommand/nsresponder-outdent-expected.png: Removed.
              * platform/mac/editing/execCommand/nsresponder-indent.html: Removed.
              * platform/mac/editing/execCommand/nsresponder-outdent.html: Removed.
              * platform/mac/editing/execCommand/nsresponder-indent-expected.txt: Removed.
              * platform/mac/editing/selection/5195166-1-expected.png: Removed.
              * platform/mac/editing/selection/5195166-2-expected.png: Removed.
              * platform/mac/editing/selection/select-line-expected.txt: Removed.
              * platform/mac/editing/selection/selection-actions-expected.checksum: Removed.
              * platform/mac/editing/selection/selection-actions.html: Removed.
              * platform/mac/editing/selection/4947387-expected.txt: Removed.
              * platform/mac/editing/selection/4947387-expected.png: Removed.
              * platform/mac/editing/selection/5195166-1-expected.checksum: Removed.
              * platform/mac/editing/selection/5195166-2-expected.checksum: Removed.
              * platform/mac/editing/selection/selection-actions-expected.txt: Removed.
              * platform/mac/editing/selection/5195166-1.html: Removed.
              * platform/mac/editing/selection/5195166-2.html: Removed.
              * platform/mac/editing/selection/selection-actions-expected.png: Removed.
              * platform/mac/editing/selection/select-line.html: Removed.
              * platform/mac/editing/selection/4947387-expected.checksum: Removed.
              * platform/mac/editing/selection/5195166-1-expected.txt: Removed.
              * platform/mac/editing/selection/4947387.html: Removed.
              * platform/mac/editing/selection/5195166-2-expected.txt: Removed.
              * platform/mac/editing/deleting/smart-delete-003-expected.checksum: Removed.
              * platform/mac/editing/deleting/smart-delete-004-expected.checksum: Removed.
              * platform/mac/editing/deleting/smart-delete-003.html: Removed.
              * platform/mac/editing/deleting/smart-delete-004.html: Removed.
              * platform/mac/editing/deleting/5300379-expected.checksum: Removed.
              * platform/mac/editing/deleting/delete-to-end-of-paragraph-expected.checksum: Removed.
              * platform/mac/editing/deleting/5300379.html: Removed.
              * platform/mac/editing/deleting/delete-to-end-of-paragraph.html: Removed.
              * platform/mac/editing/deleting/smart-delete-003-expected.txt: Removed.
              * platform/mac/editing/deleting/smart-delete-004-expected.txt: Removed.
              * platform/mac/editing/deleting/5300379-expected.txt: Removed.
              * platform/mac/editing/deleting/smart-delete-003-expected.png: Removed.
              * platform/mac/editing/deleting/delete-to-end-of-paragraph-expected.txt: Removed.
              * platform/mac/editing/deleting/smart-delete-004-expected.png: Removed.
              * platform/mac/editing/deleting/5300379-expected.png: Removed.
              * platform/mac/editing/deleting/delete-to-end-of-paragraph-expected.png: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@25437 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb6c86a5
  24. 04 Sep, 2007 1 commit
    • oliver's avatar
      RS=Adam · f3d01a86
      oliver authored
              
              Moving a number of mac specific tests into LayoutTests/platform/mac so that they
              don't need to be in the windows Skiplist.
              
              This includes most of the tests that used textInputController as it is a test
              of the mac-specific NSTextInput API.
      
              * editing/deleting/5300379-expected.checksum: Removed.
              * editing/deleting/5300379-expected.png: Removed.
              * editing/deleting/5300379-expected.txt: Removed.
              * editing/deleting/5300379.html: Removed.
              * editing/deleting/delete-to-end-of-paragraph-expected.checksum: Removed.
              * editing/deleting/delete-to-end-of-paragraph-expected.png: Removed.
              * editing/deleting/delete-to-end-of-paragraph-expected.txt: Removed.
              * editing/deleting/delete-to-end-of-paragraph.html: Removed.
              * editing/deleting/smart-delete-003-expected.checksum: Removed.
              * editing/deleting/smart-delete-003-expected.png: Removed.
              * editing/deleting/smart-delete-003-expected.txt: Removed.
              * editing/deleting/smart-delete-003.html: Removed.
              * editing/deleting/smart-delete-004-expected.checksum: Removed.
              * editing/deleting/smart-delete-004-expected.png: Removed.
              * editing/deleting/smart-delete-004-expected.txt: Removed.
              * editing/deleting/smart-delete-004.html: Removed.
              * editing/execCommand/nsresponder-indent-expected.checksum: Removed.
              * editing/execCommand/nsresponder-indent-expected.png: Removed.
              * editing/execCommand/nsresponder-indent-expected.txt: Removed.
              * editing/execCommand/nsresponder-indent.html: Removed.
              * editing/execCommand/nsresponder-outdent-expected.checksum: Removed.
              * editing/execCommand/nsresponder-outdent-expected.png: Removed.
              * editing/execCommand/nsresponder-outdent-expected.txt: Removed.
              * editing/execCommand/nsresponder-outdent.html: Removed.
              * editing/input/firstrectforcharacterrange-plain-expected.txt: Removed.
              * editing/input/firstrectforcharacterrange-plain.html: Removed.
              * editing/input/firstrectforcharacterrange-styled-expected.txt: Removed.
              * editing/input/firstrectforcharacterrange-styled.html: Removed.
              * editing/input/mac: Removed.
              * editing/input/mac/hangul-enter-confirms-and-sends-keypress-expected.txt: Removed.
              * editing/input/mac/hangul-enter-confirms-and-sends-keypress.html: Removed.
              * editing/input/mac/hangul.js: Removed.
              * editing/input/mac/kotoeri-enter-to-confirm-and-newline-expected.txt: Removed.
              * editing/input/mac/kotoeri-enter-to-confirm-and-newline.html: Removed.
              * editing/input/mac/kotoeri.js: Removed.
              * editing/input/mac/logger.js: Removed.
              * editing/input/range-for-empty-document-expected.txt: Removed.
              * editing/input/range-for-empty-document.html: Removed.
              * editing/input/replace-invalid-range-expected.txt: Removed.
              * editing/input/replace-invalid-range.html: Removed.
              * editing/input/text-input-controller-expected.txt: Removed.
              * editing/input/text-input-controller.html: Removed.
              * editing/input/wrapped-line-char-rect-expected.txt: Removed.
              * editing/input/wrapped-line-char-rect.html: Removed.
              * editing/selection/4947387-expected.checksum: Removed.
              * editing/selection/4947387-expected.png: Removed.
              * editing/selection/4947387-expected.txt: Removed.
              * editing/selection/4947387.html: Removed.
              * editing/selection/5195166-1-expected.checksum: Removed.
              * editing/selection/5195166-1-expected.png: Removed.
              * editing/selection/5195166-1-expected.txt: Removed.
              * editing/selection/5195166-1.html: Removed.
              * editing/selection/5195166-2-expected.checksum: Removed.
              * editing/selection/5195166-2-expected.png: Removed.
              * editing/selection/5195166-2-expected.txt: Removed.
              * editing/selection/5195166-2.html: Removed.
              * editing/selection/select-line-expected.txt: Removed.
              * editing/selection/select-line.html: Removed.
              * editing/selection/selection-actions-expected.checksum: Removed.
              * editing/selection/selection-actions-expected.png: Removed.
              * editing/selection/selection-actions-expected.txt: Removed.
              * editing/selection/selection-actions.html: Removed.
              * fast/AppleScript: Removed.
              * fast/AppleScript/001-expected.txt: Removed.
              * fast/AppleScript/001.html: Removed.
              * fast/AppleScript/array-expected.txt: Removed.
              * fast/AppleScript/array.html: Removed.
              * fast/AppleScript/date-expected.txt: Removed.
              * fast/AppleScript/date.html: Removed.
              * fast/dom/character-index-for-point-expected.txt: Removed.
              * fast/dom/character-index-for-point.html: Removed.
              * fast/dom/wrapper-identity-expected.txt: Removed.
              * fast/dom/wrapper-identity.html: Removed.
              * fast/dom/wrapper-round-tripping-expected.txt: Removed.
              * fast/dom/wrapper-round-tripping.html: Removed.
              * fast/encoding/char-decoding-mac-expected.txt: Removed.
              * fast/encoding/char-decoding-mac.html: Removed.
              * fast/forms/attributed-strings-expected.txt: Removed.
              * fast/forms/attributed-strings.html: Removed.
              * fast/objc: Removed.
              * fast/objc/longlongTest-expected.txt: Removed.
              * fast/objc/longlongTest.html: Removed.
              * fast/text/attributed-substring-from-range-001-expected.txt: Removed.
              * fast/text/attributed-substring-from-range-001.html: Removed.
              * fast/text/attributed-substring-from-range-expected.txt: Removed.
              * fast/text/attributed-substring-from-range-in-textfield-expected.txt: Removed.
              * fast/text/attributed-substring-from-range-in-textfield.html: Removed.
              * fast/text/attributed-substring-from-range.html: Removed.
              * fast/text/justified-text-rect-expected.checksum: Removed.
              * fast/text/justified-text-rect-expected.png: Removed.
              * fast/text/justified-text-rect-expected.txt: Removed.
              * fast/text/justified-text-rect.html: Removed.
              * platform/mac/editing/deleting/5300379-expected.checksum: Copied from editing/deleting/5300379-expected.checksum.
              * platform/mac/editing/deleting/5300379-expected.png: Copied from editing/deleting/5300379-expected.png.
              * platform/mac/editing/deleting/5300379-expected.txt: Copied from editing/deleting/5300379-expected.txt.
              * platform/mac/editing/deleting/5300379.html: Copied from editing/deleting/5300379.html.
              * platform/mac/editing/deleting/delete-to-end-of-paragraph-expected.checksum: Copied from editing/deleting/delete-to-end-of-paragraph-expected.checksum.
              * platform/mac/editing/deleting/delete-to-end-of-paragraph-expected.png: Copied from editing/deleting/delete-to-end-of-paragraph-expected.png.
              * platform/mac/editing/deleting/delete-to-end-of-paragraph-expected.txt: Copied from editing/deleting/delete-to-end-of-paragraph-expected.txt.
              * platform/mac/editing/deleting/delete-to-end-of-paragraph.html: Copied from editing/deleting/delete-to-end-of-paragraph.html.
              * platform/mac/editing/deleting/smart-delete-003-expected.checksum: Copied from editing/deleting/smart-delete-003-expected.checksum.
              * platform/mac/editing/deleting/smart-delete-003-expected.png: Copied from editing/deleting/smart-delete-003-expected.png.
              * platform/mac/editing/deleting/smart-delete-003-expected.txt: Copied from editing/deleting/smart-delete-003-expected.txt.
              * platform/mac/editing/deleting/smart-delete-003.html: Copied from editing/deleting/smart-delete-003.html.
              * platform/mac/editing/deleting/smart-delete-004-expected.checksum: Copied from editing/deleting/smart-delete-004-expected.checksum.
              * platform/mac/editing/deleting/smart-delete-004-expected.png: Copied from editing/deleting/smart-delete-004-expected.png.
              * platform/mac/editing/deleting/smart-delete-004-expected.txt: Copied from editing/deleting/smart-delete-004-expected.txt.
              * platform/mac/editing/deleting/smart-delete-004.html: Copied from editing/deleting/smart-delete-004.html.
              * platform/mac/editing/execCommand/nsresponder-indent-expected.checksum: Copied from editing/execCommand/nsresponder-indent-expected.checksum.
              * platform/mac/editing/execCommand/nsresponder-indent-expected.png: Copied from editing/execCommand/nsresponder-indent-expected.png.
              * platform/mac/editing/execCommand/nsresponder-indent-expected.txt: Copied from editing/execCommand/nsresponder-indent-expected.txt.
              * platform/mac/editing/execCommand/nsresponder-indent.html: Copied from editing/execCommand/nsresponder-indent.html.
              * platform/mac/editing/execCommand/nsresponder-outdent-expected.checksum: Copied from editing/execCommand/nsresponder-outdent-expected.checksum.
              * platform/mac/editing/execCommand/nsresponder-outdent-expected.png: Copied from editing/execCommand/nsresponder-outdent-expected.png.
              * platform/mac/editing/execCommand/nsresponder-outdent-expected.txt: Copied from editing/execCommand/nsresponder-outdent-expected.txt.
              * platform/mac/editing/execCommand/nsresponder-outdent.html: Copied from editing/execCommand/nsresponder-outdent.html.
              * platform/mac/editing/input: Copied from editing/input/mac.
              * platform/mac/editing/input/firstrectforcharacterrange-plain-expected.txt: Copied from editing/input/firstrectforcharacterrange-plain-expected.txt.
              * platform/mac/editing/input/firstrectforcharacterrange-plain.html: Copied from editing/input/firstrectforcharacterrange-plain.html.
              * platform/mac/editing/input/firstrectforcharacterrange-styled-expected.txt: Copied from editing/input/firstrectforcharacterrange-styled-expected.txt.
              * platform/mac/editing/input/firstrectforcharacterrange-styled.html: Copied from editing/input/firstrectforcharacterrange-styled.html.
              * platform/mac/editing/input/range-for-empty-document-expected.txt: Copied from editing/input/range-for-empty-document-expected.txt.
              * platform/mac/editing/input/range-for-empty-document.html: Copied from editing/input/range-for-empty-document.html.
              * platform/mac/editing/input/replace-invalid-range-expected.txt: Copied from editing/input/replace-invalid-range-expected.txt.
              * platform/mac/editing/input/replace-invalid-range.html: Copied from editing/input/replace-invalid-range.html.
              * platform/mac/editing/input/text-input-controller-expected.txt: Copied from editing/input/text-input-controller-expected.txt.
              * platform/mac/editing/input/text-input-controller.html: Copied from editing/input/text-input-controller.html.
              * platform/mac/editing/input/wrapped-line-char-rect-expected.txt: Copied from editing/input/wrapped-line-char-rect-expected.txt.
              * platform/mac/editing/input/wrapped-line-char-rect.html: Copied from editing/input/wrapped-line-char-rect.html.
              * platform/mac/editing/selection/4947387-expected.checksum: Copied from editing/selection/4947387-expected.checksum.
              * platform/mac/editing/selection/4947387-expected.png: Copied from editing/selection/4947387-expected.png.
              * platform/mac/editing/selection/4947387-expected.txt: Copied from editing/selection/4947387-expected.txt.
              * platform/mac/editing/selection/4947387.html: Copied from editing/selection/4947387.html.
              * platform/mac/editing/selection/5195166-1-expected.checksum: Copied from editing/selection/5195166-1-expected.checksum.
              * platform/mac/editing/selection/5195166-1-expected.png: Copied from editing/selection/5195166-1-expected.png.
              * platform/mac/editing/selection/5195166-1-expected.txt: Copied from editing/selection/5195166-1-expected.txt.
              * platform/mac/editing/selection/5195166-1.html: Copied from editing/selection/5195166-1.html.
              * platform/mac/editing/selection/5195166-2-expected.checksum: Copied from editing/selection/5195166-2-expected.checksum.
              * platform/mac/editing/selection/5195166-2-expected.png: Copied from editing/selection/5195166-2-expected.png.
              * platform/mac/editing/selection/5195166-2-expected.txt: Copied from editing/selection/5195166-2-expected.txt.
              * platform/mac/editing/selection/5195166-2.html: Copied from editing/selection/5195166-2.html.
              * platform/mac/editing/selection/select-line-expected.txt: Copied from editing/selection/select-line-expected.txt.
              * platform/mac/editing/selection/select-line.html: Copied from editing/selection/select-line.html.
              * platform/mac/editing/selection/selection-actions-expected.checksum: Copied from editing/selection/selection-actions-expected.checksum.
              * platform/mac/editing/selection/selection-actions-expected.png: Copied from editing/selection/selection-actions-expected.png.
              * platform/mac/editing/selection/selection-actions-expected.txt: Copied from editing/selection/selection-actions-expected.txt.
              * platform/mac/editing/selection/selection-actions.html: Copied from editing/selection/selection-actions.html.
              * platform/mac/fast/AppleScript: Copied from fast/AppleScript.
              * platform/mac/fast/dom: Added.
              * platform/mac/fast/dom/character-index-for-point-expected.txt: Copied from fast/dom/character-index-for-point-expected.txt.
              * platform/mac/fast/dom/character-index-for-point.html: Copied from fast/dom/character-index-for-point.html.
              * platform/mac/fast/dom/wrapper-identity-expected.txt: Copied from fast/dom/wrapper-identity-expected.txt.
              * platform/mac/fast/dom/wrapper-identity.html: Copied from fast/dom/wrapper-identity.html.
              * platform/mac/fast/dom/wrapper-round-tripping-expected.txt: Copied from fast/dom/wrapper-round-tripping-expected.txt.
              * platform/mac/fast/dom/wrapper-round-tripping.html: Copied from fast/dom/wrapper-round-tripping.html.
              * platform/mac/fast/encoding: Added.
              * platform/mac/fast/encoding/char-decoding-mac-expected.txt: Copied from fast/encoding/char-decoding-mac-expected.txt.
              * platform/mac/fast/encoding/char-decoding-mac.html: Copied from fast/encoding/char-decoding-mac.html.
              * platform/mac/fast/forms: Added.
              * platform/mac/fast/forms/attributed-strings-expected.txt: Copied from fast/forms/attributed-strings-expected.txt.
              * platform/mac/fast/forms/attributed-strings.html: Copied from fast/forms/attributed-strings.html.
              * platform/mac/fast/objc: Copied from fast/objc.
              * platform/mac/fast/text: Added.
              * platform/mac/fast/text/attributed-substring-from-range-001-expected.txt: Copied from fast/text/attributed-substring-from-range-001-expected.txt.
              * platform/mac/fast/text/attributed-substring-from-range-001.html: Copied from fast/text/attributed-substring-from-range-001.html.
              * platform/mac/fast/text/attributed-substring-from-range-expected.txt: Copied from fast/text/attributed-substring-from-range-expected.txt.
              * platform/mac/fast/text/attributed-substring-from-range-in-textfield-expected.txt: Copied from fast/text/attributed-substring-from-range-in-textfield-expected.txt.
              * platform/mac/fast/text/attributed-substring-from-range-in-textfield.html: Copied from fast/text/attributed-substring-from-range-in-textfield.html.
              * platform/mac/fast/text/attributed-substring-from-range.html: Copied from fast/text/attributed-substring-from-range.html.
              * platform/mac/fast/text/justified-text-rect-expected.checksum: Copied from fast/text/justified-text-rect-expected.checksum.
              * platform/mac/fast/text/justified-text-rect-expected.png: Copied from fast/text/justified-text-rect-expected.png.
              * platform/mac/fast/text/justified-text-rect-expected.txt: Copied from fast/text/justified-text-rect-expected.txt.
              * platform/mac/fast/text/justified-text-rect.html: Copied from fast/text/justified-text-rect.html.
              * platform/mac/plugins: Added.
              * platform/mac/plugins/pluginDocumentView-deallocated-dataSource-expected.txt: Copied from plugins/pluginDocumentView-deallocated-dataSource-expected.txt.
              * platform/mac/plugins/pluginDocumentView-deallocated-dataSource.html: Copied from plugins/pluginDocumentView-deallocated-dataSource.html.
              * platform/win/Skipped:
              * plugins/pluginDocumentView-deallocated-dataSource-expected.txt: Removed.
              * plugins/pluginDocumentView-deallocated-dataSource.html: Removed.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@25367 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f3d01a86
  25. 24 Aug, 2007 1 commit
    • justing's avatar
      WebCore: · d197d6b7
      justing authored
              Reviewed by Darin.
              
              <rdar://problem/5432254> GoogleDocs: A hang occurs when applying list style to selected table
              
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::handleGeneralDelete): If the position
              that marked the start of the range to delete has been removed from the
              document, and it was inside the node that holds the position that marks
              the end of the range to delete, don't remove any children of that node,
              because we don't know how many to remove.  For example, if the end is
              [a, 5] and the start was in some descendant of a and was removed, don't
              remove any of the children of a.  We will now refuse to remove some content
              incorrectly, but that's less dangerous than removing content incorrectly.
              Long term we need to update these positions as we remove content from the 
              document, but that seems like a more risky change.  Added a testcase.
              * editing/InsertListCommand.cpp:
              (WebCore::InsertListCommand::modifyRange): If the end of the selection to 
              modify is just after a table, and if the start of the selection is inside 
              that table, the last paragraph that we'll want modify is the last one inside 
              the table, not the paragraph that contains the table itself. Adjust 
              startOfLastParagraph here to avoid infinite recursion.
      
      LayoutTests:
      
              Reviewed by Darin.
              
              <rdar://problem/5432254> GoogleDocs: A hang occurs when applying list style to selected table
      
              * editing/execCommand/5432254-1.html: Added.
              * editing/execCommand/5432254-2.html: Added.
              * platform/mac/editing/execCommand: Added.
              * platform/mac/editing/execCommand/5432254-1-expected.checksum: Added.
              * platform/mac/editing/execCommand/5432254-1-expected.png: Added.
              * platform/mac/editing/execCommand/5432254-1-expected.txt: Added.
              * platform/mac/editing/execCommand/5432254-2-expected.checksum: Added.
              * platform/mac/editing/execCommand/5432254-2-expected.png: Added.
              * platform/mac/editing/execCommand/5432254-2-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@25229 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d197d6b7