Commit Graph

976 Commits

Author SHA1 Message Date
Ehsan Akhgari
d50878a182 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
5a93134139 Bug 752304 - Logic error in nsHTMLEditor::SetInlinePropertyOnNodeImpl; r=ehsan 2012-05-07 08:54:54 +03:00
Aryeh Gregor
ba69aaa763 Bug 700538 part 4 - Remove now-redundant nsHTMLEditor::IsNodeInActiveEditor; r=ehsan 2012-05-06 10:53:11 +03:00
Aryeh Gregor
c2fb29a4a2 Bug 700538 part 3 - Add and use new EditorRoot methods in nsEditor; r=ehsan 2012-05-06 10:53:11 +03:00
Aryeh Gregor
3309c31f9c Bug 700538 part 2 - Make methods that return editing hosts return dom::Element* instead of nsIContent*; r=ehsan 2012-05-06 10:53:11 +03:00
Aryeh Gregor
3af9ba928a Bug 700538 part 1 - Name some nsEditor methods more consistently; r=ehsan 2012-05-01 13:01:28 +03:00
Aryeh Gregor
80c985d67f Bug 751547 - Unify action enums in editor/; r=ehsan 2012-05-05 21:52:29 +03:00
Ms2ger
c5dcfd1bc7 Bug 751323 - Cleanup nsHTMLEditRules::RemoveEmptyNodes(); r=ehsan 2012-05-05 11:00:06 +02:00
Ms2ger
125c939be4 Bug 750103 - Cleanup nsEditor::EndOfDocument(); r=ehsan 2012-05-05 11:00:06 +02:00
Ms2ger
4df91dc293 Bug 750062 - Assert preconditions in IsVisTextNode; r=ehsan 2012-05-05 11:00:06 +02:00
Ms2ger
9abc05b1d6 Bug 750085 - Pass nsIContent to SetInlinePropertyOnNodeImpl and use nsINode APIs to iterate over children; r=ehsan 2012-05-05 11:00:06 +02:00
Ms2ger
d266e823ac Bug 750079 - Part c: Pass nsIContent to nsHTMLEditor::HasAttrVal; r=ehsan 2012-05-05 11:00:06 +02:00
Ms2ger
e873c43701 Bug 750079 - Part b: Return nsIContent from GetPriorHTMLSibling/GetNextHTMLSibling; r=ehsan 2012-05-05 11:00:06 +02:00
Ms2ger
3296a0d96c Bug 750079 - Part a: Add IsOnlyAttribute(nsIContent*, const nsAString&); r=ehsan 2012-05-05 11:00:06 +02:00
Ms2ger
f051ed6486 Bug 749329 - Cleanup TypeInState; r=ehsan 2012-05-05 11:00:06 +02:00
Ms2ger
552a17939d Bug 750064 - Add some GetPriorNode/GetNextNode overloads that take nsINode; r=ehsan 2012-05-05 11:00:05 +02:00
Ms2ger
c9da5bbd81 Bug 750063 - Allow passing null to nsTextEditRules::CreateMozBR's outparam; r=ehsan 2012-05-05 11:00:05 +02:00
Ms2ger
3c8b660b66 Bug 747346 - Cleanup nsTextEditRules::CreateTrailingBRIfNeeded(); r=ehsan 2012-05-05 11:00:05 +02:00
Aryeh Gregor
e61ab6cba6 Bug 748313 part 2 - Always try to use CSS values, even for collapsed selections; r=ehsan 2012-05-03 10:09:44 +03:00
Aryeh Gregor
0d8f909e57 Bug 748313 part 1 - Remove unused argument to nsHTMLEditor::IsTextPropertySetByContent; r=ehsan 2012-05-03 10:09:44 +03:00
Aryeh Gregor
a685451510 Bug 746915 part 1 - Move editing-related tests to editor/ directories; r=ehsan
--HG--
rename : content/html/content/test/test_bug408231.html => editor/libeditor/base/tests/test_bug408231.html
rename : content/html/document/test/test_bug742261.html => editor/libeditor/base/tests/test_bug742261.html
rename : content/html/document/test/test_bug404320.html => editor/libeditor/html/tests/test_bug404320.html
rename : content/html/document/test/test_bug468353.html => editor/libeditor/html/tests/test_bug468353.html
rename : layout/reftests/bugs/388980-1-ref.html => layout/reftests/editor/388980-1-ref.html
rename : layout/reftests/bugs/388980-1.html => layout/reftests/editor/388980-1.html
2012-05-03 10:09:44 +03:00
Aryeh Gregor
01a3e98230 Bug 748303 part 3 - Convert (Tag)CanContain(Tag) to nsIAtom*; r=ehsan 2012-05-01 09:34:52 +03:00
Aryeh Gregor
a949fda3e3 Bug 748303 part 2 - Handle non-text/elements correctly when calling (Tag)CanContain(Tag); r=ehsan 2012-05-01 09:34:52 +03:00
Aryeh Gregor
6c188dd4ba Bug 748303 part 1 - Clean up various nsHTMLEditRules methods; r=ehsan 2012-05-01 09:34:52 +03:00
Jared Wein
1504e6e3d5 Bug 702463 - Increasing the timeout of the tests due to the presence of multiple refresh drivers. r=ehsan 2012-04-30 13:44:55 -04:00
Graeme McCutcheon
b0e48d2258 Followup nit for bug 740784. r=ehsan 2012-04-26 09:16:51 +01:00
Graeme McCutcheon
aeeaf3d425 Followup nit for bug 686203 - comment change. r=ehsan DONTBUILD 2012-04-26 08:54:20 +01:00
Graeme McCutcheon
09036b4c86 No bug - annoying comment typo in nsEditorEventListener.cpp DONTBUILD 2012-04-26 08:51:10 +01:00
Aryeh Gregor
3f9b2b76b7 Bug 743819 - Only re-spellcheck new nodes on insertions, not everything; r=ehsan 2012-04-25 08:56:32 +03:00
Masayuki Nakano
ba56663cd3 Bug 630811 part.2 Replace nsInputEvent::isShift, nsInputEvent::isControl, nsInputEvent::isAlt and nsInputEvent::isMeta r=smaug 2012-04-25 12:00:02 +09:00
Ehsan Akhgari
9780e4893b Bug 748223 - Pack nsEditor better; r=roc 2012-04-24 00:54:11 -04:00
Ehsan Akhgari
5cd881d802 Backed out changeset 3e6ca2158274 because of build bustage 2012-04-24 12:16:34 -04:00
Ehsan Akhgari
bd4140a99d Bug 748223 - Pack nsEditor better; r=roc 2012-04-24 00:54:11 -04:00
Aryeh Gregor
4836ea0495 Bug 480647 part 6 - Handle CSS in execCommand("fontSize"); r=ehsan 2012-04-24 13:57:49 +03:00
Aryeh Gregor
20a2a54fec Bug 480647 part 5 - Reject invalid values from execCommand("fontSize"); r=ehsan 2012-04-24 13:57:46 +03:00
Aryeh Gregor
72210acfc9 Bug 480647 part 3 - Clean up nsHTMLCSSUtils::GenerateCSSDeclarationsFromHTMLStyle; r=ehsan 2012-04-24 13:57:23 +03:00
Aryeh Gregor
6ed928a21d Bug 599983 part 2 - Don't emit or process _moz_dirty more than necessary; r=ehsan,bz 2012-04-24 09:06:11 +03:00
Aryeh Gregor
fc86041529 Bug 599983 part 1 - Clean up nsEditor::MarkNodeDirty; r=ehsan 2012-04-24 09:06:11 +03:00
Ehsan Akhgari
06098487ea Merge mozilla-central into birch 2012-04-22 16:10:35 -04:00
Ehsan Akhgari
3f561f1dad Merge mozilla-central into birch 2012-04-20 13:50:08 -04:00
Aryeh Gregor
0650854ffc Bug 746515 part 5 - Only add style="" to empty <span>s; r=ehsan 2012-04-20 09:33:21 +03:00
Aryeh Gregor
c88905cdb1 Bug 746515 part 4 - Remove styles more aggressively in execCommand(); r=ehsan 2012-04-20 09:33:21 +03:00
Aryeh Gregor
0b381d6886 Bug 746515 part 3 - Remove empty <font> as well as <span>; r=ehsan 2012-04-20 09:33:21 +03:00
Aryeh Gregor
e79cf28e11 Bug 746515 part 2 - Clean up nsHTMLEditor::SetInlinePropertyOnNode; r=ehsan 2012-04-20 09:33:21 +03:00
Aryeh Gregor
64e8d1742b Bug 746515 part 1 - Clean up nsHTMLEditor::SetInlineProperty; r=ehsan 2012-04-20 09:33:21 +03:00
Ehsan Akhgari
b0555ad014 Merge mozilla-central into birch 2012-04-19 10:03:36 -04:00
Ehsan Akhgari
d83ac53fa5 Bug 745494 - Hide the anonymous editing UI before its too late; r=roc a=blocking 2012-04-18 20:10:49 -04:00
Aryeh Gregor
65ad808232 Bug 745723 - Only store known fails in currentStatus.js for richtext2, like for richtext; r=ehsan 2012-04-18 17:26:03 +03:00
Aryeh Gregor
b14caf2251 Bug 317093 part 4 - Use computed style for command state even if styleWithCSS is false; r=ehsan 2012-04-18 17:26:02 +03:00
Aryeh Gregor
ced3d028f4 Bug 317093 part 3 - Clean up nsHTMLEditor::GetInlinePropertyBase; r=ehsan 2012-04-18 17:26:02 +03:00