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

101 Коммитов

Автор SHA1 Сообщение Дата
Alex Catarineu 08a431f34e Bug 1581537 - Avoid several browser language leaks r=smaug
Spoof dom/dom.properties, layout/xmlparser.properties,
layout/MediaDocument.properties to en-US if needed.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 16:56:27 +00:00
Mihai Alexandru Michis d19c1272ca Backed out changeset 1d87c269da8a (bug 1581537) for causing bc failures in browser_misused_characters_in_strings.js CLOSED TREE
--HG--
extra : rebase_source : b9f2da6650a4213a4a9284d6dbe7ecfd97761501
extra : amend_source : b7ca833a091419a2de5904eccb2d3ce9d0fcd337
2019-11-04 16:06:37 +02:00
Alex Catarineu ea206b140d Bug 1581537 - Avoid several browser language leaks r=smaug
Spoof dom/dom.properties, layout/xmlparser.properties,
layout/MediaDocument.properties to en-US if needed.

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

--HG--
extra : moz-landing-system : lando
2019-11-04 11:27:59 +00:00
Mirko Brodesser 2f40f072ab Bug 1565584: move `nsIContentUtils::ContentIsDescendantOf` to `nsINode::IsInclusiveDescendantOf`. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D37880
2019-07-15 10:02:21 +02:00
Cameron McCormack 0a6fb940c5 Bug 1553705 - Use a cheaper to compute state key for parser inserted form controls. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32259

--HG--
extra : moz-landing-system : lando
2019-07-01 10:06:16 +00:00
Cameron McCormack 336cad5a55 Bug 1553705 - Make GenerateStateKey() infallible. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32258

--HG--
extra : moz-landing-system : lando
2019-07-01 07:20:04 +00:00
Narcis Beleuzu cc10ed7ce5 Backed out 2 changesets (bug 1553705) for causing Bug1562142 . CLOSED TREE
Backed out changeset fbb26a04ec1f (bug 1553705)
Backed out changeset dd6e7c0970d5 (bug 1553705)
2019-06-29 02:39:01 +03:00
Cameron McCormack 4d1517b69f Bug 1553705 - Use a cheaper to compute state key for parser inserted form controls. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32259

--HG--
extra : moz-landing-system : lando
2019-06-26 21:44:11 +00:00
Cameron McCormack 98706be760 Bug 1553705 - Make GenerateStateKey() infallible. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D32258

--HG--
extra : moz-landing-system : lando
2019-06-26 21:44:03 +00:00
Jonathan Kingston a5ba216f93 Bug 1315460 - Removal of keygen element r=keeler,baku,jld,hsivonen
Differential Revision: https://phabricator.services.mozilla.com/D22810

--HG--
extra : moz-landing-system : lando
2019-06-13 08:58:07 +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
Emilio Cobos Álvarez ff732c2cdf Bug 1555143 - Remove unused aDeep argument from UnbindFromTree. r=bzbarsky
$ for file in $(rg UnbindFromTree | cut -d : -f 1 | sort | uniq); do sed -i 's#UnbindFromTree(bool aDeep = true,#UnbindFromTree(#g' $file; done
$ for file in $(rg UnbindFromTree | cut -d : -f 1 | sort | uniq); do sed -i 's#UnbindFromTree(bool aDeep,#UnbindFromTree(#g' $file; done
$ for file in $(rg UnbindFromTree | cut -d : -f 1 | sort | uniq); do sed -i 's#UnbindFromTree(aDeep,#UnbindFromTree(#g' $file; done
$ ./mach clang-format

And fix the two callers and little use of the aDeep argument (see the "Manual
changes" patch attached to bug).

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

--HG--
extra : moz-landing-system : lando
2019-05-28 22:47:08 +00:00
Peter Van der Beken 61a0d908e5 Bug 1521853 - Remove Throws annotation from some infallible HTMLOptionsCollection/HTMLSelectElement properties. r=qdot
Differential Revision: https://phabricator.services.mozilla.com/D17265

--HG--
extra : moz-landing-system : lando
2019-01-22 19:03:07 +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
Andrew McCreight 8c3fb70cdf Bug 1499861 - Make HTMLOptionsCollection::mSelect into a strong reference. r=qDot
The cycle collector makes weak references like this obsolete.
2018-11-07 08:38:42 -05:00
Marcos Cáceres dcf8ad3c00 Bug 329509 - allow dispatching event when element is disabled. r=annevk,smaug
Allow untrusted Events and Custom events to be dispatched at disabled form element. This is for interop and some developers have asked for this.

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

--HG--
extra : moz-landing-system : lando
2018-10-31 08:55:33 +00:00
Emilio Cobos Álvarez fc1a493642 Bug 1499571 - HTMLOptionsCollection::Remove shouldn't remove the first element of the collection if out of bounds. r=bzbarsky
Make it just forward to HTMLSelectElement::Remove like other browsers.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 01:35:21 +00:00
Emilio Cobos Álvarez 3ebda39fd0 Bug 1499567 - Do not append an empty text node when creating options from HTMLOptionCollection::SetLength. r=bzbarsky
Only we do that. Align with other browsers instead.

I removed the max-asserts as well because I cannot make my browser assert when
running this test on a debug build.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 00:10:46 +00:00
Neil Deakin 0a19485e1f Bug 326944, remove nsIComboboxControlFrame interface, r=mats 2018-09-26 10:41:12 -04:00
Neil Deakin 5c44db8004 Bug 328680, remove nsIListControlFrame interface, r=mats 2018-09-26 10:41:01 -04:00
Nathan Froyd 846d8789ee Bug 1492894 - part 1 - make the node hierarchy consistently constructed with NodeInfo&&; r=mccr8
Various places in dom/ use the pattern:

  already_AddRefed<NodeInfo> ni = ...;

which is supposed to be disallowed by our static analysis code, but
isn't, for whatever reason.  To fix our static analysis code, we need to
eliminate instances of the above pattern.

Unfortunately, eliminating this pattern requires restructuring how Nodes
are created.  Most Node subclasses take `already_AddRefed<NodeInfo>&` in
their constructors, and a few accept `already_AddRefed<NodeInfo>&&`.  We
need to enforce the latter pattern consistently, which requires changing
dozens of source files.
2018-09-21 16:45:49 -04: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
Jeff Gilbert 5b753da289 Bug 1470325 - s/FooBinding/Foo_Binding/g - r=qdot
MozReview-Commit-ID: JtTcLL5OPF0
2018-06-26 17:05:01 -07:00
Emilio Cobos Álvarez 47ebd819b3 Bug 1449806: Merge {Servo,Generic}SpecifiedValues into MappedDeclarations. r=xidorn
The idea would be that this header is only included in cpp files, thus it's ok
to include ServoBindings, etc.

MozReview-Commit-ID: EgQEsR0cZd4
2018-06-25 11:14:39 +02:00
catalin.badea392@gmail.com 9c36800bd7 Bug 1469385 - Remove InsertChildAt_Deprecated and RemoveChildAt_Deprecated, r=bz,smaug 2018-06-19 12:21:18 +03: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
Boris Zbarsky a02a40bdb5 Bug 1462737. Make AsElement() not compile when called on Element or some subclass. r=mccr8
It's just noise if we already have an Element.
2018-05-18 23:37:56 -04:00
Nika Layzell 242c9ce313 Bug 1438026 - Part 3: Replace nsPresState with the new PresState type, r=baku 2018-04-10 17:49:44 -04:00
Boris Zbarsky 14f26fccf6 Bug 1449631 part 8. Remove nsIDOMEventTarget::GetEventTargetParent. r=smaug
MozReview-Commit-ID: 5wQ2LYrjUxf
2018-04-05 13:42:41 -04: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 478687c2e8 Bug 1434686 part 4. Use IgnoreErrors() in dom/. r=mystor
MozReview-Commit-ID: GwVDrTLPTOb
2018-02-01 14:21:14 -05:00
Andrea Marchesini 35c2c8122a Bug 1431000 - Introduce nsINode::InsertChildBefore, r=catalinb 2018-01-25 15:59:42 +01:00
Andrea Marchesini 85b163bc38 Bug 1430998 - Rename nsINode::InsertChildAt to InsertChildAt_Deprecated, r=catalinb 2018-01-23 14:30:18 +01:00
Andrea Marchesini b8bb98af8c Bug 1430997 - Rename nsINode::IndexOf to nsINode::ComputeIndexOf, r=catalinb 2018-01-23 14:30:18 +01:00
Andrea Marchesini 41d4da5cef Bug 1425440 - Introduce nsINode::RemoveChildNode, r=catalinb 2018-01-15 17:18:38 +01:00
Andrea Marchesini 6ee7f4e6f3 Bug 1425321 - Renaming nsINode::RemoveChildAt to RemoveChildAt_Deprecated, r=catalinb 2018-01-03 14:01:03 +01:00
Andrea Marchesini 00e79ef07b Bug 1425321 - Renaming nsINode::GetChildAt to GetChildAt_Deprecated, r=catalinb
We want to deprecate nsINode::GetChildAt as the first step of removing DOM node
child array storage. See bug 651120.
2018-01-03 13:59:54 +01:00
Kris Maglione 1c66345e09 Bug 1415352: Part 1a - Pass subject principal through to ParseAttribute. r=bz
This is necessary in order to parse style attributes using the subject
principal of the caller, rather than defaulting to the page principal.

MozReview-Commit-ID: GIshajQ28la

--HG--
extra : rebase_source : 5dba46f61d70ec647cae16383b62961ac72d2f47
2017-11-01 20:35:52 -07:00
Kyle Machulis dacb51138d Bug 1415716 - Remove nsIDOMHTMLOptionElement; r=bz
MozReview-Commit-ID: JGxQxeFBQlO

--HG--
extra : rebase_source : 86c8b72862e84f17920d45b375c0db704ebe2eb3
2017-11-08 17:43:09 -08:00
Kyle Machulis bcce449ae5 Bug 1408186 - Remove nsIDOMHTMLSelectElement and nsIDOMHTMLOptionsCollection; r=bz
MozReview-Commit-ID: Gh3JwLUtmz9

--HG--
extra : rebase_source : 6cdee487246406cafe0e5a9afe4a44f62d131c8b
2017-10-12 16:32:25 -07:00
Ray Lin 1959be8b2a Bug 1385788 - Move the ownership of preview value from PresState to HTMLSelectElement. r=bz
MozReview-Commit-ID: 9NC8h6SyWdh

--HG--
extra : rebase_source : 4facdc9cc36c779a2f87d9b3e3f6a3f51b3e9812
2017-10-25 11:57:57 +08:00
Kris Maglione 4275cd1039 Bug 1406278: Part 1 - Pass subject principal to SetAttribute and friends. r=bz
In order to tailor certain security checks to the caller that is attempting to
load a particular piece of content, we need to be able to attach an
appropriate triggering principal to the corresponding requests. Since most
HTML content is loaded based on attribute values, that means capturing the
subject principal of the caller who sets those attributes, which means making
it available to AfterSetAttr hooks.

MozReview-Commit-ID: BMDL2Uepg0X

--HG--
extra : rebase_source : 25e438c243700a9368c393e40e3a6002d968d6c8
2017-10-09 14:33:38 -07: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
Andrew McCreight 7f7f149167 Bug 1395636 - Convert code to use NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED. r=peterv
MozReview-Commit-ID: DivJPerL5SF

--HG--
extra : rebase_source : 890df75914906a5d34e8af67f9fc3a4be239d2d6
2017-08-31 16:29:22 -07:00
Sebastian Hengst 2f7f455fa1 Backed out changeset 9306866e8df0 (bug 1395636) for build bustage. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 20d028d6b971cf6a221dc2f1553687d6c074bdcb
2017-09-06 19:18:06 +02:00
Andrew McCreight 4d6e76dfcf Bug 1395636 - Convert code to use NS_IMPL_ISUPPORTS_CYCLE_COLLECTION_INHERITED. r=peterv
MozReview-Commit-ID: DivJPerL5SF

--HG--
extra : rebase_source : cb952cfc5600a163a5580438e5b0177595689dab
2017-08-31 16:29:22 -07:00
Nicholas Nethercote f941156987 Bug 1386600 - Change nsIStringBundle methods to return |AString| instead of |wstring|. r=emk,sr=dbaron.
This removes about 2/3 of the occurrences of nsXPIDLString in the tree. The
places where nsXPIDLStrings are null-checked are replaced with |rv| checks.

The patch also removes a couple of unused declarations from
nsIStringBundle.idl.

Note that nsStringBundle::GetStringFromNameHelper() was merged into
GetStringFromName(), because they both would have had the same signature.

--HG--
extra : rebase_source : ac40bc31c2a4997f2db0bd5069cc008757a2df6d
2017-08-04 14:40:52 +10:00
Jessica Jong 47209070af Bug 1385478 - Part 2: Change Required/IsRequired() to look at NS_EVENT_STATE_REQUIRED instead. r=bz
In order to speed up Required/IsRequired(), instead of querying for the
@required attribute, we're now using the NS_EVENT_STATE_REQUIRED flag to know
whether an element's value is required.

For this to work correctly, we need to set NS_EVENT_STATE_REQUIRED earlier,
that is, in AfterSetAttr(), before any consumer of IsRequired(). We also need
to update or clear our required states when input type changes, since we may
have changed from a required input type to a non-required input type or
vice versa.

Note that NS_EVENT_STATE_REQUIRED/OPTIONAL is now part of the
EXTERNALLY_MANAGED_STATES.

MozReview-Commit-ID: Bjiby9GqJSB
2017-08-03 01:27:00 -04:00
Jessica Jong 9829ff506e Bug 1385478 - Part 1: Use IsRequired/Required() to get the current required state. r=bz
IsRequired() helper function returns the current 'required' state of the
element, that is, whether its required attribute is set or not. This will be
used only for input elements that @required applies.
2017-08-03 01:23:00 -04:00