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

1236 Коммитов

Автор SHA1 Сообщение Дата
Agi Sferro 6eabf70d45 Bug 1648157 - Add getter for windowUtils.desktopModeViewport. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D93006
2020-10-09 17:32:01 +00:00
Botond Ballo 5fac61e3d1 Bug 1664101 - Store displayport margins in unadjusted form. r=kats
Where an adjustment (to reflect a delta between the APZ and layout
scroll offsets) is necessary, the inputs needed to compute the
adjustment are stored with the margins, and the adjustment is
applied at query time.

A couple of notes on this patch:

 * Storing DisplayPortMargins::mLayoutOffset is probably unnecessary,
   we should be able to just query the scroll frame's layout offset
   when applying the margins.

 * Some callers of DisplayPortMargins::WithNoAdjustment() may be
   incorrect, in that they pass in margins that are relative to the
   visual viewport but do not make a corresponding adjustment.
   This is a pre-existing issue that this patch just makes clearer.

As this is a regression-prone area, this patch is careful to avoid
making any functional changes, leaving the above issues to be
addressed in future bugs.

Differential Revision: https://phabricator.services.mozilla.com/D92506
2020-10-07 22:35:07 +00:00
Botond Ballo 5d6a075ae9 Bug 1667475 - Moved displayport-related functions from nsLayoutUtils to a new DisplayPortUtils class. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D92006
2020-10-03 21:07:34 +00:00
Botond Ballo e6c29de3e7 Bug 1667594 - Move nsLayoutUtils::SurfaceFromElementResult to its own file. r=emilio
Along with a dependent struct DirectDrawInfo.

This allows nsImageRenderer.h and CanvasRenderingContext2D.h to
avoid including nsLayoutUtils.h.

For nsImageRenderer.h in particular, a forward declaration is
not sufficient as nsImageRenderer stores SurfaceFromElementResult
by value.

A couple of method definitions elsewhere are moved out of line
to keep things compiling without including nsLayoutUtils.h in
additional headers.

Differential Revision: https://phabricator.services.mozilla.com/D91684
2020-09-30 21:05:34 +00:00
Emilio Cobos Álvarez 7182af8c8b Bug 1666065 - Make ZoomToFocusedInput() handle fixed-pos subframes of the RCD. r=botond
I haven't been able to repro the issue so I'm not quite sure how to test
this...

Differential Revision: https://phabricator.services.mozilla.com/D91307
2020-09-25 17:20:59 +00:00
Makoto Kato e82e9e223d Bug 1425291 - Part 3. Add autocapitalize to InputContext. r=masayuki
Autocapitalize isn't applied if type is url, email or password. If these types,
truncate autocapitalize value in InputContext not to pass it to widget.

Differential Revision: https://phabricator.services.mozilla.com/D86676
2020-09-15 14:27:00 +00:00
Gerald Squelart 5f9ff13253 Bug 1663543 - Convert PROFILER_ADD_MARKER and 2-arg profiler_add_marker to PROFILER_MARKER_UNTYPED - r=gregtatum
Mostly mechanical change, with some extra work where non-literal names are provided.
Also, when this is the only profiler call in a file, `#include "GeckoProfiler.h"` can be changed to `#include "mozilla/ProfilerMarkers.h"`.

Differential Revision: https://phabricator.services.mozilla.com/D89415
2020-09-10 03:02:36 +00:00
Jeff Walden 6d5beafab1 Bug 1663365 - Move various Object-related functions to a new js/public/Object.h header. r=jandem
Differential Revision: https://phabricator.services.mozilla.com/D89333
2020-09-08 22:55:38 +00:00
Emilio Cobos Álvarez 47916c8c70 Bug 1662987 - ClearDataService should know how to clear the stylesheet cache. r=baku
Much like it does for images.

Differential Revision: https://phabricator.services.mozilla.com/D89242
2020-09-08 19:38:43 +00:00
Kris Maglione 0c976d908a Bug 1651519: Part 2 - Also remove nsIDOMWindowUtils::outerWindowID. r=nika,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82957
2020-08-17 20:22:12 +00:00
Kris Maglione 3af8c4138c Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-08-17 20:20:50 +00:00
Kartikaya Gupta 0806eb1e4e Bug 1656223 - When exiting fullscreen, ensure the content viewer size is updated before first reflow. r=emilio
Instead of getting/setting the size on the view manager on a fullscreen
change, this updates the code to get/set the size on the content viewer, which
internally sets the size on the view manager. Doing this ensures that the
content viewer size is updated prior to the reflow, which is required for
the MobileViewportManager to update its internal notions of size and to update
the visual viewport properly.

Differential Revision: https://phabricator.services.mozilla.com/D87161
2020-08-15 20:02:19 +00:00
Emilio Cobos Álvarez 6c008dd4fd Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-11 16:42:46 +00:00
Razvan Maries eed7de660b Backed out 2 changesets (bug 1639328) for perma failures on test_bug1639328.html. CLOSED TREE
Backed out changeset 23130282a937 (bug 1639328)
Backed out changeset 8628c5cddd14 (bug 1639328)
2020-08-11 05:13:41 +03:00
Emilio Cobos Álvarez 36a4392364 Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-10 18:39:31 +00:00
Razvan Maries b29c16e540 Backed out 2 changesets (bug 1639328) for perma failures on test_bug1639328.html and browser_hidden_iframe.js. CLOSED TREE
Backed out changeset be370bea0702 (bug 1639328)
Backed out changeset 954bf9f3dca5 (bug 1639328)
2020-08-10 21:02:42 +03:00
Emilio Cobos Álvarez 9d054b84e4 Bug 1639328 - Make sure BrowserChilds for OOP iframes start in a consistent state. r=smaug
Right now they start with a FullyHidden() effect info, but with a
"visible" widget, and thus active docshell and so on.

That's no good :)

Differential Revision: https://phabricator.services.mozilla.com/D86364
2020-08-10 14:50:27 +00:00
Timothy Nikkel 2de46c6ff5 Bug 1656802. Make visual viewport only layout scrollbars affect the composition bounds/visual viewport. r=emilio,kats
AFAICT the spec says that these layout scrollbars that take up no layout space that scroll the visual viewport do affect the size of the visual viewport. (Double check this)

Most other users don't care about the size of these special scrollbars.

I left nsIDOMWindowUtils::getScrollbarSize unchanged (NB different from nsIDOMWindowUtils::getScrollbarSizes which is modified by this patch) because I'm less sure. I will file a followup about it.

Differential Revision: https://phabricator.services.mozilla.com/D85708
2020-08-07 11:40:52 +00:00
Bogdan Tara 06a9a6d13f Backed out 11 changesets (bug 1656802) for async-scrolling reftests failures CLOSED TREE
Backed out changeset 941ee8aa9735 (bug 1656802)
Backed out changeset c5b1b38d1d35 (bug 1656802)
Backed out changeset fe2dd5de83ef (bug 1656802)
Backed out changeset 8e217fc1c6d4 (bug 1656802)
Backed out changeset 21f574f6acb4 (bug 1656802)
Backed out changeset 753f93dffe07 (bug 1656802)
Backed out changeset 386554110008 (bug 1656802)
Backed out changeset 2d3576ace2f1 (bug 1656802)
Backed out changeset 06a47c35c531 (bug 1656802)
Backed out changeset 57fa48542435 (bug 1656802)
Backed out changeset b1517bc33eff (bug 1656802)
2020-08-07 14:36:21 +03:00
Timothy Nikkel 2f60aa099a Bug 1656802. Make visual viewport only layout scrollbars affect the composition bounds/visual viewport. r=emilio,kats
AFAICT the spec says that these layout scrollbars that take up no layout space that scroll the visual viewport do affect the size of the visual viewport. (Double check this)

Most other users don't care about the size of these special scrollbars.

I left nsIDOMWindowUtils::getScrollbarSize unchanged (NB different from nsIDOMWindowUtils::getScrollbarSizes which is modified by this patch) because I'm less sure. I will file a followup about it.

Differential Revision: https://phabricator.services.mozilla.com/D85708
2020-08-07 10:05:10 +00:00
Dorel Luca 990d081d9f Backed out 2 changesets (bug 1651519) for WPT failures in webdriver/tests/switch_to_frame/switch.py. CLOSED TREE
Backed out changeset 7b973a0e7be9 (bug 1651519)
Backed out changeset 55e9184c5617 (bug 1651519)
2020-07-22 02:47:34 +03:00
Kris Maglione d182c95351 Bug 1651519: Part 2 - Also remove nsIDOMWindowUtils::outerWindowID. r=nika,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82957
2020-07-21 22:19:19 +00:00
Kris Maglione e7d942c77f Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-07-21 19:02:27 +00:00
Dorel Luca d91c6dc40b Backed out 2 changesets (bug 1651519) for wpt failures in webdriver/tests/switch_to_frame/switch.py. CLOSED TREE
Backed out changeset 52317abc5c68 (bug 1651519)
Backed out changeset 45448dca59a4 (bug 1651519)
2020-07-21 21:55:57 +03:00
Kris Maglione 4a25531b4a Bug 1651519: Part 2 - Also remove nsIDOMWindowUtils::outerWindowID. r=nika,geckoview-reviewers,agi
Differential Revision: https://phabricator.services.mozilla.com/D82957
2020-07-21 16:59:33 +00:00
Kris Maglione 9c2c147159 Bug 1651519: Remove nsIDOMWindowUtils::currentInnerWindowID. r=nika,remote-protocol-reviewers,webcompat-reviewers,whimboo
It has some properties which make it footgunny, especially in the face of
Fission. Callers should use WindowGlobalChild.innerWindowId instead.

Differential Revision: https://phabricator.services.mozilla.com/D82801
2020-07-21 16:59:28 +00:00
Simon Giesecke 4e8c935384 Bug 1652023 - Remove unnecessary includes from PresShell.h. r=smaug
Differential Revision: https://phabricator.services.mozilla.com/D83114
2020-07-15 13:53:02 +00:00
Kris Maglione 2faa43dd5c Bug 1647438: Remove nsIDOMWindowUtils.containerElement. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D81771
2020-07-02 15:03:44 +00:00
Kagami Sascha Rosylight f6d17b63b5 Bug 1630704 - Part 28: Remove nsFrame r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D81865
2020-07-06 22:38:11 +00:00
Hiroyuki Ikezoe 7115e973a0 Bug 1324591 - Add nsLayoutUtils::IsInPositionFixedSubtree. r=TYLin
Depends on D75729

Differential Revision: https://phabricator.services.mozilla.com/D81480
2020-07-05 11:43:20 +00:00
Brindusan Cristian 7f75410fd7 Backed out 9 changesets (bug 1324591) for linux build bustages on central on nsDisplayList.h.
Backed out changeset 75966ee1fe65 (bug 1324591)
Backed out changeset d6a01c6bc40e (bug 1324591)
Backed out changeset fef36ff2ea3d (bug 1324591)
Backed out changeset 4a4ae4bd95d1 (bug 1324591)
Backed out changeset 732804c83add (bug 1324591)
Backed out changeset 84657a3522fb (bug 1324591)
Backed out changeset e6c74ba41007 (bug 1324591)
Backed out changeset 8e6d4e9f5aa0 (bug 1324591)
Backed out changeset 6bc284863aff (bug 1324591)
2020-07-05 13:45:35 +03:00
Hiroyuki Ikezoe 72b361cf0b Bug 1324591 - Add nsLayoutUtils::IsInPositionFixedSubtree. r=TYLin
Differential Revision: https://phabricator.services.mozilla.com/D81480
2020-07-05 02:19:25 +00:00
Henri Sivonen 2d63627ce0 Bug 1647728 - Unify kCharsetFromUserForced and kCharsetFromParentForced. r=m_kato
For making further changes less messy.

Differential Revision: https://phabricator.services.mozilla.com/D80813
2020-06-25 03:25:03 +00:00
Jean-Yves Avenard 87438519f0 Bug 1637500 - P2. Rename methods as they are not always dealing with "threads". r=froydnj
Before P1, GetCurrentThreadSerialEventTarget would have always returned the same data as NS_GetCurrentThread, making the comment incorrect Now it will properly return the running TaskQueue if any.

This change of name more clearly exposes what they are doing, as we aren't always dealing with threads directly; but a nsISerialEventTarget

Differential Revision: https://phabricator.services.mozilla.com/D80354
2020-06-23 05:05:36 +00:00
Kartikaya Gupta 3cdcbca508 Bug 1646385 - Move SetVisualViewport goop from nsLayoutUtils to PresShell. r=tnikkel
There's no need to put this in nsLayoutUtils since it's so closely bound
to presShell anyway. So we move it from being a static nsLayoutUtils function
that takes a PresShell pointer, to being a method on the PresShell itself.

Two functional changes here:
1. Don't run the MaybeReflowForInflationScreenSizeChange code unless the
   visual viewport actually changes
2. Run the MaybeReflowForInflationScreenSizeChange if the visual viewport
   is reset.

These functional changes can be logically thought of as "group the font-
inflation reflow stuff together with the other visual-viewport-triggered
reflow stuff".

Depends on D80040

Differential Revision: https://phabricator.services.mozilla.com/D80041
2020-06-18 11:54:01 +00:00
Emilio Cobos Álvarez f3e71a1931 Bug 1599160 - Allow caching stylesheets across documents. r=heycam
This patch implements a per-process cache of parsed stylesheets for
non-inline sheets. The entries are evicted when the document gets
destroyed and there's no other document with the same principal around.

This works fine in practice even when navigating because CC happens
pretty late, but we could add an extra timer if we deem it worth it.

I had to adapt some tests so that they keep passing. They were already
clearing various image / network caches so it seems fine to also clear
this one.

Note that there's a very subtle change in the load data key: We only
miss the cache if the referrer _policy_ is different, not if the
referrer is different. While that is slightly dubious, that is the only
think that makes this effort somewhat worth it. Otherwise stylesheets
would have to be re-fetched if the referrer is different, which
effectively would mean to re-parse it if the document URI is different,
which is bad.

It seems like the network cache only keys on the referrer policy, so it
seems fine to do the same.

Differential Revision: https://phabricator.services.mozilla.com/D77457
2020-06-12 19:31:32 +00:00
Razvan Maries 7b30d6e82e Backed out 7 changesets (bug 1599160) for damp failures. CLOSED TREE
Backed out changeset edb0e17f3c98 (bug 1599160)
Backed out changeset 64b42ac358e6 (bug 1599160)
Backed out changeset ce1521b895e1 (bug 1599160)
Backed out changeset 0b0ff0ad8db7 (bug 1599160)
Backed out changeset c7ef05dae614 (bug 1599160)
Backed out changeset 466cfd0ad5db (bug 1599160)
Backed out changeset b3f28494f0e7 (bug 1599160)
2020-06-12 02:40:38 +03:00
Emilio Cobos Álvarez 208b60eed2 Bug 1599160 - Allow caching stylesheets across documents. r=heycam
This patch implements a per-process cache of parsed stylesheets for
non-inline sheets. The entries are evicted when the document gets
destroyed and there's no other document with the same principal around.

This works fine in practice even when navigating because CC happens
pretty late, but we could add an extra timer if we deem it worth it.

I had to adapt some tests so that they keep passing. They were already
clearing various image / network caches so it seems fine to also clear
this one.

Note that there's a very subtle change in the load data key: We only
miss the cache if the referrer _policy_ is different, not if the
referrer is different. While that is slightly dubious, that is the only
think that makes this effort somewhat worth it. Otherwise stylesheets
would have to be re-fetched if the referrer is different, which
effectively would mean to re-parse it if the document URI is different,
which is bad.

It seems like the network cache only keys on the referrer policy, so it
seems fine to do the same.

Differential Revision: https://phabricator.services.mozilla.com/D77457
2020-06-11 11:42:46 +00:00
Timothy Nikkel a1a2512d01 Bug 1632268. Take into account resolution when position select drop downs and form autocomplete. r=botond
One note about this solution: it includes the apz callback transform for the root scroll frame of the root content document, but no other apz callback transform that might be on an ancestor of the select element.

Differential Revision: https://phabricator.services.mozilla.com/D78026
2020-06-08 05:45:47 +00:00
Timothy Nikkel 6cedbd9795 Bug 1642088. Use a ResolutionChangeOrigin for when the resolution is changing by tests that overides and sets the restore resolution. r=kats
Differential Revision: https://phabricator.services.mozilla.com/D77582
2020-05-30 21:34:39 +00:00
Paul Adenot 4bbaca0e14 Bug 1628779 - Add a method on DOMWindowUtils to query an estimate of the round trip latency of the default audio devices. r=chunmin
Differential Revision: https://phabricator.services.mozilla.com/D75333
2020-05-28 09:51:30 +00:00
Nicolas Silva bdabdf112f Bug 1635016 - Remove the rest of the SetTransactionLogging glue. r=jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D74866
2020-05-18 12:11:33 +00:00
Emilio Cobos Álvarez 7b19f0d6d4 Bug 1609024 - Remove cache mechanism which is not very useful. r=hiro,snorp,mccr8
I don't think all this complexity is worth it for having a
marginally-more-realistic testing story. Using the pref just works and we should
do that, I think.

Differential Revision: https://phabricator.services.mozilla.com/D59980
2020-05-21 17:02:06 +00:00
Jon Coppeard 5a5b2daeba Bug 1627711 - Remove unused nsDOMWindowUtils::IsIncrementalGCEnabled method r=Gijs
Differential Revision: https://phabricator.services.mozilla.com/D75810
2020-05-18 16:09:45 +00:00
Mike Conley 8d34859a49 Bug 1634703 - Add a parent-process-only method to nsIDOMWindowUtils to get the native window ID from a window. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D73481
2020-05-12 14:50:21 +00:00
Bogdan Tara 8c5c4f1dd7 Backed out 7 changesets (bug 1634703) for testDeviceRecordingEventAudioAndVideo failures CLOSED TREE
Backed out changeset b982f5d74610 (bug 1634703)
Backed out changeset 59229853930e (bug 1634703)
Backed out changeset e017380f5539 (bug 1634703)
Backed out changeset 47a3a96b969b (bug 1634703)
Backed out changeset b4af76cfbdaf (bug 1634703)
Backed out changeset 7ef57434b09d (bug 1634703)
Backed out changeset 9df87d346b0f (bug 1634703)
2020-05-11 23:04:54 +03:00
Mike Conley 364a058417 Bug 1634703 - Add a parent-process-only method to nsIDOMWindowUtils to get the native window ID from a window. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D73481
2020-05-08 22:31:19 +00:00
Botond Ballo 5cffd06241 Bug 1631568 - Have nsLayoutUtils::GetFrameForPoint() and GetFramesForArea() take a RelativeTo parameter. r=tnikkel
This removes the need for FrameForPointOptions::IsRelativeToLayoutViewport,
and makes sure each call site of these functions indicates whether the
input point/rect is in visual or layout coordinates.

Several call sites were passing in layout coordinates without setting the
IsRelativeToLayoutViewport flag, which this patch corrects.

Differential Revision: https://phabricator.services.mozilla.com/D71705
2020-05-05 15:24:12 +00:00
Botond Ballo 173d001b86 Bug 1556556 - Propagate RelativeTo far and wide. r=kats,mattwoodrow
This "upgrades" various nsLayoutUtils functions which take as inputs
a set of coordinates and a frame that the coordinates are relative to,
to accept a RelativeTo object instead of a frame.

Most of the patch is just dumb propagation, but the few places where
we use an explicit ViewportType::Visual are important. There are
probably a few other places I've overlooked, but this seems to cover
the important ones that come up commonly.

There are undoubtedly other functions into which we can propagate
RelativeTo, in this patch I've propagated it as far as necessary
for my needs in this bug (mainly GetTransformToAncestor() and
GetEventCoordinatesRelativeTo()).

Differential Revision: https://phabricator.services.mozilla.com/D68919
2020-05-05 19:26:38 +00:00
Botond Ballo 8f18aa54b4 Bug 1556556 - Add a "relative to layout viewport" option for display list building. r=mstange,mattwoodrow
Use it in document.elementFromPoint().

Differential Revision: https://phabricator.services.mozilla.com/D68914
2020-05-05 19:24:08 +00:00