Commit Graph

131 Commits

Author SHA1 Message Date
Ehsan Akhgari
85e673bce7 Backout changeset a72195ce0eaa (bug 612128) becasue of Fennec regressions 2011-09-22 18:09:44 -04:00
Ehsan Akhgari
ec2d83e852 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
72dee98c7b Bug 677340 - Return already_AddRefed instead of nsCOMPtr from various functions in editor/; r=ehsan 2011-08-11 15:29:59 +02:00
Mounir Lamouri
2e1dfaef9e Bug 669310 - Fixes various includes and forward declarations. f=Ms2ger r=jst 2011-07-20 12:18:54 -07:00
Ehsan Akhgari
ee5215c7a6 Revert to changeset e0ce7821fce1 because the latest push broke all of the builds DONTBUILD 2011-07-19 16:25:54 -04:00
Mounir Lamouri
5937d63965 Bug 669310 - Fixes various includes and forward declarations. f=Ms2ger r=jst 2011-07-19 11:22:43 -07:00
Mounir Lamouri
b088e154d6 Backed out bug 669310, bug 668013, bug 667887 and bug 669886 due to build bustage. 2011-07-19 10:49:48 -07:00
Mounir Lamouri
d2f5a3b4c3 Bug 669310 - Fixes various includes and forward declarations. f=Ms2ger r=jst 2011-07-18 17:05:10 -07:00
Ehsan Akhgari
a6b5feed16 Bug 671672 - Reduce a bunch of console spam in debug builds caused by the HTML editor; r=roc 2011-07-14 17:06:37 -04:00
Ehsan Akhgari
4a9dec68d7 Bug 414526 - Backspace at the beginning of a contenteditable element or delete at the end of one should not affect the rest of the contenteditable elements on the page; r=roc
The main fix here involves the introduction of the nsHTMLEditor::IsNodeInActiveEditor
API.  This API returns true if the current selection in the document falls
inside the active editable section.  The patch adds a bunch of checks using
this API to various places in the code to make sure that editing operations do
not escape their editing host.

There are also some unrelated fixes to range promotion code which fix the
bugs that have existed in that code before, but because of the lack of this
check were not uncovered before.

This patch also removes the nsTextEditUtils::InBody API which only made sense
in designMode documents, and was insufficient for contenteditable elements.
2011-07-14 11:25:07 -04:00
Ms2ger
7a41ef9f3e Bug 670499 - Make nsEditor::CreateEventListeners return void; r=ehsan 2011-07-15 12:18:35 +02:00
Jonas Sicking
cc14f402b6 Bug 663461 Part 1: Remove Add/RemoveEventListenerByIID from editor. r=smaug 2011-06-27 16:34:54 -07:00
Wolfgang Germund
db7ef51c94 Bug 664095 - Remove the override stylesheets when the editor is detached from the document as opposed to when it's destroyed for compatibility with the expected behavior from Composer; r=ehsan 2011-06-24 13:55:43 -04:00
Jonas Sicking
6a04ff1d9f Bug 658714 Part 6: Fixups after search'n'replace s/nsPIDOMEventTarget/nsIDOMEventTarget/. r=smaug 2011-06-23 19:18:01 -07:00
Jonas Sicking
e3f6b769a1 Bug 658714 Part 5: Search'n'replace nsPIDOMEventTarget to nsIDOMEventTarget. r=smaug 2011-06-23 19:18:00 -07:00
Ms2ger
c36c459144 Bug 657210 - Outparamdel nsEditor::GetPresShell; r=ehsan 2011-05-22 14:43:13 +02:00
Ms2ger
48b02e4f5a Bug 657160 - Remove NS_NewTextEditRules; r=ehsan 2011-05-15 12:16:45 +02:00
Ms2ger
63679730f9 Bug 657160 - Remove NS_NewHTMLEditRules; r=ehsan 2011-05-15 12:15:35 +02:00
Ms2ger
f828b0aa18 Bug 656996 - Remove NS_NewHTMLCSSUtils; r=ehsan 2011-05-15 12:07:30 +02:00
Ed Morley
082d53f39b Bug 655756 - Remove final XP_MAC remnants; r=josh 2011-05-10 20:24:48 +02:00
Sebastian Kromp
d80897722a Bug 633750 - deCOM nsIHTMLEditRules and move methods to nsHTMLEditRules. r=ehsan 2011-05-07 10:04:56 +02:00
David Zbarsky
5ecf0a2bd3 Bug 610305: decom nsEventStateManager r=smaug 2011-04-21 19:35:52 +02:00
Mounir Lamouri
b4cf8cd184 Backed out changeset c1a7c1bc1aeb due to busted build. 2011-04-20 22:26:06 +02:00
David Zbarsky
c4d29900ed Bug 610305: decom nsEventStateManager r=smaug 2011-04-20 21:42:33 +02:00
Benjamin Smedberg
92bd44c461 Bug 617539 - Remove branch interfaces, nsIHTMLEditor_MOZILLA_2_0_BRANCH, straight backout of revision e9d979b4b4a0, r=ehsan 2011-03-25 11:03:33 -04:00
arno renevier
0a36ca716b Bug 497115 - nsHTMLEditor.cpp contains unnecessary includes; r=peterv sr=peterv 2011-03-23 23:23:39 -04:00
Ehsan Akhgari
c06813a2c5 Bug 407127 - Part 6: Remove the presshell argument to nsIEditor::Init as it's no longer necessary; r=roc 2011-03-11 00:40:31 -05:00
Ehsan Akhgari
343b9d2aa6 Bug 407127 - Part 3: Get the selection controller for HTML editors from the presshell, instead of holding on to a presshell reference masked as a selection controller; r=roc 2011-03-11 00:40:30 -05:00
Ehsan Akhgari
6ef553932d Bug 407127 - Part 2: Refactor the editor so that it only touches mSelConWeak in GetSelectionController, to make removing it for HTML editors easier; r=roc 2011-03-11 00:40:30 -05:00
Ehsan Akhgari
586a904360 Bug 407127 - Part 1: Refactor the editor so that it only touches mPresShellWeak in GetPresShell, to make removing it easier; r=roc 2011-03-11 00:40:30 -05:00
Boris Zbarsky
890788b82e Bug 632904. Check IsEditable(), not content states, if we care about editability. r=ehsan,masayuki 2011-03-23 10:45:21 -04:00
Ehsan Akhgari
075288f489 Bug 635532 - Don't try to hide the editor anonymous UIs during the cycle collection unlink phase needlessly. r=roc,jst, a=blocker 2011-02-19 21:43:07 -08:00
Peter Van der Beken
d78216fbaf Fix for bug 633738 (quora.com bloats out of control (part 3)) - make nsHTMLEditor participate in CC, clear editor from SHistory if we're not storing anything else. r=jst, a=jst. 2011-02-16 13:07:47 +01:00
Mounir Lamouri
d33f310364 Bug 629845 (2/2) - GetRoot() returning null isn't unexpected. r=ehsan a=blocking-final 2011-02-11 02:01:49 +01:00
Ehsan Akhgari
2337dae8c9 Back out bug 612128 because it regressed Fennec with bug 618357, which blocks Fennec beta3; a=blocking-fennecb3+ 2010-12-10 21:20:00 -05:00
Ehsan Akhgari
7b0059c6db Bug 612128 - Part 4: Use the read-write state to find the selection root of the editor; r=roc a=bz 2010-12-06 14:27:14 -05:00
Ehsan Akhgari
30e6f309f2 Bug 612128 - document.execCommand("inserthtml") may insert HTML inside non-editable parts of a document; r=roc,bz a=bz 2010-11-16 15:45:49 -05:00
Ehsan Akhgari
a3f2856505 Bug 613823 - Don't attach multiple mutation observers to the document in case the HTML editor reinitializes; r=roc a=blocking-final+ 2010-12-08 21:44:15 -05:00
Ehsan Akhgari
bf6b8a80c8 Bug 612447 - Part 2: Protect the HTML editor from dying while a mutation event handler is in progress; r=bzbarsky a=blocking-beta8 2010-11-18 16:01:12 -05:00
Ehsan Akhgari
d921d70f6f Bug 612447 - Don't Recreate an editor object attached to a document in a frame if that frame is restyled; r=bzbarsky a=blocking-beta8+ 2010-11-18 16:01:12 -05:00
Ehsan Akhgari
2c680fd98b Bug 612565 - Don't recurse into document modification listeners for editable documents if the modification to the document is made on the bogus BR node; r=roc a=blocking-beta8+
This fixes an unresponsive script dialog error for Etherpad pages (possibly among other websites).
2010-11-16 15:43:46 -05:00
Ehsan Akhgari
00d37a174f Bug 611182 - Part 7: Don't notify the edit rules object for document modifications outside of the editable area; r=bzbarsky a=blocking-beta8+ 2010-11-13 15:12:15 -05:00
Ehsan Akhgari
9cd1d8318f Bug 611182 - Part 6: Actually allow the bogus node to be deleted from the document, and check if the parent is modifiable when inserting an element to prevent a bogus node being inserted under a contenteditable="false" element; r=bzbarsky a=blocking-beta8+
This fixes a failure in layout/reftests/bugs/579985-1.html, and is tested by it.
2010-11-12 10:38:14 -05:00
Ehsan Akhgari
8376c423de Bug 611182 - Part 3: Handle dynamic changes to the editable documents and create/remove the bogus node if needed; r=bzbarsky a=blocking-beta8+ 2010-11-11 16:40:52 -05:00
Ehsan Akhgari
0908325de2 Bug 551704 - Part 5: Move breakIsVisible to nsIHTMLEditor_MOZILLA_2_0_BRANCH to make sure that nsIHTMLEditor does not change for Gecko 2.0; r=bzbarsky a=blocking-betaN+
This patch should be backed out on trunk when Gecko 2.0 has been branched.
2010-11-09 21:00:26 -05:00
Ehsan Akhgari
844dd2ffc0 Bug 551704 - Part 3: Don't copy invisible BR nodes to the clipboard for editable elements, to make us more compatible with WebKit and Opera; r=bzbarsky a=blocking-betaN+ 2010-11-06 18:49:26 -04:00
Ehsan Akhgari
26b56e6566 Bug 542317 - Caret missing when an iframe is put into design mode when it already has focus; r=roc a=blocking-final+ 2010-10-29 12:30:52 -04:00
Ehsan Akhgari
a3d62c2955 Bug 603292 - PRUint32 countU < 0 is useless in nsHTMLEditor::AddNewStyleSheetToList; r=roc a=bsmedberg 2010-10-12 18:30:41 -04:00
Mounir Lamouri
66067bcb7b Bug 595036 (2/2) - Introduce nsEventStates class to represent event states. r+a=bz 2010-10-20 13:26:32 +02:00
Ehsan Akhgari
8a6a073e4c Bug 582138 - Crash [@ nsHTMLEditor::GetElementOrigin] with mixed HTML and MathML table; r,a=roc 2010-08-25 20:20:32 -04:00