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

8460 Коммитов

Автор SHA1 Сообщение Дата
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Jonathan Watt ef1290712d Bug 1452170 follow-up - Fix Windows unified build bustage by adding missing AutoRestore.h includes. r=me on CLOSED TREE 2018-04-09 10:21:42 +01:00
Makoto Kato 6c2bc77ccf Bug 1451972 - Remove more nsIDOMDocument usages from editor. r=masayuki
We should not use nsIDOMDocument if unnecessary. Because it needs QI to access
nsIDocument.

MozReview-Commit-ID: CMF3tmvBTB9

--HG--
extra : rebase_source : e832023be8d59a2c1e01bd423e6f058b0708dfe9
2018-04-06 14:53:05 +09:00
Boris Zbarsky 88937275cc Bug 1449631 part 9. Remove nsIDOMEventTarget::AddEventListener. r=smaug
Also switch the XPCOM-y version of EventTarget::AddEventListner to a
Nullable<bool> for aWantsUntrusted.

The three-arg overload of AddEventListener in ContentFrameMessageManager was
never called, so all the AddEventListener overloads there are not needed.

MozReview-Commit-ID: 4IhqHmPVWzE
2018-04-05 13:42:42 -04:00
Boris Zbarsky 1dce94cf16 Bug 1449631 part 2. Remove nsIDOMEventTarget::RemoveEventListener. r=smaug
We can't have a null content in
ScrollbarActivity::StopListeningForScrollAreaEvents, because only viewport
frames have a null GetContent().

MozReview-Commit-ID: 9iAg0ivVqqG
2018-04-05 13:42:40 -04:00
Nicholas Nethercote 4b941e22d0 Bug 1449395 - Remove unnecessary nsStaticAtom.h includes. r=froydnj
For nsCSSAnonBoxes.cpp, nsCSSPseudoElements.cpp, nsDirectoryService.cpp, the
corresponding .h file includes nsStaticAtom.h. For the other files in this
patch, nsStaticAtom.h is not needed at all.

MozReview-Commit-ID: IpMmbXwZHhu

--HG--
extra : rebase_source : 46d0a6b40a41ee233adad7c205cf907fa27de34a
2018-03-29 09:08:54 +11:00
Masayuki Nakano 5b5492e588 Bug 1435123 - HTMLEditor::GetBlock() has to specify given ancestor limit node to HTMLEditor::GetBlockNodeParent() r=m_kato
This is a simple bug of internal API of HTMLEditor.  HTMLEditor::GetBlock()
tries to retrieve nearest ancestor block node (including itself) of a node.
HTMLEditor::GetBlock() may have ancestor limiter typically it's active
editing host to prevent to modify editing host or its ancestor accidentally.

However, it forgets to call HTMLEditor::GetBlockNodeParent() with the given
ancestor limit node.  Therefore, if editing host is an inline element and
its parent is a block element, the editing host is split accidentally.

MozReview-Commit-ID: Ermmxdnk4KB

--HG--
extra : rebase_source : c9b57c5bb28cd63b6f16702317f7ddb7fb5a26f6
2018-03-29 18:57:57 +09:00
Ciure Andrei 5d841a3421 Merge inbound to mozilla-central. a=merge 2018-03-30 01:06:18 +03:00
Neil Deakin 6a995d0462 Bug 1448018, remove ContainerBoxObject which is only used to access the docshell, but bug 1448018 made the docshell accessible from the frameloader instead so the container box object is no longer being used. Change some editor tests which just access the docShell directly rather than through the box object, r=bz 2018-03-29 10:44:52 -04:00
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
Jonathan Watt 68e78b291f Bug 1449321 - Remove the IsServo and IsGecko methods from the style system code. r=emilio
--HG--
extra : source : 763277b299e42d8ee7eafede027ee690b66a7a2a
2018-03-23 16:01:34 +00:00
Masayuki Nakano ec04470e25 Bug 1448876 - Get rid of nsIClipboardDragDropHooks and nsIClipboardDragDropHookList interfaces r=bz
nsIClipboardDragDropHooks and nsIClipboardDragDropHookList allow XUL apps
to customize drag and drop operation and paste operation.  However, this
feature was used only by ChatZilla and it doesn't work on Gecko anymore.
So, we can get rid of them from our tree.

MozReview-Commit-ID: Ibs3V1gI8Ry

--HG--
extra : rebase_source : 83428293d59aaca432d76c71b214aa7799f7f9de
2018-03-26 23:56:53 +09:00
Bogdan Tara 39d9b048b9 Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-03-27 12:16:26 +03:00
Bogdan Tara 302a55b534 Merge inbound to mozilla-central. a=merge 2018-03-27 12:12:57 +03:00
Boris Zbarsky df07d2d834 Bug 1447890 part 5. Remove nsISelection::RemoveAllRanges. r=mystor
MozReview-Commit-ID: EeMje9KW6An
2018-03-27 00:35:23 -04:00
Boris Zbarsky 74e28b0d19 Bug 1447890 part 2. Remove nsISelection::RemoveRange. r=mystor
MozReview-Commit-ID: JXq5FYNNXPJ
2018-03-27 00:35:22 -04:00
Boris Zbarsky 54d1f87ff4 Bug 1447890 part 1. Remove nsISelection::AddRange. r=mystor
MozReview-Commit-ID: 1JNLZp7tbII
2018-03-27 00:35:22 -04:00
Boris Zbarsky 1731f12f9d Bug 1447889 part 9. Remove nsIDOMRange::CompareBoundaryPoints. r=mystor
MozReview-Commit-ID: 29swD9AoqoF
2018-03-27 00:35:21 -04:00
Boris Zbarsky 3906df8d57 Bug 1447889 part 8. Remove nsIDOMRange::SelectNode/SelectNodeContents. r=mystor
MozReview-Commit-ID: 2hbF6pT31Xd
2018-03-27 00:35:21 -04:00
Jonathan Watt 82ebebe276 Bug 1448714 - Fix up comments referring to 'style context' after the rename of nsStyleContext. r=emilio 2018-03-23 13:49:21 +00:00
Masayuki Nakano 10bbfadf8f Bug 1448780 - Get rid of nsIEditor.numberOfUndoItems and nsIEditor.numberOfRedoItems r=m_kato
nsIEditor.numberOfUndoItems and nsIEditor.numberOfRedoItems are shortcut
property for nsITransactionManager.numberOfUndoItems and
nsITransactionManager.numberOfRedoItems of the editor.  However, anybody
uses nsITransactionManager directly.  So, we can get rid of them.

MozReview-Commit-ID: 70J0bsxDNCC

--HG--
extra : rebase_source : fd0847687fe595b257b0256a5f1faa5f2df5f972
2018-03-26 18:11:06 +09:00
Masayuki Nakano 52cffc3290 Bug 1447924 - part 7: Implement AddTransactionListener() and RemoveTransactionListener() in EditorBase and TransactionManager r=m_kato
nsITransactionListener::AddListener() and
nsITransactionListener::RemoveListener() are of course virtual methods.
Additionally, they are safe to call without grabbing the TransactionManager's
instance with local variable.  Therefore, if EditorBase has methods to
add/remove transaction listener to/from its transaction manager, we don't
need EditorBase::GetTransactionManager() anymore.

So, this patch adds AddTransactionListener() and RemoveTransactionListener() to
EditorBase and TransactionManager, and remove
EditorBase::GetTransactionManager() (not nsIEditor's one).

MozReview-Commit-ID: FkPa1YgfagD

--HG--
extra : rebase_source : 8ef7796136804e3d7604c5ca5417fb3379606b93
2018-03-23 18:55:56 +09:00
Masayuki Nakano f882fa6959 Bug 1447924 - part 6: Implement EnableUndoRedo(), DisableUndoRedo() and ClearUndoRedo() in EditorBase and TransactionManager r=m_kato
nsIEditor::EnableUndo() and nsITransactionManager::Clear(),
nsITransactionManager::SetMaxTransactionCount() are called a lot but they are
virtual and some of or all of them are called once.  There should be each
non-virtual method to do what each root caller wants.  Therefore, this patch
adds EditorBase::EnableUndoRedo(), EditorBase::DisableUndoRedo(),
EditorBase::ClearUndoRedo(), TransactionManager::EnableUndoRedo(),
TransactionManager::DisableUndoRedo() and TransactionManager::ClearUndoRedo().

Note that this patch makes TransactionManager won't clear mUndoStack nor
mRedoStack if mDoStack is not empty.  This is checked only by
TransactionManager::SetMaxTransactionCount() but according to the comment,
TransactionManager::Clear(), TransactionManager::UndoStack() and
TransactionManager::RedoStack() should check it too.

MozReview-Commit-ID: 6qBZOQNwdhw

--HG--
extra : rebase_source : 3249137f7acca0b4698713ab732774140bcc27e8
2018-03-23 15:25:13 +09:00
Masayuki Nakano a1f13e5b38 Bug 1447924 - part 5: Merge TextEditor::Undo()/Redo() with EditorBase::Undo()/Redo() r=m_kato
EditorBase::Undo() and EditorBase::Redo() implement only undo/redo function.
TextEditor::Undo() and TextEditor::Redo() call them with calling some
notification methods.  However, this causes redundant AutoRules instance
creation and doesn't make sense to separate them under current design.

Therefore this patch merges them into TextEditor.  Unfortunately, they are
XPCOM methods but we cannot implement proper overloads of non-virtual since
they are already minimized design.  Fortunately, reducing only one virtual
call per undo/redo isn't so effective.  So, let's keep simpler design.

Additionally, this patch makes them stop committing composition because
Chrome does not commit composition even if "undo"/"redo" is requested with
execCommand() during composition and it doesn't make sense to try to
undo/redo after committing composition since first undoable transaction
becomes the committing composition and committing composition causes
removing all transactions from redo transaction queue.

MozReview-Commit-ID: 78qlV2I9Lzk

--HG--
extra : rebase_source : 545c787d47fe02bf7e085be9d3ae028816750e69
2018-03-23 01:21:17 +09:00
Masayuki Nakano 6273aa5604 Bug 1447924 - part 4: Optimize NumbeOfUndoItems(), NumbeOfRedoItems(), CanUndo() and CanRedo() of EditorBase r=m_kato
Now, both TransactionManager.h and TransactionStack.h are exposed.  So,
TransactionManager::GetNumberOfUndoItems() and
TransactionManager::GetNumberOfRedoItems() can be rewritten with non-virtual
inline methods because they just return mUndoStack.GetSize() and
mRedoStack.GetSize().  Then, we can implement EditorBase::NumbeOfUndoItems(),
EditorBase::NumberOfRedoItems(), EditorBase::CanUndo() and
EditorBase::CanRedo() as inline methods.

MozReview-Commit-ID: 3CJd0VrlvFY

--HG--
extra : rebase_source : 6848d80a395f1c161e10bfb50d15bd63de288095
2018-03-23 00:08:38 +09:00
Masayuki Nakano 0f92a44d6b Bug 1447924 - part 3: Rename nsTransactionStack to mozilla::TransactionStack r=m_kato
Then, all classes in editor/txmgr is now in mozilla namespace and all
headers which are included by other directory are now exposed.  So,
we can remote local includes from other directories now.

MozReview-Commit-ID: Kdb1c4Hp9Sy

--HG--
rename : editor/txmgr/nsTransactionStack.cpp => editor/txmgr/TransactionStack.cpp
rename : editor/txmgr/nsTransactionStack.h => editor/txmgr/TransactionStack.h
extra : rebase_source : 75035e9e618680af9188820595ab050b612a456f
2018-03-22 23:30:48 +09:00
Masayuki Nakano 01bb2a5690 Bug 1447924 - part 2: Rename nsTransactionItem to mozilla::TransactionItem r=m_kato
MozReview-Commit-ID: 5EmFPCaRYWm

--HG--
rename : editor/txmgr/nsTransactionItem.cpp => editor/txmgr/TransactionItem.cpp
rename : editor/txmgr/nsTransactionItem.h => editor/txmgr/TransactionItem.h
extra : rebase_source : 3d5e39b26dc077bb63f7d39542a42cb3d06b6b21
2018-03-22 23:07:36 +09:00
Masayuki Nakano c525b695b9 Bug 1447924 - part 1: Rename nsTransactionManager to mozilla::TransactionManager r=m_kato
We should rename nsTransactionManager to mozilla::TransactionManager before
adding new non-virtual methods.

MozReview-Commit-ID: JsivNVfDhex

--HG--
rename : editor/txmgr/nsTransactionManager.cpp => editor/txmgr/TransactionManager.cpp
rename : editor/txmgr/nsTransactionManager.h => editor/txmgr/TransactionManager.h
rename : editor/txmgr/nsTransactionManagerFactory.cpp => editor/txmgr/TransactionManagerFactory.cpp
extra : rebase_source : ff5bf76fec8be8f6a1202c17d488cf6c607d8f03
2018-03-22 22:15:54 +09:00
Masayuki Nakano 537b829474 Bug 1447213 - Change editor methods which take |const EditorRawDOMPoint&| but called with EditorDOMPoint.AsRaw() to template methods r=m_kato
A lot of methods take |const EditorRawDOMPoint&| as their argument.  However,
some of them are called with EditorDOMPoint::AsRaw(). This is not good for
performance because:
1. Needs to create temporary instance of EditorRawDOMPoint.
2. EditorRawDOMPoint::AsRaw() may be used by simple mistake.
3. Such methods may call EditorRawDOMPoint::Offset(), however, it's not copied
   to the original EditorDOMPoint instance.  So, callers may need to compute
   offset again.

So, such methods should be changed to template methods if they are not virtual
method and AsRaw() should be gotten rid of for prevent it looking not expensive.

MozReview-Commit-ID: DAqqW4a2EMS

--HG--
extra : rebase_source : 120b920477fe6e7231271411a00994325acdb842
2018-03-20 14:05:47 +09:00
Emilio Cobos Álvarez e341b20ec4 Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt on a CLOSED TREE
MozReview-Commit-ID: JPopq0LudD
2018-03-22 20:06:24 +01:00
Emilio Cobos Álvarez 5dd797f154 Back out changeset b683bb3f22a1 (Bug 1447483) for not landing with all the files. r=me on a CLOSED TREE
This reverts commit 1808914126bb9f9e4a82d2c3d7ac961885fe7d62.

MozReview-Commit-ID: 5skESBseEvo
2018-03-22 20:05:22 +01:00
Emilio Cobos Álvarez ca5ac79cca Bug 1447483: Merge nsStyleContext and ServoStyleContext, rename to ComputedStyle. r=jwatt
MozReview-Commit-ID: JPopq0LudD
2018-03-22 19:48:42 +01: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
Xidorn Quan 4cf9aed667 Bug 1449400 part 5 - Remove StyleSetHandle. r=emilio
This patch basically does:
* remove StyleSetHandle and its corresponding files
* revisit #includes of related header files and change correspondingly
* change nsIPresShell::mStyleSet to be UniquePtr<ServoStyleSet>
* change the creating path of ServoStyleSet to pass UniquePtr
* change other mentions of StyleSetHandle to ServoStyleSet*
* remove AsServo() calls on ServoStyleSet

Some unfortunate bits:
* some methods of (Servo)StyleSet only accepts ServoStyleSheet while
  many places call into the methods with StyleSheet, so there are many
  ->AsServo() added to sheets

MozReview-Commit-ID: K4zYnuhOurA

--HG--
extra : rebase_source : 459e8efeb171adad089d94272e143e8c244bd279
extra : source : 65ba2f174fcf7dba4e59c00ee8908b1bd0820a48
2018-03-29 22:15:46 +11:00
Boris Zbarsky 5b0b5358d6 Bug 1446527 part 6. Remove nsIDOMUIEvent. r=qdot
MozReview-Commit-ID: 7GbifGJQUtQ
2018-03-26 14:53:03 -04:00
Boris Zbarsky 18b01d00a3 Bug 1446527 part 3. Remove nsIDOMUIEvent::AsEvent. r=qdot
MozReview-Commit-ID: 9KqSXRUIc8G
2018-03-26 14:53:02 -04:00
Boris Zbarsky 35a72f73ba Bug 1446527 part 2. Remove nsIDOMUIEvent::GetDetail. r=qdot
MozReview-Commit-ID: GlTgti53Akj
2018-03-26 14:53:02 -04:00
Boris Zbarsky f0bc98f232 Bug 1446527 part 1. Remove rangeParent/rangeOffset members from nsIDOMUIEvent. r=qdot
MozReview-Commit-ID: 86cMORXSV9u
2018-03-26 14:53:02 -04:00
Emilio Cobos Álvarez f7522ae728 Bug 1447358: Unifdef the old style system code. r=jwatt
Summary:
This has been automatically generated using:

  http://dotat.at/prog/unifdef/

And:

find $OBJDIR -type f -name '*.h' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

find $OBJDIR -type f -name '*.cpp' |
while read FILE; do
  echo "$FILE"
  unifdef -m -DMOZ_STYLO -UMOZ_OLD_STYLE "$FILE";
done

MozReview-Commit-ID: I4NdKqbMXzJ

Reviewers: jwatt

Bug #: 1447358

Differential Revision: https://phabricator.services.mozilla.com/D779
2018-03-21 10:20:34 +01:00
Makoto Kato d0832ccf7e Bug 1444630 - Don't update dictionary after calling UninitSpellChecker. r=masayuki
When calling UninitSpellChecker during calling UpdateDictionary, this crash
occurs.  Since Thunderbird calls UninitSpellChecker by [Recheck Text] button,
this only occurs on Thunderbird.

After calling UninitSpellChecker, we should not update dictionary.

MozReview-Commit-ID: K4SPJ5FDo8n

--HG--
extra : rebase_source : d760c6472f56cef520c399e8c1f20536c3a22e36
2018-03-20 14:27:06 +09:00
shindli e83f4555ad Backed out changeset f76b3a9e3005 (bug 1444630) for failures in Z:/task_1521542418/build/tests/reftest/tests/editor/libeditor/crashtests/1444630.html on a CLOSED TREE 2018-03-20 14:03:13 +02:00
Makoto Kato fda0617389 Bug 1444630 - Don't update dictionary after calling UninitSpellChecker. r=masayuki
When calling UninitSpellChecker during calling UpdateDictionary, this crash
occurs.  Since Thunderbird calls UninitSpellChecker by [Recheck Text] button,
this only occurs on Thunderbird.

After calling UninitSpellChecker, we should not update dictionary.

MozReview-Commit-ID: K4SPJ5FDo8n

--HG--
extra : rebase_source : 67fa439e2a4767502ca84095754150d513a939b2
extra : amend_source : 1b065ebe275cefc02809478eb7d6d807f19dbbee
2018-03-20 14:27:06 +09:00
Makoto Kato 06aaef4673 Bug 1443664 - Form control might not have non-chrome only content. r=smaug 2018-03-20 16:22:39 +09:00
Boris Zbarsky 837dc7eaaa Bug 1446711 part 8. Get rid of nsIDOMMouseEvent. r=qdot
MozReview-Commit-ID: 2FK1MA4LGZj
2018-03-20 00:16:07 -04:00
Boris Zbarsky dcaa6d2614 Bug 1446711 part 5. Get rid of nsIDOMMouseEvent::GetButton. r=qdot
MozReview-Commit-ID: AZWzObh01uI
2018-03-20 00:16:06 -04:00
Boris Zbarsky f982b572f8 Bug 1446711 part 2. Get rid of nsIDOMMouseEvent::GetClientX/Y. r=qdot
MozReview-Commit-ID: DqMhK4wajH5
2018-03-20 00:16:05 -04:00
Andreea Pavel 7062e6b6a2 Merge mozilla-inbound to mozilla-central. a=merge 2018-03-20 00:39:56 +02:00
Boris Zbarsky c4a9eb60ff Bug 1446533 part 10. Remove remaining nsIDOMCharacterData uses in editor. r=mystor
MozReview-Commit-ID: CfZNQRiDs43
2018-03-19 15:45:55 -04:00
Boris Zbarsky d243dbaa39 Bug 1446533 part 9. Remove nsIDOMCharacterData::ReplaceData. r=mystor
MozReview-Commit-ID: Lei6xZ2rw2K
2018-03-19 15:45:34 -04:00
Boris Zbarsky e7e7401bc3 Bug 1446533 part 8. Remove nsIDOMCharacterData::DeleteData. r=mystor
MozReview-Commit-ID: 7100YyU5jOG
2018-03-19 15:45:31 -04:00