Commit Graph
245 Commits
Author SHA1 Message Date
Ehsan Akhgari f4bd388765 Bug 722872 - Part 1: Add nsITransferable::Init(nsILoadContext*), enforce that it's called in debug builds, and add nsIDOMDocument* arguments to nsIClipboardHelper methods; r=roc
This patch does the following:

* It adds nsITransferable::Init(nsILoadContext*).  The load context
  might be null, which means that the transferable is non-private, but
  if it's non-null, we extract the boolean value for the privacy mode
  and store it in the transferable.
* It adds checks in debug builds to make sure that Init is always
  called, in form of fatal assertions.
* It adds nsIDOMDocument* agruments to nsIClipboardHelper methods which
  represent the document that the string is coming from.
  nsIClipboardHelper implementation internally gets the nsILoadContext
  from that and passes it on to the transferable upon creation.  The
  reason that I did this was that nsIClipboardHelper is supposed to be a
  high-level helper, and in most of its call sites, we have easy access
  to a document object.
* It modifies all of the call sites of the above interfaces according to
  this change.
* It adds a GetLoadContext helper to nsIDocument to help with changing
  the call sites.
2012-04-16 22:14:01 -04:00
Aryeh Gregor bbf24a0340 Bug 766360 - Rewrite nsEditor::DeleteSelectionAndPrepareToCreateNode; r=ehsan 2012-06-21 15:54:26 +03:00
Aryeh Gregor 16a3a22853 Back out 66b3801292a0 for test failures 2012-06-24 10:30:13 +03:00
Aryeh Gregor e0dddc6286 Bug 766360 - Rewrite nsEditor::DeleteSelectionAndPrepareToCreateNode; r=ehsan 2012-06-21 15:54:26 +03:00
Henri Sivonen ddb3e40159 Bug 750096. r=bzbarsky. 2012-06-14 09:14:47 +03:00
Ryan VanderMeulen 7243a68652 Merge m-c to inbound 2012-06-10 17:59:00 -04:00
Olli Pettay 2146ee62af Bug 761613 - Merge nsIPrivateDOMEvent to nsIDOMEvent, r=jst 2012-06-10 21:14:30 +03:00
Aryeh Gregor 463121ea8c Bug 762862 - Rename nsTypedSelection to mozilla::Selection; r=ehsan 2012-06-08 17:20:55 +03:00
Ehsan Akhgari 775dd99486 Bug 761051 - Use image/jpeg as the standard internal transferable image type, but continue respecting image/jpg as well; r=roc 2012-06-07 19:27:07 -04:00
Ehsan Akhgari 4d63a17cbe Backout changeset 125438dda903 (bug 761051) because of Bq bustage 2012-06-07 19:49:37 -04:00
Ehsan Akhgari d66a66049e Bug 761051 - Use image/jpeg as the standard internal transferable image type, but continue respecting image/jpg as well; r=roc 2012-06-07 19:27:07 -04:00
Aryeh Gregor 1a424ce536 Bug 760143 - Get rid of useless nsresult in editor/; r=ehsan 2012-06-01 14:03:17 +03:00
Aryeh Gregor 2eb22e0397 Bug 748307 part 2 - Make WillDoAction take an nsTypedSelection; r=ehsan 2012-05-22 12:37:17 +03:00
Gervase Markham cb6a072c2a Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Ms2ger f427a3c823 Merge m-c to m-i. 2012-05-18 13:32:20 +02:00
Ms2ger 39a759ea47 Bug 750053 - Part b: Stop using nsISelection::GetIsCollapsed in editor/libeditor; r=ehsan 2012-05-18 10:29:39 +02:00
Aryeh Gregor 67422ef709 Bug 590640 part 6 - Don't create empty style tags unless we're about to insert text in them; r=ehsan 2012-05-10 15:00:14 +03:00
Aryeh Gregor 6a21137769 Bug 590640 part 5 - Delete empty wrappers when we delete the selection; r=ehsan 2012-05-10 17:54:33 +03:00
Ehsan Akhgari a2b048ce24 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
Aryeh Gregor 7fd0a44e4e Bug 751547 - Unify action enums in editor/; r=ehsan 2012-05-05 21:52:29 +03:00
Ehsan Akhgari 66c4d55490 Bug 741734 - Fire the paste event when pasting without formatting; r=roc 2012-04-03 13:41:04 -04:00
Ehsan Akhgari 6137e75807 Backed out changeset afff429aaf9a because of bad commit message 2012-04-03 17:47:34 -04:00
Ehsan Akhgari 2cd41bf391 commit cf0f05533cc23ba918e81ac3669449813799fe9f
Author: Ehsan Akhgari <[email protected]>
    Bug 741734 - Fire the paste event when pasting without formatting; r=roc
2012-04-03 13:41:04 -04:00
aceman 77072a23f3 Bug 732691 - Further cleanups in /mozilla/editor/libeditor/html/nsHTMLDataTransfer.cpp found in bug 368758. r=ehsan 2012-03-26 14:58:43 -07:00
Ehsan Akhgari acd8a0c496 Bug 732585 - Drag and drop images into message window is broken; r=roc 2012-03-26 09:04:06 -07:00
Ms2ger 606df6e7a8 Bug 738771 - Outparamdel nsEditor::GetDocument(); r=ehsan 2012-03-24 09:19:14 +01:00
Henri Sivonen b191345374 Bug 737417 part 1 - Split charset source constants out of nsIParser.h. r=smaug. 2012-03-22 16:42:42 +02:00
Neil Deakin e1751a6977 Bug 605991, prevent drops on a parent content page from a child frame from a different domain, r=smaug 2012-03-20 11:21:41 -04:00
Henri Sivonen 894541381a Bug 650776 part 1 - Introduce a new HTML source to HTML source sanitizer XPCOM API. r=smaug. 2012-03-19 10:16:20 +02:00
aceman 5fb2f43fa0 Bug 368758 - Remove obsolete workaround pref editor.quotesPreformatted. r=ehsan 2012-03-02 17:23:01 -05:00
Neil Deakin deb52112b3 Bug 499008, part 7, merge html drag type constants into one place, r=ehsan 2012-02-17 09:17:00 -05:00
Neil Deakin 26218de78a Bug 499008, part 5, merge the text and html implementations of InsertFromDrop, r=ehsan 2012-02-17 09:16:59 -05:00
Neil Deakin 116989261d Bug 499008, part 4, convert editor drop handling to use datatransfers instead of the drag service, r=ehsan 2012-02-17 09:16:59 -05:00
Neil Deakin 3e84562081 Bug 499008, part 2, move editor dragstart handling to ContentAreaDragDrop, r=ehsan 2012-02-17 09:16:59 -05:00
Daniel Holbert 817a88fc68 Bug 458167 patch 6: s/it's/its/ in comments within editor. r=ehsan 2012-02-15 01:18:24 -08:00
David Zbarsky c6abd95045 Bug 682611 - Part 2: Remove nsIRange; r=smaug 2012-01-10 15:19:54 +01:00
David Zbarsky b5b429da23 Bug 682611 - Part 1: Merge nsIDOMRange and nsIDOMNSRange; r=Ms2ger r=smaug 2012-01-10 15:19:54 +01:00
Ehsan Akhgari b729a2da2a Bug 613517 - Remove support for making links relative when pasting/dropping HTML data over an editable area; r=roc 2011-12-30 13:04:02 -05:00
Ehsan Akhgari 42a9cf9745 Backout changeset be42bc18185a (bug 612128) because of bug 688423 2011-10-25 22:32:55 -04:00
Ehsan Akhgari 376668740e 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
Ehsan Akhgari 478ad1a412 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Jeff Walden 7d613942b0 Bug 693469 - Implement mozilla::ArrayLength and mozilla::ArrayEnd, and replace uses of NS_ARRAY_LENGTH whenever possible. (Exceptions: assigning to static initializers, use in static assertions, as template parameters, etc. These will go away when the relevant compilers have C++11 constexpr support.) r=cjones 2011-10-10 22:50:08 -07:00
Henri Sivonen 4c43b849bd Bug 677050 - Return NS_ERROR_DOM_INVALID_STATE_ERR if fragment parsing is invoked re-entrantly. r=bzbarsky. 2011-10-14 13:39:19 +03:00
Jeff Walden c5e5f873d1 Back out everything since 5435ee09cf7b. Tinderbox compilers hate me. r=epic-fail 2011-10-12 12:21:53 -07:00
Jeff Walden 946f2ae0e3 Bug 639469 - Implement mozilla::ArrayLength and mozilla::ArrayEnd, and replace uses of NS_ARRAY_LENGTH whenever possible. r=cjones 2011-10-10 22:50:08 -07:00
Michael Wu 0fe7772ece Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones 2011-09-28 23:19:26 -07:00
Ehsan Akhgari 655e146ad3 Backout changeset a72195ce0eaa (bug 612128) becasue of Fennec regressions 2011-09-22 18:09:44 -04:00
Brian R. Bondy 065844a717 Bug 598289 - Unable to paste CF_HTML from clipboard if StartHTML/EndHTML is -1. r=ehsan 2011-09-21 13:22:53 -04:00
Ehsan Akhgari 3aef5b99c4 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
Ms2ger 717aa1d9e1 Bug 672054 - Part a: Remove nsIDOMNSUIEvent; r=smaug 2011-08-26 09:43:49 +02:00