Commit Graph

665 Commits

Author SHA1 Message Date
Aryeh Gregor
4d5c547aa9 Bug 590640 part 1 - Clean up some nsHTMLEditRules methods; r=ehsan 2012-05-09 08:24:07 +03:00
Aryeh Gregor
81df634941 Bug 756045 - Turn "ASSERTION: anonymous nodes should not be in child lists" into an NS_WARNING; r=bz 2012-05-18 09:20:49 +03:00
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
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
c9da5bbd81 Bug 750063 - Allow passing null to nsTextEditRules::CreateMozBR's outparam; 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
aeeaf3d425 Followup nit for bug 686203 - comment change. r=ehsan DONTBUILD 2012-04-26 08:54:20 +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
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
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
Aryeh Gregor
01b6da4885 Bug 480647 part 1 - Clean up nsHTMLCSSUtils::IsCSSEquivalentToHTMLInlineStyleSet; r=ehsan 2012-04-17 20:50:19 +03:00
Aryeh Gregor
4f420966ed Bug 745701 part 2 - Strip existing styles more aggressively in execCommand(); r=ehsan 2012-04-17 20:50:19 +03:00
Aryeh Gregor
c6845c0002 Bug 745701 part 1 - Clean up nsHTMLEditor::RemoveStyleInside; r=ehsan 2012-04-17 20:50:19 +03:00
Aryeh Gregor
12ce571ca9 Bug 745528 - execCommand() should apply style="" to only inline elements, not blocks; r=ehsan 2012-04-17 20:50:19 +03:00
Aryeh Gregor
6469be6f64 Bug 205485 - execCommand("backcolor") should work the same as execCommand("hilitecolor"); r=ehsan 2012-04-17 18:37:40 +03:00
Graeme McCutcheon
d7d8932ab4 Bug 686203 - nsHTMLEditorEventListener's MouseDown listener should disregard events outwith its editor. Also fixes bug 578771. r=ehsan a=blassey 2012-04-13 13:52:12 +01:00
Aryeh Gregor
bf8e85b2d4 Bug 738385 part 2 - queryCommand*() should not throw for commands that don't support them; r=ehsan 2012-04-06 10:42:54 +03:00
Aryeh Gregor
1cd223ec12 Bug 279330 part 2 - execCommand("hilitecolor") should work even in non-CSS mode; r=ehsan 2012-04-17 13:18:08 +03:00
Ms2ger
1316ee9afc Bug 744507 - Part b: Add nsINode versions in GetPriorHTMLSibling/GetNextHTMLSibling; r=ehsan 2012-04-14 15:09:38 +02:00
Ms2ger
974d88e1f3 Bug 744507 - Part a: Preparatory cleanup in GetPriorHTMLSibling/GetNextHTMLSibling; r=ehsan 2012-04-14 15:09:21 +02:00
Ms2ger
f14df3792d Bug 742884 - Part c: Cleanup nsHTMLEditRules::GetListState; r=ehsan 2012-04-14 15:08:26 +02:00
Ms2ger
8299fe6b09 Backing out bf0a78471e5e:dc7022e2d807 for inexplicable windows crashes. 2012-04-14 17:52:34 +02:00
Ms2ger
42cf123f28 Bug 744507 - Part b: Add nsINode versions in GetPriorHTMLSibling/GetNextHTMLSibling; r=ehsan 2012-04-14 15:09:38 +02:00
Ms2ger
60f0986073 Bug 744507 - Part a: Preparatory cleanup in GetPriorHTMLSibling/GetNextHTMLSibling; r=ehsan 2012-04-14 15:09:21 +02:00
Ms2ger
14a2cebd8b Bug 742884 - Part c: Cleanup nsHTMLEditRules::GetListState; r=ehsan 2012-04-14 15:08:26 +02:00
Graeme McCutcheon
50f21a7314 Bug 578771 testcase. r=ehsan a=test 2012-04-19 15:50:53 +01:00
Ehsan Akhgari
7d2ff5e146 Bug 743632 - Fix nsHTMLEditor::GetNextHTMLSibling to return the correct node; r=roc
--HG--
extra : rebase_source : 360c3800e8546aeb9e2ec0946127a85ae1155d56
2012-04-09 12:46:28 -04:00
Aryeh Gregor
920d308617 Bug 317093 part 2 - execCommand() should remove <strong>, <em>, and <s> as well as <b>, <i>, <strike>; r=ehsan 2012-04-04 14:47:13 +03:00
Aryeh Gregor
d9615bb1fb Bug 317093 part 1 - Avoid spurious UNEXPECTED-FAILs in test_richtext2 when fixing expected fails; r=ehsan 2012-04-04 14:46:04 +03:00
Aryeh Gregor
1aa75aa3d9 Bug 316447 - execCommand("insertHorizontalRule") should not set height/width; r=ehsan 2012-04-04 13:47:36 +03:00
Ehsan Akhgari
124634b2dc Bug 741734 - Fire the paste event when pasting without formatting; r=roc 2012-04-03 13:41:04 -04:00
Ehsan Akhgari
f7a38030b2 Backed out changeset afff429aaf9a because of bad commit message 2012-04-03 17:47:34 -04:00
Ehsan Akhgari
90d053cb5e commit cf0f05533cc23ba918e81ac3669449813799fe9f
Author: Ehsan Akhgari <ehsan.akhgari@gmail.com>
    Bug 741734 - Fire the paste event when pasting without formatting; r=roc
2012-04-03 13:41:04 -04:00
Aryeh Gregor
2c1ee92a02 Bug 738366 - Default styleWithCSS to false; r=ehsan 2012-04-03 17:16:05 +03:00
Masayuki Nakano
ada065ae94 Bug 739557 Set focus to editing host and use document.getSelection().collapse() for setting caret to edit target; r=ehsan 2012-03-29 09:10:22 -07:00
Mike Conley
4e49af0a00 Bug 746993 - Fix editor caret behaviour when pressing RETURN after a BR node. r=ehsan, a=tracking-firefox 2012-04-20 12:57:17 -04:00
Masayuki Nakano
2ab8e3fb4a Bug 668606 input event should be fired on all editors r=ehsan+smaug, sr=smaug 2012-03-27 10:36:44 +09:00
aceman
8e5d9b42ce 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
d33003e285 Bug 732585 - Drag and drop images into message window is broken; r=roc 2012-03-26 09:04:06 -07:00
Ms2ger
a033505149 Bug 738771 - Outparamdel nsEditor::GetDocument(); r=ehsan 2012-03-24 09:19:14 +01:00
Henri Sivonen
f2d3f89eb7 Bug 737417 part 1 - Split charset source constants out of nsIParser.h. r=smaug. 2012-03-22 16:42:42 +02:00
Aryeh Gregor
0d0dc77101 Bug 735805 - Part 2: Fix editor mochitest that runs no tests. r=ehsan 2012-03-16 16:07:16 -04:00
Neil Deakin
f9547aff6d 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
82c137d953 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
Aryeh Gregor
aeeb5ee819 Bug 735059 - Second and third execCommand() parameters should be optional; r=ehsan 2012-03-12 18:12:19 -04:00
Jacob Holzinger
acfe99c129 Bug 696242 - Convert NS_RegisterStaticAtoms and nsCSSScanner::ReportUnexpectedParams to take an array-reference rather than a pointer and length, making it impossible to pass a pointer/length that are inconsistent. r=jwalden
--HG--
extra : rebase_source : 882b5b4d500b1fa242c0a3cfa3084e4171cbaa9d
2012-03-08 18:22:57 -08:00
Serge Gautherie
06584f5688 Bug 732792. (Av1) test_bug674770-2.html: Set "middlemouse.contentLoadURL" preference too. r=ehsan. 2012-03-06 18:14:44 +01:00
aceman
a39be24188 Bug 368758 - Remove obsolete workaround pref editor.quotesPreformatted. r=ehsan 2012-03-02 17:23:01 -05:00
Neil Deakin
4f1314899a Bug 499008, part 7, merge html drag type constants into one place, r=ehsan 2012-02-17 09:17:00 -05:00
Neil Deakin
3a318c367e Bug 499008, part 5, merge the text and html implementations of InsertFromDrop, r=ehsan 2012-02-17 09:16:59 -05:00
Neil Deakin
ed4ec92cee 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
de5e8ee45b Bug 499008, part 2, move editor dragstart handling to ContentAreaDragDrop, r=ehsan 2012-02-17 09:16:59 -05:00
Neil Deakin
cc12e59fdf Bug 499008, part 1, remove spurious event checks drop editor drag handling, r=ehsan 2012-02-17 09:16:59 -05:00
Rafael Ávila de Espíndola
208be36c6c Bug 727221 - mark LastDictionary and nsElementDeletionObserver final. r=ehsan. 2012-02-16 09:39:57 -05:00
Daniel Holbert
706eb31699 Bug 458167 patch 6: s/it's/its/ in comments within editor. r=ehsan 2012-02-15 01:18:24 -08:00
Ms2ger
6788cc4bff Bug 724270 - Part b: Use nsINode in GenerateCSSDeclarationsFromHTMLStyle / GetCSSEquivalentToHTMLInlineStyleSet and callers; r=ehsan 2012-02-10 11:04:47 +01:00
Ms2ger
523de6f68f Bug 724270 - Part a: Add an nsINode overload of GetCSSInlinePropertyBase; r=ehsan 2012-02-10 11:04:47 +01:00
Ms2ger
b8ad0423eb Bug 724269 - Add nsHTMLCSSUtils::IsCSSEditableProperty(nsIContent*); r=ehsan 2012-02-10 11:04:47 +01:00
Ms2ger
160b2fe892 Bug 724268 - Simplify nsHTMLCSSUtils::GetDefaultViewCSS; r=ehsan 2012-02-10 11:04:47 +01:00
Ms2ger
d9f537650b Bug 724266 - Add dom::Element* nsHTMLCSSUtils::GetElementContainerOrSelf(nsINode* aNode); r=ehsan 2012-02-10 11:04:46 +01:00
Ms2ger
c3393d42fb Bug 724264 - Consolidate code that checks whether an element has a non-_moz_dirty attribute; r=ehsan 2012-02-10 11:04:46 +01:00
Ms2ger
2cea69e795 Bug 724261 - Use nsINode in nsHTMLEditRules::RelativeChangeIndentationOfElementNode; r=ehsan 2012-02-10 11:04:46 +01:00
Ms2ger
1cd3020364 Bug 723232 - nsHTMLEditRules::RelativeChangeIndentationOfElementNode removes divs with any one attribute; r=ehsan 2012-02-10 11:04:46 +01:00
Ms2ger
7612237b23 Bug 724260 - Add nsHTMLEditRules::IsInListItem(nsINode* aNode); r=ehsan 2012-02-10 11:04:46 +01:00
Ms2ger
4edb97bb95 Bug 724259 - Add nsHTMLEditor::IsNodeInActiveEditor(nsINode* aNode); r=ehsan 2012-02-10 11:04:46 +01:00
Ms2ger
a83254f675 Bug 723252 - Various nsHTMLEditor cleanup; r=ehsan 2012-02-10 11:04:46 +01:00
Ehsan Akhgari
a802e7dffa Bug 725069 - Never mark the comment nodes as editable; r=roc 2012-02-07 18:39:05 -05:00
Panagiotis Koutsourakis
791aa57b19 Bug 702388 - Convert Makefiles to use |TEST_DIRS += foo| r=khuey
Files named Makefile.in containing the expression

DIRS += <foo>
or
DIRS = <foo>

inside the conditional expression

ifdef ENABLE_TESTS
...
endif

are changed to

TEST_DIRS += tests

outside any conditional expression.

The files

./layout/Makefile.in
./layout/Makefile.in
./layout/style/Makefile.in
./rdf/Makefile.in
./security/manager/Makefile.in
./content/Makefile.in
./content/smil/Makefile.in
./content/xul/templates/Makefile.in
./content/xul/content/Makefile.in
./content/base/Makefile.in
./content/media/Makefile.in
./parser/htmlparser/Makefile.in
./dom/sms/Makefile.in
./js/jsd/Makefile.in
./js/xpconnect/Makefile.in
./widget/Makefile.in
./widget/windows/Makefile.in
./Makefile.in
./startupcache/Makefile.in
./storage/Makefile.in
./gfx/Makefile.in
./intl/strres/Makefile.in
./intl/uconv/Makefile.in
./intl/unicharutil/Makefile.in
./intl/lwbrk/Makefile.in
./embedding/Makefile.in
./modules/libjar/Makefile.in
./modules/libpref/Makefile.in
./build/Makefile.in
./build/win32/Makefile.in
./xpcom/Makefile.in
./extensions/spellcheck/hunspell/Makefile.in
./extensions/cookie/Makefile.in
./netwerk/Makefile.in
./netwerk/streamconv/Makefile.in
./editor/txmgr/Makefile.in
./toolkit/mozapps/shared/Makefile.in
./toolkit/mozapps/update/Makefile.in
./toolkit/library/Makefile.in
./toolkit/library/Makefile.in
./toolkit/crashreporter/Makefile.in
./toolkit/components/perf/Makefile.in
./toolkit/components/perf/Makefile.in
./toolkit/components/feeds/Makefile.in
./toolkit/components/url-classifier/Makefile.in

contain the string

ifdef ENABLE_TESTS

but have some other statement inside (e.g. TOOL_DIRS += <foo> etc) and
they remain unchanged by this patch.
2012-02-04 17:32:24 +00:00