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

5093 Коммитов

Автор SHA1 Сообщение Дата
Boris Zbarsky 034e47c66b Bug 1436508 part 12. Remove nsIDOMKeyEvent. r=masayuki
MozReview-Commit-ID: 8giqG5iHiIf
2018-02-09 11:17:10 -05:00
Boris Zbarsky fce30e834b Bug 1436508 part 10. Remove use of nsIDOMKeyEvent in JS. r=masayuki
MozReview-Commit-ID: GGciORX62Yh
2018-02-09 11:17:09 -05:00
Masayuki Nakano 1165b53e10 Bug 1436295 - HTMLEditRules::WillInsertBreak() should cancel resetting EditorDOMPoint when HTMLEditRules::ReturnInParagraph() splits DOM node around the point r=m_kato
This patch only fixes warning, not changing actual behavior of editor.

HTMLEditRules::ReturnInParagraph() splits paragraph *around* given point.
Therefore, from point of view of caller, offset of setting point may be
invalid after HTMLEditRules::ReturnInParagraph() handled the edit action.
In this case, invalidating stored child of the point may cause warning
since offset may be larger than length of its container.

So, if HTMLEditRules::ReturnInParagraph() handles the edit action,
the caller, HTMLEditRules::WillInsertBreak(), should cancel invalidating
the stored child for avoiding unnecessary warning.

MozReview-Commit-ID: DKJlr0Awwlo

--HG--
extra : rebase_source : 8fbefff3b46e55daf8db6342f00de904315d7fcc
2018-02-07 19:04:52 +09:00
shindli 0fcb667b73 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-02-08 12:13:08 +02:00
Makoto Kato 6e437ccf06 Bug 1436272 - Move noscript methods in nsIEditor to EditorBase. r=masayuki
Since We can use EditorBase/TextEditor/HTMLEditor directly,  we can
movei noscript methods in nsIEditor to each class.

Also, Init is unnecessary to use nsIDOMDocument and nsIContent since method
isn't in IDL.  And some methods are unused now.

MozReview-Commit-ID: D3B6oSlcT0L

--HG--
extra : rebase_source : 6cab2e6e7b4ba8cfb56d8320be24ca4afcbe55fb
extra : amend_source : 1d8c59086a9158a49dd270b64ecf8341ed4002ce
2018-02-07 15:28:04 +09:00
Masayuki Nakano aa44284d56 Bug 1436216 - EditorBase::CreateElement() should call RangeUpdater::SelAdjCreateNode() with point of new element r=m_kato
Before bug 1425091, we called RangeUpdater::SelAdjCreateNode() with point of
new node in EditorBase::CreateElement().  However, it was accidentally changed
to point *in* new element.  Therefore, setting such DOM point causes warnings
in debug build and call of RangeUpdater::SelAdjCreateNode() must be failed
since the point stores wrong container node.

Additionally, this patch stops using another EditorRawDOMPoint instance which
is just redundant and renames |ret| to |newElement| for making its meaning
clearer.

MozReview-Commit-ID: Gc0YgaNLYcx

--HG--
extra : rebase_source : c2fbe2669ca8a5993e26b357f53dc38341fd6bf6
2018-02-07 16:27:55 +09:00
Ciure Andrei 0b674adee4 Backed out changeset 86581d5ccbbb (bug 1436272) for failing /builds/worker/workspace/build/src/editor/libeditor/EditorBase.cpp a=backout on a CLOSED TREE 2018-02-08 04:54:47 +02:00
Makoto Kato b845e3128e Bug 1436272 - Move noscript methods in nsIEditor to EditorBase. r=masayuki
Since We can use EditorBase/TextEditor/HTMLEditor directly,  we can
movei noscript methods in nsIEditor to each class.

Also, Init is unnecessary to use nsIDOMDocument and nsIContent since method
isn't in IDL.  And some methods are unused now.

MozReview-Commit-ID: D3B6oSlcT0L

--HG--
extra : rebase_source : b89698f4ab56fdd97a4cd8c515a8b33f6a74a7af
2018-02-07 15:28:04 +09:00
Andrew McCreight 5dec0e0beb Bug 1432992, part 1 - Remove definitions of Ci, Cr, Cc, and Cu. r=florian
This patch was autogenerated by my decomponents.py

It covers almost every file with the extension js, jsm, html, py,
xhtml, or xul.

It removes blank lines after removed lines, when the removed lines are
preceded by either blank lines or the start of a new block. The "start
of a new block" is defined fairly hackily: either the line starts with
//, ends with */, ends with {, <![CDATA[, """ or '''. The first two
cover comments, the third one covers JS, the fourth covers JS embedded
in XUL, and the final two cover JS embedded in Python. This also
applies if the removed line was the first line of the file.

It covers the pattern matching cases like "var {classes: Cc,
interfaces: Ci, utils: Cu, results: Cr} = Components;". It'll remove
the entire thing if they are all either Ci, Cr, Cc or Cu, or it will
remove the appropriate ones and leave the residue behind. If there's
only one behind, then it will turn it into a normal, non-pattern
matching variable definition. (For instance, "const { classes: Cc,
Constructor: CC, interfaces: Ci, utils: Cu } = Components" becomes
"const CC = Components.Constructor".)

MozReview-Commit-ID: DeSHcClQ7cG

--HG--
extra : rebase_source : d9c41878036c1ef7766ef5e91a7005025bc1d72b
2018-02-06 09:36:57 -08:00
Narcis Beleuzu 84cea84b12 Merge inbound to mozilla-central. a=merge 2018-02-06 11:54:42 +02:00
Makoto Kato 2768bda89d Bug 1435149 - Part 2. Use scope resolution operator for CSSEditUtils's caller. r=masayuki
Part 1. changes to static method, so caller should use scope operator instead
of mCSSEditUtils member.

MozReview-Commit-ID: GlCfyjlQgr0

--HG--
extra : rebase_source : f558fc833d5f3cb193a543fc1b05cdeb58f60ec1
extra : histedit_source : 741529204d2dddef0f2dab9e18055186155eca8f
2018-02-02 18:42:25 +09:00
Makoto Kato 55fce07048 Bug 1435149 - Part 1. Change some methods to static or const method in CSSEditUtils. r=masayuki
Some methods in CSSEditUtils can change to static methods or const method.
So we should change to it to avoid unnecessary HTMLEditor check.

MozReview-Commit-ID: IwAbeNsgqSr

--HG--
extra : rebase_source : 649f198a59e06504a9e54cb64ab942ce04854ad2
extra : histedit_source : f4506dbdf8f9ccb614aca8f84aff1d572f0ce37e
2018-02-06 12:57:37 +09:00
Masayuki Nakano 283dfdf558 Bug 1434969 - EditorDOMPointBase::RewindOffset() shouldn't treat it as error if offset is same as length of the container r=m_kato
EditorDOMPointBase::RewindOffset() treats it as error when offset is
same as length of container.  However, this is wrong because offset can
be same as length of its container since it means after the last child
or last character.  So, if an instance points end of a container node,
Rewind() always fails unexpectedly.

MozReview-Commit-ID: A9bvsxETDoo

--HG--
extra : rebase_source : f05994f2924adaa29711da3916f431688eaa79b7
2018-02-04 01:00:44 +09:00
Eric Rahm d563f447dc Bug 1434789 - Part 1: Remove unnecessary nsSubstringTuple.h includes. r=froydnj
--HG--
extra : rebase_source : 66b1950fe3cad1c04c901c8c39d135802ae3ccf7
2018-01-31 16:47:43 -08:00
Makoto Kato 6194942f78 Bug 1433849 - Remove unused methods in nsIHTMLAbsPosEditor. r=masayuki
The following methods are unused in m-c, c-c and bluegriffon from JavaScript.

- selectionContainerAbsolutelyPositioned
- absolutelyPositionedSelectionContainer
- absolutePositionSelection
- relativeChangeZIndex
- absolutelyPositionElement
- setElementPosition
- getElementZIndex
- setElementZIndex
- relativeChangeElementZIndex
- showGrabberOnElement
- hideGrabber

So let't remove these method from IDL.

MozReview-Commit-ID: JASJmB65wR2

--HG--
extra : rebase_source : a7c3cdf0ea96ec7b81bed7573c57d6040033d01b
2018-02-01 10:55:25 +09:00
Florian Quèze 2b1c8dccb6 Bug 1339461 - script-generated patch to convert foo.indexOf(...) == -1 to foo.includes(), r=Mossop. 2018-02-01 20:45:22 +01:00
Boris Zbarsky 7a9f022f1a Bug 1434819 part 7. Remove the SHOW_* constants from nsIDOMNodeFilter. r=qdot
MozReview-Commit-ID: 7E2KZkLfbSI
2018-02-01 14:26:12 -05:00
Boris Zbarsky 59795295d1 Bug 1434819 part 6. Get rid of NodeFilterHolder. r=qdot
Now that TreeWalker and NodeIterator only use webidl APIs, they always have a
NodeFilter, not nsIDOMNodeFilter.

MozReview-Commit-ID: 5pzn9V3Kxzy
2018-02-01 14:26:12 -05:00
Boris Zbarsky 72cdddcc61 Bug 1434686 part 3. Use IgnoreErrors() outside of dom/. r=mystor
I left some IgnoredErrorResults for now where people warn on failure.  We could
consider adding a WarnOnError() thing or something.

MozReview-Commit-ID: L5ttZ9CGKg0
2018-02-01 14:21:14 -05:00
Cameron McCormack d02e54b79b Bug 1430014 - Part 5: Stop building old style system classes when MOZ_OLD_STYLE is not defined. r=xidorn
MozReview-Commit-ID: CIHyPdF7Exl

--HG--
extra : source : 78a2fc781eead47af3923efcde58569c5d882ab1
2018-02-01 15:04:04 +11:00
Cameron McCormack cc7db5c40c Bug 1430014 - Part 4: #ifdef out unnecessary code when the old style system is not built. r=xidorn
MozReview-Commit-ID: 1FZ9VzjcPzN

--HG--
extra : source : de22d220635f8c059834b76f769d5215ab1a8b5b
2018-02-01 15:04:04 +11:00
Boris Zbarsky a514705917 Bug 1434318 part 7. Remove nsIDOMDocument::GetElementsBy* methods. r=mystor
MozReview-Commit-ID: CnfelWtz0mT
2018-01-31 15:18:10 -05:00
Boris Zbarsky 4c01bdc27f Bug 1428610 part 7. Make the nsICSSDeclaration length API nicer. r=emilio
MozReview-Commit-ID: 2gs8npBJFJY
2018-01-30 14:48:27 -05:00
Kris Maglione 918ed6c474 Bug 1431533: Part 5a - Auto-rewrite code to use ChromeUtils import methods. r=florian
This was done using the following script:
37e3803c7a/processors/chromeutils-import.jsm

MozReview-Commit-ID: 1Nc3XDu0wGl

--HG--
extra : source : 12fc4dee861c812fd2bd032c63ef17af61800c70
extra : intermediate-source : 34c999fa006bffe8705cf50c54708aa21a962e62
extra : histedit_source : b2be2c5e5d226e6c347312456a6ae339c1e634b0
2018-01-29 15:20:18 -08:00
Makoto Kato 76358fc558 Bug 1434171 - Clean up CheckSelectionStateForAnonymousButtons. r=masayuki
Since CheckSelectionStateForAnonymousButtons is called from selection listener,
We should reduce some QI for this.

MozReview-Commit-ID: 17hhupmnnV5

--HG--
extra : rebase_source : 81ed7f844033f75e5fcf1d8983a45804f0b9544f
2018-01-30 13:42:52 +09:00
Boris Zbarsky afe966f041 Bug 1418085 part 1. Stop using nsIDOMHTMLElement in editor code. r=mystor
MozReview-Commit-ID: 6J0wWzMCfWP
2018-01-30 00:25:36 -05:00
Cosmin Sabou 9a65a40178 Backed out 3 changesets (bug 1431533) for Android mochitest failures on testEventDispatcher on a CLOSED TREE
Backed out changeset a1eca62826a1 (bug 1431533)
Backed out changeset 34c999fa006b (bug 1431533)
Backed out changeset e2674287e57f (bug 1431533)
2018-01-30 07:17:48 +02:00
Boris Zbarsky 8c61d57bca Bug 1276438 part 6. Stop using nsIDOMHTMLDocument::GetBody. r=mystor
MozReview-Commit-ID: EcDTnByuZsm
2018-01-26 00:53:35 -05:00
Boris Zbarsky fba82e4ebc Bug 1432977 part 3. Remove nsIDOMHTMLElement's offsetWidth/Height attributes. r=mccr8
MozReview-Commit-ID: EoSwBkeGj60
2018-01-29 23:40:11 -05:00
Boris Zbarsky 548d16d0b1 Bug 1432977 part 2. Remove nsIDOMHTMLElement's spellcheck attribute. r=mccr8
MozReview-Commit-ID: B07hMx3LAed
2018-01-29 23:37:57 -05:00
Boris Zbarsky e565b1fe1b Bug 1432944 part 11. Remove nsIDOMElement::GetAttribute. r=mccr8
MozReview-Commit-ID: 2f1vFvRdCPG
2018-01-29 23:28:00 -05:00
Boris Zbarsky b61aa11d01 Bug 1432944 part 8. Remove usage of nsIDOMElement::HasAttribute in editor code. r=m_kato
MozReview-Commit-ID: 926Dzqv7Oj4
2018-01-29 23:27:59 -05:00
Boris Zbarsky a6f9dbf34e Bug 1432944 part 6. Remove the nsIDOMNode overloads of HTMLEditUtils::IsNamedAnchor and HTMLEditUtils::IsTable. r=m_kato
MozReview-Commit-ID: 4KlppKdzJGy
2018-01-29 23:27:59 -05:00
Boris Zbarsky 423c0886df Bug 1432944 part 5. Remove the now-unused nsIDOMNode overload of HTMLEditUtils::IsLink. r=m_kato
MozReview-Commit-ID: CDnYK194JB9
2018-01-29 23:27:59 -05:00
Boris Zbarsky 7bfc306103 Bug 1432944 part 4. Work with Element, not nsIDOMElement, inside HTMLEditor::GetSelectedElement. r=m_kato
MozReview-Commit-ID: 3F1rbPMgkAR
2018-01-29 23:27:59 -05:00
Boris Zbarsky fbb40001ca Bug 1432944 part 3. Take an early return from HTMLEditor::GetSelectedElement when we can. r=m_kato
MozReview-Commit-ID: EAEzpom7oXo
2018-01-29 23:27:59 -05:00
Boris Zbarsky 1fa8ecc716 Bug 1432944 part 2. Make nsIHTMLEditor.getSelectedElement return nsISupports. r=m_kato
The only C++ caller immediately QIs the result anyway, and the exact type
returned doesn't matter for JS callers because the return values are DOM
objects.  This makes it simpler to rejigger the internals to work with nsINode
and Element and whatnot.

MozReview-Commit-ID: 863IDGECqYY
2018-01-29 23:27:59 -05:00
Boris Zbarsky 7bb421fe3b Bug 1432944 part 1. Stop returning NS_EDITOR_ELEMENT_NOT_FOUND from nsIHTMLEditor::GetSelectedElement. r=m_kato
The only C++ caller doesn't care, and JS callers can't tell that a non-NS_OK success code was returned anyway.

MozReview-Commit-ID: FNhQYR0a9ur
2018-01-29 23:27:58 -05:00
Boris Zbarsky f60fd673d6 Bug 1432186 part 19. Remove the nsIDOMNode::*_NODE constants. r=mccr8
MozReview-Commit-ID: KvKjeKIOB9K
2018-01-29 23:10:53 -05:00
Boris Zbarsky 4d88c28e4d Bug 1432186 part 17. Remove nsIDOMNode's parentNode attribute. r=mccr8
MozReview-Commit-ID: 4xzDwwEqnvE
2018-01-29 23:10:52 -05:00
Boris Zbarsky 37aaea3c1f Bug 1432186 part 16. Remove nsIDOMNode's ownerDocument attribute. r=mccr8
MozReview-Commit-ID: JqfAFxPBz41
2018-01-29 23:10:52 -05:00
Boris Zbarsky 9525cabcc3 Bug 1432186 part 15. Remove nsIDOMNode::HasChildNodes. r=mccr8
MozReview-Commit-ID: GFc2sv4E7b2
2018-01-29 23:10:51 -05:00
Boris Zbarsky 323cec654b Bug 1432186 part 13. Remove nsIDOMNode's nextSibling attribute. r=mccr8
MozReview-Commit-ID: DTaivhMORXr
2018-01-29 23:10:51 -05:00
Boris Zbarsky 97302665b4 Bug 1432186 part 12. Remove nsIDOMNode's previousSibling attribute. r=mccr8
MozReview-Commit-ID: 7UJFaxEnT9Q
2018-01-29 23:10:51 -05:00
Boris Zbarsky e2ce75877d Bug 1432186 part 11. Remove nsIDOMNode's firstChild attribute. r=mccr8
MozReview-Commit-ID: 5jCdAmSuPx8
2018-01-29 23:10:51 -05:00
Boris Zbarsky 96697d35fe Bug 1432186 part 10. Remove nsIDOMNode's lastChild attribute. r=mccr8
MozReview-Commit-ID: FhJs1MXAyeO
2018-01-29 23:10:51 -05:00
Boris Zbarsky eb9faa9b79 Bug 1432186 part 6. Remove nsIDOMNode::RemoveChild. r=mccr8
MozReview-Commit-ID: 9ZbIEIRtYPL
2018-01-29 23:10:50 -05:00
Boris Zbarsky abfab07da3 Bug 1432186 part 5. Remove nsIDOMNode's nodeType attribute. r=mccr8
MozReview-Commit-ID: LKsBgKcqtBS
2018-01-29 23:10:50 -05:00
Boris Zbarsky c646473558 Bug 1432186 part 3. Remove nsIDOMNode's nodeName attribute. r=mccr8
MozReview-Commit-ID: Jg0Tuvdi6uX
2018-01-29 23:10:50 -05:00
Boris Zbarsky e9880ecc58 Bug 1432186 part 2. Clean up the string handling in HTMLURIRefObject::GetNextURI. r=mccr8
MozReview-Commit-ID: DB3pSrA9ffy
2018-01-29 23:10:50 -05:00