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

280 Коммитов

Автор SHA1 Сообщение Дата
Edgar Chen 3aeb8d0b4b Bug 1730117 - Part 2: Make EnterModalState suppress event handling for the nested in-process documents; r=smaug
This also makes nsIDOMWindowUtils::SuppressEventHandling work properly.

Differential Revision: https://phabricator.services.mozilla.com/D125615
2021-09-22 14:50:56 +00:00
Sandor Molnar 8bb72e737f Backed out 2 changesets (bug 1730117) for causing wpt failures in no_window_open_when_term_nesting_level_nonzero. CLOSED TREE
Backed out changeset bafc4ddc87f6 (bug 1730117)
Backed out changeset 27a1d92e550c (bug 1730117)
2021-09-21 18:00:06 +03:00
Edgar Chen 1b679a7b3f Bug 1730117 - Part 2: Make EnterModalState suppress event handling for the nested in-process documents; r=smaug
This also makes nsIDOMWindowUtils::SuppressEventHandling work properly.

Differential Revision: https://phabricator.services.mozilla.com/D125615
2021-09-21 11:39:46 +00:00
Butkovits Atila a3bbc4c745 Backed out 2 changesets (bug 1730117) for causing failures at test_suppressed_events_nested_iframe.html. CLOSED TREE
Backed out changeset 649984f4a939 (bug 1730117)
Backed out changeset 37a35b6b54b4 (bug 1730117)
2021-09-21 00:38:17 +03:00
Edgar Chen 97e68450e6 Bug 1730117 - Part 2: Make EnterModalState suppress event handling for the nested in-process documents; r=smaug
This also makes nsIDOMWindowUtils::SuppressEventHandling work properly.

Differential Revision: https://phabricator.services.mozilla.com/D125615
2021-09-20 19:23:52 +00:00
Andi-Bogdan Postelnicu 9945b94835 Bug 1519636 - Reformat recent changes to the Google coding style. r=emilio
Updated with clang-format version 12.0.1 (taskcluster-dNZqCRqWRTqa6cZxPKxh7Q)

Differential Revision: https://phabricator.services.mozilla.com/D122814
2021-08-23 09:30:23 +00:00
Emilio Cobos Álvarez baf18c5198 Bug 1723921 - Throw on invalid pseudo-elements in getComputedStyle() as per spec. r=dholbert,layout-reviewers
I need to update tests, try incoming.

Depends on D121705

Differential Revision: https://phabricator.services.mozilla.com/D121706
2021-08-07 09:55:55 +00:00
Kagami Sascha Rosylight 86a6ba4bda Bug 1723050 - Part 2: Replace typedef by using in dom/base/ r=edgar
Differential Revision: https://phabricator.services.mozilla.com/D121294
2021-08-02 14:40:41 +00:00
Anny Gakhokidze 1620a4511a Bug 1646532 - Move mAreDialogsEnabled, mLastDialogQuitTime and mDialogAbuseCount to BC group, r=nika
Differential Revision: https://phabricator.services.mozilla.com/D119299
2021-07-12 17:53:53 +00:00
Andi-Bogdan Postelnicu 1cf28e7475 Bug 1519636 - Reformat recent changes to the Google coding style. r=emilio
Updated with clang-format version 12.0.0 (taskcluster-KEgO7qdgQ8uaewA6NkRnRA)

Differential Revision: https://phabricator.services.mozilla.com/D115804
2021-05-24 15:08:47 +00:00
Emilio Cobos Álvarez d973da3734 Bug 1710887 - Make modal state handling in window.print() more reliable. r=smaug
If afterprint removes the window we're printing, we'd call
LeaveModalState() without a top window, and never leave the modal state.

Differential Revision: https://phabricator.services.mozilla.com/D115007
2021-05-12 19:26:20 +00:00
Gijs Kruitbosch 4a96c75d24 Bug 1694661 - Update repeat prompt label for content prompts, r=nika,flod
Differential Revision: https://phabricator.services.mozilla.com/D107576
2021-04-07 11:07:16 +00:00
Simon Giesecke 760cc7e936 Bug 1679522 - Fix include directives and forward declarations. r=andi,necko-reviewers,jgilbert
- Add missing include directives and forward declarations.
- Remove some extra include directives.
- Add missing namespace qualifications.
- Move include directives out of namespace in toolkit/xre/GlobalSemaphore.h

Differential Revision: https://phabricator.services.mozilla.com/D98894
2021-03-25 10:19:44 +00:00
Olli Pettay dd5347ded5 Bug 1698549 - Call FireDelayedDOMEvents when restoring a bfcached page, r=peterv
The test isn't testing anything mApplicationCache related, since appcache is basically
no-op code.

Depends on D107930

Differential Revision: https://phabricator.services.mozilla.com/D108487
2021-03-21 21:46:25 +00:00
Alexandru Michis c3da6488ee Backed out changeset f588378316fd (bug 1699259) for causing mochitest failures in test_focusrings.xhtml
CLOSED TREE
2021-03-20 03:10:02 +02:00
Emilio Cobos Álvarez 9d854aa834 Bug 1699259 - Add a ChromeOnly FocusOptions.preventFocusRing to opt out of focus ring heuristics. r=edgar,Gijs
This seems easier than making those heuristics work across processes
somehow.

Differential Revision: https://phabricator.services.mozilla.com/D108931
2021-03-19 23:10:35 +00:00
harry 036ded43ac Bug 1699506 - Part 1 - Add a NSTitlebarAccessoryViewController to ToolbarWindow to track when the titlebar is shown in fullscreen. r=mac-reviewers,mstange
Differential Revision: https://phabricator.services.mozilla.com/D106846
2021-03-18 20:20:39 +00:00
Emilio Cobos Álvarez 52e3823a9c Bug 1699154 - Tweak focusring heuristics for script focus. r=edgar
What we implemented before this patch was basically what the heuristics
in the spec said, which used to be normative:

  https://drafts.csswg.org/selectors/#the-focus-visible-pseudo

That has become non-normative and there's ongoing discussion on what
should happen for cases like this in:

  https://github.com/w3c/csswg-drafts/issues/5885
  https://github.com/web-platform-tests/wpt/pull/27806

There seems to be agreement on that WPT issue on cases like this one, so
let's make it work.

Differential Revision: https://phabricator.services.mozilla.com/D108805
2021-03-18 19:53:38 +00:00
Nika Layzell 27ff2d45df Bug 1697927 - Part 1: Only expose HadOriginalOpener on BrowsingContext, r=farre
Differential Revision: https://phabricator.services.mozilla.com/D108860
2021-03-18 16:15:17 +00:00
smolnar b2e94b592b Backed out changeset 74ab7aa60b1a (bug 1699154) for causing reftest failures. CLOSED TREE 2021-03-18 18:39:44 +02:00
Emilio Cobos Álvarez b892d58030 Bug 1699154 - Tweak focusring heuristics for script focus. r=edgar
What we implemented before this patch was basically what the heuristics
in the spec said, which used to be normative:

  https://drafts.csswg.org/selectors/#the-focus-visible-pseudo

That has become non-normative and there's ongoing discussion on what
should happen for cases like this in:

  https://github.com/w3c/csswg-drafts/issues/5885
  https://github.com/web-platform-tests/wpt/pull/27806

There seems to be agreement on that WPT issue on cases like this one, so
let's make it work.

Differential Revision: https://phabricator.services.mozilla.com/D108805
2021-03-18 15:08:31 +00:00
smolnar 8b8afdb266 Backed out changeset 1c8b807651b8 (bug 1699154) for causing mochitest failures in test_focusrings.xhtml CLOSED TREE 2021-03-18 15:46:51 +02:00
Emilio Cobos Álvarez 1cad7af959 Bug 1699154 - Tweak focusring heuristics for script focus. r=edgar
What we implemented before this patch was basically what the heuristics
in the spec said, which used to be normative:

  https://drafts.csswg.org/selectors/#the-focus-visible-pseudo

That has become non-normative and there's ongoing discussion on what
should happen for cases like this in:

  https://github.com/w3c/csswg-drafts/issues/5885
  https://github.com/web-platform-tests/wpt/pull/27806

There seems to be agreement on that WPT issue on cases like this one, so
let's make it work.

Differential Revision: https://phabricator.services.mozilla.com/D108805
2021-03-18 12:34:31 +00:00
Simon Giesecke ad01a10a3b Bug 1634281 - Use nsTHashMap instead of nsDataHashtable. r=xpcom-reviewers,necko-reviewers,jgilbert,nika,valentin
Note that this patch only transforms the use of the nsDataHashtable type alias
to a directly equivalent use of nsTHashMap. It does not change the specification
of the hash key type to make use of the key class deduction that nsTHashMap
allows for in some cases. That can be done in a separate step, but requires more
attention.

Differential Revision: https://phabricator.services.mozilla.com/D106008
2021-03-10 10:47:47 +00:00
Simon Giesecke f4f7c593e0 Bug 1692835 - Remove nsJSThingHashtable. r=xpcom-reviewers,nika
The only use of nsJSThingHashtable is replaced by a direct use of
nsBaseHashtable.

Differential Revision: https://phabricator.services.mozilla.com/D105971
2021-03-02 09:02:19 +00:00
Edgar Chen 25e174233c Bug 1694152 - Remove unused nsGlobalWindowInner::IsPopupSpamWindow; r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D105975
2021-02-23 07:12:21 +00:00
Emilio Cobos Álvarez ba7c09d55d Bug 1689155 - Don't necessarily show outlines on refocus. r=edgar
Preserve the last state of when we focused the element in that window,
if the focus method is unknown.

Depends on D104861

Differential Revision: https://phabricator.services.mozilla.com/D104863
2021-02-15 19:08:42 +00:00
Mihai Alexandru Michis 02101824c8 Backed out 2 changesets (bug 1689155) for causing bc failures in browser_outline_refocus.js
CLOSED TREE

Backed out changeset bf4ed0fa612b (bug 1689155)
Backed out changeset 78a47c967db3 (bug 1689155)
2021-02-15 19:40:05 +02:00
Emilio Cobos Álvarez c804929923 Bug 1689155 - Don't necessarily show outlines on refocus. r=edgar
Preserve the last state of when we focused the element in that window,
if the focus method is unknown.

Differential Revision: https://phabricator.services.mozilla.com/D104863
2021-02-15 12:41:23 +00:00
Edgar Chen 0916876268 Bug 1690747 - Should also check blur is allowed in BrowsingContext::Blur(); r=hsivonen
When binding delegates blur() to BrowsingContext::Blur, the remote side skips
the check given that there is no js on the stack, but we should not skip the
check. This only affects design-mode which allows the focus moving to the root
element.

Differential Revision: https://phabricator.services.mozilla.com/D104008
2021-02-09 14:56:56 +00:00
Andreea Pavel c546ab6198 Backed out changeset ebb61065ad47 (bug 1690747) for failing mochitests at test_focus_design_mode.html on a CLOSED TREE 2021-02-09 15:11:05 +02:00
Edgar Chen 486af881a2 Bug 1690747 - Should also check blur is allowed in BrowsingContext::Blur(); r=hsivonen
When binding delegates blur() to BrowsingContext::Blur, the remote side skips
the check given that there is no js on the stack, but we should not skip the
check. This only affects design-mode which allows the focus moving to the root
element.

Differential Revision: https://phabricator.services.mozilla.com/D104008
2021-02-09 12:18:15 +00:00
Henri Sivonen 172b8e6584 Bug 1677899 - Trust the process where where focus() is called for focusability. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D104393
2021-02-09 08:03:03 +00:00
Henri Sivonen 0e936b95f1 Bug 1659383 - Check if focus() is allowed even when Window_Binding::focus() delegates to BrowsingContext::Focus(). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D100005
2021-01-18 12:48:42 +00:00
Csoregi Natalia 76177ae407 Backed out changeset d2c7360e9d01 (bug 1659383) for failures on iframe-focuses-parent-different-site.html. CLOSED TREE 2021-01-18 12:36:49 +02:00
Henri Sivonen 5a70da036b Bug 1659383 - Check if focus() is allowed even when Window_Binding::focus() delegates to BrowsingContext::Focus(). r=nika
Differential Revision: https://phabricator.services.mozilla.com/D100005
2021-01-18 07:45:29 +00:00
Nika Layzell e3097163dd Bug 1597437 - Handle 'window.content' legacy getter better with Fission, r=farre,Jamie
Differential Revision: https://phabricator.services.mozilla.com/D100167
2020-12-21 12:08:08 +00:00
Kagami Sascha Rosylight 8ab2900b08 Bug 1680167 - Part 3: MOZ_CAN_RUN_SCRIPT_BOUNDARY in dom/base r=masayuki
Differential Revision: https://phabricator.services.mozilla.com/D98626
2020-12-03 22:08:36 +00:00
Simon Giesecke dd80614fa0 Bug 1678062 - Remove unnecessary includes. r=andi
Differential Revision: https://phabricator.services.mozilla.com/D97467

Depends on D96561
2020-11-23 16:12:02 +00:00
Simon Giesecke 5bfbb2a572 Bug 1673931 - Avoid including Document.h from header files. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D95046

Depends on D95045
2020-11-23 16:07:43 +00:00
Simon Giesecke 971b645fe3 Bug 1660470 - Add missing include directives/forward declarations. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D87865
2020-11-23 16:21:38 +00:00
Steven MacLeod 6cd960cfb3 Bug 1585070 - move nsPIDOMWindowOuter::mIsActive to BrowsingContext. r=kmag
A new `BrowsingContext` field has been added to track the active
browser window for the `:-moz-window-inactive` pseudoclass. This
field takes the place of `nsPIDOMWindowOuter::mIsActive`.

With this change `:-moz-window-inactive` is now fission compatible.

Differential Revision: https://phabricator.services.mozilla.com/D86422
2020-11-20 15:16:58 +00:00
Noemi Erli 60669a2ed8 Backed out changeset 18448a7ebf82 (bug 1585070) for causing failures in test_cocoa_window_focus.html CLOSED TREE 2020-11-17 06:09:50 +02:00
Steven MacLeod 2c4c433439 Bug 1585070 - move nsPIDOMWindowOuter::mIsActive to BrowsingContext. r=kmag
A new `BrowsingContext` field has been added to track the active
browser window for the `:-moz-window-inactive` pseudoclass. This
field takes the place of `nsPIDOMWindowOuter::mIsActive`.

With this change `:-moz-window-inactive` is now fission compatible.

Differential Revision: https://phabricator.services.mozilla.com/D86422
2020-11-16 22:37:51 +00:00
Emilio Cobos Álvarez a33ff60406 Bug 1676843 - Make innerWidth/innerHeight return the actual CSS size rather than a rounded version of it. r=heycam
On Nightly, for now. This allows websites to get the real viewport size.

The rounded size has caused problems in the past (see bug 1648298 / bug
1648265), and changing it would be ideal.

I told the CSSWG that we can experiment with this on Nightly to
alleviate (or prove) compat concerns, in which case we'd need to use a
different solution, see https://github.com/w3c/csswg-drafts/issues/5260.

Differential Revision: https://phabricator.services.mozilla.com/D96826
2020-11-13 12:44:01 +00:00
alwu 1c7f393a54 Bug 1667439 - remove invalid wakelock for 'DOM_Fullscreen'. r=saschanaz
Remove this invalid wakelock because our wakelock system doesn't handle this topic.

Differential Revision: https://phabricator.services.mozilla.com/D94394
2020-10-22 13:45:30 +00:00
Emilio Cobos Álvarez 4e68e78542 Bug 1669925 - Add a printing.trigger keyed scalar to record what triggers a particular print dialog. r=jwatt,marionette-reviewers,maja_zf
In order to avoid over/under-counting, we need to treat window.print()
specially. The new UI was using aOpenWindowInfo.isForPrintPreview for
that, but that doesn't quite work for the old UI (because it will
trigger a regular print, not a preview).

But since isForPrintPreview was only really needed to distinguish
window.print(), just rename it and set it to true when the old UI is
triggered by window.print() as well.

Differential Revision: https://phabricator.services.mozilla.com/D92925
2020-10-09 14:59:46 +00:00
Sylvestre Ledru d9cd198ba1 Bug 1519636 - Reformat recent changes to the Google coding style r=andi,necko-reviewers,dragana
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D92459
2020-10-06 16:12:00 +00:00
Emilio Cobos Álvarez 2c3d952fc7 Bug 1667342 - Make the "deferred window close" keep making sense after bug 1636728. r=smaug
This was only being checked on OnDonePrinting() which isn't called in
the original docshell. Move it to the window because we don't need to
care about document viewers getting closed during print operations,
they're top level browsers that don't run script.

Differential Revision: https://phabricator.services.mozilla.com/D91416
2020-09-25 13:39:01 +00:00
Andrea Marchesini e733096393 Bug 444222 - Update the window.name when doing the navigation, r=smaug,nika
This patch implements the window.name updating in the spec
https://html.spec.whatwg.org/#history-traversal.

Differential Revision: https://phabricator.services.mozilla.com/D81361
2020-09-15 17:51:05 +00:00