1. 07 Apr, 2011 3 commits
    • rniwa@webkit.org's avatar
      2011-04-07 Ryosuke Niwa <rniwa@webkit.org> · 5614540c
      rniwa@webkit.org authored
              Reviewed by Darin Adler.
      
              REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
              https://bugs.webkit.org/show_bug.cgi?id=57872
      
              Added tests to ensure WebKit inserts a paragraph separator properly around tab span.
      
              * editing/inserting/insert-div-021-expected.txt: No longer duplicates span[id="test"] incorrectly.
              * editing/inserting/insert-paragraph-after-tab-span-and-text-expected.txt: Added.
              * editing/inserting/insert-paragraph-after-tab-span-and-text.html: Added.
              * editing/inserting/insert-paragraph-separator-tab-span-expected.txt: Added.
              * editing/inserting/insert-paragraph-separator-tab-span.html: Added.
              * editing/inserting/insert-paragraph-at-end-of-line-expected.txt: No longer duplicates a[id="anchor"] incorrectly.
      2011-04-07  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
              https://bugs.webkit.org/show_bug.cgi?id=57872
      
              r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
              because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
      
              r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
              avoiding the tab span.
      
              Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
              Also reverted r46914 for the general code path because re-creating node hierarchy duplicates nodes when
              we're moving nodes after the paragraph separator. Instead, we now split the tree up until the start block
              before moving the nodes.
      
              Tests: editing/inserting/insert-paragraph-after-tab-span-and-text.html
                     editing/inserting/insert-paragraph-separator-tab-span.html
      
              * editing/DeleteSelectionCommand.cpp:
              (WebCore::DeleteSelectionCommand::saveTypingStyleState): Since EditingStyle's constructor avoids a tab span,
              no longer calls positionBeforeTabSpan on the position passed to EditingStyle's constructor.
              * editing/EditingStyle.cpp:
              (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
              separator into a paragraph separator.
              * editing/htmlediting.cpp:
              (WebCore::positionOutsideTabSpan): Renamed from positionBeforeTabSpan. Also returns the position in the parent
              node after the tab span if the position was at the end of the tab span.
              * editing/htmlediting.h:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83247 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5614540c
    • rniwa@webkit.org's avatar
      2011-04-07 Ryosuke Niwa <rniwa@webkit.org> · 04696f10
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              editing/inserting/6633727.html should be renamed and converted into a dump-as-markup test
              https://bugs.webkit.org/show_bug.cgi?id=58037
      
              Renamed 6633727.html to insert-paragraph-at-end-of-line.html and converted it to a dump-as-markup test.
      
              * editing/inserting/6633727-expected.txt: Removed.
              * editing/inserting/6633727.html: Removed.
              * editing/inserting/insert-paragraph-at-end-of-line-expected.txt: Added.
              * editing/inserting/insert-paragraph-at-end-of-line.html: Copied from LayoutTests/editing/inserting/6633727.html.
              * editing/inserting/script-tests/6633727.js: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83181 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      04696f10
    • rniwa@webkit.org's avatar
      2011-04-07 Ryosuke Niwa <rniwa@webkit.org> · f2c5f86c
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              Convert insert-div-021.html to a dump-as-markup test
              https://bugs.webkit.org/show_bug.cgi?id=58019
      
              Converted the test.
      
              * editing/inserting/insert-div-021-expected.txt: Added.
              * editing/inserting/insert-div-021.html:
              * platform/chromium-linux/editing/inserting/insert-div-021-expected.checksum: Removed.
              * platform/chromium-linux/editing/inserting/insert-div-021-expected.png: Removed.
              * platform/chromium-win/editing/inserting/insert-div-021-expected.checksum: Removed.
              * platform/chromium-win/editing/inserting/insert-div-021-expected.png: Removed.
              * platform/chromium-win/editing/inserting/insert-div-021-expected.txt: Removed.
              * platform/gtk/editing/inserting/insert-div-021-expected.checksum: Removed.
              * platform/gtk/editing/inserting/insert-div-021-expected.png: Removed.
              * platform/gtk/editing/inserting/insert-div-021-expected.txt: Removed.
              * platform/mac/editing/inserting/insert-div-021-expected.checksum: Removed.
              * platform/mac/editing/inserting/insert-div-021-expected.png: Removed.
              * platform/mac/editing/inserting/insert-div-021-expected.txt: Removed.
              * platform/qt/editing/inserting/insert-div-021-expected.txt: Removed.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83161 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f2c5f86c
  2. 06 Apr, 2011 2 commits
    • commit-queue@webkit.org's avatar
      2011-04-06 Sheriff Bot <webkit.review.bot@gmail.com> · e2d84280
      commit-queue@webkit.org authored
              Unreviewed, rolling out r83039.
              http://trac.webkit.org/changeset/83039
              https://bugs.webkit.org/show_bug.cgi?id=57978
      
              introduced a new regression in conjunction to
              ReplaceSelectionCommand (Requested by rniwa on #webkit).
      
              * editing/inserting/insert-paragraph-separator-tab-span-expected.txt: Removed.
              * editing/inserting/insert-paragraph-separator-tab-span.html: Removed.
      2011-04-06  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r83039.
              http://trac.webkit.org/changeset/83039
              https://bugs.webkit.org/show_bug.cgi?id=57978
      
              introduced a new regression in conjunction to
              ReplaceSelectionCommand (Requested by rniwa on #webkit).
      
              * editing/EditingStyle.cpp:
              (WebCore::EditingStyle::init):
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::doApply):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83097 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e2d84280
    • rniwa@webkit.org's avatar
      2011-04-06 Ryosuke Niwa <rniwa@webkit.org> · 56390f67
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
              https://bugs.webkit.org/show_bug.cgi?id=57872
      
              r46914 initially introduced a regression by replacing calls to styleAtPosition by editingStyleAtPosition
              because editingStyleAtPosition did not avoid tab span to obtain the computed style unlike styleAtPosition.
      
              r46914 also introduced a regression by cloning hierarchy under new block at the insertion position without
              avoiding the tab span.
      
              Fixed the both regressions by avoiding tab spans when computing the editing style and when cloning hierarchy.
      
              Test: editing/inserting/insert-paragraph-separator-tab-span.html
      
              * editing/EditingStyle.cpp:
              (WebCore::EditingStyle::init): Always avoid a tab span when computing the editing style.
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::InsertParagraphSeparatorCommand::doApply): Avoid cloning tab spans and inserting a paragraph
              separator into a paragraph separator.
      2011-04-06  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              REGRESSION (r46914, r48764): When typing in Mail, line wrapping frequently occurs in the middle of words
              https://bugs.webkit.org/show_bug.cgi?id=57872
      
              Added a test insert a paragraph separator and text around tab spans. WebKit should not apply the tab span's
              style to the paragraph separator or the text.
      
              * editing/inserting/insert-paragraph-separator-tab-span-expected.txt: Added.
              * editing/inserting/insert-paragraph-separator-tab-span.html: Added.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@83039 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      56390f67
  3. 02 Mar, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-03-01 Ryosuke Niwa <rniwa@webkit.org> · 1714e2e0
      rniwa@webkit.org authored
              Reviewed by Darin Adler.
      
              Assertion failure after removing a selection in keydown handler
              https://bugs.webkit.org/show_bug.cgi?id=51389
      
              Added tests to ensure WebKit updates offset properly when deleting date
              to editing/selection/character-data-mutation.html.
      
              Added a test to ensure WebKit clears composition marks inside an input
              element when the value is set programatically.
      
              Many tests are rebaselined due to selection changed caused by the patch
              and additional respondToChangedSelection calls.
      
              * editing/deleting/delete-all-text-in-text-field-assertion-expected.txt:
              * editing/deleting/delete-by-word-001-expected.txt:
              * editing/deleting/delete-by-word-002-expected.txt:
              * editing/deleting/delete-ligature-001-expected.txt:
              * editing/deleting/delete-ligature-002-expected.txt:
              * editing/deleting/delete-ligature-003-expected.txt:
              * editing/deleting/pruning-after-merge-1-expected.txt:
              * editing/deleting/skip-virama-001-expected.txt:
              * editing/execCommand/createLink-expected.txt:
              * editing/execCommand/hilitecolor-expected.txt:
              * editing/execCommand/outdent-nested-lists-1-expected.txt:
              * editing/execCommand/unlink-expected.txt:
              * editing/input/setting-input-value-cancel-ime-composition-expected.txt: Added.
              * editing/input/setting-input-value-cancel-ime-composition.html: Added.
              * editing/inserting/insert-thai-characters-001-expected.txt:
              * editing/pasteboard/copy-in-password-field-expected.txt:
              * editing/pasteboard/paste-into-anchor-text-expected.txt:
              * editing/selection/character-data-mutation-expected.txt:
              * editing/selection/character-data-mutation.html:
              * editing/style/remove-underline-from-stylesheet-expected.txt:
              * editing/style/style-3690704-fix-expected.txt:
              * editing/style/typing-style-003-expected.txt:
              * editing/undo/redo-style-expected.txt:
              * platform/mac/accessibility/selection-value-changes-for-aria-textbox-expected.txt:
              * platform/mac/editing/deleting/collapse-whitespace-3587601-fix-expected.txt:
              * platform/mac/editing/deleting/delete-3608430-fix-expected.txt:
              * platform/mac/editing/deleting/delete-3608445-fix-expected.txt:
              * platform/mac/editing/deleting/delete-3608462-fix-expected.txt:
              * platform/mac/editing/deleting/delete-3775172-fix-expected.txt:
              * platform/mac/editing/deleting/delete-3800834-fix-expected.txt:
              * platform/mac/editing/deleting/delete-3857753-fix-expected.txt:
              * platform/mac/editing/deleting/delete-3928305-fix-expected.txt:
              * platform/mac/editing/deleting/delete-4083333-fix-expected.txt:
              * platform/mac/editing/deleting/delete-after-span-ws-001-expected.txt:
              * platform/mac/editing/deleting/delete-and-undo-expected.txt:
              * platform/mac/editing/deleting/delete-at-paragraph-boundaries-008-expected.txt:
              * platform/mac/editing/deleting/delete-block-merge-contents-010-expected.txt:
              * platform/mac/editing/deleting/delete-block-merge-contents-012-expected.txt:
              * platform/mac/editing/deleting/delete-block-merge-contents-013-expected.txt:
              * platform/mac/editing/deleting/delete-block-merge-contents-014-expected.txt:
              * platform/mac/editing/deleting/delete-block-merge-contents-015-expected.txt:
              * platform/mac/editing/deleting/delete-block-merge-contents-016-expected.txt:
              * platform/mac/editing/deleting/delete-block-merge-contents-018-expected.txt:
              * platform/mac/editing/deleting/delete-block-merge-contents-019-expected.txt:
              * platform/mac/editing/deleting/delete-block-merge-contents-020-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-br-007-expected.txt:
              * platform/mac/editing/deleting/delete-character-001-expected.txt:
              * platform/mac/editing/deleting/delete-hr-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-listitem-001-expected.txt:
              * platform/mac/editing/deleting/delete-listitem-002-expected.txt:
              * platform/mac/editing/deleting/delete-selection-001-expected.txt:
              * platform/mac/editing/deleting/delete-tab-001-expected.txt:
              * platform/mac/editing/deleting/delete-tab-002-expected.txt:
              * platform/mac/editing/deleting/delete-tab-003-expected.txt:
              * platform/mac/editing/deleting/delete-tab-004-expected.txt:
              * platform/mac/editing/deleting/delete-trailing-ws-001-expected.txt:
              * platform/mac/editing/deleting/delete-trailing-ws-002-expected.txt:
              * platform/mac/editing/deleting/delete-ws-fixup-001-expected.txt:
              * platform/mac/editing/deleting/delete-ws-fixup-003-expected.txt:
              * platform/mac/editing/deleting/delete-ws-fixup-004-expected.txt:
              * platform/mac/editing/deleting/forward-delete-expected.txt:
              * platform/mac/editing/deleting/list-item-1-expected.txt:
              * platform/mac/editing/deleting/paragraph-in-preserveNewline-expected.txt:
              * platform/mac/editing/deleting/whitespace-pre-1-expected.txt:
              * platform/mac/editing/execCommand/find-after-replace-expected.txt:
              * platform/mac/editing/execCommand/insertHorizontalRule-expected.txt:
              * platform/mac/editing/execCommand/paste-1-expected.txt:
              * platform/mac/editing/execCommand/paste-2-expected.txt:
              * platform/mac/editing/input/5576619-expected.txt:
              * platform/mac/editing/input/emacs-ctrl-o-expected.txt:
              * platform/mac/editing/input/firstrectforcharacterrange-styled-expected.txt:
              * platform/mac/editing/input/text-input-controller-expected.txt:
              * platform/mac/editing/inserting/4278698-expected.txt:
              * platform/mac/editing/inserting/editing-empty-divs-expected.txt:
              * platform/mac/editing/inserting/insert-3654864-fix-expected.txt:
              * platform/mac/editing/inserting/insert-3851164-fix-expected.txt:
              * platform/mac/editing/inserting/insert-after-delete-001-expected.txt:
              * platform/mac/editing/inserting/insert-br-003-expected.txt:
              * platform/mac/editing/inserting/insert-br-006-expected.txt:
              * platform/mac/editing/inserting/insert-br-007-expected.txt:
              * platform/mac/editing/inserting/insert-br-008-expected.txt:
              * platform/mac/editing/inserting/insert-br-009-expected.txt:
              * platform/mac/editing/inserting/insert-br-at-tabspan-002-expected.txt:
              * platform/mac/editing/inserting/insert-br-at-tabspan-003-expected.txt:
              * platform/mac/editing/inserting/insert-div-003-expected.txt:
              * platform/mac/editing/inserting/insert-div-006-expected.txt:
              * platform/mac/editing/inserting/insert-div-007-expected.txt:
              * platform/mac/editing/inserting/insert-div-008-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-space-in-empty-doc-expected.txt:
              * platform/mac/editing/inserting/insert-tab-003-expected.txt:
              * platform/mac/editing/inserting/insert-text-at-tabspan-001-expected.txt:
              * platform/mac/editing/inserting/insert-text-at-tabspan-002-expected.txt:
              * platform/mac/editing/inserting/insert-text-with-newlines-expected.txt:
              * platform/mac/editing/inserting/multiple-lines-selected-expected.txt:
              * platform/mac/editing/inserting/paragraph-separator-03-expected.txt:
              * platform/mac/editing/inserting/redo-expected.txt:
              * platform/mac/editing/inserting/return-key-with-selection-003-expected.txt:
              * platform/mac/editing/inserting/typing-001-expected.txt:
              * platform/mac/editing/inserting/typing-002-expected.txt:
              * platform/mac/editing/inserting/typing-003-expected.txt:
              * platform/mac/editing/inserting/typing-around-br-001-expected.txt:
              * platform/mac/editing/inserting/typing-around-image-001-expected.txt:
              * platform/mac/editing/pasteboard/4076267-2-expected.txt:
              * platform/mac/editing/pasteboard/4076267-3-expected.txt:
              * platform/mac/editing/pasteboard/4076267-expected.txt:
              * platform/mac/editing/pasteboard/4700297-expected.txt:
              * platform/mac/editing/pasteboard/8145-3-expected.txt:
              * platform/mac/editing/pasteboard/bad-placeholder-expected.txt:
              * platform/mac/editing/pasteboard/cut-text-001-expected.txt:
              * platform/mac/editing/pasteboard/emacs-ctrl-a-k-y-expected.txt:
              * platform/mac/editing/pasteboard/emacs-ctrl-k-y-001-expected.txt:
              * platform/mac/editing/pasteboard/interchange-newline-1-expected.txt:
              * platform/mac/editing/pasteboard/interchange-newline-2-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-1-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-2-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-3-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-4-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-5-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-blockquote-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-borders-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-list-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-table-expected.txt:
              * platform/mac/editing/pasteboard/paste-line-endings-007-expected.txt:
              * platform/mac/editing/pasteboard/paste-line-endings-008-expected.txt:
              * platform/mac/editing/pasteboard/paste-line-endings-009-expected.txt:
              * platform/mac/editing/pasteboard/paste-line-endings-010-expected.txt:
              * platform/mac/editing/pasteboard/paste-match-style-001-expected.txt:
              * platform/mac/editing/pasteboard/paste-pre-001-expected.txt:
              * platform/mac/editing/pasteboard/paste-pre-002-expected.txt:
              * platform/mac/editing/pasteboard/paste-table-003-expected.txt:
              * platform/mac/editing/pasteboard/paste-table-cells-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-001-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-002-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-003-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-004-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-005-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-008-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-009-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-019-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-at-tabspan-001-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-at-tabspan-002-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-at-tabspan-003-expected.txt:
              * platform/mac/editing/pasteboard/paste-xml-expected.txt:
              * platform/mac/editing/pasteboard/pasting-object-expected.txt:
              * platform/mac/editing/pasteboard/smart-paste-002-expected.txt:
              * platform/mac/editing/pasteboard/smart-paste-003-expected.txt:
              * platform/mac/editing/pasteboard/smart-paste-004-expected.txt:
              * platform/mac/editing/pasteboard/smart-paste-005-expected.txt:
              * platform/mac/editing/pasteboard/smart-paste-006-expected.txt:
              * platform/mac/editing/pasteboard/smart-paste-007-expected.txt:
              * platform/mac/editing/pasteboard/smart-paste-008-expected.txt:
              * platform/mac/editing/selection/move-between-blocks-no-001-expected.txt:
              * platform/mac/editing/selection/replace-selection-1-expected.txt:
              * platform/mac/editing/selection/select-all-iframe-expected.txt:
              * platform/mac/editing/spelling/spelling-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/smoosh-styles-001-expected.txt:
              * platform/mac/editing/style/style-3681552-fix-001-expected.txt:
              * platform/mac/editing/style/style-3681552-fix-002-expected.txt:
              * platform/mac/editing/style/style-boundary-002-expected.txt:
              * platform/mac/editing/style/style-boundary-003-expected.txt:
              * platform/mac/editing/style/style-boundary-005-expected.txt:
              * platform/mac/editing/style/typing-style-001-expected.txt:
              * platform/mac/editing/style/typing-style-002-expected.txt:
              * platform/mac/editing/style/unbold-in-bold-expected.txt:
              * platform/mac/editing/undo/4063751-expected.txt:
              * platform/mac/editing/undo/redo-typing-001-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/editing/undo/undo-misspellings-expected.txt:
              * platform/mac/editing/undo/undo-typing-001-expected.txt:
              * platform/mac/editing/unsupported-content/list-type-after-expected.txt:
              * platform/mac/editing/unsupported-content/list-type-before-expected.txt:
              * platform/mac/editing/unsupported-content/table-type-after-expected.txt:
              * platform/mac/editing/unsupported-content/table-type-before-expected.txt:
              * platform/mac/fast/dom/delete-contents-expected.txt:
      2011-03-01  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Darin Adler.
      
              Assertion failure after removing a selection in keydown handler
              https://bugs.webkit.org/show_bug.cgi?id=51389
      
              The bug was caused by textWillBeReplaced's not always updating selection, and
              shouldRemovePositionAfterAdoptingTextReplacement's not moving the end offset when it's
              at the end of replaced data.
      
              Fixed the bug by always updating selection in textWillBeReplaced and fixing the condition
              to move the offset in shouldRemovePositionAfterAdoptingTextReplacement. Also added a call
              to setSelection instead of directly modifying m_selection to notify all the clients.
              Namely, the call to EditorClient::respondToChangedSelection is required for
              setting-input-value-cancel-ime-composition.html.
      
              Note that we must update layout before calling setSelection because setSelection calls
              setFocusedNodeIfNeeded and it requires layout to be up-to-date. Without this call, tests
              such as fast/forms/input-appearance-maxlength.html hits an assertion in Node::isFocusable.
      
              Test: editing/input/setting-input-value-cancel-ime-composition.html
      
              * editing/SelectionController.cpp:
              (WebCore::shouldRemovePositionAfterAdoptingTextReplacement): When replacing text, the offset
              of the selection end must be updated even if it was at the end of the replaced text.
              e.g. removing "world" from "hello world] WebKit" should result in "hello ] WebKit" not
              "hello  WebK[it". Note we don't move the offset if no text is removed because appending
              "world" to "hello ]" should result in "hello ]world" not "hello world]".
              (WebCore::SelectionController::textWillBeReplaced): Calls setSelection to update
              the selection instead of modifying m_selection directly.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@80121 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1714e2e0
  4. 24 Jan, 2011 1 commit
    • rniwa@webkit.org's avatar
      2011-01-24 Ryosuke Niwa <rniwa@webkit.org> · 920c61a5
      rniwa@webkit.org authored
              Reviewed by Ojan Vafai.
      
              Inserting multiple whitespace using text composition (IME) should insert interleaved nbsp and whitespace.
              https://bugs.webkit.org/show_bug.cgi?id=52781
      
              The test was rebaselined to have interleaved space and non-breaking space.
      
              * editing/inserting/insert-composition-whitespace-expected.txt:
              * editing/inserting/insert-composition-whitespace.html:
      2011-01-24  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Ojan Vafai.
      
              Inserting multiple whitespace using text composition (IME) should insert interleaved nbsp and whitespace.
              https://bugs.webkit.org/show_bug.cgi?id=52781
      
              The bug was caused by stringWithRebalancedWhitespace's replacing the space at the beginning of a paragraph
              and the end of a paragraph by a non-breaking space after it replaced two consecutive spaces by a space and
              non-breaking space pattern, thereby replacing more spaces by non-breaking spaces than needed.
      
              Rewrote the function using Vector<UChar> to fix the bug. New function no longer calls String::replace
              multiple times but instead it traverses through the string and replaces a space that immediately follows
              another space or appears at the beginning of a paragraph or at the end of a paragraph by a non-break space.
      
              * editing/CompositeEditCommand.cpp:
              * editing/htmlediting.cpp:
              (WebCore::stringWithRebalancedWhitespace): Written.
              * editing/htmlediting.h:
              (WebCore::isWhitespace): Removed from CompositeEditCommand.cpp
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76565 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      920c61a5
  5. 23 Jan, 2011 1 commit
    • morrita@google.com's avatar
      2011-01-19 MORITA Hajime <morrita@google.com> · 6a3e425f
      morrita@google.com authored
              Reviewed by Ryosuke Niwa.
      
              Space and tab characters "sent" by an input method give totally different results than typing them directly.
              https://bugs.webkit.org/show_bug.cgi?id=5241
      
              Added a test that exercises continous whitespace characters and tabs inserted by IME.
      
              * editing/inserting/insert-composition-whitespace-expected.txt: Added.
              * editing/inserting/insert-composition-whitespace.html: Added.
      2011-01-19  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ryosuke Niwa.
      
              Space and tab characters "sent" by an input method give totally different results than typing them directly
              https://bugs.webkit.org/show_bug.cgi?id=5241
      
              * Introduced TextEvent::InputTypeComposition and TypingCommand::TextCompositionType to
                distinguish text input which is originated by composition.
              * Generalized rebalanceWhitespaceAt() to rebalanceWhitespaceOnTextSubstring() to rebalancing
                range of string on text node, instead of surrounding part of that.
      
              Test: editing/inserting/insert-composition-whitespace.html
      
              * dom/TextEvent.h:
              (WebCore::TextEvent::isComposition):
              * dom/TextEventInputType.h: Added TextEventInputComposition as a member of TextEvent::InputType
              * editing/CompositeEditCommand.cpp:
              (WebCore::containsOnlyWhitespace):
              (WebCore::CompositeEditCommand::shouldRebalanceLeadingWhitespaceFor):
              (WebCore::CompositeEditCommand::canRebalance):
              (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
              (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): Added: A generalized version of rebalanceWhitespaceAt(), which takes a range inside Text string.
              * editing/CompositeEditCommand.h:
              * editing/Editor.cpp:
              (WebCore::Editor::insertTextForConfirmedComposition): Added.
              (WebCore::Editor::insertTextWithoutSendingTextEvent):
              (WebCore::Editor::confirmComposition): Now uses insertTextForConfirmedComposition().
              (WebCore::Editor::setComposition):
              * editing/Editor.h:
              * editing/InsertTextCommand.cpp:
              (WebCore::InsertTextCommand::input):
              * editing/InsertTextCommand.h:
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::TypingCommand):
              (WebCore::TypingCommand::insertText):
              (WebCore::TypingCommand::insertTextRunWithoutNewlines):
              * editing/TypingCommand.h: Added TypingCommand::m_compositionType and TypingCommand::TextCompositionType
              (WebCore::TypingCommand::setCompositionType): Added.
              (WebCore::TypingCommand::create):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76482 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6a3e425f
  6. 20 Jan, 2011 2 commits
    • jorlow@chromium.org's avatar
      2011-01-20 Sheriff Bot <webkit.review.bot@gmail.com> · 6230e750
      jorlow@chromium.org authored
              Unreviewed, rolling out r76215.
              http://trac.webkit.org/changeset/76215
              https://bugs.webkit.org/show_bug.cgi?id=52799
      
              Caused regressions in Chromium; morrita is going to look at it
              tomrorow (Requested by jorlow on #webkit).
      
              * editing/inserting/insert-composition-whitespace-expected.txt: Removed.
              * editing/inserting/insert-composition-whitespace.html: Removed.
      2011-01-20  Sheriff Bot  <webkit.review.bot@gmail.com>
      
              Unreviewed, rolling out r76215.
              http://trac.webkit.org/changeset/76215
              https://bugs.webkit.org/show_bug.cgi?id=52799
      
              Caused regressions in Chromium; morrita is going to look at it
              tomrorow (Requested by jorlow on #webkit).
      
              * dom/TextEvent.h:
              * dom/TextEventInputType.h:
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
              * editing/CompositeEditCommand.h:
              * editing/Editor.cpp:
              (WebCore::Editor::insertTextWithoutSendingTextEvent):
              (WebCore::Editor::confirmComposition):
              (WebCore::Editor::setComposition):
              * editing/Editor.h:
              * editing/InsertTextCommand.cpp:
              (WebCore::InsertTextCommand::input):
              * editing/InsertTextCommand.h:
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::TypingCommand):
              (WebCore::TypingCommand::insertText):
              (WebCore::TypingCommand::insertTextRunWithoutNewlines):
              * editing/TypingCommand.h:
              (WebCore::TypingCommand::create):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76226 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6230e750
    • morrita@google.com's avatar
      2011-01-19 MORITA Hajime <morrita@google.com> · 94c27d14
      morrita@google.com authored
              Reviewed by Ryosuke Niwa.
      
              Space and tab characters "sent" by an input method give totally different results than typing them directly.
              https://bugs.webkit.org/show_bug.cgi?id=5241
      
              Added a test that exercises continous whitespace characters and tabs inserted by IME.
      
              * editing/inserting/insert-composition-whitespace-expected.txt: Added.
              * editing/inserting/insert-composition-whitespace.html: Added.
      2011-01-19  MORITA Hajime  <morrita@google.com>
      
              Reviewed by Ryosuke Niwa.
      
              Space and tab characters "sent" by an input method give totally different results than typing them directly
              https://bugs.webkit.org/show_bug.cgi?id=5241
      
              * Introduced TextEvent::InputTypeComposition and TypingCommand::TextCompositionType to
                distinguish text input which is originated by composition.
              * Generalized rebalanceWhitespaceAt() to rebalanceWhitespaceOnTextSubstring() to rebalancing
                range of string on text node, instead of surrounding part of that.
      
              Test: editing/inserting/insert-composition-whitespace.html
      
              * dom/TextEvent.h:
              (WebCore::TextEvent::isComposition):
              * dom/TextEventInputType.h: Added TextEventInputComposition as a member of TextEvent::InputType
              * editing/CompositeEditCommand.cpp:
              (WebCore::containsOnlyWhitespace):
              (WebCore::CompositeEditCommand::shouldRebalanceLeadingWhitespaceFor):
              (WebCore::CompositeEditCommand::canRebalance):
              (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
              (WebCore::CompositeEditCommand::rebalanceWhitespaceOnTextSubstring): Added: A generalized version of rebalanceWhitespaceAt(), which takes a range inside Text string.
              * editing/CompositeEditCommand.h:
              * editing/Editor.cpp:
              (WebCore::Editor::insertTextForConfirmedComposition): Added.
              (WebCore::Editor::insertTextWithoutSendingTextEvent):
              (WebCore::Editor::confirmComposition): Now uses insertTextForConfirmedComposition().
              (WebCore::Editor::setComposition):
              * editing/Editor.h:
              * editing/InsertTextCommand.cpp:
              (WebCore::InsertTextCommand::input):
              * editing/InsertTextCommand.h:
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::TypingCommand):
              (WebCore::TypingCommand::insertText):
              (WebCore::TypingCommand::insertTextRunWithoutNewlines):
              * editing/TypingCommand.h: Added TypingCommand::m_compositionType and TypingCommand::TextCompositionType
              (WebCore::TypingCommand::setCompositionType): Added.
              (WebCore::TypingCommand::create):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@76215 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      94c27d14
  7. 12 Jan, 2011 1 commit
    • tony@chromium.org's avatar
      2011-01-12 Tony Chang <tony@chromium.org> · 524140e7
      tony@chromium.org authored
              Reviewed by Ojan Vafai.
      
              output the value of input and textarea nodes when using dump-as-markup
              https://bugs.webkit.org/show_bug.cgi?id=52319
      
              * editing/inserting/5607069-2-expected.txt:
              * editing/inserting/5607069-3-expected.txt:
              * editing/selection/dump-as-markup-expected.txt:
              * editing/selection/dump-as-markup-form-text-expected.txt: Added.
              * editing/selection/dump-as-markup-form-text.html: Added.
              * fast/parser/object-with-textarea-fallback-expected.txt:
              * html5lib/runner.html:
              * html5lib/webkit-resumer.html:
              * resources/dump-as-markup.js:
              (Markup.useHTML5libOutputFormat): Add a flag for html5lib compatibility
              (Markup._get):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@75638 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      524140e7
  8. 23 Dec, 2010 1 commit
    • rniwa@webkit.org's avatar
      2010-12-23 Ryosuke Niwa <rniwa@webkit.org> · 2e986a1f
      rniwa@webkit.org authored
              Reviewed by Darin Adler.
      
              Selection becomes stale when CharacterData is manipulated directly
              https://bugs.webkit.org/show_bug.cgi?id=51389
      
              The bug was caused by SelectionController's not adjusting selection when CharacterData's
              m_data is modified by its API.
      
              Fixed the bug by adding textWillBeReplaced to SelectionController and calling it in
              CharacterData::textWillBeReplaced. Added newLength to setDataAndUpdate, which is passed to
              textWillBeReplaced because inserting, replacing, or removing data may require moving
              the offset of the selection end points (done by shouldRemovePositionAfterAdoptingTextReplacement).
      
              Also fixed the condition for determining whether or not a node intersects the selection
              in respondToNodeModification, which is extracted from nodeWillBeRemoved. The old condition
              failed to recognize certain cases when selection started and ended with non-zero offsets.
      
              Tests: editing/selection/character-data-mutation-crash.html
                     editing/selection/character-data-mutation.html
      
              * dom/CharacterData.cpp:
              (WebCore::CharacterData::setData): Passes newLegnth to setDataAndUpdate.
              (WebCore::CharacterData::appendData): Ditto.
              (WebCore::CharacterData::insertData): Ditto.
              (WebCore::CharacterData::deleteData): Ditto.
              (WebCore::CharacterData::replaceData): Ditto.
              (WebCore::CharacterData::setDataAndUpdate): Added newLegnth to the argument list,
              and renamed lengthOfReplacedData to oldLength; calls textWillBeReplaced.
              * dom/CharacterData.h:
              * editing/SelectionController.cpp:
              (WebCore::removingNodeRemovesPosition): Removed indentations from blank lines.
              (WebCore::SelectionController::nodeWillBeRemoved): Calls nodeWillBeRemoved.
              (WebCore::SelectionController::respondToNodeModification): Extracted from nodeWillBeRemoved;
              fixed the logic to figure out whether a node is inside the range or not.
              (WebCore::shouldRemovePositionAfterAdoptingTextReplacement): Added.
              (WebCore::SelectionController::textWillBeReplaced): Added.
              * editing/SelectionController.h:
      2010-12-23  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Darin Adler.
      
              Selection becomes stale when CharacterData is manipulated directly
              https://bugs.webkit.org/show_bug.cgi?id=51389
      
              Added tests to ensure WebKit adjusts or clears selection when the start container
              or the end container of the selection's first range is modified by CharacterData's API.
      
              Many editing tests had to be rebaselined due to different editing delegate dumps
              caused by WebKit's properly adjusting selection's offsets as editing commands modify the DOM.
      
              * editing/deleting/delete-by-word-001-expected.txt:
              * editing/deleting/delete-by-word-002-expected.txt:
              * editing/deleting/delete-ligature-001-expected.txt:
              * editing/deleting/delete-ligature-002-expected.txt:
              * editing/deleting/delete-ligature-003-expected.txt:
              * editing/deleting/skip-virama-001-expected.txt:
              * editing/execCommand/createLink-expected.txt:
              * editing/execCommand/hilitecolor-expected.txt:
              * editing/execCommand/unlink-expected.txt:
              * editing/inserting/insert-thai-characters-001-expected.txt:
              * editing/pasteboard/copy-in-password-field-expected.txt:
              * editing/pasteboard/paste-into-anchor-text-expected.txt:
              * editing/selection/character-data-mutation-crash-expected.txt: Added.
              * editing/selection/character-data-mutation-crash.html: Added.
              * editing/selection/character-data-mutation-expected.txt: Added.
              * editing/selection/character-data-mutation.html: Added.
              * editing/style/remove-underline-from-stylesheet-expected.txt:
              * editing/style/typing-style-003-expected.txt:
              * editing/undo/redo-style-expected.txt:
              * platform/mac/editing/deleting/collapse-whitespace-3587601-fix-expected.txt:
              * platform/mac/editing/deleting/delete-3608430-fix-expected.txt:
              * platform/mac/editing/deleting/delete-3608445-fix-expected.txt:
              * platform/mac/editing/deleting/delete-3608462-fix-expected.txt:
              * platform/mac/editing/deleting/delete-after-span-ws-001-expected.txt:
              * platform/mac/editing/deleting/delete-after-span-ws-002-expected.txt:
              * platform/mac/editing/deleting/delete-after-span-ws-003-expected.txt:
              * platform/mac/editing/deleting/delete-and-undo-expected.txt:
              * platform/mac/editing/deleting/delete-block-merge-contents-010-expected.txt:
              * platform/mac/editing/deleting/delete-block-table-expected.txt:
              * platform/mac/editing/deleting/delete-br-007-expected.txt:
              * platform/mac/editing/deleting/delete-character-001-expected.txt:
              * platform/mac/editing/deleting/delete-contiguous-ws-001-expected.txt:
              * platform/mac/editing/deleting/delete-hr-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-listitem-001-expected.txt:
              * platform/mac/editing/deleting/delete-selection-001-expected.txt:
              * platform/mac/editing/deleting/delete-tab-001-expected.txt:
              * platform/mac/editing/deleting/delete-tab-002-expected.txt:
              * platform/mac/editing/deleting/delete-tab-003-expected.txt:
              * platform/mac/editing/deleting/delete-tab-004-expected.txt:
              * platform/mac/editing/deleting/delete-trailing-ws-001-expected.txt:
              * platform/mac/editing/deleting/delete-trailing-ws-002-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/forward-delete-expected.txt:
              * platform/mac/editing/deleting/non-smart-delete-expected.txt:
              * platform/mac/editing/deleting/smart-delete-001-expected.txt:
              * platform/mac/editing/deleting/smart-delete-002-expected.txt:
              * platform/mac/editing/deleting/smart-delete-003-expected.txt:
              * platform/mac/editing/deleting/smart-delete-004-expected.txt:
              * platform/mac/editing/execCommand/insertHorizontalRule-expected.txt:
              * platform/mac/editing/input/firstrectforcharacterrange-styled-expected.txt:
              * platform/mac/editing/input/text-input-controller-expected.txt:
              * platform/mac/editing/inserting/4278698-expected.txt:
              * platform/mac/editing/inserting/editing-empty-divs-expected.txt:
              * platform/mac/editing/inserting/insert-3654864-fix-expected.txt:
              * platform/mac/editing/inserting/insert-after-delete-001-expected.txt:
              * platform/mac/editing/inserting/insert-br-003-expected.txt:
              * platform/mac/editing/inserting/insert-br-006-expected.txt:
              * platform/mac/editing/inserting/insert-br-007-expected.txt:
              * platform/mac/editing/inserting/insert-br-008-expected.txt:
              * platform/mac/editing/inserting/insert-br-009-expected.txt:
              * platform/mac/editing/inserting/insert-br-at-tabspan-002-expected.txt:
              * platform/mac/editing/inserting/insert-br-at-tabspan-003-expected.txt:
              * platform/mac/editing/inserting/insert-div-003-expected.txt:
              * platform/mac/editing/inserting/insert-div-006-expected.txt:
              * platform/mac/editing/inserting/insert-div-008-expected.txt:
              * platform/mac/editing/inserting/insert-div-024-expected.txt:
              * platform/mac/editing/inserting/insert-space-in-empty-doc-expected.txt:
              * platform/mac/editing/inserting/insert-tab-003-expected.txt:
              * platform/mac/editing/inserting/insert-text-at-tabspan-001-expected.txt:
              * platform/mac/editing/inserting/insert-text-at-tabspan-002-expected.txt:
              * platform/mac/editing/inserting/insert-text-with-newlines-expected.txt:
              * platform/mac/editing/inserting/typing-001-expected.txt:
              * platform/mac/editing/inserting/typing-002-expected.txt:
              * platform/mac/editing/inserting/typing-003-expected.txt:
              * platform/mac/editing/inserting/typing-around-br-001-expected.txt:
              * platform/mac/editing/inserting/typing-around-image-001-expected.txt:
              * platform/mac/editing/pasteboard/4076267-2-expected.txt:
              * platform/mac/editing/pasteboard/4076267-3-expected.txt:
              * platform/mac/editing/pasteboard/bad-placeholder-expected.txt:
              * platform/mac/editing/pasteboard/cut-text-001-expected.txt:
              * platform/mac/editing/pasteboard/emacs-ctrl-a-k-y-expected.txt:
              * platform/mac/editing/pasteboard/emacs-ctrl-k-y-001-expected.txt:
              * platform/mac/editing/pasteboard/interchange-newline-1-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-1-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-2-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-4-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-list-expected.txt:
              * platform/mac/editing/pasteboard/merge-end-table-expected.txt:
              * platform/mac/editing/pasteboard/paste-match-style-001-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-001-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-019-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-at-tabspan-001-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-at-tabspan-002-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-at-tabspan-003-expected.txt:
              * platform/mac/editing/pasteboard/paste-xml-expected.txt:
              * platform/mac/editing/pasteboard/pasting-object-expected.txt:
              * platform/mac/editing/pasteboard/smart-paste-002-expected.txt:
              * platform/mac/editing/pasteboard/smart-paste-006-expected.txt:
              * platform/mac/editing/pasteboard/smart-paste-007-expected.txt:
              * platform/mac/editing/pasteboard/subframe-dragndrop-1-expected.txt:
              * platform/mac/editing/spelling/spelling-expected.txt:
              * platform/mac/editing/style/style-3681552-fix-001-expected.txt:
              * platform/mac/editing/style/style-3681552-fix-002-expected.txt:
              * platform/mac/editing/style/style-boundary-002-expected.txt:
              * platform/mac/editing/style/style-boundary-005-expected.txt:
              * platform/mac/editing/style/typing-style-001-expected.txt:
              * platform/mac/editing/style/typing-style-002-expected.txt:
              * platform/mac/editing/style/unbold-in-bold-expected.txt:
              * platform/mac/editing/undo/4063751-expected.txt:
              * platform/mac/editing/undo/redo-typing-001-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/editing/undo/undo-misspellings-expected.txt:
              * platform/mac/editing/undo/undo-typing-001-expected.txt:
              * platform/mac/editing/unsupported-content/list-type-after-expected.txt:
              * platform/mac/editing/unsupported-content/list-type-before-expected.txt:
              * platform/mac/editing/unsupported-content/table-type-after-expected.txt:
              * platform/mac/editing/unsupported-content/table-type-before-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@74593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2e986a1f
  9. 08 Nov, 2010 2 commits
    • rniwa@webkit.org's avatar
      2010-11-08 Ryosuke Niwa <rniwa@webkit.org> · e1c4a654
      rniwa@webkit.org authored
              Reviewed by Kent Tamura.
      
              dump-as-markup conversion: editing/inserting/5607069-2.html and 5607069-3.html
              https://bugs.webkit.org/show_bug.cgi?id=49223
      
              Converted editing/inserting/5607069-2.html and editing/inserting/5607069-3.html
              to dump-as-markup tests. Re-enabled them on Qt, Gtk, and Chromium platforms.
      
              * editing/inserting/5607069-2-expected.txt: Added.
              * editing/inserting/5607069-2.html:
              * editing/inserting/5607069-3-expected.txt: Added.
              * editing/inserting/5607069-3.html:
              * platform/chromium-linux/editing/inserting/5607069-2-expected.checksum: Removed.
              * platform/chromium-linux/editing/inserting/5607069-2-expected.png: Removed.
              * platform/chromium-linux/editing/inserting/5607069-2-expected.txt: Removed.
              * platform/chromium-linux/editing/inserting/5607069-3-expected.checksum: Removed.
              * platform/chromium-linux/editing/inserting/5607069-3-expected.png: Removed.
              * platform/chromium-win/editing/inserting/5607069-2-expected.checksum: Removed.
              * platform/chromium-win/editing/inserting/5607069-2-expected.png: Removed.
              * platform/chromium-win/editing/inserting/5607069-2-expected.txt: Removed.
              * platform/chromium-win/editing/inserting/5607069-3-expected.checksum: Removed.
              * platform/chromium-win/editing/inserting/5607069-3-expected.png: Removed.
              * platform/chromium-win/editing/inserting/5607069-3-expected.txt: Removed.
              * platform/chromium/test_expectations.txt:
              * platform/gtk/Skipped:
              * platform/mac-leopard/editing/inserting/5607069-2-expected.checksum: Removed.
              * platform/mac-leopard/editing/inserting/5607069-2-expected.png: Removed.
              * platform/mac-leopard/editing/inserting/5607069-3-expected.checksum: Removed.
              * platform/mac-leopard/editing/inserting/5607069-3-expected.png: Removed.
              * platform/mac/editing/inserting/5607069-2-expected.checksum: Removed.
              * platform/mac/editing/inserting/5607069-2-expected.png: Removed.
              * platform/mac/editing/inserting/5607069-2-expected.txt: Removed.
              * platform/mac/editing/inserting/5607069-3-expected.checksum: Removed.
              * platform/mac/editing/inserting/5607069-3-expected.png: Removed.
              * platform/mac/editing/inserting/5607069-3-expected.txt: Removed.
              * platform/qt/Skipped:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e1c4a654
    • xji@chromium.org's avatar
      2010-11-08 Xiaomei Ji <xji@chromium.org> · 32dbea58
      xji@chromium.org authored
              Reviewed by Dan Bernstein.
      
              Fix Unicode explicit bidi control characters are removed in editing operations,
              such as insert/copy/cut/paste.
              https://bugs.webkit.org/show_bug.cgi?id=25321
      
              Unicode explicit bidi control characters were excluded in BidiRun and
              consequently from InlineTextBoxes due to their effect on rendering complex
              text with ATSUI.
              The fix is including those characters in BidiRun and remove them from
              ComplexTextRun with ATSUI.
      
              Test: editing/inserting/insert-paste-bidi-control.html
                     fast/text/atsui-bidi-control.html
      
              * platform/graphics/mac/ComplexTextControllerATSUI.cpp:
              (WebCore::ComplexTextController::ComplexTextRun::ComplexTextRun):
              * platform/text/BidiResolver.h:
              (WebCore::::checkDirectionInLowerRaiseEmbeddingLevel):
              (WebCore::::lowerExplicitEmbeddingLevel):
              (WebCore::::raiseExplicitEmbeddingLevel):
              (WebCore::::createBidiRunsForLine):
      2010-11-08  Xiaomei Ji  <xji@chromium.org>
      
              Reviewed by Dan Bernstein.
      
              Fix Unicode explicit bidi control characters are removed in editing operations,
              such as insert/copy/cut/paste.
              https://bugs.webkit.org/show_bug.cgi?id=25321
      
              Unicode explicit bidi control characters were excluded in BidiRun and
              consequently from InlineTextBoxes due to their effect on rendering complex
              text with ATSUI.
              The fix is including those characters in BidiRun and remove them from
              ComplexTextRun with ATSUI.
      
              * editing/inserting/insert-paste-bidi-control-expected.txt: Added.
              * editing/inserting/insert-paste-bidi-control.html: Added.
              * editing/selection/extend-selection-expected.txt:
              * editing/selection/home-end-expected.txt:
              * fast/text/atsui-bidi-control-expected.txt: Added.
              * fast/text/atsui-bidi-control.html: Added.
              * platform/mac/fast/css/text-overflow-ellipsis-bidi-expected.txt:
              * platform/mac/fast/text/international/bidi-LDB-2-formatting-characters-expected.txt:
              * platform/mac/fast/text/international/bidi-control-chars-treated-as-ZWS-expected.txt:
              * platform/mac/fast/text/international/bidi-explicit-embedding-expected.txt:
              * platform/mac/fast/text/international/bidi-ignored-for-first-child-inline-expected.txt:
              * platform/mac/fast/text/international/bidi-neutral-run-expected.txt:
              * platform/mac/fast/text/international/bidi-override-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71566 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      32dbea58
  10. 03 Nov, 2010 1 commit
    • tony@chromium.org's avatar
      2010-11-03 Tony Chang <tony@chromium.org> · ff101615
      tony@chromium.org authored
              Reviewed by Ojan Vafai.
      
              Undo r54932 which inappropriately adjusts font sizes on zoomed pages
              https://bugs.webkit.org/show_bug.cgi?id=48890
      
              When copying zoomed text, we used to write to the clipboard the zoomed
              font size.  r54932 worked around this at paste time by scaling the
              font size based on the zoom.
      
              In r67568, Erik fixed getComputedStyle to return the original value
              rather than the zoomed font size.  This makes the work around added
              by r54932 unnecessary.
      
              The code in r54932 was busted in the first place since it only worked
              when in quirks mode since it didn't add units to the font size.
      
              * editing/inserting/page-zoom-font-size-expected.txt: Added.
              * editing/inserting/page-zoom-font-size.html: Added.
      2010-11-03  Tony Chang  <tony@chromium.org>
      
              Reviewed by Ojan Vafai.
      
              Undo r54932 which inappropriately adjusts font sizes on zoomed pages
              https://bugs.webkit.org/show_bug.cgi?id=48890
      
              Test: editing/inserting/page-zoom-font-size.html
      
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::ReplaceSelectionCommand::negateStyleRulesThatAffectAppearance):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@71252 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ff101615
  11. 21 Oct, 2010 1 commit
    • rniwa@webkit.org's avatar
      2010-10-21 Ryosuke Niwa <rniwa@webkit.org> · 601e805e
      rniwa@webkit.org authored
              Reviewed by Tony Chang.
      
              removeFormat needs to be reimplemented
              https://bugs.webkit.org/show_bug.cgi?id=43017
      
              Reimplemented execCommand('RemoveFormat', false, null). New implementation removes
              the same elements removed by Internet Explorer. Because WebKit supports StyleWithCSS
              we also reset any editing styles to match that of the root editable element
              while Internet Explorer does not remove any CSS styles.
      
              New implementation uses ApplyStyleCommand to remove appropriate elements and reset the style.
              Added new constructor and member variable to ApplyStyleCommand to support mass-removal of elements
              since it's inefficient to call ApplyStyleCommand on each element we're removing.
      
              To avoid an infinite loop in pushDownInlineStyleAroundNode when mass-removing, WebKit no longer
              push down element one level at a time. Instead, we keep a stack of styled elements to be applied,
              and apply wrap siblings of targetNode's ancestors by all of them at once.
      
              Tests: editing/execCommand/remove-format-elements.html
                     editing/execCommand/remove-format-multiple-elements.html
      
              * editing/ApplyStyleCommand.cpp:
              (WebCore::ApplyStyleCommand::ApplyStyleCommand): Added; this version takes style and a function pointer
              to a boolean function that determines which element needs to removed, and set m_removeOnly to true.
              (WebCore::ApplyStyleCommand::doApply): Added support for m_isInlineElementToRemoveFunction.
              (WebCore::ApplyStyleCommand::applyBlockStyle): Ditto.
              (WebCore::ApplyStyleCommand::applyInlineStyleToNodeRange): Exits early if m_removeOnly is true.
              (WebCore::ApplyStyleCommand::isStyledInlineElementToRemove): Added.
              (WebCore::ApplyStyleCommand::removeStyleFromRunBeforeApplyingStyle): Calls isStyledInlineElementToRemove.
              (WebCore::ApplyStyleCommand::removeInlineStyleFromElement): Ditto.
              (WebCore::ApplyStyleCommand::removeInlineStyle): Ditto.
              (WebCore::ApplyStyleCommand::pushDownInlineStyleAroundNode): See above.
              * editing/ApplyStyleCommand.h:
              (WebCore::ApplyStyleCommand::create): Added.
              * editing/RemoveFormatCommand.cpp:
              (WebCore::isElementForRemoveFormatCommand): Added.
              (WebCore::RemoveFormatCommand::doApply): Rewritten.
      2010-10-21  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Tony Chang.
      
              removeFormat needs to be reimplemented
              https://bugs.webkit.org/show_bug.cgi?id=43017
      
              * editing/execCommand/19403-expected.txt: hr element is no longer removed erroneously.
              * editing/execCommand/19403.html: Updated the test description.
              * editing/execCommand/4786404-1-expected.txt: Change in text nodes but identical rendering.
              * editing/execCommand/4786404-2-expected.txt: Ditto.
              * editing/execCommand/4920488-expected.txt: Preserves anchor element on RemoveFormat.
              * editing/execCommand/4920488.html: Updated the test description.
              * editing/execCommand/4920742-1-expected.txt: Preserves div elements.
              * editing/execCommand/5049671.html: Updated the test to dump twice before and after RemoveFormat.
              This was a test to ensure WebKit removes anchor elements but we no longer removes anchor elements.
              * editing/execCommand/5049671-expected.txt:
              * editing/execCommand/5573879.html: Updated the test description because WebKit no longer removes
              lists on RemoveFormat.
              * editing/execCommand/5573879-expected.txt:
              * editing/execCommand/5770834-1-expected.txt: Removed redundant text-align property value.
              * editing/execCommand/remove-format-elements-expected.txt: Added.
              * editing/execCommand/remove-format-elements.html: Added.
              * editing/execCommand/remove-format-multiple-elements-expected.txt: Added.
              * editing/execCommand/remove-format-multiple-elements.html: Added.
              * editing/execCommand/remove-formatting-2-expected.txt: Change in text nodes but identical rendering.
              * editing/execCommand/remove-formatting-expected.txt: WebKit no longer removes anchor, table,
              tbody, tr, and td elements.
              * editing/execCommand/script-tests/remove-format-multiple-elements.js: Added.
              (testRemoveFormat):
              (selectAll):
              (selectSecondWord):
              (selectFirstTwoWords):
              (selectLastTwoWords):
              (selectLastWord):
              * editing/execCommand/script-tests/toggle-link.js: Anchor wraps div instead of div wrapping anchor.
              * editing/execCommand/script-tests/toggle-unlink.js: Ditto.
              * editing/execCommand/toggle-link-expected.txt: Ditto.
              * editing/execCommand/toggle-unlink-expected.txt: Ditto.
              * editing/execCommand/unlink-expected.txt: i wraps div instead of i wrapping anchor.
              * editing/inserting/space-after-removeformat-expected.txt: Editing delegate change.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@70283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      601e805e
  12. 11 Oct, 2010 1 commit
    • rniwa@webkit.org's avatar
      2010-10-11 Ryosuke Niwa <rniwa@webkit.org> · 6495d703
      rniwa@webkit.org authored
              Reviewed by Darin Adler.
      
              spellcheck="false" not respected in designMode
              https://bugs.webkit.org/show_bug.cgi?id=39978
      
              The bug was caused by WebKit's setting focus to html element rather than body element in design mode.
              Because we disable spell-check only if ancestor nodes of the focused element had spellcheck=false,
              this caused us to ignore body element's spellcheck attribute.
      
              Fixed the bug by overriding supportsFocus in HTMLBodyElement to make body element focusable
              when the parent node of body elements (namely html element) is editable.
      
              Test: editing/spelling/design-mode-spellcheck-off.html
      
              * html/HTMLBodyElement.cpp:
              (WebCore::HTMLBodyElement::supportsFocus): Added.
              * html/HTMLBodyElement.h:
      2010-10-11  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Darin Adler.
      
              spellcheck="false" not respected in designMode
              https://bugs.webkit.org/show_bug.cgi?id=39978
      
              Added a test to ensure Webkit respects spellcheck=off on body element.
              Rebaselined are due to our setting the focus to body element rather than html element in design mode.
      
              * editing/spelling/design-mode-spellcheck-off-expected.txt: Added.
              * editing/spelling/design-mode-spellcheck-off.html: Added.
              * editing/inserting/space-after-removeformat-expected.txt: Editing delegates change due to focus moving to body.
              * platform/chromium-win/editing/inserting/editable-html-element-expected.txt: Ditto.
              * platform/chromium-win/editing/selection/editable-html-element-expected.txt: Ditto.
              * platform/chromium-win/editing/selection/editable-links-expected.txt: Ditto.
              * platform/chromium-win/editing/selection/focus_editable_html-expected.txt: Ditto.
              * platform/chromium-win/editing/style/designmode-expected.txt: Ditto.
              * platform/mac/editing/inserting/editable-html-element-expected.txt: Ditto.
              * platform/mac/editing/selection/designmode-no-caret-expected.txt: Ditto.
              * platform/mac/editing/selection/editable-html-element-expected.txt: Ditto.
              * platform/mac/editing/selection/editable-links-expected.txt: Ditto.
              * platform/mac/editing/selection/focus_editable_html-expected.txt: Ditto.
              * platform/mac/editing/style/designmode-expected.txt: Ditto.
              * platform/qt/editing/inserting/editable-html-element-expected.txt: Ditto.
              * platform/qt/editing/selection/editable-html-element-expected.txt: Ditto.
              * platform/qt/editing/selection/focus_editable_html-expected.txt: Ditto.
              * platform/qt/editing/style/designmode-expected.txt: Ditto.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@69509 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6495d703
  13. 10 Sep, 2010 1 commit
    • rniwa@webkit.org's avatar
      2010-09-10 Ryosuke Niwa <rniwa@webkit.org> · ed35cb50
      rniwa@webkit.org authored
              Reviewed by Tony Chang.
      
              editing/inserting/insert-3659587-fix.html and editing/style/style-3690704-fix.html should use runDumpAsTextEditingTest
              https://bugs.webkit.org/show_bug.cgi?id=45578
      
              Modified insert-3659587-fix.html and style-3690704-fix.html to use runDumpAsTextEditingTest().
      
              * editing/inserting/insert-3659587-fix-expected.txt: Added.
              * editing/inserting/insert-3659587-fix.html:
              * editing/style/style-3690704-fix-expected.txt: Added.
              * editing/style/style-3690704-fix.html:
              * platform/chromium-linux/editing/inserting/insert-3659587-fix-expected.checksum: Removed.
              * platform/chromium-linux/editing/inserting/insert-3659587-fix-expected.png: Removed.
              * platform/chromium-linux/editing/style/style-3690704-fix-expected.checksum: Removed.
              * platform/chromium-linux/editing/style/style-3690704-fix-expected.png: Removed.
              * platform/chromium-win/editing/inserting/insert-3659587-fix-expected.checksum: Removed.
              * platform/chromium-win/editing/inserting/insert-3659587-fix-expected.png: Removed.
              * platform/chromium-win/editing/inserting/insert-3659587-fix-expected.txt: Removed.
              * platform/chromium-win/editing/style/style-3690704-fix-expected.checksum: Removed.
              * platform/chromium-win/editing/style/style-3690704-fix-expected.png: Removed.
              * platform/chromium-win/editing/style/style-3690704-fix-expected.txt: Removed.
              * platform/gtk/editing/inserting/insert-3659587-fix-expected.txt: Removed.
              * platform/gtk/editing/style/style-3690704-fix-expected.txt: Removed.
              * platform/mac/editing/inserting/insert-3659587-fix-expected.checksum: Removed.
              * platform/mac/editing/inserting/insert-3659587-fix-expected.png: Removed.
              * platform/mac/editing/inserting/insert-3659587-fix-expected.txt: Removed.
              * platform/mac/editing/style/style-3690704-fix-expected.checksum: Removed.
              * platform/mac/editing/style/style-3690704-fix-expected.png: Removed.
              * platform/mac/editing/style/style-3690704-fix-expected.txt: Removed.
              * platform/qt/editing/inserting/insert-3659587-fix-expected.txt: Removed.
              * platform/qt/editing/style/style-3690704-fix-expected.txt: Removed.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67277 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ed35cb50
  14. 09 Sep, 2010 3 commits
    • rniwa@webkit.org's avatar
      2010-09-09 Ryosuke Niwa <rniwa@webkit.org> · 407d092b
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              REGRESSION: applying new font size causes font-size outside selection to change
              https://bugs.webkit.org/show_bug.cgi?id=45026
      
              The regression was caused by removeImplicitlyStyledElement not converting font size to CSS value properly.
              Namely, it was treating font size as a pixel value for font-size property.  Fixed this by adding fontSizeToCSSValue
              which uses HTMLFontElement::cssValueFromFontSizeNumber and deployed it in removeImplicitlyStyledElement
      
              Also fixed a bug in StyleChange::extractTextStyles that it ignores font-size property when the values were
              relative terms such as x-small and -webkit-xxx-large. And replaced the logic to convert from pixel font size
              to legacy font size by CSSStyleSelector::legacyFontSize.
      
              Test: editing/style/push-down-font-styles.html
      
              * editing/ApplyStyleCommand.cpp:
              (WebCore::StyleChange::extractTextStyles): Fixed a bug. See above.
              (WebCore::stringToCSSValue): Converts string to CSSValue.
              (WebCore::fontSizeToCSSValue): Converts font size number (String) to CSSPrimitiveValue.
              (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Calls stringToCSSValue and fontSizeToCSSValue.
              * css/CSSStyleSelector.h: Made fontSizeForKeyword public.
      2010-09-09  Ryosuke Niwa  <rniwa@webkit.org>
      
              Reviewed by Eric Seidel.
      
              REGRESSION: applying new font size causes font-size outside selection to change
              https://bugs.webkit.org/show_bug.cgi?id=45026
      
              Added a test to apply font-size and font-family on various markups.
      
              * editing/deleting/delete-br-012-expected.txt: Conflicting font and span elements are merged into one font element.
              * editing/inserting/5994480-2-expected.txt: Removed redundant size attribute from font element.
              * editing/deleting/delete-select-all-001-expected.txt: Style spans are replaced by font elements.
              * editing/style/block-style-004-expected.txt: Ditto.
              * editing/style/block-style-005-expected.txt: Ditto.
              * editing/style/block-style-006-expected.txt: Ditto.
              * editing/style/fontsize-1-expected.txt: Ditto.
              * editing/execCommand/query-font-size-expected.txt: Ditto; also fixed the test not to add extraneous spans.
              * editing/style/push-down-font-styles-expected.txt: Added.
              * editing/style/push-down-font-styles.html: Added.
              * editing/style/script-tests/push-down-font-styles.js: Added.
              (testSingleToggle):
              (selectAll):
              (selectTest):
              (selectFirstWord):
              (selectSecondWord):
              (selectLastTwoWords):
              * platform/chromium-win/editing/inserting/5994480-2-expected.txt: Removed extraneous span.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67170 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      407d092b
    • dpranke@chromium.org's avatar
      2010-09-09 Dirk Pranke <dpranke@chromium.org> · a417c0f1
      dpranke@chromium.org authored
              Unreviewed, rolling out r67145.
              http://trac.webkit.org/changeset/67145
              https://bugs.webkit.org/show_bug.cgi?id=45431
      
              broke editing/inserting/5994480-2.html on Chromium Linux
      
              * editing/deleting/delete-br-012-expected.txt:
              * editing/deleting/delete-select-all-001-expected.txt:
              * editing/execCommand/query-font-size-expected.txt:
              * editing/execCommand/query-font-size.html:
              * editing/inserting/5994480-2-expected.txt:
              * editing/style/block-style-004-expected.txt:
              * editing/style/block-style-005-expected.txt:
              * editing/style/block-style-006-expected.txt:
              * editing/style/fontsize-1-expected.txt:
              * editing/style/push-down-font-styles-expected.txt: Removed.
              * editing/style/push-down-font-styles.html: Removed.
              * editing/style/script-tests/push-down-font-styles.js: Removed.
      2010-09-09  Dirk Pranke  <dpranke@chromium.org>
      
              Unreviewed, rolling out r67145.
              http://trac.webkit.org/changeset/67145
              https://bugs.webkit.org/show_bug.cgi?id=45431
      
              broke editing/inserting/5994480-2.html on Chromium Linux
      
              * css/CSSStyleSelector.h:
              * editing/ApplyStyleCommand.cpp:
              (WebCore::StyleChange::init):
              (WebCore::StyleChange::extractTextStyles):
              (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67154 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a417c0f1
    • rniwa@webkit.org's avatar
      2010-09-09 Ryosuke Niwa <rniwa@webkit.org> · cfcbb77a
      rniwa@webkit.org authored
              Reviewed by Eric Seidel.
      
              REGRESSION: applying new font size causes font-size outside selection to change
              https://bugs.webkit.org/show_bug.cgi?id=45026
      
              The regression was caused by removeImplicitlyStyledElement not converting font size to CSS value properly.
              Namely, it was treating font size as a pixel value for font-size property.  Fixed this by adding fontSizeToCSSValue
              which uses HTMLFontElement::cssValueFromFontSizeNumber and deployed it in removeImplicitlyStyledElement
      
              Also fixed a bug in StyleChange::extractTextStyles that it ignores font-size property when the values were
              relative terms such as x-small and -webkit-xxx-large. And replaced the logic to convert from pixel font size
              to legacy font size by CSSStyleSelector::legacyFontSize.
      
              Test: editing/style/push-down-font-styles.html
      
              * editing/ApplyStyleCommand.cpp:
              (WebCore::StyleChange::extractTextStyles): Fixed a bug. See above.
              (WebCore::stringToCSSValue): Converts string to CSSValue.
              (WebCore::fontSizeToCSSValue): Converts font size number (String) to CSSPrimitiveValue.
              (WebCore::ApplyStyleCommand::removeImplicitlyStyledElement): Calls stringToCSSValue and fontSizeToCSSValue.
              * css/CSSStyleSelector.h: Made fontSizeForKeyword public.
      2010-09-09  Kent Tamura  <tkent@chromium.org>
      
              Unreviewed, test expectation update.
      
              The baseline image was wrong.  It was exposed by r45431.
              https://bugs.webkit.org/show_bug.cgi?id=45431
      
              * platform/chromium-linux/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.checksum:
              * platform/chromium-linux/svg/dynamic-updates/SVGFEDiffuseLightingElement-lighting-color-css-prop-expected.png:
              * platform/chromium/test_expectations.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@67145 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cfcbb77a
  15. 08 Jul, 2010 1 commit
  16. 23 Apr, 2010 1 commit
    • xji@chromium.org's avatar
      2010-04-23 Xiaomei Ji <xji@chromium.org> · 1dfb0561
      xji@chromium.org authored
              Reviewed by Dan Bernstein and Darin Adler
      
              Fix issue "caret does not paint after type in characters in right
              aligned div or after delete all characters in RTL div or 
              0px right padding RTL textarea"
              https://bugs.webkit.org/show_bug.cgi?id=25319
      
              Test: editing/inserting/caret-position.html
      
              * rendering/RenderText.cpp:
              (WebCore::RenderText::localCaretRect):
      2010-04-23  Xiaomei Ji  <xji@chromium.org>
      
              Reviewed by Dan Bernstein and Darin Adler
      
              Fix issue "caret does not paint after type in characters in right
              aligned div or after delete all characters in RTL div or 
              0px right padding RTL textarea"
              https://bugs.webkit.org/show_bug.cgi?id=25319
      
              * editing/inserting/caret-position-expected.txt: Added.
              * editing/inserting/caret-position.html: Added.
              * platform/mac/editing/input/caret-primary-bidi-expected.txt:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@58191 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      1dfb0561
  17. 25 Mar, 2010 1 commit
  18. 09 Mar, 2010 1 commit
    • tony@chromium.org's avatar
      2010-03-09 Tony Chang <tony@chromium.org> · 8c8fa6ce
      tony@chromium.org authored
              Reviewed by Adam Barth.
      
              https://bugs.webkit.org/show_bug.cgi?id=21840
              https://bugs.webkit.org/show_bug.cgi?id=23993
      
              Fix an editing bug where replacing a selection would result in the
              new text ending up inside nodes that were not visibly included in the
              selection.  Instead, move our destination position out of nodes that
              were not visibly included.
      
              Two new tests to verify the new behavior.  Because we're now inserting
              outside of some formatting nodes, some span tags are no longer necessary
              for undoing formatting caused by these formatting nodes.
      
              * editing/deleting/backspace-avoid-preceding-style-expected.txt: Added.
              * editing/deleting/backspace-avoid-preceding-style.html: Added.
              * editing/inserting/replace-at-visible-boundary-expected.txt: Added.
              * editing/inserting/replace-at-visible-boundary.html: Added.
              * platform/mac/editing/deleting/delete-3857753-fix-expected.txt:
              * platform/mac/editing/inserting/insert-div-026-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-at-tabspan-001-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-at-tabspan-002-expected.txt:
              * platform/mac/editing/style/font-family-with-space-expected.txt:
              * platform/mac/editing/style/smoosh-styles-001-expected.txt:
              * platform/mac/editing/style/style-boundary-005-expected.txt:
      2010-03-09  Tony Chang  <tony@chromium.org>
      
              Reviewed by Adam Barth.
      
              https://bugs.webkit.org/show_bug.cgi?id=21840
              https://bugs.webkit.org/show_bug.cgi?id=23993
      
              Fix an editing bug where replacing a selection would result in the
              new text ending up inside nodes that were not visibly included in the
              selection.  Instead, move our destination position out of nodes that
              were not visibly included.
      
              Tests: editing/deleting/backspace-avoid-preceding-style.html
                     editing/inserting/replace-at-visible-boundary.html
      
              * editing/ReplaceSelectionCommand.cpp:
              (WebCore::positionAvoidingPrecedingNodes):
              (WebCore::ReplaceSelectionCommand::doApply):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8c8fa6ce
  19. 26 Feb, 2010 1 commit
    • ossy@webkit.org's avatar
      Unreviewed. Roll-out r55263 because it broke fast/forms/textarea-type-spaces-pretty-diff.html. · 713375e0
      ossy@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=30946
      
      WebCore: 
      
      * editing/CompositeEditCommand.cpp:
      (WebCore::isWhitespace):
      (WebCore::CompositeEditCommand::rebalanceWhitespaceAt):
      * editing/InsertTextCommand.cpp:
      (WebCore::InsertTextCommand::input):
      * editing/InsertTextCommand.h:
      * editing/htmlediting.cpp:
      * editing/htmlediting.h:
      
      LayoutTests: 
      
      * editing/execCommand/5142012-3-expected.txt:
      * editing/inserting/rebalance-whitespace-1-expected.txt: Removed.
      * editing/inserting/rebalance-whitespace-1.html: Removed.
      * editing/pasteboard/5521237-expected.txt:
      * platform/mac/editing/execCommand/5482023-expected.checksum:
      * platform/mac/editing/execCommand/5482023-expected.png: Added.
      * platform/mac/editing/execCommand/5482023-expected.txt:
      * platform/mac/editing/execCommand/remove-formatting-2-expected.checksum:
      * platform/mac/editing/execCommand/remove-formatting-2-expected.png: Added.
      * platform/mac/editing/execCommand/remove-formatting-expected.checksum:
      * platform/mac/editing/execCommand/remove-formatting-expected.png: Added.
      * platform/mac/editing/execCommand/remove-formatting-expected.txt:
      * platform/mac/editing/inserting/editable-html-element-expected.checksum:
      * platform/mac/editing/inserting/editable-html-element-expected.png: Added.
      * platform/mac/editing/inserting/editable-html-element-expected.txt:
      * platform/mac/editing/pasteboard/4989774-expected.checksum:
      * platform/mac/editing/pasteboard/4989774-expected.png: Added.
      * platform/mac/editing/pasteboard/4989774-expected.txt:
      * platform/mac/editing/selection/4983858-expected.checksum:
      * platform/mac/editing/selection/4983858-expected.png: Added.
      * platform/mac/editing/selection/4983858-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      713375e0
  20. 25 Feb, 2010 1 commit
    • enrica@apple.com's avatar
      Extra layout on keypress after a space (problem with rebalanceWhitespaceAt in InsertTextCommand). · b5adb4e2
      enrica@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=30946
      <rdar://problem/7639184>
      
      Reviewed by Adele Peterson.
      
      WebCore: 
      
      Do text insertion and whitespace rebalancing around the insertion in one step so that there's only one layout.
      This patch was originally made by Justin Garcia.
              
      Test: editing/inserting/rebalance-whitespace-1.html
      
      * editing/CompositeEditCommand.cpp:
      (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): No behavior changes here,
      just pushed the code that determined the extent of whitespace surrounding a position
      to its own helper function.
      * editing/InsertTextCommand.cpp:
      (WebCore::InsertTextCommand::insertTextIntoNodeAndRebalanceWhitespace): Added.  Find 
      whitespace surrounding the insertion position, add the text to insert, rebalance that entire
      string, then insert it into the document.
      (WebCore::InsertTextCommand::input):
      * editing/InsertTextCommand.h:
      * editing/htmlediting.cpp:
      (WebCore::isWhitespace): Moved from CompositeEditCommand.cpp.
      (WebCore::extentOfWhitespaceForRebalancingAt): Moved code from rebalanceWhitespaceAt into this helper
      function.  Obtains the offset of the start and end of whitespace around a particular position.
      * editing/htmlediting.h:
      
      LayoutTests: 
      
      There are now regular spaces where nbsps were used unnecessarily before.  Also,
      multi-character insertions now have their whitespace rebalanced, and this is
      reflected in a few tests.
      
      * editing/execCommand/5142012-3-expected.txt:
      * editing/inserting/rebalance-whitespace-1-expected.txt: Added.
      * editing/inserting/rebalance-whitespace-1.html: Added.
      * editing/pasteboard/5521237-expected.txt:
      * platform/mac/editing/execCommand/5482023-expected.checksum:
      * platform/mac/editing/execCommand/5482023-expected.png: Removed.
      * platform/mac/editing/execCommand/5482023-expected.txt:
      * platform/mac/editing/execCommand/remove-formatting-2-expected.checksum:
      * platform/mac/editing/execCommand/remove-formatting-2-expected.png: Removed.
      * platform/mac/editing/execCommand/remove-formatting-expected.checksum:
      * platform/mac/editing/execCommand/remove-formatting-expected.png: Removed.
      * platform/mac/editing/execCommand/remove-formatting-expected.txt:
      * platform/mac/editing/inserting/editable-html-element-expected.checksum:
      * platform/mac/editing/inserting/editable-html-element-expected.png: Removed.
      * platform/mac/editing/inserting/editable-html-element-expected.txt:
      * platform/mac/editing/pasteboard/4989774-expected.checksum:
      * platform/mac/editing/pasteboard/4989774-expected.png: Removed.
      * platform/mac/editing/pasteboard/4989774-expected.txt:
      * platform/mac/editing/selection/4983858-expected.checksum:
      * platform/mac/editing/selection/4983858-expected.png: Removed.
      * platform/mac/editing/selection/4983858-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55263 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b5adb4e2
  21. 04 Feb, 2010 1 commit
    • eric@webkit.org's avatar
      2010-02-04 Tony Chang <tony@chromium.org> · 88dc665e
      eric@webkit.org authored
              Reviewed by Eric Seidel.
      
              https://bugs.webkit.org/show_bug.cgi?id=25002
              When inserting a new paragraph, avoid nesting empty divs.  When
              pasting near the end of a paragraph, this prevents each paste
              command for getting nested one level deeper.
      
              Three paste tests have been rebaselined since this causes the pasted
              content to be outside the last div instead of inside.  E.g.,
              <div>foo<div>bar</div>[pasted content]</div> is now
              <div>foo<div>bar</div></div><div>[pasted content]</div>
      
              The new test verifies this behavior.
      
              * editing/inserting/paragraph-outside-nested-divs-expected.txt: Added.
              * editing/inserting/paragraph-outside-nested-divs.html: Added.
              * platform/mac/editing/pasteboard/paste-text-012-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-013-expected.txt:
              * platform/mac/editing/pasteboard/paste-text-017-expected.txt:
      2010-02-04  Tony Chang  <tony@chromium.org>
      
              Reviewed by Eric Seidel.
      
              https://bugs.webkit.org/show_bug.cgi?id=25002
              When inserting a new paragraph, avoid nesting empty divs.  When
              pasting near the end of a paragraph, this prevents each paste
              command for getting nested one level deeper.
      
              Test: editing/inserting/paragraph-outside-nested-divs.html
      
              * editing/InsertParagraphSeparatorCommand.cpp:
              (WebCore::highestVisuallyEquivalentDiv):
              (WebCore::InsertParagraphSeparatorCommand::doApply):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@54395 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      88dc665e
  22. 23 Oct, 2009 1 commit
    • adele@apple.com's avatar
      REGRESSION: Copy is copying incorrect background-color · 4e6db62c
      adele@apple.com authored
      <rdar://problem/7248529>
      https://bugs.webkit.org/show_bug.cgi?id=29697
      
      Patch by Enrica Casucci <enrica@apple.com> on 2009-10-23
      Reviewed by Adele Peterson.
      
      WebCore: 
      
      Test: editing/execCommand/indent-paragraphs.html
      
      This change removes the BackgroundColor from the list 
      of inheritable CSS properties and changes significantly
      the way we perform indentation.
      The new implementation of IndentOutdentCommand uses a new method
      defined in CompositeEditCommand called moveParagraphWithClones.
      This is an improved version of the original moveParagraph that
      is aimed at preserving the original markup of the paragraph being
      moved.
      
      * editing/ApplyStyleCommand.cpp:
      (WebCore::): removed CSSPropertyBackgroundColor from editingStyleProperties.
      * editing/CompositeEditCommand.cpp:
      (WebCore::CompositeEditCommand::CompositeEditCommand): Removed trailing blanks.
      (WebCore::CompositeEditCommand::rebalanceWhitespaceAt): Removed trailing blanks.
      (WebCore::CompositeEditCommand::cloneParagraphUnderNewElement): Added.
      (WebCore::CompositeEditCommand::cleanupAfterDeletion): Added.
      (WebCore::CompositeEditCommand::moveParagraphWithClones): Added.
      (WebCore::CompositeEditCommand::moveParagraphs): Modified to use cleanupAfterDeletion.
      (WebCore::CompositeEditCommand::breakOutOfEmptyListItem): Removed trailing blanks.
      (WebCore::CompositeEditCommand::breakOutOfEmptyMailBlockquotedParagraph): Removed trailing blanks.
      (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary): Removed trailing blanks.
      * editing/CompositeEditCommand.h: Added three new methods.
      * editing/IndentOutdentCommand.cpp:
      (WebCore::IndentOutdentCommand::tryIndentingAsListItem): Changed to use moveParagraphWithClones.
      (WebCore::IndentOutdentCommand::indentIntoBlockquote): Changed to use moveParagraphWithClones.
      (WebCore::IndentOutdentCommand::indentRegion): Removed comment.
      * editing/IndentOutdentCommand.h: Removed prepareBlockquoteLevelForInsertion method.
      
      LayoutTests: 
      
      All the following tests have been re-baselined because
      the indent command now preserves the original markup.
      A new test (indent-paragraph.html) has been added to test
      several indent combinations not covered by the existing tests.
              
      * editing/execCommand/19087-expected.txt:
      * editing/execCommand/19653-1-expected.txt:
      * editing/execCommand/indent-div-inside-list-expected.txt:
      * editing/execCommand/indent-nested-blockquotes-expected.txt:
      * editing/execCommand/indent-nested-div-expected.txt:
      * editing/execCommand/indent-paragraphs.html: Added.
      * editing/execCommand/indent-second-paragraph-in-blockquote-expected.txt:
      * editing/execCommand/indent-with-style-expected.txt:
      * editing/inserting/5994480-2-expected.txt:
      * platform/mac/editing/execCommand/4641880-2-expected.txt:
      * platform/mac/editing/execCommand/4916541-expected.txt:
      * platform/mac/editing/execCommand/5138441-expected.txt:
      * platform/mac/editing/execCommand/5481523-expected.txt:
      * platform/mac/editing/execCommand/indent-paragraphs-expected.txt: Added.
      * platform/mac/editing/execCommand/indent-selection-expected.txt:
      * platform/mac/editing/pasteboard/select-element-1-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@49985 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4e6db62c
  23. 25 Sep, 2009 1 commit
    • adele@apple.com's avatar
      WebCore: Fix for https://bugs.webkit.org/show_bug.cgi?id=29740 · d6b05948
      adele@apple.com authored
      <rdar://problem/7168738> Gmail: After changing a foreground text color, pressing return doesn't apply background to new line
      
      Patch by Enrica Casucci <enrica@apple.com> on 2009-09-25
      Reviewed by Darin Adler, Dan Bernstein, Adele Peterson, and others.
      
      Change the way style is preserved when inserting a new paragraph.
      The original code handled insertion at the beginning and at the end of a paragraph as special
      cases. The newly created paragraph contained a set of nodes generated starting from the
      computed style of the insertion node. This approach has two problems:
      1. if the insertion node has a non opaque background color and one of the parent element did have
      a solid background color the new paragraph did not have the element with the solid color in the tree.
      2. in some circumstances it generated more markup than the original paragraph had (a span with bold, italic,
      background color and some font attribute was being reproduced as span + bold + italic + font as separate tags.
      The new approach is to recreate in the new paragraph the same hierarchy of nodes found in the
      paragraph where the insertion point is.
      
      Test: editing/inserting/insert-bg-font.html
      
      * editing/InsertParagraphSeparatorCommand.cpp:
      (WebCore::InsertParagraphSeparatorCommand::getAncestorsInsideBlock): retrieves the list of all the ancestors
      between the insert node and the outer block.
      (WebCore::InsertParagraphSeparatorCommand::cloneHierarchyUnderNewBlock): uses the list of ancestors to recreate
      in the new paragraph the same element hierarchy present in the starting paragraph.
      (WebCore::InsertParagraphSeparatorCommand::doApply): changed the code to handle the general case of insertion
      in the middle of the paragraph to use the new methods. Changed the handling of the insertion at the beginning and
      at the end of the paragraph to use the new methods instead of applying the calculated style.
      * editing/InsertParagraphSeparatorCommand.h: added methods getAncestorsInsideBlock and cloneHierarchyUnderNewBlock.
      
      LayoutTests: Updated the expected results to reflect the changes in the way the new paragraph
      is created and added test case for https://bugs.webkit.org/show_bug.cgi?id=29740
      <rdar://problem/7168738> Gmail: After changing a foreground text color, pressing return doesn't apply background to new line
      
      Patch by Enrica Casucci <enrica@apple.com> on 2009-09-25
      Reviewed by Darin Adler, Dan Bernstein, Adele Peterson, and others.
      
      * editing/inserting/insert-bg-font.html: Added.
      * platform/mac/editing/inserting/insert-bg-font-expected.txt: Added.
      * platform/mac/editing/pasteboard/5478250-expected.txt:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d6b05948
  24. 19 Sep, 2009 1 commit
    • hamaji@chromium.org's avatar
      2009-09-19 Shinichiro Hamaji <hamaji@chromium.org> · c85c660a
      hamaji@chromium.org authored
              Rubber-stamped by Eric Seidel.
      
              js tests should move into jstests subdirectory instead of resources/
              https://bugs.webkit.org/show_bug.cgi?id=25880
      
              Migration for editing directory.
      
              * editing/inserting/font-size-clears-from-typing-style.html:
              * editing/inserting/resources/TEMPLATE.html: Removed.
              * editing/inserting/resources/font-size-clears-from-typing-style.js: Removed.
              * editing/inserting/script-tests: Added.
              * editing/inserting/script-tests/TEMPLATE.html: Copied from LayoutTests/editing/inserting/resources/TEMPLATE.html.
              * editing/inserting/script-tests/font-size-clears-from-typing-style.js: Copied from LayoutTests/editing/inserting/resources/font-size-clears-from-typing-style.js.
              * editing/pasteboard/file-input-files-access.html:
              * editing/pasteboard/files-during-page-drags.html:
              * editing/pasteboard/get-data-text-plain-paste.html:
              * editing/pasteboard/resources/TEMPLATE.html: Removed.
              * editing/pasteboard/resources/file-input-files-access.js: Removed.
              * editing/pasteboard/resources/files-during-page-drags.js: Removed.
              * editing/pasteboard/resources/get-data-text-plain-paste.js: Removed.
              * editing/pasteboard/script-tests: Added.
              * editing/pasteboard/script-tests/TEMPLATE.html: Copied from LayoutTests/editing/pasteboard/resources/TEMPLATE.html.
              * editing/pasteboard/script-tests/file-input-files-access.js: Copied from LayoutTests/editing/pasteboard/resources/file-input-files-access.js.
              * editing/pasteboard/script-tests/files-during-page-drags.js: Copied from LayoutTests/editing/pasteboard/resources/files-during-page-drags.js.
              * editing/pasteboard/script-tests/get-data-text-plain-paste.js: Copied from LayoutTests/editing/pasteboard/resources/get-data-text-plain-paste.js.
              * editing/selection/click-in-margins-inside-editable-div.html:
              * editing/selection/click-in-padding-with-multiple-line-boxes.html:
              * editing/selection/click-outside-editable-div.html:
              * editing/selection/resources/TEMPLATE.html: Removed.
              * editing/selection/resources/click-in-margins-inside-editable-div.js: Removed.
              * editing/selection/resources/click-in-padding-with-multiple-line-boxes.js: Removed.
              * editing/selection/resources/click-outside-editable-div.js: Removed.
              * editing/selection/script-tests: Added.
              * editing/selection/script-tests/TEMPLATE.html: Copied from LayoutTests/editing/selection/resources/TEMPLATE.html.
              * editing/selection/script-tests/click-in-margins-inside-editable-div.js: Copied from LayoutTests/editing/selection/resources/click-in-margins-inside-editable-div.js.
              * editing/selection/script-tests/click-in-padding-with-multiple-line-boxes.js: Copied from LayoutTests/editing/selection/resources/click-in-padding-with-multiple-line-boxes.js.
              * editing/selection/script-tests/click-outside-editable-div.js: Copied from LayoutTests/editing/selection/resources/click-outside-editable-div.js.
              * editing/style/resources/TEMPLATE.html: Removed.
              * editing/style/resources/text-decoration-state.js: Removed.
              * editing/style/script-tests: Added.
              * editing/style/script-tests/TEMPLATE.html: Copied from LayoutTests/editing/style/resources/TEMPLATE.html.
              * editing/style/script-tests/text-decoration-state.js: Copied from LayoutTests/editing/style/resources/text-decoration-state.js.
              * editing/style/text-decoration-state.html:
              * editing/text-iterator/basic-iteration.html:
              * editing/text-iterator/resources/TEMPLATE.html: Removed.
              * editing/text-iterator/resources/basic-iteration.js: Removed.
              * editing/text-iterator/script-tests: Added.
              * editing/text-iterator/script-tests/TEMPLATE.html: Copied from LayoutTests/editing/text-iterator/resources/TEMPLATE.html.
              * editing/text-iterator/script-tests/basic-iteration.js: Copied from LayoutTests/editing/text-iterator/resources/basic-iteration.js.
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48549 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c85c660a
  25. 10 Aug, 2009 1 commit
    • rniwa@webkit.org's avatar
      WebCore: Background color formatting lost on enter · f0c2610c
      rniwa@webkit.org authored
      https://bugs.webkit.org/show_bug.cgi?id=20348
      
      Patch by Ryosuke Niwa <rniwa@webkit.org> on 2009-08-07
      Reviewed by Justin Garcia.
      
      This patch makes background color be preserved during editing.
      In particular, editingStyleAtPosition would include the background color when obtaining styles.
      
      * editing/ApplyStyleCommand.cpp:
      (WebCore::): Added CSSPropertyBackgroundColor to editingStyleProperties
      
      LayoutTests: Background color formatting lost on enter
      https://bugs.webkit.org/show_bug.cgi?id=20348
      
      Patch by Ryosuke Niwa <rniwa@webkit.org> on 2009-08-07
      Reviewed by Justin Garcia.
      
      This patch adds a test to make sure WebKit preserves background color when inserting a new paragraph.
      
      * editing/inserting/5994480-2-expected.txt: Because input element has explicit white background and the enclosing div has
      transparent background, WebKit adds white background color in DeleteSelectionCommand::calculateTypingStyleAfterDelete upon deletion.
      * editing/style/highlight-insert-paragraph-expected.txt: Added.
      * editing/style/highlight-insert-paragraph.html: Added.
      * platform/mac/editing/pasteboard/select-element-1-expected.txt: Because select element has explicit white background color
      and div has transparent background, WebKit adds white background color in calculateTypingStyleAfterDelete upon cut.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@47008 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f0c2610c
  26. 07 Aug, 2009 1 commit
    • darin@apple.com's avatar
      "Shadow tree" DOM nodes are being accidentally exposed to JavaScript · ddd87502
      darin@apple.com authored
      https://bugs.webkit.org/show_bug.cgi?id=28086
      
      Patch by Darin Adler <darin@apple.com> on 2009-08-07
      Reviewed by Adele Peterson.
      
      Rewrite tests that depend on selection inside <input> and <textarea> elements
      from showing up with getSelection(), since does not match Firefox and needs to
      change soon.
      
      * editing/deleting/delete-ligature-002-expected.txt: Updated.
      * editing/deleting/delete-ligature-002.html: Changed to use a contenteditable
      <div> element instead of a <textarea> element.
      
      * editing/deleting/delete-ligature-003-expected.txt: Updated.
      * editing/deleting/delete-ligature-003.html: Changed to use a contenteditable
      <div> element instead of a <textarea> element.
      
      * editing/deleting/skip-virama-001-expected.txt: Updated.
      * editing/deleting/skip-virama-001.html: Changed to use a contenteditable
      <div> element instead of a <textarea> element.
      
      * editing/input/textarea-arrow-navigation-expected.txt: Moved to fast/forms.
      * editing/input/textarea-arrow-navigation.html: Ditto.
      
      * editing/inserting/insert-thai-characters-001-expected.txt: Updated.
      * editing/inserting/insert-thai-characters-001.html: Changed to use a contenteditable
      <div> element instead of a <textarea> element.
      
      * editing/selection/5213963-expected.txt: Added. This is now a text-only test.
      * editing/selection/5213963.html: Added a call to dumpAsText(). Changed selection
      testing to use selectionEnd instead of getSelection().type.
      
      * editing/selection/find-in-text-control-expected.txt: Updated.
      * editing/selection/find-in-text-control.html: Changed test to distinguish the
      different text controls. Made it use activeElement to find out if the selection
      is inside a control.
      
      * editing/selection/move-begin-end-expected.txt: Updated.
      * editing/selection/move-begin-end.html: Changed to use a contenteditable
      <div> element instead of a <textarea> element.
      
      * editing/text-iterator/thai-cursor-movement-expected.txt: Updated.
      * editing/text-iterator/thai-cursor-movement.html: Changed to use a contenteditable
      <div> element instead of a <textarea> element.
      
      * fast/forms/textarea-arrow-navigation-expected.txt: Moved from editing/input since
      this is a <textarea> test, not a general editing test.
      * fast/forms/textarea-arrow-navigation.html: Ditto.
      Changed to use eventSender instead of the editing machinery to test the down arrow.
      
      * platform/mac/editing/selection/5213963-expected.checksum: Removed.
      This is now a text-only test.
      * platform/mac/editing/selection/5213963-expected.png: Ditto.
      * platform/mac/editing/selection/5213963-expected.txt: Ditto.
      * platform/qt/editing/selection/5213963-expected.txt: Ditto.
      * platform/win/editing/selection/5213963-expected.txt: Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@46926 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ddd87502
  27. 26 Jun, 2009 1 commit
    • adele@apple.com's avatar
      WebCore: · 03d6c3a8
      adele@apple.com authored
      2009-06-26  Adele Peterson  <adele@apple.com>
      
              Reviewed by Darin Adler.
      
              Fix for <rdar://problem/7000796>
              REGRESSION(34681): Breaking up quoted text makes new, unquoted text blue after certain steps; repros with some messages
      
              Test: editing/inserting/break-blockquote-after-delete.html
      
              Keep track of whether the typing style should be preserved after the TypingCommand is applied.  When adding onto an open
              typing command, keep that flag up to date.
      
              In this case, an InsertParagraphSeparatorInQuotedContent command, which should not preserve typing style, 
              was following an open Delete command, which does preserve the typing style.  So we were applying the original
              typing style (from before the delete, so blue text) to the cursor in the unquoted area after breaking up the blockquote.
      
              * editing/TypingCommand.cpp:
              (WebCore::TypingCommand::TypingCommand):
              (WebCore::TypingCommand::typingAddedToOpenCommand):
              (WebCore::TypingCommand::insertTextRunWithoutNewlines):
              (WebCore::TypingCommand::insertLineBreak):
              (WebCore::TypingCommand::insertParagraphSeparator):
              (WebCore::TypingCommand::insertParagraphSeparatorInQuotedContent):
              (WebCore::TypingCommand::deleteKeyPressed):
              (WebCore::TypingCommand::forwardDeleteKeyPressed):
              (WebCore::TypingCommand::deleteSelection):
              (WebCore::TypingCommand::updatePreservesTypingStyle):
              * editing/TypingCommand.h: (WebCore::TypingCommand::preservesTypingStyle):
      
      LayoutTests:
      
      2009-06-26  Adele Peterson  <adele@apple.com>
      
              Reviewed by Darin Adler.
      
              Test for <rdar://problem/7000796>
              REGRESSION(34681): Breaking up quoted text makes new, unquoted text blue after certain steps; repros with some messages
      
              * editing/inserting/break-blockquote-after-delete.html: Added.
              * platform/mac/editing/inserting/break-blockquote-after-delete-expected.checksum: Added.
              * platform/mac/editing/inserting/break-blockquote-after-delete-expected.png: Added.
              * platform/mac/editing/inserting/break-blockquote-after-delete-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45266 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      03d6c3a8
  28. 23 Jun, 2009 4 commits
    • jparent@chromium.org's avatar
      WebCore: · 0f0ad610
      jparent@chromium.org authored
      2009-06-23  Ryosuke Niwa  <rniwa@google.com>
      
              Reviewed by Justin Garcia.
      
              Undo the changeset 21212 to fix the regression bug 14062.
              The changeset 21212 attempted to fix rdar://problem/5002441.
              The changeset 21212 modified InsertTextCommand::input so as to convert
              all spaces in text to non-breaking spaces for rdar://problem/5002441.
              However, the bug was originally caused by rebalanceWhitespaceAt
              and this workaround introduced a regression bug 14062.
              Because rebalanceWhitespaceAt appears to behave correctly now,
              the workaround introduced in 21212 is no longer needed.
      
              Test: editing/inserting/space-after-removeformat.html
      
              * editing/InsertTextCommand.cpp:
              (WebCore::InsertTextCommand::input):
      
      LayoutTests:
      
      2009-06-23  Ryosuke Niwa  <rniwa@google.com>
      
              Reviewed by Justin Garcia.
      
              Undo the changeset 21212 to fix the regression bug 14062.
              The changeset 21212 attempted to fix rdar://problem/5002441.
              The changeset 21212 modified InsertTextCommand::input so as to convert
              all spaces in text to non-breaking spaces for rdar://problem/5002441.
              However, the bug was originally caused by rebalanceWhitespaceAt
              and this workaround introduced a regression bug 14062.
              Because rebalanceWhitespaceAt appears to behave correctly now,
              the workaround introduced in 21212 is no longer needed.
      
              The following test cases are affected by this change.
              This patch removes unappropriate non-breaking spaces (&nbsp;) and
              inserts normal spaces instead.
      
              * editing/deleting/2610675-1-expected.txt: Replaced.
              * editing/deleting/2610675-2-expected.txt: Replaced.
              * editing/deleting/2610675-3-expected.txt: Replaced.
              * editing/inserting/insert-before-link-1-expected.txt: Replaced.
              * editing/inserting/space-after-removeformat-expected.txt: Added.
              * editing/inserting/space-after-removeformat.html: Added.
              * platform/mac/editing/execCommand/5482023-expected.checksum: Replaced.
              * platform/mac/editing/execCommand/5482023-expected.png: Replaced.
              * platform/mac/editing/execCommand/5482023-expected.txt: Replaced.
              * platform/mac/editing/input/text-input-controller-expected.txt: Replaced.
              * platform/mac/editing/inserting/editable-html-element-expected.checksum: Replaced.
              * platform/mac/editing/inserting/editable-html-element-expected.png: Replaced.
              * platform/mac/editing/inserting/editable-html-element-expected.txt: Replaced.
              * platform/mac/editing/pasteboard/4989774-expected.checksum: Replaced.
              * platform/mac/editing/pasteboard/4989774-expected.png: Replaced.
              * platform/mac/editing/pasteboard/4989774-expected.txt: Replaced.
              * platform/mac/editing/selection/4983858-expected.checksum: Replaced.
              * platform/mac/editing/selection/4983858-expected.png: Replaced.
              * platform/mac/editing/selection/4983858-expected.txt: Replaced.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45016 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0f0ad610
    • ojan@chromium.org's avatar
      WebCore: · 7ae729be
      ojan@chromium.org authored
      2009-06-23  Ojan Vafai  <ojan@chromium.org>
      
              Reviewed by Dan Bernstein.
      
              Add logic to CSSStyleDeclaration::diff to deal with font-sizes that are
              keyword values. When diff is called on a CSSStyleDeclaration, we check
              the keywordSize to see if font-size matches a keyword value.
      
              This ensures that when we diff a CSSMutableStyleDeclaration returned from
              copyInheritableProperties on a CSSComputedStyleDeclaration that we
              correctly identify matching font-sizes.
      
              https://bugs.webkit.org/show_bug.cgi?id=26279
      
              Test: editing/inserting/font-size-clears-from-typing-style.html
      
              * css/CSSComputedStyleDeclaration.cpp:
              (WebCore::CSSComputedStyleDeclaration::cssPropertyMatches):
              * css/CSSComputedStyleDeclaration.h:
              * css/CSSStyleDeclaration.cpp:
              (WebCore::CSSStyleDeclaration::cssPropertyMatches):
              (WebCore::CSSStyleDeclaration::diff):
              * css/CSSStyleDeclaration.h:
      
      LayoutTests:
      
      2009-06-23  Ojan Vafai  <ojan@chromium.org>
      
              Reviewed by Dan Bernstein.
      
              This test hits an edge case where typingStyle would never get cleared.
              In addition to making every text insertion go into its own text node,
              this caused large performance problems.
      
              https://bugs.webkit.org/show_bug.cgi?id=26279
      
              * editing/execCommand/5770834-1-expected.txt:
                  These results match how they were before r43243. It's not clear to me
                  why changes to font-size are affecting text-align styling though.
              * editing/inserting/font-size-clears-from-typing-style-expected.txt: Added.
              * editing/inserting/font-size-clears-from-typing-style.html: Added.
              * editing/inserting/resources/TEMPLATE.html: Copied from LayoutTests/editing/execCommand/resources/TEMPLATE.html.
              * editing/inserting/resources/font-size-clears-from-typing-style.js: Added.
              * platform/mac/editing/execCommand/remove-formatting-2-expected.txt:
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ae729be
    • kmccullough@apple.com's avatar
      WebCore: · f53c7458
      kmccullough@apple.com authored
      2009-06-23  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Darin Adler.
      
              <rdar://problem/6994790> CrashTracer: [USER] 8 crashes in Mail trying to
              add a blank line to pasted Facebook content (under
              CompositeEditCommand::positionAvoidingSpecialElementBoundary)
      
              - Just added null checks and I will create a new bug to prevent the
              bad behavior.
      
              * editing/CompositeEditCommand.cpp:
              (WebCore::CompositeEditCommand::positionAvoidingSpecialElementBoundary):
      
      LayoutTests:
      
      2009-06-23  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Darin Adler.
      
              <rdar://problem/6994790> CrashTracer: [USER] 8 crashes in Mail trying to
              add a blank line to pasted Facebook content (under
              CompositeEditCommand::positionAvoidingSpecialElementBoundary)
      
              * editing/inserting/return-with-object-element-expected.txt: Added.
              * editing/inserting/return-with-object-element.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45009 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f53c7458
    • kmccullough@apple.com's avatar
      WebCore: · c326351a
      kmccullough@apple.com authored
      2009-06-23  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Adele Peterson.
      
              <rdar://problem/6902203> REGRESSION: 'Return' insertion point incorrect
              after manually quoting blank line then hitting return
      
              If the insertion point is both the begining and ending visible position
              then we need to insert at the end instead of the begining, which is what
              would normally happen if the insertion point was as the begining.
      
              * editing/BreakBlockquoteCommand.cpp:
              (WebCore::BreakBlockquoteCommand::doApply):
      
      LayoutTests:
      
      2009-06-23  Kevin McCullough  <kmccullough@apple.com>
      
              Reviewed by Adele Peterson.
      
              <rdar://problem/6902203> REGRESSION: 'Return' insertion point incorrect
              after manually quoting blank line then hitting return
      
              * editing/inserting/insert-br-quoted-007-expected.txt: Added.
              * editing/inserting/insert-br-quoted-007.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@45000 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c326351a
  29. 06 May, 2009 1 commit
    • mitz@apple.com's avatar
      WebCore: · ffea9c76
      mitz@apple.com authored
              Reviewed by Simon Fraser and Justin Garcia.
      
              - fix another part of <rdar://problem/6703873> Triple-click quoted line
                and type Return creates an extra quoted blank line
      
              Test: editing/inserting/6703873-2.html
      
              * editing/BreakBlockquoteCommand.cpp:
              (WebCore::BreakBlockquoteCommand::doApply): Corrected the logic for
              determining the first node that should go into the new blockquote
              given the split position: if it is at the end of a container, use the
              next node after the container. Otherwise, use the child at the
              position's offset.
      
      LayoutTests:
      
              Reviewed by Simon Fraser and Justin Garcia.
      
              - test for another part of <rdar://problem/6703873> Triple-click quoted
                line and type Return creates an extra quoted blank line
      
              * editing/inserting/6703873-2-expected.txt: Added.
              * editing/inserting/6703873-2.html: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@43333 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      ffea9c76
  30. 14 Apr, 2009 1 commit
    • adele@apple.com's avatar
      2009-04-13 Adele Peterson <adele@apple.com> · 44641760
      adele@apple.com authored
              Reviewed by Darin Adler.
      
              Fix for <rdar://problem/6703873> Triple-click quoted line and type Return creates an extra quoted blank line
      
              Test: editing/inserting/6703873.html
      
              * editing/BreakBlockquoteCommand.cpp: (WebCore::BreakBlockquoteCommand::doApply):
              If the startNode's original parent is now empty, we can remove it.  Its already been cloned and copied with the startNode,
              so we only need to keep it around if it actually holds some original content, otherwise it will look like an extra empty 
              container in the document.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@42501 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      44641760