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

26 Коммитов

Автор SHA1 Сообщение Дата
Makoto Kato 8c5d5f7c30 Bug 1449147 - Clean up more nsIDOMNode usages in editor. r=masayuki
To reduce QI, I would like to replace nsIDOMNode with nsINode.  And some
parameters in *DataTransder.cpp's methods is unused (it uses as nullptr),
so we should remove these parameters.

Also nsIDOMNodeList is unused now, so we should remove this including.

MozReview-Commit-ID: 1QTIkxDazjJ

--HG--
extra : rebase_source : 3961e897fcaa96975facc822821f1e223cab358d
2018-03-27 20:19:35 +09:00
Boris Zbarsky 29d232e53f Bug 1447098 part 1. Rename FromContent on various DOM classes to FromNode. r=mystor
MozReview-Commit-ID: 202nkbmkwfR
2018-03-21 17:39:04 -04:00
Boris Zbarsky 4e402f9b99 Bug 1445983. <bdi> should be an HTMLElement, not HTMLUnknownElement. r=hsivonen
MozReview-Commit-ID: 9eJ45uXRDfR
2018-03-16 11:26:09 -04: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 4d88c28e4d Bug 1432186 part 17. Remove nsIDOMNode's parentNode attribute. r=mccr8
MozReview-Commit-ID: 4xzDwwEqnvE
2018-01-29 23:10:52 -05:00
Masayuki Nakano 36d48397f0 Bug 1408125 - part 4: Redesign HTMLEditor::InsertNodeAtPoint() with EditorRawDOMPoint r=m_kato
HTMLEditor::InsertNodeAtPoint() should take |const EditorRawDOMPoint&| as
an argument which specifies point to insert.  Additionally, it should take
|EditorDOMPoint*| to return the next point of actual insertion point.

Additionally, this patch renames it to InsertNodeAtProperAncestor() for
explaining what it will do.

MozReview-Commit-ID: HYUzSlyPxAd

--HG--
extra : rebase_source : 57033cdc4458b45a5fe9d6aa642c185133a79304
2017-11-28 22:28:07 +09:00
Olli Pettay af3373dc1d Bug 1418002 - Remove HTMLContentElement, r=jessica 2017-11-30 10:57:15 +02:00
Masayuki Nakano f802692190 Bug 1411687 - part 2: Rewrite the check to insert a <br> element in HTMLEditRules::WillInsertBreak() r=m_kato
Currently, HTMLEditRules::WillInsertBreak() checks if the editing host can
contain a <p> element as a child or a descendant.  However, this is not enough.
If an inline element has a block element which can contain a <p> element,
current implementation considers to insert a <br>.  This is possible when
* The editing host is an unknown element including user defined element.
* The editing host is an inline element and its children and/or descendants
  were added by JS.  E.g., <span contenteditable> element can have <div>
  element.

I think that we should consider to insert a <br> element when:
- There is no block ancestors in the editing host.
- The editing host is the only block element and it cannot contain <p> element
  or the default paragraph separator is <br> element.
- The nearest block ancestor isn't a single-line container declared in the
  execCommand spec and there are no block elements which can contain <p>
  element.

Note that Chromium checks if CSS box of ancestors is block too.  However,
it must be out of scope of this bug.

MozReview-Commit-ID: HdjU9t83Nd1

--HG--
extra : rebase_source : 7030671268a610613359b5d8ae5d126e120f59bd
2017-10-27 01:27:44 +09:00
Nicholas Nethercote d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Olli Pettay 657d54de19 Bug 1402941 - Add HTMLSlotElement (disabled for now), r=hsivonen
--HG--
extra : rebase_source : ced3d844425bee6fddd22641646a7366ffd5d69e
2017-10-02 13:22:12 +03:00
Sebastian Hengst 72d1ea4a4b merge mozilla-central to autoland. r=merge a=merge 2017-09-27 11:49:57 +02:00
Kyle Machulis a3876f104a Bug 1389650 - Remove nsIDOMHTMLAnchorElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLAnchorElement, replacing it
with binding class usage.

MozReview-Commit-ID: 7v0bKlY7Fax
2017-09-26 11:41:28 -07:00
Sebastian Hengst 5ed0b93c50 Backed out changeset 26805294a547 (bug 1389650) 2017-09-26 10:47:41 +02:00
Nicholas Nethercote dfd3b7e7aa Bug 1400459 (part 2) - Devirtualize nsIAtom. r=heycam.
This patch merges nsAtom into nsIAtom. For the moment, both names can be used
interchangeably due to a typedef. The patch also devirtualizes nsIAtom, by
making it not inherit from nsISupports, removing NS_DECL_NSIATOM, and dropping
the use of NS_IMETHOD_. It also removes nsIAtom's IIDs.

These changes trigger knock-on changes throughout the codebase, changing the
types of lots of things as follows.

- nsCOMPtr<nsIAtom> --> RefPtr<nsIAtom>

- nsCOMArray<nsIAtom> --> nsTArray<RefPtr<nsIAtom>>
  - Count() --> Length()
  - ObjectAt() --> ElementAt()
  - AppendObject() --> AppendElement()
  - RemoveObjectAt() --> RemoveElementAt()

- ns*Hashtable<nsISupportsHashKey, ...> -->
  ns*Hashtable<nsRefPtrHashKey<nsIAtom>, ...>

- nsInterfaceHashtable<T, nsIAtom> --> nsRefPtrHashtable<T, nsIAtom>
  - This requires adding a Get() method to nsRefPtrHashtable that it lacks but
    nsInterfaceHashtable has.

- nsCOMPtr<nsIMutableArray> --> nsTArray<RefPtr<nsIAtom>>
  - nsArrayBase::Create() --> nsTArray()
  - GetLength() --> Length()
  - do_QueryElementAt() --> operator[]

The patch also has some changes to Rust code that manipulates nsIAtom.

MozReview-Commit-ID: DykOl8aEnUJ

--HG--
extra : rebase_source : 254404e318e94b4c93ec8d4081ff0f0fda8aa7d1
2017-09-26 08:33:21 +10:00
Kyle Machulis e2ace7d91f Bug 1389650 - Remove nsIDOMHTMLAnchorElement; r=bz
Removes the XPCOM interface for nsIDOMHTMLAnchorElement, replacing it
with binding class usage.

MozReview-Commit-ID: 7v0bKlY7Fax
2017-09-25 23:12:44 -07:00
Olli Pettay c80e124562 Bug 1396584 - Remove support for multiple ShadowRoots, r=mrbkap
--HG--
extra : rebase_source : 2bb600ed1ffd35c195617a7eb70d0ba847a46898
2017-09-25 18:09:26 +03:00
Nicholas Nethercote cea0a3af5d Bug 1400777 (part 1) - Remove eHTMLTags. r=mrbkap.
It's just a too-cute-by-half typedef for nsHTMLTag.

--HG--
extra : rebase_source : 142128de90c3bed06648db445ca0159c23ea6ff3
2017-09-19 11:07:49 +10:00
Kyle Machulis d812ac4e87 Bug 1279218 - Additional applet tag logic removal; r=bz
I've been having problems with interdiffs on mozreview lately, so for
ease of review, this patch is being submitted as a seperate patch for
review. Once it is r+'d, it will be folded into the first patch in
this set before landing.

MozReview-Commit-ID: CS9MngaXlBd

--HG--
extra : rebase_source : 6a86fd4f7a66e73497a756976a2562d183002a2a
2017-07-28 16:44:39 -07:00
David Major ed12ea611f Bug 1346078: Remove nsAString_internal and just use the nsAString name directly. r=bsmedberg
MozReview-Commit-ID: DWDEDMIVKm7

--HG--
extra : rebase_source : 7fe8dc07c816dca234c67761e61cdee372a87e97
2017-03-10 15:17:23 +13:00
Makoto Kato 2c1a2f9f2c Bug 1344116 - Clean up HTMLEditRules::RemoveAlignment. r=masayuki
Before I will fix some justify* command's bug, I would like to clean up HTMLEditRules::RemoveAlignment to get rid of nsIDOM* into this method.

MozReview-Commit-ID: 4UATycS5iBl

--HG--
extra : rebase_source : 7079a774b4b8359aeffbdbdf2efe0b45bd92c173
2017-03-03 13:13:21 +09:00
Tim Nguyen d7db347638 Bug 1322938 - Basic implementation of HTMLDialogElement. r=smaug, masayuki
MozReview-Commit-ID: AU92mq2QZIc
2016-12-23 16:01:50 +01:00
Masayuki Nakano 6bc92def07 Bug 1311240 Fix odd "{" and "}" of control statements in editor for conforming to our coding rules r=smaug
Currently, editor code uses following style (or similar style) in a lot of places:

if (foo)
{

}
else
{

}

This patch fixes this as conforming to our coding rules, i.e., it becomes:

if (foo) {

} else {

}

Additionally, this fixes other odd control statements in the files which include above issue because it's difficult to find following issues with searching the files:

* if (foo) bar;
* if (foo) { bar; }
* if (foo)
    bar;

Finally, if it becomes much simpler than current code, this patch rewrites existing code with "early return style". But this case is only a few places because this is risky.

MozReview-Commit-ID: 2Gs26goWXrF

--HG--
extra : rebase_source : 603f9003a3566b3203bdeb27dc73ac33502d2853
2016-10-24 11:27:45 +09:00
Masayuki Nakano fb4dd2591f Bug 1260651 part.61 Replace "etc" with "etc." r=mccr8
MozReview-Commit-ID: JFgd0t2bqzu
2016-07-08 14:15:21 +09:00
Masayuki Nakano f382711dc3 Bug 1260651 part.59 Rename nsEditor to mozilla::EditorBase (and also their file names) r=mccr8
This patch also renames:

EditorInputEventDispatcher -> mozilla::EditorInputEventDispatcher

And some variable names are renamed from aEditor or mEditor to aEditorBase or mEditorBase for making their types clearer.

MozReview-Commit-ID: 2FCXWpLMn8e

--HG--
rename : editor/libeditor/nsEditor.cpp => editor/libeditor/EditorBase.cpp
rename : editor/libeditor/nsEditor.h => editor/libeditor/EditorBase.h
2016-07-08 13:10:13 +09:00
Masayuki Nakano 379230116b Bug 1260651 part.16 Rename nsHTMLEditUtils to mozilla::HTMLEditUtils (and their files too) r=mccr8
MozReview-Commit-ID: DABzQHszB0c

--HG--
rename : editor/libeditor/nsHTMLEditUtils.cpp => editor/libeditor/HTMLEditUtils.cpp
rename : editor/libeditor/nsHTMLEditUtils.h => editor/libeditor/HTMLEditUtils.h
2016-07-07 14:01:12 +09:00