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

70 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez 5ce8c5c731 Bug 1646032 - Avoid a silly string copy in PreloadService. r=mayhemer
There's no real need to go through a DOMString here.

Differential Revision: https://phabricator.services.mozilla.com/D79815
2020-06-16 14:07:18 +00:00
Emilio Cobos Álvarez c3b7227771 Bug 1639392 - Merge nsIStyleSheetLinkingElement and nsStyleLinkElement, and call it LinkStyle. r=jwatt
Which is the spec term. nsIStyleSheetLinkingElement is even more
confusing since it may not be an element at all (see: processing
instructions).

Differential Revision: https://phabricator.services.mozilla.com/D76071
2020-05-21 03:07:16 +00:00
Edgar Chen 88a9a03a8a Bug 1618295 - Add imageSrcset and imageSizes attributes in HTMLLinkElement; r=hsivonen
See https://html.spec.whatwg.org/multipage/semantics.html#htmllinkelement.

Depends on D68786

Differential Revision: https://phabricator.services.mozilla.com/D71949
2020-05-11 14:08:58 +00:00
Honza Bambas c83b99c509 Bug 1618299 - Teach `dom::HTMLLinkElement` about Document.Preloads(), r=smaug
Depends on D71378

Differential Revision: https://phabricator.services.mozilla.com/D67483
2020-05-11 14:06:45 +00:00
Ehsan Akhgari 340e730db7 Bug 1614329 - Fix the handling of the type attribute of HTMLStyleElement; r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D62254

--HG--
extra : moz-landing-system : lando
2020-02-11 19:38:26 +00:00
Emilio Cobos Álvarez 135388d85f Bug 1587457 - Remove Element::GetTokenList. r=bzbarsky
Looks like this used to be more generic, looking at:

https://hg.mozilla.org/mozilla-central/rev/263812990c503f6e238b33b2fd3314284ac1be3e

But now only specific element subclasses use it, and the token lists can just be
members in the relevant subclasses.

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

--HG--
extra : moz-landing-system : lando
2019-10-11 04:09:40 +00:00
Emilio Cobos Álvarez d47ef2a1b7 Bug 1572526 - Move a bunch of code that's only called by HTMLLinkElement out of Link.cpp. r=bzbarsky
Seems like a more logical place for it to live.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 14:10:08 +00:00
Emilio Cobos Álvarez 66c0a4fa9b Bug 1572246 - Make <link> always unvisited. r=bzbarsky
Intent email: https://groups.google.com/d/msg/mozilla.dev.platform/1NP6oJzK6zg/ftAz_TajAAAJ

For now do the obvious check rather than bigger refactorings, since we keep them
matching :link or not depending on whether they have an href.

I'll file an HTML spec issue about not making them traversable, and a MathML
issue about the craziness that it is that almost all MathML elements can be
links.

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

--HG--
extra : moz-landing-system : lando
2019-08-15 14:10: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
Emilio Cobos Álvarez ca33d8548f Bug 1281135 - Make <link disabled> work and HTMLLinkElement.disabled reflect that attribute. r=bzbarsky
...instead of forwarding to the sheet like HTMLStyleElement does.

I've proposed this behavior in:

  https://github.com/whatwg/html/issues/3840#issuecomment-480894419

I think this is one of the sane behaviors we can have, what Blink / WebKit do
makes no sense to me.

Alternative potentially-sane behavior is making the initial value of the
stylesheet's disabled bit the same as the content attribute, and both reflect
and forward the attribute from the setter.

That means that setAttribute does something different than setting `disabled`,
which means that you can get into all sorts of funny states when reloading the
sheet... So I rather not do that.

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

--HG--
extra : moz-landing-system : lando
2019-04-19 13:31:05 +00:00
Noemi Erli 9d4b8e45ab Backed out changeset ef991fe893a4 (bug 1281135) for failures in browser_bug839103.js 2019-04-19 09:18:03 +03:00
Emilio Cobos Álvarez 60a57d4109 Bug 1281135 - Make <link disabled> work and HTMLLinkElement.disabled reflect that attribute. r=bzbarsky
...instead of forwarding to the sheet like HTMLStyleElement does.

I've proposed this behavior in:

  https://github.com/whatwg/html/issues/3840#issuecomment-480894419

I think this is one of the sane behaviors we can have, what Blink / WebKit do
makes no sense to me.

Alternative potentially-sane behavior is making the initial value of the
stylesheet's disabled bit the same as the content attribute, and both reflect
and forward the attribute from the setter.

That means that setAttribute does something different than setting `disabled`,
which means that you can get into all sorts of funny states when reloading the
sheet... So I rather not do that.

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

--HG--
extra : moz-landing-system : lando
2019-04-18 07:48:55 +00:00
Boris Zbarsky e5e9a70cac Bug 1541094. Mark PostHandleEvent as MOZ_CAN_RUN_SCRIPT. r=smaug
The change to the EventTargetChainItem constructor is because we're changing mTarget to be const (to avoid taking extra stack refs to the EventTarget), so have to set it in the constructor instead of setting it after creating the object.

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

--HG--
extra : moz-landing-system : lando
2019-04-02 19:06:11 +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
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 1fbd784d00 Bug 1481601 - Remove now-useless aPreallocateChildren from nsINode::Clone() and friends. r=bzbarsky
Since sed on multiple lines ended up being such a pain and I didn't end up
writing a script for this because I didn't think it'd end up being so boring, I
may have made a couple cleanups here and there as well...

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

--HG--
extra : moz-landing-system : lando
2018-08-08 23:58:44 +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
Emilio Cobos Álvarez 9509853a38 Bug 1459498: Rename nsIStyleSheetLinkingElement::StyleSheetInfo to SheetInfo. r=heycam
MozReview-Commit-ID: FeOmISAxWBk
2018-05-08 10:07:46 +02:00
Emilio Cobos Álvarez 5b6f2bdee0 Bug 1459498: Refactor nsStyleLinkElement so that all the stylesheet information comes from one place. r=heycam
I've kept the nsAutoStrings in the StyleSheetInfo class on the hopes that the
compiler does RVO, but if it doesn't I can remove I guess.

MozReview-Commit-ID: 2vN6BSEhYcw
2018-05-08 10:07:41 +02:00
Dragana Damjanovic d9148a8a51 Bug 1441246 - Move preload cod from nsStyleLinkElement to HTMLLinkElement. r=smaug
--HG--
extra : rebase_source : 01cb8b69aa1187abb83b36098d81df1d96c7d79c
2018-04-20 12:47:00 +03: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 258352c8a8 Bug 1447098 part 2. Rename the NS_IMPL_FROMCONTENT macros to NS_IMPL_FROMNODE. r=mystor 2018-03-21 17:39:04 -04:00
Emilio Cobos Álvarez de099db7bd Bug 1444905: Remove scoped style support from the old style system. r=xidorn,smaug
Summary: It uses two node bits that can be better suited for something else.

Reviewers: xidorn, smaug

Bug #: 1444905

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

MozReview-Commit-ID: HIPDtHm6xpM
2018-03-13 10:26:13 +01:00
Chris Peterson fe5cd3d5d9 Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj
MozReview-Commit-ID: 8pjYjEvQF42

--HG--
extra : rebase_source : 5eb0bea2ef5f06a811b4f3daf57ce8720f12dd07
2018-02-08 21:22:43 -08:00
Chris Peterson d09123f248 Bug 1436263 - Part 1: Replace `final override` virtual function specifiers with just `final`. r=froydnj
MozReview-Commit-ID: DE5HkIhsZ6D

--HG--
extra : rebase_source : 94831c1e13a840dd2ea0600f64bcf70c2bf938d9
extra : source : cf9283bf1b0bca3a6311c98e227329d451f80ecb
2018-02-05 22:46:57 -08:00
Boris Zbarsky 69cbdecca9 Bug 1435132 part 2. Make nsIStyleSheetLinkingElement::GetCharset infallible. r=mccr8
MozReview-Commit-ID: 2maFIxR2HkS
2018-02-02 08:21:32 -05:00
Boris Zbarsky 04324f18ad Bug 1424474 part 3. Make sure that we only pass non-system subject principals to setters/methods that later use that principal for loading security checks. r=kmag
MozReview-Commit-ID: IjUEG5xwn5
2017-12-20 17:43:18 -05:00
Narcis Beleuzu edb8ba34eb Backed out 2 changesets (bug 1424474) for mochitest failures on test_bug494328.html r=backout on a CLOSED TREE
Backed out changeset 39d5991f02ba (bug 1424474)
Backed out changeset da3dec2fce06 (bug 1424474)
2017-12-21 02:55:27 +02:00
Boris Zbarsky a2696c3c8a Bug 1424474 part 2. Make sure that we only pass non-system subject principals to setters/methods that later use that principal for loading security checks. r=kmag 2017-12-20 17:43:18 -05:00
Boris Zbarsky 887ce3941a Bug 1419270 part 2. Use getter or setter specific NeedsSubjectPrincipal annotations more. r=qdot
MozReview-Commit-ID: KBwjFh3TMUg
2017-12-05 16:03:18 -05: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
Boris Zbarsky 01a7f72b91 Bug 1407334. Add some overloads for src/href getters that don't need a principal, for Thunderbird to use. r=kmag
MozReview-Commit-ID: 23iOeNDMXNk
2017-10-10 15:04:19 -04:00
Kris Maglione 9c145b38f6 Bug 1406278: Part 8b - Use subject principal as triggering principal in style <link> "href" attribute. r=bz
MozReview-Commit-ID: LWMkBcB4WIg

--HG--
extra : rebase_source : fa2daf25c58190cee7e55798347d4eaffa0d5250
extra : histedit_source : f2887c9e53c572aa5e675600cd1aeb6c5a72becc%2Ce7a84ac505319ca24e65c73a4df13014a0a0cdc0
2017-10-05 19:40:48 -07: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
Kyle Machulis 669ff05b49 Bug 1406525 - Remove nsIDOMHTMLLinkElement; r=bz
MozReview-Commit-ID: 4xUSQ8SiIqX
2017-10-09 16:09: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
Phil Ringnalda 89e0db3395 Backed out changeset f99c758cd03e (bug 1406525) for Windows build bustage
MozReview-Commit-ID: 1mr4kaJl8hR
2017-10-06 22:40:54 -07:00
Kyle Machulis b91f02872e Bug 1406525 - Remove nsIDOMHTMLLinkElement; r=bz
MozReview-Commit-ID: 4xUSQ8SiIqX

--HG--
extra : rebase_source : ed4b87bc6554d7668d6c51903efbf6bd138fddf4
2017-10-06 14:15:03 -07: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
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
Ryan VanderMeulen afcf43248f Backed out revision 2e5306010ce1 (bug 1389421) due to unresolved spec issues. 2017-08-28 15:20:55 -04:00
Aryeh Gregor 1b3b415680 Bug 1389421 - Support nonce IDL property; r=ckerschb,smaug
We already support the actual functionality, but nobody added support
for the IDL property to the .webidl file.

Also added <style nonce> to the web-platform-tests reflection tests,
since nobody updated that to the current spec either.

This does not add support for .nonce to SVGScriptElement, because I
couldn't find any standard that specified it.  I updated the wpt tests
to expect .nonce to work on HTMLScriptElement but not SVGScriptElement.

MozReview-Commit-ID: F1K7WMfMoDi

--HG--
extra : rebase_source : 247c63b63446dc0d60062bb9d9c61228c379b989
2017-08-21 14:49:44 +03:00
Nicholas Nethercote 57c26c9834 Bug 1387956 - Overhaul ComputedValues measurement, and add style structs measurement. r=bholley.
This patch moves measurement of ComputedValues objects from Rust to C++.
Measurement now happens (a) via DOM elements and (b) remaining elements via
the frame tree. Likewise for the style structs hanging off ComputedValues
objects.

Here is an example of the output.

> ├──27,600,448 B (26.49%) -- active/window(https://en.wikipedia.org/wiki/Barack_Obama)
> │  ├──12,772,544 B (12.26%) -- layout
> │  │  ├───4,483,744 B (04.30%) -- frames
> │  │  │   ├──1,653,552 B (01.59%) ── nsInlineFrame
> │  │  │   ├──1,415,760 B (01.36%) ── nsTextFrame
> │  │  │   ├────431,376 B (00.41%) ── nsBlockFrame
> │  │  │   ├────340,560 B (00.33%) ── nsHTMLScrollFrame
> │  │  │   ├────302,544 B (00.29%) ── nsContinuingTextFrame
> │  │  │   ├────156,408 B (00.15%) ── nsBulletFrame
> │  │  │   ├─────73,024 B (00.07%) ── nsPlaceholderFrame
> │  │  │   ├─────27,656 B (00.03%) ── sundries
> │  │  │   ├─────23,520 B (00.02%) ── nsTableCellFrame
> │  │  │   ├─────16,704 B (00.02%) ── nsImageFrame
> │  │  │   ├─────15,488 B (00.01%) ── nsTableRowFrame
> │  │  │   ├─────13,776 B (00.01%) ── nsTableColFrame
> │  │  │   └─────13,376 B (00.01%) ── nsTableFrame
> │  │  ├───3,412,192 B (03.28%) -- servo-style-structs
> │  │  │   ├──1,288,224 B (01.24%) ── Display
> │  │  │   ├────742,400 B (00.71%) ── Position
> │  │  │   ├────308,736 B (00.30%) ── Font
> │  │  │   ├────226,512 B (00.22%) ── Background
> │  │  │   ├────218,304 B (00.21%) ── TextReset
> │  │  │   ├────214,896 B (00.21%) ── Text
> │  │  │   ├────130,560 B (00.13%) ── Border
> │  │  │   ├─────81,408 B (00.08%) ── UIReset
> │  │  │   ├─────61,440 B (00.06%) ── Padding
> │  │  │   ├─────38,176 B (00.04%) ── UserInterface
> │  │  │   ├─────29,232 B (00.03%) ── Margin
> │  │  │   ├─────21,824 B (00.02%) ── sundries
> │  │  │   ├─────20,080 B (00.02%) ── Color
> │  │  │   ├─────20,080 B (00.02%) ── Column
> │  │  │   └─────10,320 B (00.01%) ── Effects
> │  │  ├───2,227,680 B (02.14%) -- computed-values
> │  │  │   ├──1,182,928 B (01.14%) ── non-dom
> │  │  │   └──1,044,752 B (01.00%) ── dom
> │  │  ├───1,500,016 B (01.44%) ── text-runs
> │  │  ├─────492,640 B (00.47%) ── line-boxes
> │  │  ├─────326,688 B (00.31%) ── frame-properties
> │  │  ├─────301,760 B (00.29%) ── pres-shell
> │  │  ├──────27,648 B (00.03%) ── pres-contexts
> │  │  └─────────176 B (00.00%) ── style-sets

The 'servo-style-structs' and 'computed-values' sub-trees are new. (Prior to
this patch, ComputedValues under DOM elements were tallied under the the
'dom/element-nodes' sub-tree, and ComputedValues not under DOM element were
ignored.) 'servo-style-structs/sundries' aggregates all the style structs that
are smaller than 8 KiB.

Other notable things done by the patch are as follows.

- It significantly changes the signatures of the methods measuring nsINode and
  its subclasses, in order to handle the tallying of style structs separately
  from element-nodes. Likewise for nsIFrame.

- It renames the 'layout/style-structs' sub-tree as
  'layout/gecko-style-structs', to clearly distinguish it from the new
  'layout/servo-style-structs' sub-tree.

- It adds some FFI functions to access various Rust-side data structures from
  C++ code.

- There is a nasty hack used twice to measure Arcs, by stepping backwards from
  an interior pointer to a base pointer. It works, but I want to replace it
  with something better eventually. The "XXX WARNING" comments have details.

- It makes DMD print a line to the console if it sees a pointer it doesn't
  recognise. This is useful for detecting when we are measuring an interior
  pointer instead of a base pointer, which is bad but easy to do when Arcs are
  involved.

- It removes the Rust code for measuring CVs, because it's now all done on the
  C++ side.

MozReview-Commit-ID: BKebACLKtCi

--HG--
extra : rebase_source : 4d9a8c6b198a0ff025b811759a6bfa9f33a260ba
2017-08-11 16:37:33 +10:00
Dragana Damjanovic dd.mozilla@gmail.com 0bd7a2c931 Bug 1222633 - Add rel=preload - dom part. r=smaug 2017-07-10 15:05:56 +02:00
Ben Kelly bd95903746 Bug 1197401 Remove the disabled HTML imports implementation. r=wchen 2017-06-12 07:36:02 -07:00
Kirk Steuber e74f1cd513 Bug 1363481 - Add the old attribute value as a parameter to Element::AfterSetAttr r=bz
In order to facilitate the movement of code with side-effects called by Element::SetAttr to Element::BeforeSetAttr and Element::AfterSetAttr, Element::AfterSetAttr should have access to the old value of the attribute. This includes information about whether there was previously a value set or not.

Accomplishing this involved passing an additional argument through functions that find and change the old attribute value in order to ensure that we can differentiate between an empty old value and an absent old value (attribute was not set).

Note that while I tried to ensure that accurate values (and their absence) are reported to Element::AfterSetAttr, I largely ignored SVG. While the old value reported for SVG values should be however accurate the value already being reported to SetAttrAndNotify was, SVG elements do not currently report unset values properly because they will never pass a null pointer to SetAttrAndNotify.

MozReview-Commit-ID: K1mha8CNFZP

--HG--
extra : rebase_source : 42776eb01451d371e4aebcc17fe3dd112c8d268b
2017-05-18 14:09:01 -07:00
Kirk Steuber 7fdb378650 Bug 1359556 - Optimize cloneNode by preinitializing attribute and child arrays r=bz
Currently, attribute and child arrays (implemented in dom/base/nsAttrAndChildArray.h) start out empty. When cloning, the array ends up being resized multiple times in order to add the attributes and children that are being cloned from the original node. This would be quicker if the array was initialized to the correct size in the first place so that resizes are not necessary.

However, preallocating space for children is only necessary when performing a deep clone. Therefore, an additional parameter is being added to the Clone, CopyInnerTo, and CloneDocHelper methods to indicate whether preallocation of children should happen. Attributes are copied either way, so that part of the array is preallocated in both cases.

MozReview-Commit-ID: 3iVezeAKXnI

--HG--
extra : rebase_source : 9c3deec6d7aafd6411044d623d4863637b45fd58
2017-04-20 12:57:48 -07:00