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

51 Коммитов

Автор SHA1 Сообщение Дата
Brendan Dahl c68cd30ef2 Bug 1510785 - Only build XBL related code when MOZ_XBL is defined. r=bzbarsky
When XBL is disabled, no code in dom/xbl will be built. Also, adds ifdefs
to remove any of the XBL related code elsewhere. There's definitely more
that can be done here, but I think it's better to wait to do the rest of
the cleanup when we actually remove the code.

Depends on D45612

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

--HG--
extra : moz-landing-system : lando
2019-10-08 23:52:14 +00:00
Doug Thayer 5a64723655 Bug 1550108 - Eliminate large buffer copies from StartupCache r=froydnj
The signatures were updated in the previous patch to hand us the raw,
uncopied buffers. This just adjusts the callsites to match.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 20:45:09 +00:00
Doug Thayer 47ada02be2 Bug 1550108 - Avoid decompressing entries just to check if they exist r=kmag
This will not behave exactly the same if we had previously written bad
data for the entry that would fail to decompress. I imagine this is rare
enough, and the consequences are not severe enough, that this should be
fine.

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

--HG--
extra : moz-landing-system : lando
2019-10-04 20:44:32 +00:00
Cosmin Sabou 14938bad3b Backed out 10 changesets (bug 1550108) for causing build bustages on StartupCache.cpp.
Backed out changeset cbadfa2bbd7e (bug 1550108)
Backed out changeset 2560f0ab6ebf (bug 1550108)
Backed out changeset 0a1fa8d8bb3c (bug 1550108)
Backed out changeset 62416909cf67 (bug 1550108)
Backed out changeset 60991713b1e2 (bug 1550108)
Backed out changeset f950e30afd90 (bug 1550108)
Backed out changeset e63d0a1fec38 (bug 1550108)
Backed out changeset 7a009d42e7e7 (bug 1550108)
Backed out changeset 395affa4c205 (bug 1550108)
Backed out changeset 0fd41e9dbd2a (bug 1550108)

--HG--
rename : mfbt/lz4/lz4.c => mfbt/lz4.c
rename : mfbt/lz4/lz4.h => mfbt/lz4.h
2019-09-29 01:14:31 +03:00
Doug Thayer cf2166a011 Bug 1550108 - Eliminate large buffer copies from StartupCache r=froydnj
The signatures were updated in the previous patch to hand us the raw,
uncopied buffers. This just adjusts the callsites to match.

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

--HG--
extra : moz-landing-system : lando
2019-09-27 18:17:13 +00:00
Doug Thayer 5f9554635c Bug 1550108 - Avoid decompressing entries just to check if they exist r=kmag
This will not behave exactly the same if we had previously written bad
data for the entry that would fail to decompress. I imagine this is rare
enough, and the consequences are not severe enough, that this should be
fine.

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

--HG--
extra : moz-landing-system : lando
2019-09-27 22:15:01 +00:00
Zibi Braniecki ad66c0ca23 Bug 1517880 - Clean up the XUL Prototype a bit. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34827

--HG--
extra : moz-landing-system : lando
2019-07-26 20:16:22 +00:00
Gurzau Raul 776258cda0 Backed out 5 changesets (bug 1517880) on request from gandalf on a CLOSED TREE.
Backed out changeset 39c3063994bf (bug 1517880)
Backed out changeset 45bf070f451b (bug 1517880)
Backed out changeset d2b9e6bbb4cb (bug 1517880)
Backed out changeset 3bd43f3e288a (bug 1517880)
Backed out changeset 3b54c85a747b (bug 1517880)
2019-07-26 23:09:57 +03:00
Zibi Braniecki 52c27c1da9 Bug 1517880 - Clean up the XUL Prototype a bit. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34827

--HG--
extra : moz-landing-system : lando
2019-07-26 16:11:40 +00:00
Emilio Cobos Álvarez 2b46634961 Bug 1546329 - Remove dead skins code. r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com//D28459
2019-04-25 14:00:06 +02:00
Emilio Cobos Álvarez 88a1b27597 Bug 1546046 - Remove support for XBL resources. r=TYLin
So much unsound code going away :-)

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

--HG--
extra : moz-landing-system : lando
2019-04-23 16:43:15 +00:00
Bogdan Tara ec489aa170 Backed out changeset e85cb54e5944 (bug 1546046) complementary backout after 1470880 was backed out CLOSED TREE 2019-04-23 06:55:29 +03:00
Emilio Cobos Álvarez daef6a8b67 Bug 1546046 - Remove support for XBL resources. r=TYLin
So much unsound code going away :-)

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

--HG--
extra : moz-landing-system : lando
2019-04-22 21:57:22 +00:00
Brendan Dahl 7ebaf1cd2b Bug 1527977 - Share XUL prototype cache with XUL and XHTML. r=smaug
Create a new parser (PrototypeDocumentParser) and content sink
(PrototypeDocumentContentSink) that can be used by both XUL and XHTML.

The new parser moves the code from XULDocument that handles creating and
loading a nsXULPrototypeDocument from either the cache or the source
file. Once the parser has finished loading the prototype it notifies the
content sink. The parser is largely a stub and would be better suited
for use as a nsBaseParser, but nsHTMLDocument unfortunately needs an
nsIParser.

The new content sink has the XULDocument code responsible for the
prototype traversal that creates the DOM (XULDocument::ResumeWalk and
friends) and fires off various events.

To unify XUL and XHTML, the XHTML readystate event sequence is used in
XUL. However, the layout path of XHTML loaded from the prototype cache
more closely follows XUL, where frame initializers and layout don't
start until the entire DOM is built.

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

--HG--
rename : dom/xul/XULDocument.cpp => dom/prototype/PrototypeDocumentContentSink.cpp
rename : parser/moz.build => dom/prototype/moz.build
rename : parser/moz.build => parser/prototype/moz.build
extra : moz-landing-system : lando
2019-03-09 01:00:23 +00:00
Ryan Hunt 00e98538aa Bug 1523969 part 6 - Move method definition inline comments to new line in 'dom/'. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D21106

--HG--
extra : rebase_source : ea3f51c2c11247114deccbc86e90fb02b8a97257
2019-02-25 16:05:29 -06:00
Neil Deakin cb10352f4b Bug 1482389, replace TreeBoxObject with XULTreeElement inherited from XULElement, r=peterv,paolo
--HG--
rename : dom/webidl/TreeBoxObject.webidl => dom/chrome-webidl/XULTreeElement.webidl
rename : layout/xul/tree/TreeBoxObject.cpp => dom/xul/XULTreeElement.cpp
rename : layout/xul/tree/TreeBoxObject.h => dom/xul/XULTreeElement.h
2018-12-04 11:25:30 -05: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
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
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
Xidorn Quan d9cb92544e Bug 1447828 part 2 - Remove StyleBackendType uses from nsXULPrototypeCache. r=emilio
MozReview-Commit-ID: 1tYFBTk9BqF

--HG--
extra : rebase_source : 72c783c84ff36fddd6d49e79e7912f42bb0c11a8
extra : source : 4972e279ef76127e4898874478fcbd75c9631d76
2018-03-29 02:31:23 +11:00
Eric Rahm 7337adec45 Bug 1439047 - Part 1: Make StartupCache::PutBuffer take ownership of the buffer. r=froydnj
This avoids a redundant alloc and copy in `PutBuffer`. All existing callers
were destroying the passed in buffer after the call.

--HG--
extra : rebase_source : 065505219d70d26bad49c7eba2cec8edf0e9939d
extra : amend_source : 118eddad4dc901da02817c788fb98f6f4c85a3f0
extra : source : 7f0cedfb4bd85bfe1a523168019864c9c6c0e665
2018-02-16 15:30:47 -08:00
Narcis Beleuzu 01dffd73eb Backed out 2 changesets (bug 1439047) for Android build bustages. CLOSED TREE
Backed out changeset 718961d941d4 (bug 1439047)
Backed out changeset 7f0cedfb4bd8 (bug 1439047)
2018-02-24 01:10:22 +02:00
Eric Rahm 8b8acc64f2 Bug 1439047 - Part 1: Make StartupCache::PutBuffer take ownership of the buffer. r=froydnj
This avoids a redundant alloc and copy in `PutBuffer`. All existing callers
were destroying the passed in buffer after the call.

--HG--
extra : rebase_source : 39a21686becedf32c38e58fa832ae47845b2f5e0
2018-02-16 15:30:47 -08:00
Xidorn Quan a0c9e1acaa Bug 1438497 part 3 - Add XUL prototype cache to memory report. r=njn
MozReview-Commit-ID: 7CSEJKFkm7B

--HG--
extra : rebase_source : fe10ebd0d3b5538565e6e9692feb1cb993ef01a8
2018-02-19 21:07:44 +11:00
Masatoshi Kimura f12126aba1 Bug 685236 - Stop using GetNativePath in dom/xul. r=bz
GetPersistentDescriptor is suitable for the serialization format.

MozReview-Commit-ID: JOadBsw9xvM

--HG--
extra : source : 3d63ad5ebff6f06387f0f4b115e5d9bbab59abf9
extra : intermediate-source : 59d5a2bf3d318fd61763d97ae5cb7fd8c0169aaa
2017-12-16 00:32:43 +09:00
Kris Maglione 3876d40960 Bug 1404198: Part 1 - Add non-virtual constructor for nsIObject(Input|Output)Stream and update existing callers. r=njn
MozReview-Commit-ID: 3eoh6AwDJyz

--HG--
extra : rebase_source : 92b18b6ef07d276cac79ce735ca0b592cffbf87e
2017-10-04 20:06:28 -07:00
Masatoshi Kimura f143125cc2 Bug 1326520 - Rename nsIURI.path to pathQueryRef. r=valentin.gosu
MozReview-Commit-ID: DqJdTGopR9G

--HG--
extra : rebase_source : e8c9eb03468c075b79013b6e0bd8b367229c24cd
2017-07-29 20:50:21 +09:00
Ting-Yu Lin 7e1743b337 Bug 1363640 Part 5 - Add a table in nsXULPrototypeCache to cache XBL documents with servo backend. r=bz,heycam
We assume those XBL documents without a bound document use gecko style
backend. Their backend type will be explicitly set when loading in Part 6.

MozReview-Commit-ID: 5c5xtYFvgAD

--HG--
extra : rebase_source : 578b50953d98ffa5280dac3440979e2aba7519cb
2017-05-19 15:18:00 -07:00
Ting-Yu Lin 832d727a8b Bug 1363640 Part 4 - Rename TableForBackendType to StyleSheetTableFor. r=heycam
In the next part, mXBLDocTable will be split into mGeckoXBLDocTable and
mServoXBLDocTable, and a helper function XBLDocTableFor will be added. Hence
this rename to avoid confusion.

MozReview-Commit-ID: CPCd67wKgb1

--HG--
extra : rebase_source : 08dd5c38fd3efab152a0be9e44c4d6536824d67a
2017-05-19 14:32:44 -07:00
Zibi Braniecki 3d91da8726 Bug 1347314 - Migrate calls to ChromeRegistry::GetSelectedLocale to use LocaleService::GetAppLocale. r=jfkthame,Pike
In cases, where the caller is looking for the locale to be used for JS Intl API,
we can now replace it with `undefined` which causes JS Intl API to use the default
locale which since bug 1346674 is resolved to the app locale.

This allows us to remove a lot of calls for the app locale.

The remaining ones are split between `AsBCP47` and `AsLangTag`.
Here, the `AsLangTag` is used, as described in the API docs, for cases where
the language string is used for localization purposes, such as language negotaition
matching to our language resources etc.
`AsBCP47` is used when the returned value is handed over to ICU API.

MozReview-Commit-ID: DzmFEUvMq3N

--HG--
extra : rebase_source : 513ed31d995864939aa893e73c81ffdf591a6617
2017-03-14 16:09:54 -07:00
Sebastian Hengst 0a04f3b9e2 Backed out changeset cc308a73ad05 (bug 1347314) for eslint failure in test_device.html. r=backout 2017-03-22 18:20:26 +01:00
Zibi Braniecki c2cd68a689 Bug 1347314 - Migrate calls to ChromeRegistry::GetSelectedLocale to use LocaleService::GetAppLocale. r=jfkthame,Pike
In cases, where the caller is looking for the locale to be used for JS Intl API,
we can now replace it with `undefined` which causes JS Intl API to use the default
locale which since bug 1346674 is resolved to the app locale.

This allows us to remove a lot of calls for the app locale.

The remaining ones are split between `AsBCP47` and `AsLangTag`.
Here, the `AsLangTag` is used, as described in the API docs, for cases where
the language string is used for localization purposes, such as language negotaition
matching to our language resources etc.
`AsBCP47` is used when the returned value is handed over to ICU API.

MozReview-Commit-ID: DzmFEUvMq3N

--HG--
extra : rebase_source : 13fa4c397ba4c79303a2cd76684b5b8c4bd17331
2017-03-14 16:09:54 -07:00
Brad Werth 7125ec2d5c Bug 1339627 Part 1: Add a Servo-specific StyleSheet table to nsXULPrototypeCache. r=heycam
MozReview-Commit-ID: 98dUNnccdn1

--HG--
extra : rebase_source : 8ae3b8ac218524cc8d701b8d60522ded737071a5
2017-03-06 14:59:37 -08:00
Brad Werth 71665c7275 Bug 1290218 Part 6: Generalize nsXULPrototypeCache to hold StyleSheet instead of CSSStyleSheet. r=heycam
MozReview-Commit-ID: 5OdDzJMZ4lH

--HG--
extra : rebase_source : 52a7944565730421f155789684ef7740299da87f
2017-01-31 12:21:04 -08:00
Jonathan Kew e007b6ec83 Bug 1301655 - pt 0 - Add an optional parameter to nsIChromeRegistry.getSelectedLocale to allow callers to request the locale be returned as a valid BCP47 lang tag. r=gandalf 2016-10-28 12:04:06 +01:00
Xidorn Quan 1dc2955ab8 Bug 1304302 part 8 - Change include of {CSS,Servo}StyleSheet.h to StyleSheetInlines.h. r=heycam
It is a preparation for later patch which moves functions from those
classes into StyleSheet. Some of the functions are better defined in
StyleSheetInlines.h.

This commit is generated by the following command:

find . \( -name '*.h' -or -name '*.cpp' \) -not -name '*StyleSheet*' -exec sed -i -b \
  -e '/^#include/ s_/\(CSS\|Servo\)StyleSheet\.h_/StyleSheetInlines.h_' \
  -e '1,\_^#include "mozilla/StyleSheetInlines.h"_ ! { \_^#include "mozilla/StyleSheetInlines.h"_d }' {} +

MozReview-Commit-ID: 54H5x27Pmso

--HG--
extra : source : e4fe253a8f82c3c58e5191d6af66fb0e85f2df19
2016-09-26 22:03:25 +10:00
Peter Van der Beken 946ac27409 Bug 1251655 - Remove support for JavaScript-DOM-class and JavaScript-DOM-interface. r=bz.
--HG--
extra : rebase_source : 88c93e93905e20d2f6755d67d86902fdfc923eb4
2016-02-14 15:59:48 +01:00
Nathan Froyd 12d9670a60 Bug 1249389 - part 4 - make StartupCache::GetBuffer take a UniquePtr outparam; r=erahm
This change eliminates a number of nsAutoArrayPtr usages, as well as
making the pattern GetBuffer() -> NewObjectInputStreamFromBuffer more
pleasant.
2016-02-18 12:26:28 -05:00
Nathan Froyd f49b2c8d86 Bug 1249389 - part 2 - change NewBufferFromStorageStream's outparam into a UniquePtr; r=erahm
Similar to the previous change to NewObjectInputStreamFromBuffer, we
want to make the ownership transfer out of NewBufferFromStorageStream
more obvious.  Doing this also lets us get rid of some uses of
nsAutoArrayPtr, which is less idiomatic than UniquePtr.
2016-02-18 12:04:40 -05:00
Nathan Froyd cd3c15f774 Bug 1249389 - part 1 - change NewObjectInputStreamFromBuffer to take a UniquePtr argument; r=erahm
Because NewObjectInputStreamFromBuffer takes a raw pointer as input, the
typical coding pattern to use it is:

  nsAutoArrayPtr<char> buf;
  // assign something to buf
  nsresult rv = NewObjectInputStreamFromBuffer(buf, ...);
  if (NS_FAILED(rv)) {
    ...
    return rv;
  }
  buf.forget();

Which is clumsy, error-prone, and obscures the ownership transfer of the
pointer into the stream returned by NewObjectInputStreamFromBuffer.
Let's address all of these concerns by changing the argument to a
UniquePtr<char[]>.
2016-02-18 11:14:02 -05:00
Jesse Ruderman ca10ca8bdf Bug 1244948 - silence the 'loaded script twice' warning. r=bz 2016-02-04 20:43:17 -08:00
Nicholas Nethercote 7d1f9c2d2b Bug 1187151 (part 10) - Replace nsBaseHashtable::Enumerate() calls in dom/ with iterators. r=khuey.
--HG--
extra : rebase_source : b3cdb5676109174c96f3b7dc1e8e9e3db6a0c276
2016-01-27 16:04:59 -08:00
Nicholas Nethercote eed165cf7c Bug 1187151 (part 9) - Replace nsBaseHashtable::Enumerate() calls in dom/ with iterators. r=khuey.
--HG--
extra : rebase_source : e23bf73378e9daafff3c3a6781f815d6053dbe94
2016-01-27 16:04:59 -08:00
Terrence Cole bb224242a8 Bug 1235598 - Part 2: Use TraceEdge exclusively in Gecko; r=smaug
--HG--
extra : rebase_source : 27afd7eecd5a13f8d28b888b64d5e44b3c4a74a5
2015-12-30 08:52:14 -08:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Andrew McCreight e7300e3a7f Bug 1190608, part 1 - Delete trailing whitespace in nsXULElement.cpp and nsXULPrototypeCache.cpp. r=poiru
Also, change the mode line for nsXULElement.cpp to match reality, which is 4 space indentation.
2015-08-04 13:06:14 -07:00
Dragana Damjanovic 7987d2203e Bug 905127 - Part 2 - remove unnecessary nsNetUtil.h includes r=jduell 2015-07-06 07:55:00 +02:00
Jim Chen d77273ce23 Bug 1166356 - Properly detect double-caching in nsXULPrototypeCache; r=ehsan 2015-06-16 19:45:29 -04:00
Jim Chen 435a558d68 Bug 1168916 - Get rid of redundant pref callback in nsXULPrototypeCache; r=janv 2015-06-16 19:45:29 -04:00
Nathan Froyd 2b1ae6e2ca Bug 1153267 - part 1 - use smart-pointer .forget() instead of NS_ADDREF+assign; r=ehsan 2015-03-31 10:03:49 -04:00