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

5413 Коммитов

Автор SHA1 Сообщение Дата
Masayuki Nakano c3dc8121ea Bug 669028 part.9 editor should use mozilla::LookAndFeel rather than nsILookAndFeel r=ehsan 2011-09-09 11:27:12 +09:00
Ehsan Akhgari 72e52f9e41 Bug 682650 - Use an unsigned 32-bit integer as the container of offsets inside text nodes; r=roc
(I bet that there are text nodes on the web which have more than 65535 characters on the Web!)
2011-09-08 11:35:33 -04:00
Matt Brubeck df5011c45e Bug 684807 - Annotate more crashtest assertions on Android [r=philor]
--HG--
extra : rebase_source : fb7142167faccb19975aa12c6048428c8dea42c4
2011-09-08 09:00:32 -07:00
Felix Fung 0bc71ca85d Bug 577266 - Correct misspellings in source code 2011-09-06 17:20:35 -07:00
Fabien Cazenave 3fd551dbdf Bug 462758 - elements with contenteditable=true and position:absolute can be moved around the page; r=ehsan 2011-09-07 13:34:58 -04:00
arno renevier 09ac4cf16e bug 684315: Remove private browsing code from nsEditorSpellCheck.cpp; r=ehsan 2011-09-06 15:16:04 -04:00
Ms2ger ccea776176 Bug 684807 - Annotate crashtest assertions on Android; r=philor 2011-09-06 18:35:43 +02:00
Ed Morley 01f15294eb Backout a422b9ff0a9e (bug 591780 part 1) for causing 8% Ts regression on multiple platforms; a=khuey 2011-09-06 14:32:26 +01:00
Jesper Kristensen 1ef15b178d Bug 591780 - Part 1: Backend support for adding and removing spell checker dictionaries at runtime; r=ehsan 2011-09-05 18:44:34 -04:00
arno renevier b9bd12f40a bug 684230: remove progressListener at the end of test_bug434998.xul; r=ehsan 2011-09-05 15:22:03 -04:00
Arno Renevier 8ed782b9a3 Bug 682564 - Prefer user set dictionary over other dictionaries when it matches spellcheck langcode; r=ehsan 2011-09-04 14:00:20 +01: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
Ehsan Akhgari b68262a622 Keep changeset 9ef862cbcc5e backed out on the reverted tree 2011-09-02 09:03:38 -04:00
Ehsan Akhgari 44916171a8 Revert to changeset e6fc4594c22e which was the last one to get a green Win7 tp run 2011-09-02 09:03:08 -04:00
Ehsan Akhgari 704a16280b Backout changeset 9ef862cbcc5e (bug 682564) because of mochitest-oth oranges 2011-09-01 21:00:05 -04:00
arno renevier 9f50a8dae9 Bug 682564 - Prefer user set dictionary over other dictionaries when it matches spellcheck langcode; r=ehsan 2011-09-01 22:14:02 +01:00
Marco Castelluccio a1151d128d Bug 682744 - Sprinkle some do_QueryObject fairy dust around the tree; r=khuey 2011-08-30 22:45:31 +01:00
Ms2ger 0b1536d069 Bug 672054 - Part a: Remove nsIDOMNSUIEvent; r=smaug 2011-08-26 09:43:49 +02: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
arno renevier e6a982f07d bug 678842: remember spell check setting per site; r=ehsan 2011-08-23 15:03:33 -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
Fabien Cazenave 8a7028d704 Bug 680060 - [queryCommandEnabled] check `GetIsSelectionEditable' results; r=ehsan 2011-08-18 11:34:52 -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
Jonas Sicking e50dc8cb66 Bug 667612: Make addEventListener not throw if passed a null listener. r=smaug 2011-08-18 02:45:00 -07:00
Fabien Cazenave 730fe59635 Bug 674212 - Modifying text of a contenteditable DOM Node removes spellcheck underlinings; r=ehsan 2011-08-17 17:12:46 -04:00
Ehsan Akhgari 3bf0c576f1 Bug 318065 followup - Remove the extra finish call from the test
DONTBUILD
2011-08-17 16:40:31 -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
Graeme McCutcheon f9b46f6f4f Bug 318065 - Don't notify editor observers until bogus node state is reset. r=ehsan 2011-08-16 13:55:23 +01: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
arno renevier abf78cfc8e Bug 338427 followup - fix Get/SetCurrentDictionary signature; r=ehsan 2011-08-15 13:55:02 -04:00
arno renevier c4a382824d Bug 338427 followup - Do not override manually set dictionary; r=ehsan 2011-08-15 13:54:03 -04:00
Marco Castelluccio d3f9d68e9e Bug 612839 - Removed nsAHtml5FragmentParser. r=hsivonen 2011-08-14 10:39:26 -07:00
Vidar Haarr 2e082405d2 Bug 232691 - Replace nsString emptyString; with EmptyString() in nsHTMLEditRules; r=ehsan 2011-08-13 14:59:48 +02: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
Ms2ger 56beecce2a Bug 677340 - Return already_AddRefed instead of nsCOMPtr from various functions in editor/; r=ehsan 2011-08-11 15:29:59 +02:00
Ms2ger 3fea5b3901 Bug 677101, part c - Reduce nsIDOMText.h inclusions; r=volkmar 2011-08-11 15:29:58 +02:00
Ms2ger 4ca9cbc0f3 Bug 677101, part b - Remove nsContentUtils.h includes from headers; r=volkmar 2011-08-11 15:29:50 +02: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
Graeme McCutcheon f14955fe44 Bug 483651 - Trailing <br> node not removed when it should be; r=ehsan 2011-08-12 15:53:10 -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
Ian Neal a5f7b6054c Test for Bug 290026 - Outdent of List does not work properly r=ehsan 2011-08-10 00:14:53 +01:00
Ehsan Akhgari 356a62adb7 Merge the latest green changeset on mozilla-inbound to mozilla-central 2011-08-09 08:09:13 -04:00
Jan Varga a298beaa2e Bug 617528 Part 2 - Core implementation r=smaug
--HG--
rename : content/html/content/test/test_bug418756.html => content/html/content/test/test_checked.html
2011-08-08 19:31:32 +02:00
Michael Wu fbcd07dca0 Bug 676465 - Replace PRBool with boolean in IDL files, r=bsmedberg 2011-08-06 22:03:32 -07:00