Commit Graph

706 Commits

Author SHA1 Message Date
Zibi Braniecki
e78d123097 Bug 1455649 - DocumentL10n, part 3 - Plug DocumentL10n life cycle into DOM hooks. r=smaug
--HG--
extra : rebase_source : d071878d22b5fd204db8367780ee22be22196773
2018-09-06 18:28:40 -07:00
Brian Grinstead
a5cb861f39 Bug 1487476 - Expose lightweight themes as chrome-only features on nsIDocument instead of XULDocument;r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D4719

--HG--
extra : moz-landing-system : lando
2018-08-30 23:17:58 +00:00
Jeff Walden
64fceacad0 Bug 1486577 - Don't #include "js/CompilationAndEvaluation.h" in jsapi.h, minimizing the scope of that header and reducing translation-unit size of anything that needs JSAPI but doesn't need to compile/evaluate JavaScript. r=jandem
--HG--
extra : rebase_source : cd9a8becc15477bc5e24408159d4f061ec81c8b2
2018-08-24 22:51:49 -05:00
Jeff Walden
4bdf4a3614 Bug 1486577 - Don't #include js/SourceBufferHolder.h in jsapi.h, and instead require users to do so -- a minor translation-unit size improvement for anyone who never has to use SourceBufferHolder other than by reference. r=jandem
--HG--
extra : rebase_source : df47aba0c7dac3fe80ab6ea1b9a34c7acc54850d
2018-08-24 21:01:58 -05:00
Brendan Dahl
114c68f373 Bug 1482170 - Remove <Add/Remove>BroadcastListenerFor on XULDocument webidl. r=bz
These methods are only ever used in tests and no longer need to be exposed.
In test_bug445177.xul I tried to preserve more of the test, but everything
after the call to addBroadcastListenerFor is dependent on that.

MozReview-Commit-ID: C4vAxNir4O8
2018-08-15 09:14:23 -07:00
Xidorn Quan
33b8a6dacd Bug 1483090 - Rename StyleUserInterface to StyleUI. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D3276

--HG--
extra : moz-landing-system : lando
2018-08-14 08:37:37 +00:00
Adrian Wielgosik
be0c1a4f55 Bug 1481645 - Remove some redundant uses of do_QueryInterface. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D2893

--HG--
extra : moz-landing-system : lando
2018-08-13 09:05:19 +00:00
Tiberius Oros
aff5d4ad5d Merge inbound to mozilla-central. a=merge 2018-08-09 13:02:05 +03: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
Brendan Dahl
027788b3ce Bug 1481286 - Move command dispatcher from XULDocument to Document. r=bz
Allows non-XUL chrome privilege documents to also use the command
dispatcher. The command dispatcher is created lazily since it will not
always be used.

Update test to reflect removal of the XUL attribute "commandDispatcher"
from content privilege XUL.

MozReview-Commit-ID: HUXMG9kx4ft
2018-08-08 09:02:03 -07:00
Brendan Dahl
3c230cf25e Bug 1481286 - Use a custom element to add/remove command updater. r=bz
Create a "commandset" custom element that performs the job of adding and
removing command updaters that XULDocument use to do. Previously, the
"commandupdater" attribute was allowed on any element, but in tree it is
only every used on "commandset" elements.

MozReview-Commit-ID: HUXMG9kx4ft
2018-08-08 09:02:03 -07:00
Olli Pettay
7315a671e1 Bug 1481399 - rename nsAttrAndChildArray to AttrArray, r=mrbkap
--HG--
rename : dom/base/nsAttrAndChildArray.cpp => dom/base/AttrArray.cpp
rename : dom/base/nsAttrAndChildArray.h => dom/base/AttrArray.h
extra : rebase_source : 488f4d9c87bf337686abfa98e79466343a9e6685
2018-08-07 22:07:26 +03:00
Brendan Dahl
da472b2bfe Bug 1480206 - Move XULDocument popup attributes to Document. r=bz
Allows top level non-XUL documents to share this code. Three tests had to
be adjusted to account for the attributes being chrome only now and not
available to content privilege XUL. In two tests, the values attributes
are now simply undefined. The crashtest was converted to a chrome
mochitest to preserve what it was testing.

MozReview-Commit-ID: 99w9Ax4et3C

--HG--
rename : dom/base/crashtests/473284.xul => dom/base/test/chrome/test_bug473284.xul
extra : rebase_source : 924d34a88fe8a48d766f78b02e64275f6e7cdc2b
2018-08-06 10:52:53 -07:00
Boris Zbarsky
d4993da381 Bug 1476142 part 4. Remove some unnecessary QIs on window in various parts of the tree. r=kmag
The crashtest was not testing anything useful, because getInterface is no longer exposed to web content.
2018-08-02 15:26:48 -04:00
dvarga
09eac64963 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-08-02 01:19:44 +03:00
Brian Grinstead
d2ba8811dc Bug 1479543 - Expose getBoxObjectFor on Document instead of XULDocument;r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D2570

--HG--
extra : moz-landing-system : lando
2018-08-01 22:00:44 +00:00
Jon Coppeard
4ff436874c Bug 1475228 - Make asynchronous compile APIs take SourceBufferHolders r=jandem 2018-07-17 14:30:23 +01: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
0e0ef15865 Bug 1479860: Remove aCompileEventHandlers argument in nsXULElement::AddListenerFor. r=bz
All callers pass true.

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

MozReview-Commit-ID: A0L3QglvFJa
2018-08-01 10:42:54 +02:00
Jan de Mooij
9b9ef5d8db Bug 1479363 part 3 - Use JSAutoRealm instead of JSAutoRealmAllowCCW in dom/xbl and dom/xul. r=bholley 2018-07-31 08:37:07 +02:00
Andreea Pavel
840f785b1e Backed out 8 changesets (bug 1475228) for wpt failures e.g. html/semantics/scripting-1/the-script-element/execution-timing/088.html on a CLOSED TREE
Backed out changeset b2d18ea619ec (bug 1475228)
Backed out changeset 45d3ffe3308e (bug 1475228)
Backed out changeset 02b27f8441be (bug 1475228)
Backed out changeset b82c2cf4b3f1 (bug 1475228)
Backed out changeset 2bc8f24dc3fc (bug 1475228)
Backed out changeset 6104ea971587 (bug 1475228)
Backed out changeset 7c83633262db (bug 1475228)
Backed out changeset 34fb24d52f08 (bug 1475228)
2018-07-30 16:49:02 +03:00
Jon Coppeard
cdfffa27fe Bug 1475228 - Make asynchronous compile APIs take SourceBufferHolders r=jandem 2018-07-17 14:30:23 +01:00
Jan de Mooij
80adc67aba Bug 1478955 part 1 - Rename JSAutoRealm to JSAutoRealmAllowCCW. r=luke 2018-07-28 12:12:26 +02:00
Brian Grinstead
6a6ca1a08c Bug 1475342 - Move document.getElementsByAttribute[NS] to ParentNode so it'll work for HTML document and elements;r=bz
It's currently only accessible on XULDocument and XULElement, but that makes porting existing
JS to run in an HTML document inconvenient. We could alternatively change calling JS, but
this can be easily moved and exposed in chrome contexts.

MozReview-Commit-ID: JitYET20NSE

--HG--
extra : rebase_source : 75d823c688cba8d84dc19705e83284be383962f2
2018-07-26 13:40:13 -07:00
Brian Grinstead
b981060d1c Bug 1476678 - Remove document.persist from XULDocument;r=bz
Also remove overload for XULDocument::Persist and the implementation
of XULDocument::DoPersist, since there's only one remaining caller.

MozReview-Commit-ID: CPaTdFJ4GOx

--HG--
extra : rebase_source : b0fdfbdab204f787349b3284fc8c73c4aa799d66
2018-07-21 10:46:25 -07:00
Valentin Gosu
7937c7c4cc Bug 1476928 - Remove nsIURI.CloneIgnoringRef and nsIURI.CloneWithNewRef r=JuniorHsu
The patch introduces NS_GetURIWithNewRef and NS_GetURIWithNewRef which perform the same function.

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

--HG--
extra : moz-landing-system : lando
2018-07-23 11:28:47 +00:00
shindli
cd1abb81b8 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-19 00:49:25 +03:00
Paolo Amadini
dc49387df8 Bug 1472555 - Part 5 - Remove the listbox layout. r=bz,surkov
MozReview-Commit-ID: Bx1p1nTurCz

--HG--
extra : rebase_source : 6910e500f30eb42b45032dbab85a3dc9c014390b
2018-07-18 11:23:32 +01:00
Brendan Dahl
cf9a56e726 Bug 1475262 - Only ignore XUL persist on top level windows. r=smaug
Fixes the incorrect assumption that all XUL <window> elements are top level
windows and will have their attribute persistence handled by the
nsXULWindow. An example of where this assumption fails is the password
manager which opens a <window> within a sub dialog that has no nsXULWindow.

MozReview-Commit-ID: 1f59QPIz42s

--HG--
extra : rebase_source : e91711ead3ba7714d8c6ad241e903dc160ad8bab
2018-07-12 13:55:55 -07:00
Margareta Eliza Balazs
ad89a11136 Backed out 7 changesets (bug 1475228) for causing Spidermonkey rust failures on Linux x64 debug
Backed out changeset e91802969fb7 (bug 1475228)
Backed out changeset 623af73419eb (bug 1475228)
Backed out changeset bf96bd78dc11 (bug 1475228)
Backed out changeset 104817d51d1b (bug 1475228)
Backed out changeset d3829c85f650 (bug 1475228)
Backed out changeset 74d10b32b3ea (bug 1475228)
Backed out changeset dde64fbe2f0d (bug 1475228)
2018-07-17 17:57:55 +03:00
Jon Coppeard
89af4d641f Bug 1475228 - Make asynchronous compile APIs take SourceBufferHolders r=jandem 2018-07-17 14:30:23 +01:00
Kris Maglione
0bfdb4329f Bug 1473631: Part 0a - Make preference callbacks typesafe. r=njn
I initially tried to avoid this, but decided it was necessary given the number
of times I had to repeat the same pattern of casting a variable to void*, and
then casting it back in a part of code far distant from the original type.

This changes our preference callback registration functions to match the type
of the callback's closure argument to the actual type of the closure pointer
passed, and then casting it to the type of our generic callback function. This
ensures that the callback function always gets an argument of the type it's
actually expecting without adding any additional runtime memory or
QueryInterface overhead for tracking it.

MozReview-Commit-ID: 9tLKBe10ddP

--HG--
extra : rebase_source : 7524fa8dcd5585f5a31fdeb37d95714f1bb94922
2018-07-06 12:24:41 -07:00
Brian Grinstead
eafdeadedf Bug 1475305 - Remove document.width and document.height from XULDocument;r=bz
MozReview-Commit-ID: 8jWcMUYA25R

--HG--
extra : rebase_source : c23a2e647922882fc1ca3d7153ec95c5d8a2aa9d
2018-07-12 11:35:11 -07:00
Emma Malysz
ce8c74748f Bug 1454358, removes unneccessary implementation of ScrollBoxObject rr?enndeakin+6102 r=bz,enndeakin+6102
MozReview-Commit-ID: LBQ0RoS0ZVc

--HG--
rename : dom/webidl/ScrollBoxObject.webidl => dom/chrome-webidl/XULScrollElement.webidl
rename : layout/xul/ScrollBoxObject.cpp => dom/xul/XULScrollElement.cpp
rename : layout/xul/ScrollBoxObject.h => dom/xul/XULScrollElement.h
extra : rebase_source : 6a0de76dfdacbc29d261a4aea703a44f87ad7e12
2018-06-25 10:11:31 -07:00
Bogdan Tara
6dbc2726d8 Backed out changeset b099e7e0b264 (bug 1454358) for build bustages on Element.h CLOSED TREE
--HG--
rename : dom/chrome-webidl/XULScrollElement.webidl => dom/webidl/ScrollBoxObject.webidl
rename : dom/xul/XULScrollElement.cpp => layout/xul/ScrollBoxObject.cpp
rename : dom/xul/XULScrollElement.h => layout/xul/ScrollBoxObject.h
2018-07-12 01:50:53 +03:00
Emma Malysz
c28a132d13 Bug 1454358, removes unneccessary implementation of ScrollBoxObject rr?enndeakin+6102 r=bz,enndeakin+6102
MozReview-Commit-ID: LBQ0RoS0ZVc

--HG--
rename : dom/webidl/ScrollBoxObject.webidl => dom/chrome-webidl/XULScrollElement.webidl
rename : layout/xul/ScrollBoxObject.cpp => dom/xul/XULScrollElement.cpp
rename : layout/xul/ScrollBoxObject.h => dom/xul/XULScrollElement.h
extra : rebase_source : ad00e7030e50229975b0bc0d3c622af4fe244a79
2018-06-25 10:11:31 -07:00
Brendan Dahl
133e16ecf4 Bug 1449791 - Remove platform support of overlays. r=bz
The following was removed:
- the main meat of the overlays and interface in XULDocument
- all overlay observers and forward references
- the notion of a master document
- XUL overlay provider
- manifest parsing of overlay attribute
- references to "overlay" atom
- restrictions on persistence (only need because of overlays)
- unused code that the above referenced

I also attempted to update comments that referenced overlays, but there is still
some work to be done here.


MozReview-Commit-ID: 8lrirzcgSuJ

--HG--
extra : rebase_source : 25b4e1d3fb2af6f02d894887271fd345c9c2083b
2018-03-28 18:20:04 -07:00
Margareta Eliza Balazs
fd5c37f1dd Merge inbound to mozila-central. a=merge 2018-07-06 12:47:20 +03:00
Neil Deakin
0d504e92c3 Bug 1437638, move frame loader property from XULElement to XULFrameElement, removing many checks that only apply to child frames instead of every XUL element. Since it is assumed that most frames/browsers will have frame loaders created for them, and that there aren't many of them, we can use a member field instead of slots, so remove the slot property, r=bz 2018-07-05 20:14:29 -04:00
Neil Deakin
f08f9ce4af Bug 1437638, move frame, browser and editor to be based on XULFrameElement, a new subclass of XULElement, r=paolo,bz 2018-07-05 20:14:18 -04:00
Brendan Dahl
cba4aa7f3a Bug 1466897 - Rename nsIRootBox to nsIPopupContainer. r=mats
MozReview-Commit-ID: D4GgReAEelG

--HG--
rename : layout/xul/nsIRootBox.h => layout/xul/nsIPopupContainer.h
extra : rebase_source : 6670156e9958d6fb51860fe92bbb4ffbf5789267
2018-06-26 17:29:55 -07:00
Andrea Marchesini
14d462eeb3 Bug 1418246 - Return valid columnNumber value in CSP violation events, r=ckerschb 2018-07-05 08:21:04 +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
c7d35aa526 Bug 1470930: Use enums for passing arguments for event dispatch. r=smaug
MozReview-Commit-ID: DsNuF7GAflJ
2018-06-26 18:22:06 +02:00
Andi-Bogdan Postelnicu
4f8b7d9e04 Bug 1453795 - XPToolkit - Initialize member fields in classes/ structures. r=jvarga
--HG--
extra : rebase_source : 5db6a49a59781828afd2b4b8d273299c805547c9
2018-06-15 14:12:46 +03:00
Chris Peterson
2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Emilio Cobos Álvarez
bd7c1e4e8c Bug 1468133: Remove the optimization to lazily load non-SVG styles since it's not relevant anymore. r=heycam
This was a memory-saving optimization introduced as part of dependencies for bug
686875, but a more general system landed in bug 77999 for Gecko and
https://github.com/servo/servo/pull/18509 for Servo.

So now it's probably even a bit of a pessimization (though probably not huge),
and given this causes bugs like bug 1462742, bug 1157592, and bug 1468145, and
fishiness like the one pointed out in this bug, we may as well remove it.

The performance impact of having to lookup through more rules should be minimal
given the bloom filter and the rule hash optimizations.

This makes me wonder whether we could remove the whole concept of on-demand UA
sheets, since they've caused pain, for example, when the frontend people try
loading <svg>s from NAC (since that triggers sheet loading from frame
construction, which is not good). I'm not concerned about loading mathml.css and
svg.css everywhere, though xul.css may not be as doable since it adds a bunch of
attribute-dependent selectors. Though on the other hand I asserted in the
xul.css code and we don't load it in content with <video> / <input
type="date/time/etc"> and such, afaict, so maybe now that legacy addons are gone
we can remove that sheet from content processes altogether.

MozReview-Commit-ID: 9JCWNZj6BkT
2018-06-22 03:42:46 +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
Brendan Dahl
7c6e7fdabc Bug 1450753 - Remove XUL style overlays. r=Nika
Style overlays are no longer used outside of tests.

MozReview-Commit-ID: 798Id5JITAm

--HG--
extra : rebase_source : edfbfc973f865d72bbc019a26519436157476793
2018-06-06 15:15:25 -07: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