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

75 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 7540d08d90 Bug 1556799 - Remove manual NAC as soon as parent chain changes. r=masayuki
Having NAC bound to the tree when not connected is not quite fine, make sure to
clean up properly.

Differential Revision: https://phabricator.services.mozilla.com/D33704

--HG--
extra : moz-landing-system : lando
2019-06-06 01:48:10 +00:00
Emilio Cobos Álvarez 6917a38081 Bug 1555216 - Change the signature of BindToTree to be (BindContext&, nsINode& aParentNode). r=bzbarsky
BindContext was going to have way more information at first, but then I realized
that most of the things I wanted to know were basically a flag away using the
parent node.

Still I think it's worth it, now experimenting with BindToTree will only mean
adding a field to a struct that's included from a couple cpp files, instead of a
massive pain.

I also think this is clearer, and doing this highlights quite a few
inconsistencies in our code which I've left untouched, but commented with
FIXMEs.

Steps are:

$ for file in $(rg 'nsresult BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#nsresult BindToTree(Document\* aDocument, nsIContent\* aParent,#nsresult BindToTree(BindContext\&, nsINode\& aParent)#g' $file; done
$ for file in $(rg 'nsresult BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#                      nsIContent\* aBindingParent) override#override#g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#::BindToTree(Document\* aDocument, nsIContent\* aParent,#::BindToTree(BindContext\& aContext, nsINode\& aParent)#g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#nsIContent\* aBindingParent)##g' $file; done
$ for file in $(rg '::BindToTree\(' | cut -d : -f 1 | sort | uniq); do sed -i 's#::BindToTree(aDocument, aParent, aBindingParent)#::BindToTree(aContext, aParent)#g' $file; done
$ ./mach clang-format

Then manual fixups.

Depends on D32948

Differential Revision: https://phabricator.services.mozilla.com/D32949
2019-05-31 23:31:52 +02:00
Masayuki Nakano 19fbb1a392 Bug 1549925 - Mark all methods of nsIDocumentStateListener as can_run_script r=m_kato
`nsIDocumentStateListener` is a scriptable interface and each method may run
any script.  So, we should mark them as `can_run_script`.  Then, we need to
mark a lot of editing methods because we need to mark
`EditorBase::EndTransactionInternal()` and `EditorBase::DoTransactionInternal()`
as `MOZ_CAN_RUN_SCRIPT`.

Differential Revision: https://phabricator.services.mozilla.com/D30360

--HG--
extra : moz-landing-system : lando
2019-05-09 07:37:51 +00:00
Masayuki Nakano 36e5df54ec Bug 1547621 - Move all inline methods of nsIPresShell into mozilla::PresShell r=smaug
And also this patch moves some related methods which use the inline methods
and member variables used only by them.

Differential Revision: https://phabricator.services.mozilla.com/D29201

--HG--
rename : layout/base/nsIPresShellInlines.h => layout/base/PresShellInlines.h
extra : moz-landing-system : lando
2019-04-30 01:52:53 +00:00
Emilio Cobos Álvarez d8e2990d8a Bug 1535788 - Make the Document own the StyleSet. r=heycam
This is the last step to be able to call matchMedia on display: none iframes.

This is green, except for some startup preference query tests that I'm going to
address in a blocking bug (making LangGroupFontPrefs global, basically).

The setup is similar to the ShadowRoot one, except we don't eagerly keep the
StyleSet around up-to-date, we only fill it if it ever had a pres context.

Differential Revision: https://phabricator.services.mozilla.com/D23903

--HG--
extra : moz-landing-system : lando
2019-04-03 07:02:00 +00:00
Masayuki Nakano 39daaa7db8 Bug 1534561 - Make editor use PresShell directly rather than nsIPresShell r=m_kato
`PresShell.h` is exposed as `mozilla/PresShell.h` and `PresShell` is the only
concrete class of `nsIPresShell`.  Therefore, we have no reason to access
`PresShell` via `nsIPresShell`.

Differential Revision: https://phabricator.services.mozilla.com/D23277

--HG--
extra : moz-landing-system : lando
2019-03-15 05:01:10 +00:00
Masayuki Nakano 9609df9a73 Bug 1525481 - part 3: Make editor not expose internal errors to the web r=m_kato
As far as I've tested, Chrome does not throw exception even when editor is
destroyed or editor content is modified unexpectedly.  So, we should return
`NS_OK` from most public methods of editor when internal methods return
`NS_ERROR_EDITOR_DESTROYED` or `NS_ERROR_EDITOR_UNEXPECTED_DOM_TREE`.

Differential Revision: https://phabricator.services.mozilla.com/D20811

--HG--
extra : moz-landing-system : lando
2019-02-25 09:07:54 +00:00
Emilio Cobos Álvarez d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Masayuki Nakano f91716e775 Bug 1465702 - part 5: Remove unnecessary Selection argument from editor module r=m_kato
EditorBase::SelectionRefPtr() is now safe to use in editor and really fast to
retrieve Selection than EditorBase::GetSelection().  Therefore, we can get rid of
all Selection pointer/reference argument of each method which always take
normal Selection.

Note that this changes nsIHTMLEditor.checkSelectionStateForAnonymousButtons()
because its argument is only Selection.  So, BlueGriffon should work even
though it calls the method with nsIEditor.selection.

Differential Revision: https://phabricator.services.mozilla.com/D10009

--HG--
extra : moz-landing-system : lando
2018-10-30 10:01:38 +00:00
Masayuki Nakano 41166eca5f Bug 1465702 - part 4: Make public methods of HTMLEditor create AutoEditActionDataSetter if necessary r=m_kato
Differential Revision: https://phabricator.services.mozilla.com/D10008

--HG--
extra : moz-landing-system : lando
2018-10-30 10:00:17 +00:00
Masayuki Nakano 63856d6d6e Bug 1485929 - Create HTMLEditor::RefreshInlineTableEditingUIInternal() for internal use r=m_kato
HTMLEditor::RefreshInlineTableEditingUI() is an XPCOM method.  Therefore,
we should create a non-virtual method for internal use.

Additionally, this patch makes related methods safer for nested calls of
ShowInlineTableEditingUI() and HideInlineTableEditingUI().  If
ShowInlineTableEditingUI() and RefreshInlineTableEditingUIInternal() detects
hiding or replacing current UI, they return error to make the callers stop
handling anything for new UI.

Differential Revision: https://phabricator.services.mozilla.com/D5428

--HG--
extra : moz-landing-system : lando
2018-09-11 12:10:54 +00:00
Masayuki Nakano 9762aae24f Bug 1485921 - Create HTMLEditor::RefreshResizersInternal() for internal use r=m_kato
HTMLEditor::RefreshResizers() is an XPCOM method but it's used internally.  So,
HTMLEditor should implement it with non-virtual method and use new one for
internal use.

This patch also makes related methods nested-creation of resizers aware.  This
issue must not be dangerous, but looks like buggy.

Differential Revision: https://phabricator.services.mozilla.com/D5426

--HG--
extra : moz-landing-system : lando
2018-09-11 08:15:52 +00:00
Masayuki Nakano a527ce6536 Bug 1484136 - Create HTMLEditor::RefreshGrabberInternal() for internal use r=m_kato
HTMLEditor::RefereshGrabber() is an XPCOM method which is used by BlueGriffon.
Additionally, it's called internally.  Therefore, we should create a non-virtual
method for this and all internal users should use it.

This patch renames all other related methods to *Internal() for consistency.
Additionally, this fixes a bug of nested calls of ShowGrabber() and
HideGrabber().  This makes CreateGrabber() sets mGrabber directly since
it may be cleared by HideGrabber() while it's running, and also makes
HideGrabber() moves all members who will be cleaned up with local variables
and always clean them up even if it meats an error.

Differential Revision: https://phabricator.services.mozilla.com/D5424

--HG--
extra : moz-landing-system : lando
2018-09-11 05:30:33 +00:00
Masayuki Nakano 908ba601c1 Bug 1485925 - part 1: Create HTMLEditor::HideResizersInternal() for internal use r=m_kato
HTMLEditor::HideResizers() is an XPCOM method, so, we should create non-virtual
method for internal use.

Differential Revision: https://phabricator.services.mozilla.com/D4923

--HG--
extra : moz-landing-system : lando
2018-09-06 05:02:46 +00:00
Masayuki Nakano 3e09e244fd Bug 1485923 - Remove nsIHTMLObjectResizer.showResizers(), rename HTMLEditor::ShowResizers() to HTMLEditor::ShowResizersInternal() and merge it with HTMLEditor::ShowResizersInner() r=m_kato
First, nobody uses nsIHTMLObjectResizer.showResizers().  So, we can remove it.

Then, we have two private methods, one is non-virtual
HTMLEditor::ShowResizers(), and the other is HTMLEditor::ShowResizersInner().
HTMLEditor::ShowResizers() calls HTMLEditor::ShowResizersInner() and if
it fails, calls HideResizers().  However, in some cases, e.g., when it already
has visible resizers, hiding resizers does not make sense.

So, this patch removes non-virtual HTMLEditor::ShowResizers() method too,
then, renames HTMLEditor::ShowResizersInner() to HTMLEditor::ShowResizers(),
finally, it hides resizers only when it fails to setup resizers for keeping
resizers hidden.

Differential Revision: https://phabricator.services.mozilla.com/D4921

--HG--
extra : moz-landing-system : lando
2018-09-06 04:38:00 +00:00
Masayuki Nakano d33fe8cd6d Bug 1484110 - part 3: HTMLEditor::RefereshEditingUI() should refresh UIs when one of them is changed to enabled or disabled r=m_kato
HTMLEditor::RefereshEditingUI() works only with enabled UIs.  Therefore, if
UI is disabled while it's visible, it keeps shown.  This is too bad if web
apps tries to disable the Gecko specific UIs after we show some of them.

This patch adds HTMLEditor::HideAnonymousEditingUIsIfUnnecessary() to hide
unnecessary UIs and makes RefereshEditingUI() call it always.
2018-08-17 19:03:02 +09:00
Masayuki Nakano a24cf41019 Bug 1484110 - part 2: Rewrite HTMLEditor::HideInlineTableEditingUI() r=m_kato
First, HTMLEditor::HideInlineTableEditingUI() always returns NS_OK.  So, we
can change its return type to void.

Additionally, it removes each UI from the DOM tree one by one.  However, each
mutation could cause showing same UI again.  In such case,
ShowInlineTableEditingUI() overwrites each UI with newly created element.
Then, HTMLEditor cannot remove the old UI anymore.  Therefore, this patch
moves all members of the UI into local variables first.
2018-08-17 18:23:13 +09:00
Masayuki Nakano 7fc2bdaae1 Bug 1484110 - part 1: Create HTMLEditor::RefereshEditingUI() for internal use of nsIHTMLEditor::CheckSelectionStateForAnonymousButtons() r=m_kato
HTMLEditor::CheckSelectionStateForAnonymousButtons() is called a lot internally.
Especially, its virtual call cost may make damage to our performance since
it's called from a selection listener.

So, we should create non-virtual method, RefereshEditingUI() for internal use.
2018-08-17 17:56:28 +09:00
Masayuki Nakano 44ae690779 Bug 1449564 - part 2: Make absolute positioned element editor disabled in default and make it possible to enable it with new command r=m_kato
We have another built-in UI of editor which is not implemented by any other
browsers.  That is a draggable handler to move absolute positioned elements.
So, we should disable it in default for compatibility with the other browsers.

However, different from resizers and inline table editor, we don't have
command to enable/disable this feature but for backward compatibility, we
should have it.  Therefore, this patch adds new command
"enableAbsolutePositionEditor".

Note that whether resizing UI is available only with enableObjectResizing
state is different from enableInlineTableEditing command.  Resizers for
absolute positioned elements are NOT available both enableObjectResizing
and enableAbsolutePositionEditor are enabled.

Additionally, this adds automated tests to check basic functions of absolute
positioned editor.

MozReview-Commit-ID: 9ZSGB8tLpFw

--HG--
rename : editor/libeditor/tests/test_resizers_appearance.html => editor/libeditor/tests/test_abs_positioner_appearance.html
rename : editor/libeditor/tests/test_resizers_resizing_elements.html => editor/libeditor/tests/test_abs_positioner_positioning_elements.html
extra : rebase_source : d516f3f3ef36d4ad13938f214cb6e3868d7ff407
2018-04-04 22:27:49 +09:00
Masayuki Nakano b808917841 Bug 1449564 - part 1: Disable object resizer and inline table editor in default r=m_kato
Gecko supports resizers of <img> elements and <table>, <td>, <th> elements and
has UI to remove existing table row or column in default.  However, the other
browsers don't have such UI and web apps need to disable this feature with
calling both:
document.execCommand("enableObjectResizing", false, false);
document.execCommand("enableInlineTableEditing", false, false);
for avoiding conflicting with their own features to edit such elements.

Therefore, it doesn't make sense to keep enabling them in default only on
Gecko.  If web apps want to keep using these features, they should call:
document.execCommand("enableObjectResizing", false, true);
document.execCommand("enableInlineTableEditing", false, true);
at initializing the editor.

And also this patch fixes bugs of
document.queryCommandState("enableObjectResizing") and
document.queryCommandState("enableInlineTableEditing").  They always return
false even after calling document.execCommand(..., false, true) since
nsSetDocumentStateCommand::GetCommandStateParams() sets bool value as
STATE_ATTRIBUTE.  However, nsHTMLDocument::QueryCommandValue() which is the
caller referring STATE_ATTRIBUTE doesn't treat it as bool value.  And also
those commands are related to state of document.  Therefore, they should be
return as bool value of STATE_ALL instead.  Then,
nsHTMLDocument::QueryCommandState() returns the state as expected.  Note that
those commands are supported only by Gecko.  So, we don't need to worry about
the compatibility.

Finally, this patch rewrites 2 existing tests to check basic behavior of
resizers and appearance of resizers.

Note that this patch does not add new tests to test inline table editor
since it's difficult to test the behavior with current API.  Perhaps, we
should add an API to nsIHTMLEditor to retrieve each anonymous elements in
another bug since it requires to add wrapping API of SpecialPowers.

MozReview-Commit-ID: 1FhYo5vcV60

--HG--
rename : editor/libeditor/tests/test_objectResizing.html => editor/libeditor/tests/test_resizers_appearance.html
rename : editor/libeditor/tests/test_bug640321.html => editor/libeditor/tests/test_resizers_resizing_elements.html
extra : rebase_source : a707de5a64ef1f8ce974cdf1be093d1b4f61c7bc
2018-04-02 17:26:46 +09:00
Masayuki Nakano b212948c3b Bug 1484092 - part 1: Make HTMLEditor::GetElementOrParentByTagName() use nsAtom for the tag name r=m_kato
HTMLElementOrParentByTagName() is the last user of IsLinkTag(const nsAString&)
and IsNamedAnchorTag(const nsAString&).  For making their maintenance easier,
let's make GetElementOrParentByTagName() take const nsAtom& for tag name.

GetElementOrParentByTagName() has two functions, one is looking for an element
starting from a node.  The other is, if the start node is nullptr, it retrieves
anchor node of Selection as start node.  Therefore, this patch splits the
first part to GetElementOrParentByTagNameInternal().  Then, creates its
wrapper which retrieves anchor of Selection automatically,
GetElementOrParentByTagNameAtSelection().

Additionally, this patch makes all internal callers of HTMLEditor use
GetElementOrParentByTagNameInternal() or
GetElementOrParentByTagNameAtSelection() directly.  Then, public method,
GetElementOrParentByTagName() is called only by outer classes.

Note that some callers use both GetElementOrParentByTagNameInternal()
and GetElementOrParentByTagNameAtSelection() since they don't check whether
setting node is nullptr.  They may be bug of them.  We should investigate
the API callers later.

Differential Revision: https://phabricator.services.mozilla.com/D3584

--HG--
extra : moz-landing-system : lando
2018-08-17 14:06:18 +00:00
Noemi Erli 79400be144 Backed out 2 changesets (bug 1484092) for build bustages in builds/worker/workspace/build/src/editor/libeditor/HTMLEditor.cpp💯53 on a CLOSED TREE
Backed out changeset 10fdd041f1b5 (bug 1484092)
Backed out changeset d0b14e8711df (bug 1484092)
2018-08-17 13:39:44 +03:00
Masayuki Nakano a8b7670d10 Bug 1484092 - part 1: Make HTMLEditor::GetElementOrParentByTagName() use nsAtom for the tag name r=m_kato
HTMLElementOrParentByTagName() is the last user of IsLinkTag(const nsAString&)
and IsNamedAnchorTag(const nsAString&).  For making their maintenance easier,
let's make GetElementOrParentByTagName() take const nsAtom& for tag name.

GetElementOrParentByTagName() has two functions, one is looking for an element
starting from a node.  The other is, if the start node is nullptr, it retrieves
anchor node of Selection as start node.  Therefore, this patch splits the
first part to GetElementOrParentByTagNameInternal().  Then, creates its
wrapper which retrieves anchor of Selection automatically,
GetElementOrParentByTagNameAtSelection().

Additionally, this patch makes all internal callers of HTMLEditor use
GetElementOrParentByTagNameInternal() or
GetElementOrParentByTagNameAtSelection() directly.  Then, public method,
GetElementOrParentByTagName() is called only by outer classes.

Note that some callers use both GetElementOrParentByTagNameInternal()
and GetElementOrParentByTagNameAtSelection() since they don't check whether
setting node is nullptr.  They may be bug of them.  We should investigate
the API callers later.

Differential Revision: https://phabricator.services.mozilla.com/D3584

--HG--
extra : moz-landing-system : lando
2018-08-17 10:04:42 +00:00
Masayuki Nakano 0e96aef5c8 Bug 1483144 - Make HTMLEditor::GetSelectionContainer() protected r=m_kato
HTMLEditor::GetSelectionContainer() is a public method, but it's not used by
outer classes. So, we can make it a protected member.

Additionally, this patch cleans up the method.

  - Renames to GetSelectionContainerElement() for making clearer what will be
    returned.
  - Makes it const.
  - Makes it take Selection reference since most callers already have Selection.
  - Makes it use RangeBoundary to access start point and end point of range since nsRange::StartOffset() and nsRange::EndOffset() may be slow.
  - Makes it not use GetSelectedElement() since it requires unnecessary additional cost and the condition to call it means it uses only the first path in GetSelectedElement() which just returns start node of the range.
  - Makes it output warning when it returns nullptr since it reaches nullptr only when illegal cases, e.g., Selection is in orphan node.

Differential Revision: https://phabricator.services.mozilla.com/D3461

--HG--
extra : moz-landing-system : lando
2018-08-16 15:12:51 +00:00
Masayuki Nakano 45a67c4b77 Bug 1480663 - Make EditorBase::IsModifiableNode() non-virtual r=m_kato
HTMLEditor::IsModifiableNode() is enough simple and can be checked in
EditorBase. So, we should make it non-virtual and check if instance is
HTMLEditor in EditorBase::IsModifiableNode().

Differential Revision: https://phabricator.services.mozilla.com/D2706

--HG--
extra : moz-landing-system : lando
2018-08-03 11:10:46 +00:00
Emilio Cobos Álvarez 8f34c12e14 Bug 1479860: Remove unused aCompileEventHandlers argument from BindToTree. r=bz
Mostly automatic via sed. Only parts which I touched manually (apart from a
couple ones where I fixed indentation or which had mispelled arguments) are the
callers. I may have removed a couple redundant `virtual` keywords as well when
I started to do it manually, I can revert those if wanted.

Most of them are just removing the argument, but in Element.cpp I also added an
assertion for GetBindingParent when binding the ShadowRoot's kids (the binding
parent is set from the ShadowRoot constructor, and I don't think we bind a
shadow tree during unlink or what not which could cause a behavior difference).

Differential Revision: https://phabricator.services.mozilla.com/D2574

MozReview-Commit-ID: 2oIgatty2HU
2018-08-01 10:42:54 +02:00
Miko Mynttinen 4c85ef17cc Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 1e7eea4f2d4ec16ec0c559a8afb26976ddbf4d07
2018-06-01 17:59:07 +02:00
arthur.iakab 7e765f798b Backed out 2 changesets (bug 1465060) for build bustages on security/sandbox/linux/reporter/SandboxReporter.cpp
Backed out changeset 7c8905b6b226 (bug 1465060)
Backed out changeset 10446073eca8 (bug 1465060)
2018-06-03 19:25:41 +03:00
Miko Mynttinen 8d9dc85cd4 Bug 1465060 - Part 1: Fix warnings for std::move() use r=froydnj
MozReview-Commit-ID: HpdFXqQdIOO

--HG--
extra : rebase_source : 619d0e0ff63a2453c80f0c4d9beb906d43fa9b01
2018-06-01 17:59:07 +02:00
Emilio Cobos Álvarez fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Dorel Luca 0d2ff9e60d Merge mozilla-inbound to mozilla-central. a=merge 2018-05-16 00:54:22 +03:00
Emilio Cobos Álvarez 11794a944d Bug 1461701: Remove nsUpdateType and UPDATE_CONTENT_MODEL. r=smaug
MozReview-Commit-ID: 33iBMZqnkAc
2018-05-15 18:47:16 +02:00
Boris Zbarsky 1fb03996f4 Bug 1387143 part 29. Remove nsISelection. r=mats 2018-05-08 13:52:42 -04:00
Boris Zbarsky 921ee1d522 Bug 1387143 part 4. Stop using nsISelection in remaining xpidl. r=mats 2018-05-08 13:52:36 -04:00
Emilio Cobos Álvarez 5f526b4a81 Bug 1455559: Make FromNode work for references. r=bz,Nika
MozReview-Commit-ID: 1ldU1aKeMzs

--HG--
extra : rebase_source : 70a2537ab56d040f33acd84d4fd0c3d9de392198
2018-04-20 11:10:12 +02: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
Ciure Andrei 5d841a3421 Merge inbound to mozilla-central. a=merge 2018-03-30 01:06:18 +03: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
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 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
Andreea Pavel 7062e6b6a2 Merge mozilla-inbound to mozilla-central. a=merge 2018-03-20 00:39:56 +02:00
Makoto Kato 250a70b6ca Bug 1446861 - Remove more nsIDOMElement usages from editor. r=masayuki
Except table access and XPCOM methods for c-c, tests and etc, we can remove
more nsIDOMElement usages to avoid QI.

MozReview-Commit-ID: HO5kAaZAs6Q

--HG--
extra : rebase_source : 41ede0bace33504ad852dc4e0016ea346cd7bdee
2018-03-19 14:14:45 +09:00
Emilio Cobos Álvarez 06bfed73ea Bug 1446451: GetPropertyValue can indeed not return an integer if the node is not displayed. r=masayuki
MozReview-Commit-ID: Gk0PffVE7bz

--HG--
extra : rebase_source : ded727b58d4184a9723d9f2d196882462384bce7
2018-03-16 18:07:33 +01:00
Sylvestre Ledru fa45a3c670 Bug 1443080 - Use the static call for static methods (not instance) r=Ehsan
MozReview-Commit-ID: JwHh4bzxuTR

--HG--
extra : rebase_source : 5f5e37517aa80c2e7b5933962178d761074886e7
2018-03-16 14:29:15 +01:00
Emilio Cobos Álvarez 7536928a98 Bug 1445605: Make GetCSSFloatValue use GetPropertyValue instead of GetPropertyCSSValue. r=masayuki
We only use it for properties that return pixels anyway, so we can use it
without much problem.

This also fixes bug 1428974.

MozReview-Commit-ID: 5BbVOUdQT7o
2018-03-15 18:22:31 +01:00
Emilio Cobos Álvarez 2988d4e66d Bug 1442207: Remove unneeded arguments to nsIMutationObserver. r=smaug
aDocument is always content->OwnerDoc().
aContainer is always content->GetParent().

Differential Revision: https://phabricator.services.mozilla.com/D664

MozReview-Commit-ID: 4xwPCOnhyIL
2018-03-01 22:45:17 +01:00
Emilio Cobos Álvarez 0f3f398be9 Bug 1439036: Fix some other miscellaneous issues with the caller. r=bz
While we're here...

MozReview-Commit-ID: 7B79vec0bYS

--HG--
extra : rebase_source : 1c7f78c913986e8d2856d62c3037da64b109d20e
2018-02-17 01:46:35 +01:00
Emilio Cobos Álvarez b293adf1cf Bug 1459871: Remove other getPropertyCSSValue-related interfaces. r=bz
I can land the removal behind a pref first if you want and all that instead.

Again, this doesn't remove the internal usage for getComputedStyle (yet).

MozReview-Commit-ID: LA157ohfLhu
2018-05-15 14:05:13 +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