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

3291 Коммитов

Автор SHA1 Сообщение Дата
Kris Maglione 20da940e14 Bug 1596918: Part 3a - Scripted rewrite of most ContentTask.spawn calls to SpecialPowers.spawn calls. r=mccr8,remote-protocol-reviewers,ato
This is generally pretty straightforward, and rewrites nearly all calls. It
skips the ones that it can detect using frame script globals like
`sendAsyncMessage`, though.

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

--HG--
extra : moz-landing-system : lando
2019-12-06 22:14:14 +00:00
Gabriele Svelto 5dc21d568c Bug 1600545 - Remove useless inclusions of header files generated from IDL files in modules/, netwerk/, parser/, security/, startupcache/, storage/, toolkit/, tools/, uriloader/, widget/, xpcom/ and xpfe/ r=Ehsan
The inclusions were removed with the following very crude script and the
resulting breakage was fixed up by hand. The manual fixups did either
revert the changes done by the script, replace a generic header with a more
specific one or replace a header with a forward declaration.

find . -name "*.idl" | grep -v web-platform | grep -v third_party | while read path; do
    interfaces=$(grep "^\(class\|interface\).*:.*" "$path" | cut -d' ' -f2)
    if [ -n "$interfaces" ]; then
        if [[ "$interfaces" == *$'\n'* ]]; then
          regexp="\("
          for i in $interfaces; do regexp="$regexp$i\|"; done
          regexp="${regexp%%\\\|}\)"
        else
          regexp="$interfaces"
        fi
        interface=$(basename "$path")
        rg -l "#include.*${interface%%.idl}.h" . | while read path2; do
            hits=$(grep -v "#include.*${interface%%.idl}.h" "$path2" | grep -c "$regexp" )
            if [ $hits -eq 0 ]; then
                echo "Removing ${interface} from ${path2}"
                grep -v "#include.*${interface%%.idl}.h" "$path2" > "$path2".tmp
                mv -f "$path2".tmp "$path2"
            fi
        done
    fi
done

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

--HG--
extra : moz-landing-system : lando
2019-12-06 09:17:57 +00:00
Boris Zbarsky 75124bdd98 Bug 1517588. Use nsIPrincipal::IsSystemPrincipal instead of nsContentUtils::IsSystemPrincipal r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D53067

--HG--
extra : moz-landing-system : lando
2019-12-05 04:44:32 +00:00
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
Geoff Brown de6c41dd8a Bug 1585119 - Re-enable yet more mochitests on android; r=geckoview-reviewers,snorp
Most of these tests have been disabled for a long time; they run well
in the current test environment.
This completes my review of skipped Android tests.

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

--HG--
extra : moz-landing-system : lando
2019-10-22 20:10:27 +00:00
Alex Catarineu 8d86dd4c94 Bug 1573276 - Always allow localization in error pages r=johannh,peterv
Differential Revision: https://phabricator.services.mozilla.com/D43216

--HG--
extra : moz-landing-system : lando
2019-09-25 10:39:45 +00:00
Sylvestre Ledru d264b841c9 Bug 1576502 - Fix some wording issues r=mhoye
Differential Revision: https://phabricator.services.mozilla.com/D43363

--HG--
extra : moz-landing-system : lando
2019-08-27 15:38:58 +00:00
Alex Catarineu a8b667f825 Bug 467035 - Avoid leaking browser language via DTD r=Gijs,bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D34187

--HG--
extra : moz-landing-system : lando
2019-07-08 10:47:05 +00:00
Victor Porof 572c392d30 Bug 1561435 - Format parser/, a=automatic-formatting
# ignore-this-changeset

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

--HG--
extra : source : 03ab20f6337a695a31afb301410182972e4195a9
2019-07-05 10:56:19 +02:00
Boris Zbarsky 8c4e35413a Bug 1559008. Load catalog DTDs even if we don't have a useful DTD URI, since we ignore that URI anyway when we find a catalog DTD. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D34815

--HG--
extra : moz-landing-system : lando
2019-06-24 12:45:22 +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
Sylvestre Ledru 993c03acb1 Bug 1552795 - Remove all trailing whitespaces in idl files r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D31769

--HG--
extra : moz-landing-system : lando
2019-05-22 22:37:14 +00:00
Peter Van der Beken 3991c12564 Bug 1539759 - Improve DTD entity handling. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D30248

--HG--
extra : moz-landing-system : lando
2019-05-21 18:24:02 +00:00
Mihai Alexandru Michis 8187c0826d Backed out changeset 16c03995ac55 (bug 1539759) for causing Buffer Overflow in nsExpatDriver.cpp
--HG--
extra : rebase_source : 0b9e64681becc725d8550f4a6820166ce8fba2bf
2019-05-13 18:16:39 +03:00
Peter Van der Beken 068b07cee6 Bug 1539759 - Improve DTD entity handling. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D30248

--HG--
extra : moz-landing-system : lando
2019-05-13 07:32:42 +00:00
Boris Zbarsky 89d6eb2831 Bug 325352 part 1. Align our "defined insertion point" concept more closely with the spec's "script nesting level" concept. r=hsivonen
This also exposes an accessor for whether the parser has a nonzero script nesting level.

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

--HG--
extra : moz-landing-system : lando
2019-05-08 06:10:47 +00:00
Cosmin Sabou 58c0da101a Backed out changeset 03166449953f (bug 1539759) on request from past for causing bug 1548990. CLOSED TREE 2019-05-04 11:02:30 +03:00
Gijs Kruitbosch c1c14ab7ad Bug 1539759 - improve DTD entity handling, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D27904

--HG--
extra : moz-landing-system : lando
2019-05-03 09:13:58 +00:00
Narcis Beleuzu c8e45a1834 Backed out changeset 4c6e2e3f23f9 (bug 1539759) for failures on nsExpatDriver::WillBuildModel . CLOSED TREE 2019-05-02 13:42:29 +03:00
Gijs Kruitbosch 54d985d143 Bug 1539759 - improve DTD entity handling, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D27904

--HG--
extra : moz-landing-system : lando
2019-05-02 09:22:10 +00:00
Oana Pop Rus 594cead134 Backed out changeset 5f451bcec205 (bug 1539759) for build bustages in nsExpatDriver.cpp on a CLOSED TREE 2019-05-02 11:52:32 +03:00
Gijs Kruitbosch 170118c247 Bug 1539759 - improve DTD entity handling, r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D27904

--HG--
extra : moz-landing-system : lando
2019-05-02 08:19:08 +00:00
Sylvestre Ledru e226046cb8 Bug 1547143 - Format the tree: Be prescriptive with the pointer style (left) r=Ehsan
# ignore-this-changeset

Depends on D28954

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

--HG--
extra : moz-landing-system : lando
2019-05-01 08:47:10 +00:00
Brian Grinstead ede8c44ef2 Bug 1544322 - Part 2.1 - Remove the [type] attribute for one-liner <script> tags loading files in /tests/SimpleTest/ in everything except for dom/ r=bzbarsky
This excludes dom/, otherwise the file size is too large for phabricator to handle.

This is an autogenerated commit to handle scripts loading mochitest harness files, in
the simple case where the script src is on the same line as the tag.

This was generated with https://bug1544322.bmoattachments.org/attachment.cgi?id=9058170
using the `--part 2` argument.

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

--HG--
extra : moz-landing-system : lando
2019-04-16 03:50:44 +00:00
Henri Sivonen 38ab798925 Bug 1540675 - Handle line breaks correctly in comment end bang state. r=alchen.
Differential Revision: https://phabricator.services.mozilla.com/D25594
2019-04-15 13:40:14 +03:00
Mike Hommey d452755d02 Bug 1542996 - Remove duplicate component registration. r=kmag
Bug 1478124 and bug 1524687 converted many things to static xpcom
component registration, but somehow left the corresponding C++
initialization.

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

--HG--
extra : moz-landing-system : lando
2019-04-09 18:58:49 +00:00
Mike Hommey 071a2fe984 Bug 1541792 - Replace linker magic with manual component registration. r=froydnj
Before bug 938437, we had a rather large and error-prone
nsStaticXULComponents.cpp used to register all modules. That was
replaced with clever use of the linker, which allowed to avoid the mess
that maintaining that file was.

Fast forward to now, where after bug 1524687 and other work that
preceded it, we have a much smaller number of remaining static xpcom
components, registered via this linker hack, and don't expect to add
any new ones. The list should eventually go down to zero.

Within that context, it seems to be the right time to get rid of the
magic, and with it the problems it causes on its own.

Some of those components could probably be trivially be converted to
static registration via .conf files, but I didn't want to deal with the
possible need to increase the number of dummy modules in XPCOMInit.cpp.
They can still be converted as a followup.

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

--HG--
extra : moz-landing-system : lando
2019-04-05 02:30:56 +00:00
Ian Moody 3e10462c9e Bug 1541024 - parser/ automated ESLint no-throw-literal fixes. r=hsivonen
Result of running:
$ mach eslint -funix parser/ | sed -Ee 's/:.+//' - | xargs sed -E \
    -e 's/throw ((["`])[^"]+\2);/throw new Error(\1);/g' \
    -e 's/throw ((["`])[^"]+\2 \+ [^ ";]+);/throw new Error(\1);/g' \
    -e 's/throw \(/throw new Error(/g' -i

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

--HG--
extra : moz-landing-system : lando
2019-04-05 11:31:01 +00:00
Henri Sivonen c798ef580c Bug 1534346 - Mark malformed SVG scripts as malformed for real. r=alchen
Differential Revision: https://phabricator.services.mozilla.com/D24347

--HG--
extra : moz-landing-system : lando
2019-03-21 20:39:22 +00:00
Sylvestre Ledru 4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Boris Zbarsky 2e5c884144 Bug 1489308 part 5. Align the work we do on document.open with the spec. r=mccr8,smaug
The main behavior changes are:

1) We no longer create a new Window when doing document.open().  We use the
same Window but remove all the event listeners on it and on the existing DOM
tree before removing the document's existing kids.

2) We no longer create a new session history entry.  The existing one always
gets replaced instead.

3) We now support document.open on documents that are not in a Window.

The reasons for the various test changes are as follows:

The change to browser_modifiedclick_inherit_principal.js is because we no
longer set the docshell to a wyciwyg URL when document.open() happens and the
test was depending on that to terminate.

browser_wyciwyg_urlbarCopying.js is being removed because it's trying to test
wyciwyg URIs, which no longer exist.

The changes in docshell/test/navigation are because document.open() no longer
affects session history.  One of the tests was testing the interactions there
and is being removed; another is being repurposed to just test that
document.open() does not affect history.length.

The change to test_x-frame-options.html is because document.open() now removes
event listeners on the window, which it didn't use to do (and in the specific
case in this test reused the existing inner too, so the listener was still
around in practice).  The new behavior matches other browsers.

The removal of test_bug172261.html is because document.open() no longer affects
session history, so you can't go back across it or forward to the "opened"
state, so the situation that test is trying to test no longer exists.

The changes to test_bug255820.html are because reloading a document after
document.open() will now just load the URL of the document that was the entry
document for the open() call, not reload the written content.  So there's not
much point testing reload behavior, and in this test it was just reloading the
toplevel test file inside the frames.

The change to test_bug346659.html is because now we no longer create a new
Window on document.open().

The change to test_bug1232829.html is because document.open() (implicit in this
test) no longer adds history entries, so the back() was just leaving the test
page instead of going back across the document.open().  The test is a
crashtest in practice, so might still be testing something useful about how
document.open() interacts with animations.

The change to test_bug715739.html is because the URL of the document after
document.open() is now the URL of the entry document, not a wyciwyg URL, so
reload() has different behavior than it used to.

The change to test_bug329869.html is because now when we go back we're
reloading the original document we had, not doing a wyciwyg load, and the
security info now doesn't include the untrusted script.

The changes to the wpt expectations are removing a bunch of expected failures
now that we pass those tests and disabling some tests that are fundamentally
racy and hence fail randomly.  The latter all have github issues filed for the
test problem.

The change to testing/web-platform/tests/common/object-association.js is fixing
tests that were not matching the spec (and were failing in other browsers).

The change to parser-uses-registry-of-owner-document.html is fixing tests that
were not matching the spec (and were failing in other browsers).

The change to document-write.tentative.html is because the test was buggy: it
was using the same iframe element for all its tests and racing loads from some
tests against API calls from other tests, etc.  It's a wonder it ever managed
to pass, independent of these patches (and in fact it doesn't pass according to
wpt.fyi data, even in Firefox).

The changes in html/browsers/history/the-history-interface are because
document.open() no longer adds history entries.  The test was failing in all
other browsers for the same reason.

The changes in html/browsers/history/the-location-interface are because
reloading a document.open()-created thing now loads the URL of the page that
was the entry document for the open() call.  The test was failing in all other
browsers.

The change to reload_document_open_write.html is because we now reload the url
of the document that entered the script that called open() when we reload, not
the written content.  Other browsers were failing this test too; Gecko with
the old document.open implementation was the only one that passed.

The change to http-refresh.py is to fix a test bug: it was not returning a
Content-Type header, so we were putting up helper app dialogs, etc.

The change to test_ext_contentscript.js is because we no create a new global
for document.open() calls.  Kris Maglione OKed this part.

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

--HG--
extra : moz-landing-system : lando
2019-02-27 23:24:48 +00:00
Jonathan Kingston f6680698bd Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-27 23:42:27 +00:00
Jonathan Kingston c4853316e7 Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:31 +00:00
Jonathan Kingston f7e35ae39e Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-27 23:41:04 +00:00
Dorel Luca 4a4dcd57fa Backed out 4 changesets (bug 1525319) for Android failures in dom/base/test/test_progress_events_for_gzip_data.html
Backed out changeset b73f033efb41 (bug 1525319)
Backed out changeset 1d318d5c6b98 (bug 1525319)
Backed out changeset 6d73418988d4 (bug 1525319)
Backed out changeset 84ca79bd2dc3 (bug 1525319)
2019-02-25 04:06:11 +02:00
Jonathan Kingston 63ab2bd8aa Bug 1525319 - Removing context from OnDataAvailable r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20881

--HG--
extra : moz-landing-system : lando
2019-02-24 20:27:55 +00:00
Jonathan Kingston 332531fa9c Bug 1525319 - Removing context from OnStopRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20770

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:59 +00:00
Jonathan Kingston 2441197975 Bug 1525319 - Removing context from OnStartRequest r=valentin
Differential Revision: https://phabricator.services.mozilla.com/D20769

--HG--
extra : moz-landing-system : lando
2019-02-24 20:26:16 +00:00
Kris Maglione b2f85650a1 Bug 1524687: Part 12 - Convert everything else to static registration. r=erahm
--HG--
extra : source : 625f71135038f79c075f758e316fbb00097c9a18
extra : intermediate-source : 7a1ef487a9e74d66b112034051e49b77023860b8
extra : histedit_source : 88d19dbee4a99faa191e49e2847c4c59aba05b0c%2C5ee702f97153152d31124e0c5f3e8318cbeb3195
2019-01-29 16:03:41 -08:00
arthur.iakab 470dbf03b6 Backed out 5 changesets (bug 1524687) for causing build bustages on platform.h CLOSED TREE
Backed out changeset 0f06a6b51bfe (bug 1524687)
Backed out changeset 7a1ef487a9e7 (bug 1524687)
Backed out changeset accad7b4cbc7 (bug 1524687)
Backed out changeset eb33f7e6467c (bug 1524687)
Backed out changeset 86cf09db340b (bug 1524687)
2019-02-21 02:04:02 +02:00
Kris Maglione 95c0cf7aa9 Bug 1524687: Part 12 - Convert everything else to static registration. r=erahm
--HG--
extra : rebase_source : ccc1b4f8559152237e523b67ea76e2b406c1cb11
extra : intermediate-source : e8ad5619116c31fc4d38e0e789ddb9b5d2a5bb25
extra : source : 625f71135038f79c075f758e316fbb00097c9a18
2019-01-29 16:03:41 -08:00
Jonathan Kingston 3421b8fcff Bug 1520868 - Replacing AsyncOpen2 with AsyncOpen always r=valentin
Replacing js and text occurences of asyncOpen2
Replacing open2 with open

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

--HG--
rename : layout/style/test/test_asyncopen2.html => layout/style/test/test_asyncopen.html
extra : moz-landing-system : lando
2019-02-12 16:08:25 +00:00
Myk Melez 25349d2601 Bug 1518283 - prohibit blank lines at the beginning and end of blocks (eslint padded-blocks) r=mossop,Standard8
Differential Revision: https://phabricator.services.mozilla.com/D17526

--HG--
extra : moz-landing-system : lando
2019-01-30 17:26:25 +00:00
Zibi Braniecki 51cb6c2749 Bug 1518252 - Block layout on Fluent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D17334

--HG--
extra : moz-landing-system : lando
2019-01-25 23:14:03 +00:00
Cosmin Sabou d4afc5310c Backed out 2 changesets (bug 1518252) for frequent clipboard failures on browser_jsterm_middle_click_paste.
Backed out changeset b6f80451898e (bug 1518252)
Backed out changeset 06114c66901f (bug 1518252)

--HG--
extra : rebase_source : 795b3a29b1344ce224207c4034f13d3d7f1a5c53
2019-01-24 02:50:54 +02:00
Zibi Braniecki 5e38c8a5a5 Bug 1518252 - Block layout on Fluent. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D17334

--HG--
extra : moz-landing-system : lando
2019-01-23 21:29:15 +00:00
Margareta Eliza Balazs 9dda825205 Merge mozilla-central to inbound. a=merge CLOSED TREE 2019-01-18 12:31:59 +02:00
Ehsan Akhgari e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Boris Zbarsky eb529dfa42 Bug 1520812. Remove bogus assertion in nsExpatDriver::HandleError. r=hsivonen
Any time we stop a load of an XML document before we've gotten all the data,
we'll end up in this code with mSink null, because nsParser::Terminate ends up
calling nsExpatDriver::DidBuildModel which nulls out mSink, and not getting all
the data means the XML won't be well-formed.

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

--HG--
extra : moz-landing-system : lando
2019-01-17 15:34:15 +00:00
Sylvestre Ledru 47a5dd1fb8 Bug 1519636 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

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

--HG--
extra : moz-landing-system : lando
2019-01-16 08:50:07 +00:00
Henri Sivonen 063ff34a92 Bug 1447707 - Remove the XPIDL SAX interface to the XML parser. r=peterv
Differential Revision: https://phabricator.services.mozilla.com/D14724

--HG--
extra : moz-landing-system : lando
2018-12-19 16:49:31 +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
reimu f4794a2bfb Bug 1501931 - Enable ESLint for parser/ (manual fixes) r=Standard8,mrbkap
Depends on D11920

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

--HG--
extra : moz-landing-system : lando
2018-12-06 20:30:32 +00:00
reimu 4819e4a0ee Bug 1501931 - Enable ESLint for parser/ (automatic fixes) r=Standard8,mrbkap
Differential Revision: https://phabricator.services.mozilla.com/D11920

--HG--
extra : moz-landing-system : lando
2018-12-06 20:34:29 +00:00
Tooru Fujisawa 7983faeb5d Bug 1511393 - Use c-basic-offset: 2 in Emacs mode line for C/C++ code. r=nbp 2018-12-01 04:52:05 +09:00
Benjamin Bouvier a7f1d173a0 Bug 1511383: Update vim modelines after clang-format; r=sylvestre
- modify line wrap up to 80 chars; (tw=80)
- modify size of tab to 2 chars everywhere; (sts=2, sw=2)

--HG--
extra : rebase_source : 7eedce0311b340c9a5a1265dc42d3121cc0f32a0
extra : amend_source : 9cb4ffdd5005f5c4c14172390dd00b04b2066cd7
2018-11-30 16:39:55 +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
Ehsan Akhgari 490e611801 Bug 1508472 - Part 5: Fifth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal. I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

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

--HG--
extra : moz-landing-system : lando
2018-11-29 10:30:46 +00:00
Brian Grinstead 35b0511c9a Bug 1425874 - Implement HTMLMarqueeElement r=bzbarsky
This adds a new class for the marquee tag, instead of overloading HTMLDivElement.
It removes some of the XBL that was used to expose properties to web content.

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

--HG--
extra : moz-landing-system : lando
2018-11-14 05:29:11 +00:00
Henri Sivonen 3a3e5d3765 Bug 1364399 follow-up - Test cases and clarifying comment. r=smaug.
MozReview-Commit-ID: KoHMiyIVb8f
2018-11-07 12:54:42 +02:00
Mark Banner a26105ff45 Bug 1501662 - Add more .eslintrc.js files for test directories (dom, modules, netwerk and parser). r=mossop
Differential Revision: https://phabricator.services.mozilla.com/D9661

--HG--
extra : moz-landing-system : lando
2018-10-24 19:11:17 +00:00
Eric Rahm 2fb6934934 Bug 1492204 - Part 3: Remove references to char_iterator. r=froydnj
We can just use 'iterator' now that nsWritingIterator is gone.

--HG--
extra : rebase_source : 3f6fbafc9b57ce89afba581b224b3dc2295fa614
2018-09-18 12:05:23 -07:00
Eric Rahm 0c061732bd Bug 1492204 - Part 1: Stop using deprecated string writing iterators. r=froydnj
This switches over the few remaining usages of the deprecated
BeginWriting/EndWriting(iterator&) functions to the more standard
BeginWriting/EndWriting() functions.

--HG--
extra : rebase_source : 3c54621d4921eb45157ec4edce0b693bdd7f02d5
2018-09-18 09:44:57 -07:00
Henri Sivonen 89ca07c012 Bug 1487341 - Make Truncate(), SetLength() and Capacity() more efficient by keeping memcpying to the minimum. r=froydnj
MozReview-Commit-ID: 2LeRrWcN8vF

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

--HG--
extra : moz-landing-system : lando
2018-09-17 09:45:02 +00:00
Henri Sivonen 3edc601325 Bug 1402247 - Use encoding_rs for XPCOM string encoding conversions. r=Nika,erahm,froydnj.
Correctness improvements:

 * UTF errors are handled safely per spec instead of dangerously truncating
   strings.

 * There are fewer converter implementations.

Performance improvements:

 * The old code did exact buffer length math, which meant doing UTF math twice
   on each input string (once for length calculation and another time for
   conversion). Exact length math is more complicated when handling errors
   properly, which the old code didn't do. The new code does UTF math on the
   string content only once (when converting) but risks allocating more than
   once. There are heuristics in place to lower the probability of
   reallocation in cases where the double math avoidance isn't enough of a
   saving to absorb an allocation and memcpy.

 * Previously, in UTF-16 <-> UTF-8 conversions, an ASCII prefix was optimized
   but a single non-ASCII code point pessimized the rest of the string. The
   new code tries to get back on the fast ASCII path.

 * UTF-16 to Latin1 conversion guarantees less about handling of out-of-range
   input to eliminate an operation from the inner loop on x86/x86_64.

 * When assigning to a pre-existing string, the new code tries to reuse the
   old buffer instead of first releasing the old buffer and then allocating a
   new one.

 * When reallocating from the new code, the memcpy covers only the data that
   is part of the logical length of the old string instead of memcpying the
   whole capacity. (For old callers old excess memcpy behavior is preserved
   due to bogus callers. See bug 1472113.)

 * UTF-8 strings in XPConnect that are in the Latin1 range are passed to
   SpiderMonkey as Latin1.

New features:

 * Conversion between UTF-8 and Latin1 is added in order to enable faster
   future interop between Rust code (or otherwise UTF-8-using code) and text
   node and SpiderMonkey code that uses Latin1.

MozReview-Commit-ID: JaJuExfILM9
2018-08-14 14:43:42 +03:00
L. David Baron 1e88f0f003 Bug 1369941: Replace single integers N in fuzzy() and fuzzy-if() with 0-N ranges. r=dholbert
This patch was written entirely by the following script:

  #!/bin/bash

  if [ ! -d "./.hg" ]
  then
    echo "Not in a source tree." 1>&2
    exit 1
  fi

  find . -regex '.*\(ref\|crash\)test.*\.list' | while read FILENAME
  do
    echo "Processing ${FILENAME}."
    # The following has four substitutions:
    # * The first one replaces the *first* argument to fuzzy() when it doesn't
    #   have a - in it, by replacing it with an explicit 0-N range.
    # * The second one does the same for the *second* argument to fuzzy().
    # * The third does the same for the *second* argument to fuzzy-if().
    # * The fourth does the same for the *third* argument to fuzzy-if().
    #
    # Note that this is using perl rather than sed because perl doesn't
    # support non-greedy matching, which is needed for the first argument to
    # fuzzy-if.
    perl -pi -e 's/(fuzzy\()([^ ,()-]*)(,[^ ,()]*\))/${1}0-${2}${3}/g;s/(fuzzy\([^ ,()]*,)([^ ,()-]*)(\))/${1}0-${2}${3}/g;s/(fuzzy-if\([^ ]*?,)([^ ,()-]*)(,[^ ,()]*\))/${1}0-${2}${3}/g;s/(fuzzy-if\([^ ]*?,[^ ,()]*,)([^ ,()-]*)(\))/${1}0-${2}${3}/g' "${FILENAME}"
  done

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

--HG--
extra : moz-landing-system : lando
2018-08-09 20:10:21 +00:00
Andrea Marchesini a053cf1c15 Bug 1476306 - Moving NullPrincipal/ContentPrincipal/SystemPrincipal under mozilla namespace - part 1 - NullPrincipal, r=ckerschb 2018-07-17 21:37:48 +02:00
Andrea Marchesini 14d462eeb3 Bug 1418246 - Return valid columnNumber value in CSP violation events, r=ckerschb 2018-07-05 08:21:04 +02:00
Andi-Bogdan Postelnicu 1d049872c5 Bug 1453795 - Parser/HTML Parser - Initialize member fields in classes/ structures. r=mrbkap 2018-06-14 00:08:27 +03:00
Joel Maher 50b91c0a14 Bug 1405428 - skip-if = verify on mochitests which do not pass test-verify. r=gbrown 2018-06-10 05:01:47 -04:00
Joel Maher 5cf551b940 Bug 1392106 - random-if more win7 tests for missing letters. r=RyanVM 2018-06-01 09:29:35 -04:00
Joel Maher bea2e0899f Bug 1392106 - random-if many more win7 tests. r=RyanVM 2018-05-29 13:50:33 -04:00
Joel Maher 29d83f200e Bug 1392106 - random-if many more tests on win7. r=RyanVM 2018-05-25 13:03:59 -04:00
Chris Peterson 71422dcaa9 Bug 1457813 - Part 2: Replace non-asserting NS_PRECONDITIONs with MOZ_ASSERTs. r=froydnj
s/NS_PRECONDITION/MOZ_ASSERT/ and reindent

MozReview-Commit-ID: KuUsnVe2h8L

--HG--
extra : source : c14655ab3df2c9b1465dd8102b9d25683359a37b
2018-04-28 12:50:58 -07:00
Boris Zbarsky d49151ed50 Bug 1452183 part 1. Stop using nsIDOMDocumentFragment in IDL files. r=mccr8 2018-04-17 21:13:03 -04:00
Sebastian Hengst 0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Nicholas Nethercote 4b941e22d0 Bug 1449395 - Remove unnecessary nsStaticAtom.h includes. r=froydnj
For nsCSSAnonBoxes.cpp, nsCSSPseudoElements.cpp, nsDirectoryService.cpp, the
corresponding .h file includes nsStaticAtom.h. For the other files in this
patch, nsStaticAtom.h is not needed at all.

MozReview-Commit-ID: IpMmbXwZHhu

--HG--
extra : rebase_source : 46d0a6b40a41ee233adad7c205cf907fa27de34a
2018-03-29 09:08:54 +11:00
Boris Zbarsky 9bdcd1eca8 Bug 1444872. Remove support for the 'type' parameter to document.open. r=qdot 2018-03-28 18:01:46 -04:00
Tom Ritter 449237fc51 Bug 1378552 - Reduce the liklihood of inadvertently misusing NullPrincipal::Create(). r=ckerschb
NullPrincipal::Create() (will null OA) may cause an OriginAttributes bypass.
We change Create() so OriginAttributes is no longer optional, and rename
Create() with no arguments to make it more explicit about what the caller is doing.

MozReview-Commit-ID: 7DQGlgh1tgJ
2018-03-22 13:36:20 -05:00
Tooru Fujisawa 1adba8c1fc Bug 1442465 - Part 4.2: Stop unnecessarily awaiting on BrowserTestUtils.removeTab (simple part). r=dao 2018-03-19 11:16:45 +09:00
Boris Zbarsky 4e402f9b99 Bug 1445983. <bdi> should be an HTMLElement, not HTMLUnknownElement. r=hsivonen
MozReview-Commit-ID: 9eJ45uXRDfR
2018-03-16 11:26:09 -04:00
Nicholas Nethercote 991955fad8 Bug 1445079 - Remove nsHTMLTags::sTagAtomTable[]. r=froydnj
The atoms in nsHTMLTags are a subset of nsGkAtoms, which means that
sTagAtomTable[] currently ends up holding duplicate pointers to the same static
atoms.

This patch removes sTagAtomTable[]. The only place that used sTagAtomTable[]
was nsHTMLTags::AddRefTable(). It now instead calls NS_GetStaticAtom() to get
the static atoms registered by nsGkAtoms.

The patch also moves some checking of sTagNames from RegisterAtoms() (which is
removed) to AddRefTable().

All this reduces the number of duplicate static atoms from 148 to 12.

MozReview-Commit-ID: 14qXYeoorFr
* * *
[mq]: foo

MozReview-Commit-ID: AgQbXlcvWrt
2018-03-14 09:56:14 +11:00
Nicholas Nethercote d967055f0b Bug 1445079 - Rename nsHTMLTags::sTagUnicodeTable[] as sTagNames[]. r=froydnj
It's just an array of names, not a hash table.

MozReview-Commit-ID: 3rWNNec64UJ
2018-03-14 09:54:43 +11:00
Eric Rahm 916d8bacc7 Bug 1442760 - Switch nsHTMLTags hashtables to nsDataHashtable. r=hsivonen
This converts nsHTMLTags hashtables from PLHash to nsDataHashtable which
gives us both type safety and simpler code. Addtionally `gTagTable` now holds
a nsString instead of a raw char16_t pointer, this has the benefit of the
strings knowing their sizes allowing for more efficient comparisons. We avoid
heap allocations in the nsString by using `AssignLiteral` with the string from
the static string array.

--HG--
extra : rebase_source : 3ab6409de5e933beb868a0b371dff81e56df0810
2018-03-06 17:27:17 -08:00
Sylvestre Ledru 9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Jesse Ruderman 1519b89248 Bug 762726 - Add crashtest. 2017-12-05 11:02:58 -05:00
Jesse Ruderman 6cf039848c Bug 662185 - Add crashtest. 2017-12-05 11:02:58 -05:00
Jesse Ruderman 9098c723e2 Bug 616027 - Add crashtest. 2017-12-05 11:02:58 -05:00
Olli Pettay af3373dc1d Bug 1418002 - Remove HTMLContentElement, r=jessica 2017-11-30 10:57:15 +02:00
Nicholas Nethercote faa8efadfe Bug 1416980 - Remove nsIExtendedExpatSink. r=erahm.
Because none of the expat users need it.

--HG--
extra : rebase_source : 55a9338fe88073b9278f715e57eef926a638f31e
2017-11-14 17:22:49 +11:00
Joel Maher bda41cf05e Bug 1385288 - Disable parser/htmlparser/tests/reftest/bug582940-1.html on osx for frequent failures. r=me, a=testonly 2017-11-13 12:20:03 -05:00
Joel Maher 0daa567ffa Bug 1385288 - Disable parser/htmlparser/tests/reftest/bug582940-1.html on osx for frequent failures. r=me, a=testonly 2017-11-02 13:15:06 -04:00
Joel Maher c101ca4540 Bug 1385288 - Disable parser/htmlparser/tests/reftest/bug582940-1.html on osx debug for frequent failures. r=me, a=testonly 2017-10-31 08:45:45 -04:00
Nicholas Nethercote 8ad99dd7fa Bug 1411893 - Introduce nsStaticAtom. r=emilio,froydnj.
It's a sub-class of nsAtom, useful for cases where you know you are dealing
exclusively with static atoms. The nice thing about it is that you can use
raw nsStaticAtom pointers instead of RefPtr<>. (In fact, the AddRef/Release
implementations ensure that we'll crash if we use RefPtr<nsStaticAtom>.)

MozReview-Commit-ID: 4Q6QHX5h44V

--HG--
extra : rebase_source : e4237f85b4821b684db0ef84d1f9c5e17cdee428
2017-10-27 10:31:13 +11:00
Andi-Bogdan Postelnicu 2a15cd5990 Bug 1411615 - make nsScannerIterator a trivial type in order to use memset. r=hsivonen
MozReview-Commit-ID: 2YpZE8Rryyl

--HG--
extra : rebase_source : 2f8beb81d40d73caaf70f935cbbcb1fbfb2da535
2017-10-26 17:50:26 +03:00
Nicholas Nethercote 21e7dce1a2 Bug 1410294 (part 3) - Overhaul static atom macros. r=froydnj.
There are four things that must be provided for every static atom, two of which
have a macro:
- the atom pointer declaration (no macro);
- the atom pointer definition (no macro);
- the atom char buffer (NS_STATIC_ATOM_BUFFER);
- the StaticAtomSetup struct (NS_STATIC_ATOM_SETUP).

This patch introduces new macros for the first two things: NS_STATIC_ATOM_DECL
and NS_STATIC_ATOM_DEFN, and changes the arguments of the existing two macros
to make them easier to use (e.g. all the '##' concatenation now happens within
the macros).

One consequence of the change is that all static atoms must be within a class,
so the patch adds a couple of classes where necessary (DefaultAtoms, TSAtoms).

The patch also adds a big comment explaining how the macros are used, and what
their expansion looks like. This makes it a lot easier to understand how static
atoms work. Correspondingly, the patch removes some small comments scattered
around the macro use points.

MozReview-Commit-ID: wpRyrEOTHE

--HG--
extra : rebase_source : 9f85d477b4d06c9a9e710c757de1f1476edb6efe
2017-10-22 08:50:25 +11:00
Nicholas Nethercote 074a872086 Bug 1410294 (part 1) - Rename nsStaticAtom as nsStaticAtomSetup. r=froydnj.
Because it's the type we use to set up static atoms at startup, not the static
atom itself.

The patch accordingly renames some parameters, variables, and NS_STATIC_ATOM,
for consistency.

MozReview-Commit-ID: 1a0KvhYNNw2

--HG--
extra : rebase_source : 5c66e5b2dfe053a368bf3584d957198aec4cce91
2017-10-20 14:04:47 +11:00