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

21116 Коммитов

Автор SHA1 Сообщение Дата
Matt Woodrow f5dd8136c6 Bug 1615967 - Move customUserAgent to BrowsingContext. r=nika,remote-protocol-reviewers
Differential Revision: https://phabricator.services.mozilla.com/D63040

--HG--
extra : moz-landing-system : lando
2020-02-24 02:15:03 +00:00
Zibi Braniecki dcb4bfbaa7 Bug 1616999 - Rename MozLocale::AddLikelySubtags to Maximize following ECMA402 Intl.Locale convention. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D63561

--HG--
extra : moz-landing-system : lando
2020-02-21 21:03:15 +00:00
Nika Layzell 771fc6dd18 Bug 1615480 - Part 3: Rename nsFrameLoader::mBrowsingContext to avoid confusion, r=kmag
The new name should make it more clear that this should not be the default way
to look up the BrowsingContext instance from a nsFrameLoader, as it does not
ensure that the BrowsingContext has been fully initialized and attached to the
tree.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 21:53:33 +00:00
Nika Layzell a7579eda4b Bug 1615480 - Part 2: Call GetBrowsingContext from ApplySandboxFlags, r=kmag
This will ensure that the BrowsingContext has been attached before trying to
access properties on it.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 21:03:52 +00:00
Nika Layzell 04b9498a12 Bug 1615480 - Part 1: Return a raw pointer from Get[Extant]BrowsingContext, r=kmag
The BrowsingContext is guaranteed to be being kept alive by
`nsFrameLoader::mBrowsingContext` and by the nsDocShell or RemoteBrowser object.
This improves the ergonomics of this helper method, which may help avoid misuse
of `mBrowsingContext`.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 21:03:54 +00:00
Cosmin Sabou 887b32be68 Backed out 3 changesets (bug 1615480) for causing build bustages on nsFrameLoader.cpp.
CLOSED TREE

Backed out changeset d6fd08e3fccf (bug 1615480)
Backed out changeset ad31eae54af2 (bug 1615480)
Backed out changeset 70aff2593d98 (bug 1615480)
2020-02-21 23:00:55 +02:00
Nika Layzell bab25b308b Bug 1615480 - Part 3: Rename nsFrameLoader::mBrowsingContext to avoid confusion, r=kmag
The new name should make it more clear that this should not be the default way
to look up the BrowsingContext instance from a nsFrameLoader, as it does not
ensure that the BrowsingContext has been fully initialized and attached to the
tree.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 18:46:38 +00:00
Nika Layzell 3870045265 Bug 1615480 - Part 2: Call GetBrowsingContext from ApplySandboxFlags, r=kmag
This will ensure that the BrowsingContext has been attached before trying to
access properties on it.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 18:45:25 +00:00
Nika Layzell df715e383d Bug 1615480 - Part 1: Return a raw pointer from Get[Extant]BrowsingContext, r=kmag
The BrowsingContext is guaranteed to be being kept alive by
`nsFrameLoader::mBrowsingContext` and by the nsDocShell or RemoteBrowser object.
This improves the ergonomics of this helper method, which may help avoid misuse
of `mBrowsingContext`.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 18:44:57 +00:00
Sean Feng ac8fcce95b Bug 1617223 - Remove unused mPostMessageEventQueue from nsGlobalWindowOuter r=bzbarsky
Differential Revision: https://phabricator.services.mozilla.com/D63691

--HG--
extra : moz-landing-system : lando
2020-02-21 17:43:59 +00:00
Emilio Cobos Álvarez 7ee58cb469 Bug 1601118 - Fix nsFind state initialization logic. r=smaug
We should start seeking from the child-at-start/end-offset, rather than the
selection container.

The logic to select the starting node was backwards too...

If we're finding backwards we want to start looking from the beginning of the
range and vice versa. But I think that doesn't really matter since
nsWebBrowserFind always gives us a start range with start == end.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 17:41:34 +00:00
Mihai Alexandru Michis 1c3183cf0a Backed out changeset 9a03944aff45 (bug 1601118) for causing AssertionError in geckoview.test.FinderTest
CLOSED TREE
2020-02-21 16:14:06 +02:00
Emilio Cobos Álvarez aa5e974d27 Bug 1601118 - Fix nsFind state initialization logic. r=smaug
We should start seeking from the child-at-start/end-offset, rather than the
selection container.

The logic to select the starting node was backwards too...

If we're finding backwards we want to start looking from the beginning of the
range and vice versa. But I think that doesn't really matter since
nsWebBrowserFind always gives us a start range with start == end.

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

--HG--
extra : moz-landing-system : lando
2020-02-21 13:19:37 +00:00
Simon Giesecke d94419173b Bug 1613985 - Use default for equivalent-to-default constructors/destructors in dom/base. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63102

--HG--
extra : moz-landing-system : lando
2020-02-21 10:41:47 +00:00
Marco Bonardo 636a4b4b19 Bug 1612403 - File extensions are duplicated for file inputs with custom 'accept'. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D63071

--HG--
extra : moz-landing-system : lando
2020-02-21 08:30:30 +00:00
Masayuki Nakano 1110bedb45 Bug 1613830 - Add `nsINode::GetAsElementOrParentElement()` r=smaug
This patch assumes that only element node can have content node.  I.e., we
won't hit the following `MOZ_ASSERT`:

```
Element* element = nullptr;
nsIContent* content = aContent;
while (content) {
  if (content->IsElement()) {
    element = content->AsElement();
    break;
  }
  content = content->GetParent();
}
MOZ_ASSERT(!content || content == element || content->GetParent() == element);
```

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

--HG--
extra : moz-landing-system : lando
2020-02-21 02:47:05 +00:00
alwu b47157c216 Bug 1611328 - part1 : update document title via WindowGlobal r=nika
In order to generate media default metadata, we need to know document's title in the media session controller.

Therefore, store this property in `WindowGlobal` to allow we access document's title in chrome process.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 19:04:23 +00:00
Zibi Braniecki 1e5ae10955 Bug 1614767 - Use AppLocale to set document direction for chrome, about and resource protcols. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D62528

--HG--
extra : moz-landing-system : lando
2020-02-20 18:43:53 +00:00
Noemi Erli 3d7d919746 Backed out changeset 87347a74981d (bug 1614767) for failures in test_righttoleft.xhtml 2020-02-20 20:13:47 +02:00
Zibi Braniecki e2eb46f328 Bug 1614767 - Use AppLocale to set document direction for chrome, about and resource protcols. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D62528

--HG--
extra : moz-landing-system : lando
2020-02-20 13:19:26 +00:00
Boris Zbarsky d2908d39ab Bug 1581172. Remove NS_ERROR_DOM_TYPE_ERR. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D63500

--HG--
extra : moz-landing-system : lando
2020-02-20 16:57:57 +00:00
Mirko Brodesser 90e61dc61a Bug 1616565: remove indirect calls to `NotifySelectionListeners` in `Selection`. r=smaug
Slightly clarfifies the relation of `Selection` and `nsFrameSelection`.

This requires undesirable 'kungFuDeathGrips'. However, they existed
already, only via an indirect call.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 14:46:21 +00:00
Simon Giesecke 9350e6b741 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-20 11:40:14 +00:00
Andreea Pavel 7c1d6a5705 Backed out changeset 3cfea5c3c067 (bug 1612403) for failing test_bug449141.html on a CLOSED TREE 2020-02-20 11:55:52 +02:00
Marco Bonardo ea2e250303 Bug 1612403 - File extensions are duplicated for file inputs with custom 'accept'. r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D63071

--HG--
extra : moz-landing-system : lando
2020-02-19 16:48:10 +00:00
Andrea Marchesini 43b62b8d44 Bug 1577040 - Part 2: Remove nsContentUtils::IsTrackingResourceWindow() and replace its calls with IsThirdPartyTrackingResourceWindow(), r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D63300

--HG--
extra : moz-landing-system : lando
2020-02-20 07:29:11 +00:00
Ehsan Akhgari c8bd96de51 Bug 1577040 - Part 1: Remove the usages of nsIHttpChannel::IsTrackingResource() in the cookie service, r=Ehsan
Differential Revision: https://phabricator.services.mozilla.com/D63299

--HG--
extra : moz-landing-system : lando
2020-02-20 07:27:24 +00:00
Kris Maglione 0e4ad9af20 Bug 1615508: Fix printing frames. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D63379

--HG--
extra : moz-landing-system : lando
2020-02-19 22:47:05 +00:00
Dorel Luca d5f9df8ee1 Backed out 2 changesets (bug 1613985) for Build bustage on Windows2012. CLOSED TREE
Backed out changeset fd177b40b561 (bug 1613985)
Backed out changeset fb6d62b7f28d (bug 1613985)
2020-02-19 22:22:41 +02:00
Simon Giesecke 59b23375c0 Bug 1613985 - Use MOZ_COUNTED_DEFAULT_CTOR_*/MOZ_COUNTED_DTOR_* macros. r=froydnj
This removes the need for explicit #ifdef NS_BUILD_REFCNT_LOGGING without
introducing user-defined destructors when it is not defined.

Also, some uses of virtual for declaring destructors are replaced by the
appropriate override declaration through these changes.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 18:05:38 +00:00
Andreas Farre fc1c08fe45 Bug 1616199 - Track non-detached BrowsingContextGroups instead of TabGroups. r=mccr8
Differential Revision: https://phabricator.services.mozilla.com/D63148

--HG--
extra : moz-landing-system : lando
2020-02-18 17:16:43 +00:00
Lars T Hansen 5dd2428621 Bug 1609916 - Callback from SC to DOM on SAB cloning. r=luke
When structured clone reads a SAB and creates a new SAB object, or
when it serializes a SAB onto a channel, call a callback that lets the
embedder know.  The embedder can then adjust its policy.  Concretely,
we want to allow the browser to serialize threads in a process that
uses JS shared memory.

Note, for WebAssembly.Memory, reading and writing are delegated to the
cloning operations for SAB, so no special handling is needed.

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

--HG--
extra : moz-landing-system : lando
2020-02-19 09:25:52 +00:00
Boris Chiou 4f3959bfee Bug 1610981 - Eliminate usage of CSSPseudoElement from KeyframeEffect. r=birtles,smaug
Replace ElementOrCSSPseudoElement with Element and add PseudoElement (which is
a DOMString) into KeyframeAnimationOptions and KeyframeEffect.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 20:44:14 +00:00
Mike Shal d8e4653d19 Bug 1611326 - Default to py3_action, and add a py2 attribute to GENERATED_FILES; r=firefox-build-system-reviewers,rstewart
GENERATED_FILES now defaults to python3 unless py2=True is specified as
an argument. All existing GENERATED_FILES scripts and GeneratedFile
templates have the py2=True attribute added, so this patch should
effectively be a no-op.

Going forward, individual scripts can be converted to python3 and their
corresponding py2=True attribute can be deleted. In effect, this patch
will be backed out in pieces until all scripts run in python3, at which
point the py2 attribute itself can be removed.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 13:22:46 +00:00
Nika Layzell 3263c02cc5 Bug 1609324 - Disable BFCache when remote subframes are present, r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D62831

--HG--
extra : moz-landing-system : lando
2020-02-16 13:40:12 +00:00
Henri Sivonen ac7d3f7b2a Bug 1556627 - Make nsFocusManager::SetFocus work in Fission. r=NeilDeakin,farre,masayuki
Differential Revision: https://phabricator.services.mozilla.com/D55651

--HG--
extra : moz-landing-system : lando
2020-02-18 13:30:04 +00:00
Mirko Brodesser ed3750ee94 Bug 1615581: part 3) Rename `mSelectingTableCellMode` to `mMode`. r=jfkthame
Differential Revision: https://phabricator.services.mozilla.com/D62904

--HG--
extra : moz-landing-system : lando
2020-02-18 12:28:59 +00:00
Mirko Brodesser 7471880b9b Bug 1615581: part 2) Group table-cell-selection related members in common struct. r=jfkthame
Simplifies reasoning about table-cell related code, because it's less
coupled with `nsFrameSelection`.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 12:28:52 +00:00
Mirko Brodesser f170973369 Bug 1615581: part 1) Rename `TableSelection` to `TableSelectionMode`. r=jfkthame
See part 2) why this is necessary.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 12:28:45 +00:00
Mirko Brodesser 4688607b42 Bug 1615581: part 0) Correct style around `TableSelection` usage. r=jfkthame
Preparatory step for the following parts.

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

--HG--
extra : moz-landing-system : lando
2020-02-18 12:28:32 +00:00
Masayuki Nakano a5deb4a2c5 Bug 1611374 - Disallow nested `Document.execCommand()` calls in Nightly and early Beta r=smaug
Chrome does not allow nested `Document.execCommand()` calls:
https://source.chromium.org/chromium/chromium/src/+/master:third_party/blink/renderer/core/editing/commands/document_exec_command.cc;l=75;drc=301e5d079a1b4c29c5b17574d0470e6db7370acc

On the other hand, Safari (and Firefox) allows it.  However, it's worthwhile to
follow Chrome's behavior.

This patch makes `Document::ExecCommand()` return `false` when it's called
while running another `Document::ExecCommand()` call on Nightly and early Beta.
This is exactly same behavior, and we should watch broken web apps reports
for a while before riding this on the train.

And this patch sets the pref to `true` when all crash tests under
`editor/libeditor/crashtests` which depend on nested calls of `execCommand` run
since same things may be reproducible with other DOM APIs.

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

--HG--
extra : moz-landing-system : lando
2020-02-15 19:17:00 +00:00
Edgar Chen cdb900d597 Bug 1604140 - Part 3: Add test for focus tabbing through scrollable shadow host; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61945

--HG--
extra : moz-landing-system : lando
2020-02-13 10:05:05 +00:00
Edgar Chen ed544051f6 Bug 1604140 - Part 2: Should skip the shadow host we started on in frame traversal; r=smaug
The original check, `currentContent != startContent`, is to skip the element we started on in frame traversal.
This would happen for instance on a scrollable element, where frame traversal could return the element again.

However, in shadow dom case, the frame traversal may start on a redirected shadow host, where `startContent` is still the original start element.

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

--HG--
rename : testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero.html => testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-scrollable.html
extra : moz-landing-system : lando
2020-02-13 10:05:07 +00:00
Edgar Chen 27785a6d9b Bug 1604140 - Part 1: Fix focus trap within shadow DOM when host is scrollable; r=smaug
The checks for `*TopLevelScopeOwner` are to skip the scope that we have already checked.
But when the shadow host is scrollable, we will traverse anonymous children for the scroll frame first in frame traversal and `oldTopLevelScopeOwner` will be reset.
Then we don't realize that we have already checked the host's scope.

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

--HG--
rename : testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-not-set.html => testing/web-platform/tests/shadow-dom/focus/focus-tabindex-order-shadow-zero-host-not-set-scrollable.html
extra : moz-landing-system : lando
2020-02-17 15:59:52 +00:00
Jens Hausdorf 35db4b006b Bug 1591235 - nsContentUtils::ShouldResistFingerprinting(*) methods should check pref if null is passed as param r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D61572

--HG--
extra : moz-landing-system : lando
2020-02-04 14:32:13 +00:00
Tom Tung 916ea683da Bug 1613900 - P4 - Propagate the exception by setting a pending exception to the JSContext; r=baku
Differential Revision: https://phabricator.services.mozilla.com/D62882

--HG--
extra : moz-landing-system : lando
2020-02-14 15:25:59 +00:00
Tom Tung 0e080c84cd Bug 1613900 - P2 - Report original JS error message to StructuredCloneCallbacksError; r=baku,sfink
The idea is to propagate error messages defined in js.msg to
StructuredCloneHolder and throw it with a data clone error later. So that
developers can still understand the reason why serialization/deserialization
fails and we don't need to implement two similar set of error messages on JS and
DOM sides.

Note that this patch gave up the original idea (report error message to
console), but developers can stil get the error message by catching the
exception.

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

--HG--
extra : moz-landing-system : lando
2020-02-14 13:45:47 +00:00
Hiroyuki Ikezoe f64788828d Bug 1612649 - Call UpdateImageState in SetDeferredLoad to start with `not broken` state for lazy load images. r=emilio
So that we can generate nsImageFrame for lazy load image elements in the first
place.

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

--HG--
rename : layout/reftests/image/moz-broken-matching-1.html => layout/reftests/image/moz-broken-matching-lazy-load.html
extra : moz-landing-system : lando
2020-02-15 08:45:27 +00:00
Masayuki Nakano 9d4fda135f Bug 1601585 - Make `Document::EditingStateChanged()` stop calling `HTMLEditor::BeginingOfDocument()` when there is a pending state change for `contenteditable` elements and there is a selection range r=smaug
For backward compatibility, `Document::EditingStateChanged()` calls
`HTMLEditor::BeginingOfDocument()` to initialize selection when the document
becomes editable first time.  However, it checks whether
`Document::mEditingState` was ``EditingState::eOff` or not.  This looks enough,
but not so because `Document::MaybeEditingStateChanged()` calls it
asynchronously if `contenteditable` element appears at not safe to run script.
Therefore, this patch makes it check `Document::mContentEditableCount` value
which is modified synchronously from `Element::AfterSetAttr()` (additionally,
this makes it check whether there is at least a range in normal selection too,
though).

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

--HG--
extra : moz-landing-system : lando
2020-02-15 08:18:43 +00:00
Emilio Cobos Álvarez 7dbe3f32c3 Bug 1615609 - Rename nsRefreshDriver::IntersectionObservationAdded. r=hiro
The existing name is wrong since recently.

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

--HG--
extra : moz-landing-system : lando
2020-02-15 07:23:51 +00:00