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

54 Коммитов

Автор SHA1 Сообщение Дата
Frederik Braun a7153982e8 Bug 1366973: Rename security flags to not contain DATA anymore r=geckoview-reviewers,ckerschb,snorp
Differential Revision: https://phabricator.services.mozilla.com/D83490
2020-07-15 11:20:45 +00:00
Simon Giesecke cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Kashav Madan 2b8ca16f35 Bug 1557407 - Replace DispatchTrustedEvent with DispatchEventOnlyToChrome for various chrome-only events, r=smaug
Adds an |aChromeOnlyDispatch| flag to DispatchCustomEvent to decide whether
to call DispatchTrustEvent or DispatchEventOnlyToChrome.

The following chrome-only events are dispatched with DispatchCustomEvent and now
make use of the flag:

- DOMWindowClose
- fullscreen / willenterfullscreen / willexitfullscreen
- occlusionstatechange
- resolutionchange
- XULAlertClose

and the following were previously dispatched with DispatchTrustedEvent and now
use DispatchEventOnlyToChrome:

- MozBeforeInitialXULLayout
- MozMouseScrollFailed / MozMouseScrollTransactionTimeout
- MozPaintWait / MozPaintWaitFinished
- MozPerformDelayedBlur
- all events fired by APZCCallbackHelper::NotifyMozMouseScrollEvent

Differential Revision: https://phabricator.services.mozilla.com/D76723
2020-06-01 17:11:48 +00:00
Sylvestre Ledru 615c83d723 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D76451
2020-05-25 07:42:38 +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
Emilio Cobos Álvarez 9bf325345b Bug 1639392 - Move nsIStyleSheetLinkingElement::OverrideBaseURI to its only implementation. r=jwatt
It's a PI thing, so keep it there.

Differential Revision: https://phabricator.services.mozilla.com/D76070
2020-05-21 00:40:31 +00:00
Emilio Cobos Álvarez 7353713339 Bug 1639392 - Remove nsIStyleSheetLinkingElement::InitStyleLinkElement. r=jwatt
Always gets false as an argument, and the value starts false, so it's
just dead code.

Depends on D76067

Differential Revision: https://phabricator.services.mozilla.com/D76068
2020-05-20 17:35:25 +00:00
Razvan Maries 958490b3c1 Backed out 4 changesets (bug 1639392) for build bustages on nsCOMPtr.h. CLOSED TREE
Backed out changeset 379e2c6c0491 (bug 1639392)
Backed out changeset ce2500faad38 (bug 1639392)
Backed out changeset cee5116fbef3 (bug 1639392)
Backed out changeset 7c5823c53db8 (bug 1639392)
2020-05-20 19:36:00 +03:00
Emilio Cobos Álvarez 0b3825c885 Bug 1639392 - Move nsIStyleSheetLinkingElement::OverrideBaseURI to its only implementation. r=jwatt
It's a PI thing, so keep it there.

Depends on D76069

Differential Revision: https://phabricator.services.mozilla.com/D76070
2020-05-20 10:32:14 +00:00
Emilio Cobos Álvarez 4b6f3e905b Bug 1639392 - Remove nsIStyleSheetLinkingElement::InitStyleLinkElement. r=jwatt
Always gets false as an argument, and the value starts false, so it's
just dead code.

Depends on D76067

Differential Revision: https://phabricator.services.mozilla.com/D76068
2020-05-20 10:30:32 +00:00
Zibi Braniecki 9a24b61c50 Bug 1627809 - Rename Document::TriggerInitialTranslation to Document::OnParsingCompleted. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D70974
2020-04-30 17:56:11 +00:00
Zibi Braniecki 30bcee56da Bug 1627809 - Rename *DocumentTranslation to *Translation. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D70971
2020-04-30 17:55:26 +00:00
Peter Van der Beken 86602c0e65 Bug 1628282 - Inline nsDocShell::OnLoadingSite into its only caller. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D70179

--HG--
extra : moz-landing-system : lando
2020-04-08 11:48:56 +00:00
Emilio Cobos Álvarez ead4d440e7 Bug 1624657 - Use the right document to create elements from the prototype document. r=smaug
This matches closer the behavior of the HTML parser, which doesn't run custom
element constructors, among other things.

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

--HG--
extra : moz-landing-system : lando
2020-04-05 18:36:00 +00:00
Coroiu Cristina fd8d1a348f Backed out changeset 14eb5adc6cd9 (bug 1624657) for browser-chrome failures at browser/modules/test/browser/browser_UsageTelemetry_searchbar.js 2020-04-05 01:53:18 +03:00
Emilio Cobos Álvarez c7ca3bd932 Bug 1624657 - Use the right document to create elements from the prototype document. r=smaug
This matches closer the behavior of the HTML parser, which doesn't run custom
element constructors, among other things.

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

--HG--
extra : moz-landing-system : lando
2020-04-04 21:53:38 +00:00
Emilio Cobos Álvarez c07f3b6b0b Bug 1622235 - Make defer scripts wait for stylesheets. r=hsivonen
Rename ScriptLoader::mDocumentParsingDone to
ScriptLoader::mDeferCheckpointReached, and make it also get unblocked by
stylesheet loading.

Remove a useless null-check for mDocument as we unconditionally dereference it
below when checking mDocument->HaveFiredDOMTitleChange()

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

--HG--
extra : moz-landing-system : lando
2020-03-20 13:33:11 +00:00
Sean Feng 908efe692e Bug 1377999 - Make TextNode to adapt the DOMArena changes r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62353

--HG--
extra : moz-landing-system : lando
2020-03-17 14:53:54 +00:00
Simon Giesecke aaf6cb4e75 Bug 1617628 - Hide nsBaseHashtable Put overloads in nsRefPtrHashtable subclass. r=froydnj
Differential Revision: https://phabricator.services.mozilla.com/D63899

--HG--
extra : moz-landing-system : lando
2020-02-25 17:03:36 +00:00
Sylvestre Ledru cc2040bf21 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:48:34 +00:00
Dorel Luca 506e65bcab Backed out changeset bbb39655cf71 (bug 1605934) for build bustage in widget/gtk/mozwayland/mozwayland.c 2020-01-18 15:39:55 +02:00
Sylvestre Ledru 6689a37527 Bug 1605934 - Use nested namespaces r=sg
Done with:
./mach static-analysis check --checks="-*, modernize-concat-nested-namespaces" --fix .
and then clang-format on the files

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

--HG--
extra : moz-landing-system : lando
2020-01-18 13:16:39 +00:00
Gabriele Svelto ace6d1063f Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ 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/D55442

--HG--
extra : moz-landing-system : lando
2019-12-06 09:24:56 +00:00
Dorel Luca a381d5c96d Backed out changeset f6e53d1c6518 (bug 1600545) for Android build bustage. CLOSED TREE 2019-12-04 17:32:27 +02:00
Gabriele Svelto bc9290f767 Bug 1600545 - Remove useless inclusions of header files generated from IDL files in dom/ 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/D55442

--HG--
extra : moz-landing-system : lando
2019-12-04 15:01:19 +00:00
Brian Grinstead d981495450 Bug 1593119 - Remove dom/xbl and the MOZ_XBL build option r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D51338

--HG--
extra : moz-landing-system : lando
2019-11-07 00:35:32 +00:00
Mirko Brodesser b2de103bf9 Bug 1593222: part 12) Rename "nsNodeUtils.*" to "MutationObservers.*". r=smaug
Depends on D51827

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

--HG--
rename : dom/base/nsNodeUtils.cpp => dom/base/MutationObservers.cpp
rename : dom/base/nsNodeUtils.h => dom/base/MutationObservers.h
extra : moz-landing-system : lando
2019-11-06 09:08:06 +00:00
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
Brendan Dahl 5915a3e4bf Bug 1575620 - Fix refreshing session restore when using prototype cache. r=smaug
The session restore page keeps its restore list within a text input field
so that the values are persisted even if the page is refreshed. When form
elements were loaded with the prototype cache we didn't call
DoneCreatingElement after creating the element, which means the form values
weren't restored.

The list of elements that require DoneCreatingElement and DoneAddingChildren
to be called was in three (now four) different places, so I moved them to
a central spot in nsIContent to share in all locations. This also highlighted
that the check for <output> nodes is missing from the XML content sink.

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

--HG--
extra : moz-landing-system : lando
2019-09-06 20:27:09 +00:00
shindli b99fd194b2 Backed out changeset 5e9663384022 (bug 1575620) for causing bustages in builds/worker/workspace/build/src/obj-firefox/dist/include/nsIContent.h CLOSED TREE 2019-09-06 22:47:18 +03:00
Brendan Dahl c377fd351d Bug 1575620 - Fix refreshing session restore when using prototype cache. r=smaug
The session restore page keeps its restore list within a text input field
so that the values are persisted even if the page is refreshed. When form
elements were loaded with the prototype cache we didn't call
DoneCreatingElement after creating the element, which means the form values
weren't restored.

The list of elements that require DoneCreatingElement and DoneAddingChildren
to be called was in three (now four) different places, so I moved them to
a central spot in nsIContent to share in all locations. This also highlighted
that the check for <output> nodes is missing from the XML content sink.

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

--HG--
extra : moz-landing-system : lando
2019-09-05 22:26:25 +00:00
Emilio Cobos Álvarez 919bb7ded3 Bug 1571530 - Cleanup slightly SheetComplete, and use the right boolean to notify. r=heycam
This is mostly straight-forward cleanup, but there's a behavior change which
was an oversight from bug 1386840, the regular mObservers stuff didn't pass the
right thing (was passing only mWasAlternate rather than whether it was
deferred).

I think that as a result, only in XML documents (since nsXMLContentSink is the
only thing that adds itself as a global CSS loader observer that ever looks at
this boolean), we may end up breaking this assert:

https://searchfox.org/mozilla-central/rev/9ae20497229225cb3fa729a787791f424ff8087b/dom/base/nsContentSink.cpp#183

(If there are any sheets with non-matching media queries and such).

But I couldn't find a test-case that broke it (tried SVG / XHTML), and in other
documents like pure XML you cannot specify a media query...

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

--HG--
extra : moz-landing-system : lando
2019-08-16 10:56:16 +00:00
Brendan Dahl 0a8d6f243d Bug 1551344 - Part 2: Update outdated comments referencing XULDocument. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D41239

--HG--
extra : moz-landing-system : lando
2019-08-09 17:47:41 +00:00
Zibi Braniecki 90adb39db2 Bug 1517880 - Accumulate l10n elements from prototype during document loading. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D38970

--HG--
extra : moz-landing-system : lando
2019-07-26 20:19:26 +00:00
Olli Pettay 9978173b32 Bug 1517880 - Add a flag for l10n elements created from prototype. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D36067

--HG--
extra : moz-landing-system : lando
2019-07-26 20:16:37 +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 8c51af17fd Bug 1517880 - Accumulate l10n elements from prototype during document loading. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D38970

--HG--
extra : moz-landing-system : lando
2019-07-26 17:12:08 +00:00
Olli Pettay ebcd546db9 Bug 1517880 - Add a flag for l10n elements created from prototype. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D36067

--HG--
extra : moz-landing-system : lando
2019-07-26 16:11:42 +00: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
Boris Zbarsky d5a8a4a595 Bug 1557793 part 3. Change the signatures of various nsContentUtils localization methods to play nicer with the new stringbundle API. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D34201

--HG--
extra : moz-landing-system : lando
2019-06-08 21:26:12 +00:00
Ehsan Akhgari adf073ce68 Bug 836176 - Part 3: Remove nsIHTMLDocument; r=farre
Differential Revision: https://phabricator.services.mozilla.com/D32925

--HG--
extra : moz-landing-system : lando
2019-06-04 17:27:43 +00:00
Boris Zbarsky 6430c24e0a Bug 1548625 part 2. Get rid of some ExposeObjectToActiveJS calls in DOM code. r=mccr8,jonco
The call in VRFrameData::LazyCreateMatrix is not needed because
aRetval.set(aArray) ends up calling into Heap::get() which does a read barrier
and exposes.

The call in nsXULPrototypeScript::Compile is not needed because initializing
the AutoJSAPI will guarantee that the global of the Realm it enters, which is
what we're examining here, will be exposed.

The call in Promise's CreateNativeHandlerFunction is not needed because the
object being passed in was always just-created into a stack Rooted.

The call in MIDIMessageEvent::GetData is not needed because it's always working
with a just-created object.  Also, mData is a Heap, so there will be a read
barrier anyway before anyone gets at the value.

The call in PrototypeDocumentContentSink::ExecuteScript is not needed because
the AutoEntryScript will guarantee that the global of the Realm it enters is
exposed.  And the JSAutoRealm is not needed either, because we're in that Realm
already.

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

--HG--
extra : moz-landing-system : lando
2019-05-03 10:09:11 +00:00
Emilio Cobos Álvarez d2dc6882d2 Bug 1545107 - DocumentStatesChanged should not unconditionally notify if the state hasn't actually changed. r=smaug
It just does wasted work. The new setup is also much more similar to the one
used for element states.

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

--HG--
extra : moz-landing-system : lando
2019-04-17 19:25:50 +00:00
Brendan Dahl 05719da576 Bug 1533883 - Test loading XHTML with and without the prototype. r=smaug
Ensure the prototype is used when the pref is enabled and likewise
when disabled. Also, compare the contents of the DOM with and without the
prototype.

Depends on D27745

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

--HG--
extra : moz-landing-system : lando
2019-04-16 18:46:52 +00:00
Brendan Dahl 51d9c2f820 Bug 1544144 - Fix custom HTML element creation when using prototype and XHTML. r=smaug
Use the correct global for custom HTML elements created from a prototype.
Also, add an error message to make it easier to spot when the
PrototypeDocumentSink fails.

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

--HG--
extra : moz-landing-system : lando
2019-04-15 10:56:03 +00:00
Brendan Dahl 4ac9a7a0eb Bug 1543245 - Prevent HTML script tags from loading twice when using PrototypeDocument. r=smaug
HTML script tags were being loaded once by the element when it was bound
to the tree and a second time by the PrototypeDocumentContentSink. This
patch disables the script element from loading itself.

Differential Revision: https://phabricator.services.mozilla.com/D26823
2019-04-12 13:15:19 -07:00
Coroiu Cristina 9943b037bc Backed out 2 changesets (bug 1543245) for frequently failing devtools at devtools/client/inspector/test/browser_inspector_highlighter-07.js on a CLOSED TREE
Backed out changeset 8e8da015fde1 (bug 1543245)
Backed out changeset a4d256528051 (bug 1543245)
2019-04-11 05:21:18 +03:00
Brendan Dahl 0d976daec9 Bug 1543245 - Prevent HTML script tags from loading twice when using PrototypeDocument. r=smaug
HTML script tags were being loaded once by the element when it was bound
to the tree and a second time by the PrototypeDocumentContentSink. This
patch disables the script element from loading itself.

Depends on D26822

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

--HG--
extra : moz-landing-system : lando
2019-04-10 06:36:06 +00:00
Brendan Dahl 44fd876aaf Bug 1080029 - Support HTML template in XUL documents. r=smaug
Check if the current parent element is an HTML template element and if it
is, append to the document fragment instead of it.

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

--HG--
extra : moz-landing-system : lando
2019-04-09 19:50:00 +00:00