Граф коммитов

162 Коммитов

Автор SHA1 Сообщение Дата
Aryeh Gregor 6516ccca87 Bug 735059 - Second and third execCommand() parameters should be optional; r=ehsan 2012-03-12 18:12:19 -04:00
Serge Gautherie fa28cf7ed9 Bug 732792. (Av1) test_bug674770-2.html: Set "middlemouse.contentLoadURL" preference too. r=ehsan. 2012-03-06 18:14:44 +01:00
Ehsan Akhgari a33fd21f62 Bug 725069 - Never mark the comment nodes as editable; r=roc 2012-02-07 18:39:05 -05:00
Jared Wein c3725ef355 Bug 198964 - Enable smooth scrolling by default. r=gavin 2012-01-13 16:26:34 -08:00
Masayuki Nakano bcb5aa90d8 Bug 711903 part.2 Fix new test failure r=ehsan 2011-12-31 23:04:37 +09:00
Neil Rashbrook d073236fa6 Bug 692153 Make Copy and Select All always work even when contenteditable areas are present r=ehsan 2011-12-30 17:42:04 +00:00
Neil Rashbrook 27f9d856f2 Bug 669026 Fix caret movement when contenteditable areas are present r=ehsan 2011-12-24 00:11:30 +00:00
Masayuki Nakano 411111e945 Bug 698949 Editor should refuse untrusted keypress event r=smaug 2011-12-21 21:11:36 +09:00
Masayuki Nakano efe739e3f9 Bug 700199 EventUtils.js should use synthesized events for sendKey(), sendChar() and sendString() rather than untrusted events r=smaug+ehsan+dolske+enndeakin 2011-12-16 22:38:45 +09:00
Jan Bambach 16da8f10c3 Bug 707677 - Use defaultPrevented instead of the deprecated getPreventDefault() in front-end code. r=dao 2011-12-08 10:21:32 +01:00
Masayuki Nakano 5ff35fa5ae backout 34b8fe028357 2011-12-08 16:42:45 +09:00
Masayuki Nakano 705962c806 Bug 700199 EventUtils.js should use synthesized events for sendKey(), sendChar() and sendString() rather than untrusted events r=ehsan+smaug+enndeakin+dolske 2011-12-07 14:13:06 +09:00
Masayuki Nakano a0d25e7690 Bug 392159 Use nsIClipboard::SupportsSelectionClipboard() instead of #ifdef in nsEditorEventListener r=ehsan 2011-11-30 11:57:41 +09:00
Masayuki Nakano 360fdc970d Bug 697842 stopPropagation() shouldn't break IME composition r=ehsan 2011-11-27 09:36:36 +09:00
Masayuki Nakano 0ce4481e30 Bug 674770 part.4 Add new tests for pasting by middle click r=ehsan 2011-11-26 13:51:49 +09:00
Ehsan Akhgari 716fbb5f12 Bug 674770 part.3 Add tests for middle-clicking on anchor element when the page has contenteditable element r=roc 2011-11-26 13:51:49 +09:00
Oonishi Atsushi 8f0353652d Bug 311007 - Add aFlags arg to onLocationChange(...), to distinguish between same-document and different-document. r=smaug, sr=bzbarsky 2011-11-10 15:01:11 +01:00
Ed Morley 7ea8e12caa Backout 4997c6f8b24d (bug 616542) for causing locally run mochitest-browser-chrome test runs to fail 2011-11-05 18:35:59 +00:00
Rail Aliiev ac65d0d88e Bug 616542 - Shorten file path length of mochitest; r=ted 2011-11-04 21:13:42 +00:00
Jonas Sicking 591066d996 Bug 687400: Kill Node.isSameNode. r=smaug 2011-10-28 19:52:27 -07:00
Ehsan Akhgari 22b6c29d5d Backout changeset be42bc18185a (bug 612128) because of bug 688423 2011-10-25 22:32:55 -04:00
Ehsan Akhgari 944bae7a2e Bug 612128 - Prevent the editor from modifying nodes which are not under an editing host; r=roc,bzbarsky
This patch ensures that the NODE_IS_EDITABLE flag is only set on nodes living
under an editing host.  Things like text controls which used to have that flag
previously will not have it any more.  The flag would be set on their anonymous
div node instead.  Note that if text controls actually fall under an editing
host, they will get the NODE_IS_EDITABLE flag.

This patch also makes nsHTMLEditor::IsEditable return sane results (text nodes
are always considered to be editable).

--HG--
extra : rebase_source : 37317b4d95c2ea957be81420583a98a24f0864ac
2010-11-16 15:45:49 -05:00
Ehsan Akhgari b0b9ecd29f Bug 688789 - Stop touching the frame tree to determine whether a node is editable or not; r=roc 2011-10-17 00:11:29 -04:00
Joel Maher 0011350970 Bug 573735 - support waitForClipboard events in e10s. r=jdm,ted 2011-10-14 07:52:02 -04:00
Ehsan Akhgari b6b4433743 Backout changeset bc4f8b8d18b3 (bug 674770) because of the failing test on Windows 2011-10-12 13:51:14 -04:00
Ehsan Akhgari 3b5e217423 Bug 674770 - contenteditable breaks middle-click to open links when middlemouse.paste=true; r=roc 2011-09-29 15:24:13 -04:00
Ehsan Akhgari 69ee1b11ba Backout changeset a72195ce0eaa (bug 612128) becasue of Fennec regressions 2011-09-22 18:09:44 -04:00
Martijn Wargers 1460f290eb Bug 634626 - Move test_bug36682 to mochitest chrome, add layout.spellcheckDefault pref test; r=ehsan 2011-09-22 17:35:24 +01:00
Masayuki Nakano 6fecf30153 Bug 543789 part.7 Dispatch compositionupdate event and set data value of compositionend event in all IME handling tests r=smaug, sr=roc 2011-09-22 18:17:41 +09:00
Brian R. Bondy 546712057e Bug 598289 - Test case for CF_HTML parsing with StartHTML/EndHTML set to -1. r=ehsan 2011-09-21 13:22:54 -04:00
Ehsan Akhgari c0e01ee34d Bug 612128 - Prevent the editor from modifying nodes which are not under an editing host; r=roc,bzbarsky
This patch ensures that the NODE_IS_EDITABLE flag is only set on nodes living
under an editing host.  Things like text controls which used to have that flag
previously will not have it any more.  The flag would be set on their anonymous
div node instead.  Note that if text controls actually fall under an editing
host, they will get the NODE_IS_EDITABLE flag.

This patch also makes nsHTMLEditor::IsEditable return sane results (text nodes
are always considered to be editable).
2010-11-16 15:45:49 -05:00
Ian Neil d5e9d513c1 Test case for bug 552782; r=ehsan 2011-09-20 12:27:24 -04:00
Ed Morley bdd7b6de63 Backout changeset b8d354d37128 (bug 574005) for Linux M3 orange; a=bbondy 2011-09-13 00:49:59 +01:00
Brian R. Bondy 61dead824b Bug 574005 - Make obtaining CF_HTML directly work on Windows and Linux (application/x-moz-nativehtml); r=ehsan 2011-09-12 18:38:57 -04:00
Fabien Cazenave 911973d7e1 Bug 570144 - After pressing Enter, editable DIVs in list items are duplicated; r=ehsan 2011-09-12 15:25:38 -04:00
Fabien Cazenave c5be62f04a Bug 290026 - Outdent of List does not work properly; r=ehsan 2011-09-02 12:21:33 -04:00
Fabien Cazenave 944a5d2ef2 Bug 291780 - List outdent is not working properly; r=ehsan 2011-09-02 12:19:09 -04:00
Fabien Cazenave e9ca41c695 Bug 677752 - [contentEditable] indent and justify* fail on editable nodes that have only one child; r=ehsan
Issue #1: indent/justify* can create non-valid fragments.
When applying a block-level formatting to a text node, Gecko creates a div or
blockquote block around the text node and sets the corresponding "align" or
"style" attribute. This patch checks that the active editing host can contain
such a block-level element.

Issue #2: indent/justify* can modify the active editing host.
On the first child of the editable element, the selection is extended outside of
the active editing host -- which causes a few issues for our test cases.
In this patch, this issue is "solved" by modifying
`nsHTMLEditRules::GetPromotedPoint' for block-level operations.


** About the tests **

Sorry for the long explanation but I prefer to be as sharp as possible when I
have to modify existing unit tests.

This patch raises 34 unit test "failures" which are improvements.
Two test files are concerned and have been modified accordingly:
  * test_htmleditor_keyevent_handling
  * test_richtext2.html

One test has been clarified (no real modification):
  * test_bug414526.html

Of course, a specific unit test has been added, see `test_bug677752.html'.


** editor/libeditor/html/tests/test_htmleditor_keyevent_handling.html **
Outdenting now works properly, which results in 4 `FAIL'.

  * 7372 ERROR TEST-UNEXPECTED-FAIL
      | non-tabbable HTML editor: Shift+Tab after Tab on UL
      - got "<ul><li id=\"target\">ul list item</li></ul>",
      expected "<ul><ul><li id=\"target\">ul list item</li></ul></ul>"

  * 7379 ERROR TEST-UNEXPECTED-FAIL
      | non-tabbable HTML editor: Shift+Tab on UL
      - got "ul list item",
      expected "<ul><li id=\"target\">ul list item</li></ul>"

  * 7415 ERROR TEST-UNEXPECTED-FAIL
      | non-tabbable HTML editor: Shift+Tab after Tab on OL -
      got "<ol><li id=\"target\">ol list item</li></ol>",
      expected "<ol><ol><li id=\"target\">ol list item</li></ol></ol>"

  * 7422 ERROR TEST-UNEXPECTED-FAIL
      | non-tabbable HTML editor: Shfit+Tab on OL
      - got "ol list item",
      expected "<ol><li id=\"target\">ol list item</li></ol>"


** editor/libeditor/html/tests/browserscope/test_richtext2.html **
The 15 tests that now pass result in 15 `FAIL' and 15 `UNEXPECTED_PASS'.
Here's an overview of what we had before the patch:

  * Section A - Apply Formatting Tests: +10 points
                    before patch: 21/31 (Selection:  9/31)
                     after patch: 28/31 (Selection: 12/31)

      FB:BQ_TEXT-1_SI    EXECUTION EXCEPTION
      FB:BQ_TEXT-1_SI    EXECUTION EXCEPTION
      FB:BQ_BR.BR-1_SM   EXECUTION EXCEPTION
      FB:BQ_BR.BR-1_SM   EXECUTION EXCEPTION
      IND_TEXT-1_SI      EXECUTION EXCEPTION
      IND_TEXT-1_SI      EXECUTION EXCEPTION
      JC_TEXT-1_SC       editing host is modified
      JF_TEXT-1_SC       editing host is modified
      JL_TEXT-1_SC       editing host is modified
      JR_TEXT-1_SC       editing host is modified

  * Section AC - Apply Formatting Tests, using styleWithCSS: +5 points
                    before patch:  7/18 (Selection:  5/18)
                     after patch: 12/18 (Selection:  5/18)

      IND_TEXT-1_SI      editing host is modified
      JC_TEXT-1_SC       editing host is modified
      JF_TEXT-1_SC       editing host is modified
      JL_TEXT-1_SC       editing host is modified
      JR_TEXT-1_SC       editing host is modified


** editor/libeditor/html/tests/test_bug414526.html **
This test has been clarified to get more explicit report messages -- the test
themselves haven't been changed. A `todo_is' test has been added.
This test is the one that shows that `IsNodeInActiveEditor' can't be modified,
and that limiting the range promotion for block-level operations is preferrable.
2011-08-23 15:10:14 -04:00
Fabien Cazenave 51ba25e02c Bug 680279 - Splitting Gmail rich-text list with Enter misplaces the caret; r=ehsan
The patch for bug 674861 has introduced a regression.
When a list is splitted, a new paragraph should inserted before the new list.
2011-08-19 18:14:04 -04:00
Ehsan Akhgari eb0c0c8650 Backout changeset 46dc0fb0b1cb (bug 674770) because of yet another mochitest-3 Windows failure
--HG--
extra : rebase_source : a0739cd5d2eb66015d785c107151507f8a8113e3
2011-08-18 16:25:11 -04:00
Ehsan Akhgari 84774ab4ac Bug 674770 - contenteditable breaks middle-click to open links when middlemouse.paste=true; r=roc 2011-07-28 17:42:38 -04:00
Fabien Cazenave e14db8b0a8 Bug 676401 - The document.queryCommandEnabled API doesn't take the active editing host into account; r=ehsan
* adding an `isSelectionEditable' readonly attribute in <nsIEditor>;
 * modified all ::IsCommandEnabled methods in editor/ to take it into account:

./libeditor/base/nsEditorCommands.cpp (15 commands)
  nsUndoCommand                   'undo'
  nsRedoCommand                   'redo'
  nsClearUndoCommand              'clearUndo'
  nsCutCommand                    'cut'
  nsCutOrDeleteCommand            ?
  nsCopyCommand                   'copy'
  nsCopyOrDeleteCommand           ?
  nsPasteCommand                  'paste'
  nsPasteTransferableCommand      ?
  nsSwitchTextDirectionCommand    ?
  nsDeleteCommand                 'delete'
  nsSelectAllCommand              'selectAll'
  nsSelectionMoveCommands         ?
  nsInsertPlaintextCommand        ?
  nsPasteQuotationCommand         ?

./composer/src/nsComposerCommands.cpp (15 commands)
  nsBaseStateUpdatingCommand      ?
  nsPasteNoFormattingCommand      ?
  nsRemoveListCommand             ?
  nsIndentCommand                 'indent'
  nsOutdentCommand                'outdent'
  nsMultiStateCommand             ?
  nsHighlightColorStateCommand    'hiliteColor'
  nsAbsolutePositioningCommand    ?
  nsDecreaseZIndexCommand         ?
  nsIncreaseZIndexCommand         ?
  nsRemoveStylesCommand           'removeFormat'
  nsIncreaseFontSizeCommand       'increaseFontSize'
  nsDecreaseFontSizeCommand       'decreaseFontSize'
  nsInsertHTMLCommand             'insertHTML'
  nsInsertTagCommand              ?

./composer/src/nsComposerDocumentCommands.cpp (3 commands)
  nsSetDocumentOptionsCommand     ?
  nsSetDocumentStateCommand       ?
  nsDocumentStateCommand          n/a (unpatched)
2011-08-17 13:28:03 -04:00
Fabien Cazenave 7a2ab2c16d Bug 456798 — Implement document.queryCommandSupported
Rationale: a command is supported if it can be converted to an internal Midas
command. `nsCommandManager::IsCommandSupported' might not be needed any more.

Corollary: document.queryCommandEnabled should return false on unsupported
commands without raising any exception.

Browserscope tests: +43 points = 258 failed tests...
 * Q section: 0/48 => 42/48
   42 tests used to fail (execution exception), now pass
 * QE section: 36/46 => 37/46
   garbage-1_TEXT-1 used to fail, now passes
In these two sections, a lot of tests that used to raise an exception now return
`false' (that's still a FAIL, but that's not the same kind of FAIL).

Other Browserscope tests are not affected by this patch.
The status of this test suite (currentStatus.js) has been updated accordingly.
2011-08-17 08:04:14 -04:00
Ms2ger f1ce0d69e4 Merge m-c to m-i 2011-08-13 14:47:03 +02:00
Malini Das 132054c82e Bug 367393 - Add a packed MochiKit that contains only SimpleTest dependencies- new tests. r=jmaher, a=test-only 2011-08-12 12:21:44 -04:00
Malini Das c20b68638f Bug 367393 - Add a packed MochiKit that contains only SimpleTest dependencies- plain tests 2/2. r=jmaher, a=test-only 2011-08-12 12:21:44 -04:00
Malini Das ea71db787e Bug 367393 - Add a packed MochiKit that contains only SimpleTest dependencies- chrome. r=jmaher, a=test-only 2011-08-12 12:21:36 -04:00
Fabien Cazenave 2211444fe6 Bug 442186 - execCommand justify* fails on first line of contenteditable; r=ehsan
Given the way GetPromotedPoint / IsNodeInActiveEditor are designed, when the
selection is in the first child element of the active editing host the
selection is extended outside of editor node.

As a result, `GetNodesFromSelection' (which is called at the beginning of
`WillAlign') returns two nodes:
1. an empty text node, which is enclosed in a <div style="text-align: ***">;
2. the first child element, which is destroyed when it's a <div>;

Proposed solution:
#1 can be avoided by checking that the node is editable in `WillAlign';
#2 can be avoided by not dropping <div> blocks in `RemoveAlignment'.
This is an opportunity to simplify `RemoveAlignment' a bit.
2011-08-10 19:03:34 -04:00
arno renevier 56a37f401e Bug 338427 - Spellchecker should respect the langi attribute; r=ehsan 2011-08-12 15:12:45 -04:00
Ian Neal 1a531de79c Test for Bug 291780 - List outdent is not working properly r=ehsan 2011-08-10 00:14:58 +01:00