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

106 Коммитов

Автор SHA1 Сообщение Дата
Emilio Cobos Álvarez c818031a2d Bug 1737044 - Include pointer and frame in nsWindow logging. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D129160
2021-10-21 14:02:30 +00:00
stransky 1ceca373dc Bug 1736377 [Linux] Remove mIsTopLevel as it's always true, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D128749
2021-10-18 18:43:30 +00:00
Daniel Holbert 582d90dd75 Bug 1733465 part 5: Store nsView::mDirtyRegion in a UniquePtr rather than a raw pointer. r=tnikkel
This lets us remove the last explicit 'delete' invocation from the /view
subdirectory. Hooray!

As part of this change, I'm also updating the getter for this member-var to
return a reference instead of a pointer, since it's infallible.

Differential Revision: https://phabricator.services.mozilla.com/D127187
2021-10-01 20:38:11 +00:00
Sandor Molnar 325902a5b7 Backed out 5 changesets (bug 1733465) for causing android build bustages in android/SessionAccessibility.cpp. CLOSED TREE
Backed out changeset 4c5b28b66740 (bug 1733465)
Backed out changeset 3db0452b185c (bug 1733465)
Backed out changeset d7460c9c6acb (bug 1733465)
Backed out changeset 3cee3f595e45 (bug 1733465)
Backed out changeset 267d5fc92f12 (bug 1733465)
2021-10-01 19:13:59 +03:00
Daniel Holbert cf5b13f1b0 Bug 1733465 part 5: Store nsView::mDirtyRegion in a UniquePtr rather than a raw pointer. r=tnikkel
This lets us remove the last explicit 'delete' invocation from the /view
subdirectory. Hooray!

As part of this change, I updated the getter for this member-var to return a
"const UniquePtr&" instead of a raw pointer, per this recommendation in
UniquePtr.h:
https://searchfox.org/mozilla-central/rev/7539ad54ddc720a0553efd07ca681b9a409f9887/mfbt/UniquePtr.h#171-173

(Fortunately the getter only has two callers, so they were easy to fix.)

I also changed the name of the getter to drop "Get", per our convention that
getters can hint at infallibility by the absence of "Get".

Depends on D127185

Differential Revision: https://phabricator.services.mozilla.com/D127187
2021-10-01 14:37:07 +00:00
sotaro c94f215c05 Bug 1710533 - Apply the widget size constraints to newBounds r=mstange,gfx-reviewers
When nsView::CalcWidgetBounds() size might be applied to widget with modification. And next widget->GetClientBounds() could be different than nsView::CalcWidgetBounds() again with several reasons. But it seems OK to apply widget->ConstrainSize() in nsView::DoResetWidgetBounds(). It could remove repaint because of widget->ConstrainSize() call in the Resize().

Differential Revision: https://phabricator.services.mozilla.com/D114814
2021-05-13 09:34:26 +00:00
Butkovits Atila fed10644e6 Backed out changeset 64abec51f1cb (bug 1710533) for causing failures at test_panel.xhtml. CLOSED TREE 2021-05-12 21:22:16 +03:00
sotaro f00fe575af Bug 1710533 - Apply the widget size constraints to newBounds r=mstange,gfx-reviewers
When nsView::CalcWidgetBounds() size might be applied to widget with modification. And next widget->GetClientBounds() could be different than nsView::CalcWidgetBounds() again with several reasons. But it seems OK to apply widget->ConstrainSize() in nsView::DoResetWidgetBounds(). It could remove repaint because of widget->ConstrainSize() call in the Resize().

Differential Revision: https://phabricator.services.mozilla.com/D114814
2021-05-12 16:34:54 +00:00
Butkovits Atila 1624c3803a Backed out changeset 93fd52dafca2 (bug 1689682) as requested by haik. CLOSED TREE 2021-03-14 04:29:17 +02:00
Haik Aftandilian 15dfd27d86 Bug 1689682 - Long tooltips open on wrong screen r=mac-reviewers,mstange
Change ::Create(...LayoutDeviceIntRect...) to scale to desktop coordinates using the parent window scaling factor.

Change ::Create(...DesktopIntRect...) to treat the |aRect| argument as offsets when a child widget is being created per nsIWidget documentation.

Remove unnecessary logic from ::BackingScaleFactorChanged().

Change nsView to reset mDimBounds and mPosX, mPosY after destroying its widget.

Differential Revision: https://phabricator.services.mozilla.com/D106351
2021-03-11 17:04:22 +00:00
Kartikaya Gupta 19fc8e5c6a Bug 1616245 - Change a few nsIWidget functions to take strongly-typed arguments. r=jfkthame
These functions all have a single call site, and the call site clearly always
has rect in DesktopPixel units. So it makes sense to encode this in the API,
and propagate the strongly typed units.

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

--HG--
extra : moz-landing-system : lando
2020-04-01 11:50:47 +00:00
Makoto Kato 6279258383 Bug 1503656 - Part 7. Notify of safe area insets changed. r=smaug
Since safe area insets uses on content, we need send it from chrome process to
content process.

SafeAreaInsetsChanged will be called per window position/size change (Next
patch is Android implementation for it), we have to calculate safe area insets
on widget/window per change.

Current implementation is that this value is top level document only like Blink
since https://github.com/w3c/csswg-drafts/issues/4670 isn't resolved yet.

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

--HG--
extra : moz-landing-system : lando
2020-03-04 08:16:31 +00:00
Csoregi Natalia aa5b814fee Backed out 6 changesets (bug 1503656) as per request. CLOSED TREE
Backed out changeset 27faa3b167a9 (bug 1503656)
Backed out changeset 7111f9b5ad06 (bug 1503656)
Backed out changeset 43fdc889beac (bug 1503656)
Backed out changeset 332ceea26151 (bug 1503656)
Backed out changeset f31efa4ea2ec (bug 1503656)
Backed out changeset 91b847efe591 (bug 1503656)
2020-03-04 10:07:42 +02:00
Makoto Kato 00949ff265 Bug 1503656 - Part 7. Notify of safe area insets changed. r=smaug
Since safe area insets uses on content, we need send it from chrome process to
content process.

SafeAreaInsetsChanged will be called per window position/size change (Next
patch is Android implementation for it), we have to calculate safe area insets
on widget/window per change.

Current implementation is that this value is top level document only like Blink
since https://github.com/w3c/csswg-drafts/issues/4670 isn't resolved yet.

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

--HG--
extra : moz-landing-system : lando
2020-03-04 07:28:04 +00:00
Timothy Nikkel a87a3bf1c3 Bug 1556568. Fix the first paint telemetry metric. r=mattwoodrow,chutten
Differential Revision: https://phabricator.services.mozilla.com/D37382

--HG--
extra : moz-landing-system : lando
2020-02-18 20:56:10 +00:00
Emilio Cobos Álvarez 6615ff9fad Bug 1614208 - Stop including AccessibleCaretEventHub and PresShell.h from Selection.h. r=TYLin
And fix a bunch of fallout as we now don't include nsDocShell.h everywhere.

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

--HG--
extra : moz-landing-system : lando
2020-02-11 01:22:29 +00:00
Hiroyuki Ikezoe 0452b0e146 Bug 1596317 - Use CallState for nsContentUtils::CallOnAllRemoteChildren. r=smaug
`true` -> `CallState::Stop`
`false` -> `CallState::Continue`

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

--HG--
extra : moz-landing-system : lando
2019-12-19 07:58:27 +00:00
Hiroyuki Ikezoe aec08b91cc Bug 1596317 - Change the function pointer argument of nsContentUtils::CallOnAllRemoteChildren to std::function. r=smaug
We are going to introduce a new function in Document in this commit series,
which enumerates all child documents regardless of whether it's in the same
process, in content processes or in out-of-process iframes. The function takes
std::functions, but I don't have any good ideas to convert lambda functions with
capturing variables to function pointer.

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

--HG--
extra : moz-landing-system : lando
2019-12-19 07:57:57 +00:00
Bogdan Tara a96ffb25c5 Backed out 7 changesets (bug 1596317) for causing build bustages CLOSED TREE
Backed out changeset 0d3208fcb948 (bug 1596317)
Backed out changeset fe5554dc4115 (bug 1596317)
Backed out changeset 019de59cbc93 (bug 1596317)
Backed out changeset f4851472b087 (bug 1596317)
Backed out changeset a984cf515db8 (bug 1596317)
Backed out changeset d0da5bf9b4d4 (bug 1596317)
Backed out changeset abe5f2030dd9 (bug 1596317)
2019-12-19 06:49:39 +02:00
Hiroyuki Ikezoe 634fee0f48 Bug 1596317 - Use CallState for nsContentUtils::CallOnAllRemoteChildren. r=smaug
`true` -> `CallState::Stop`
`false` -> `CallState::Continue`

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

--HG--
extra : moz-landing-system : lando
2019-12-19 03:36:35 +00:00
Hiroyuki Ikezoe 402bdca99d Bug 1596317 - Change the function pointer argument of nsContentUtils::CallOnAllRemoteChildren to std::function. r=smaug
We are going to introduce a new function in Document in this commit series,
which enumerates all child documents regardless of whether it's in the same
process, in content processes or in out-of-process iframes. The function takes
std::functions, but I don't have any good ideas to convert lambda functions with
capturing variables to function pointer.

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

--HG--
extra : moz-landing-system : lando
2019-12-19 03:35:59 +00:00
Hiroyuki Ikezoe 9b165804d8 Bug 1586986 - Deliver 'fixed-bottom' offset to the top of the pres context on the foreground tab. r=geckoview-reviewers,tnikkel,snorp
The dynamic toolbar transition doesn't affect on background tabs since to
switch tabs the dynamic toolbar should be restored to its original state (i.e.,
completely visible state).

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

--HG--
extra : moz-landing-system : lando
2019-11-21 21:15:46 +00:00
Hiroyuki Ikezoe 2a51338a5a Bug 1586144 - Introduce an API to set the dynamic toolbar maximum height in GeckoView. r=geckoview-reviewers,tnikkel,snorp
And deliver the value to the top content pres context, but it's not used in
this commit. The value will be used in the next commit.

One caveat is that areas covered by the dynamic toolbar will be outside
of the content area, which means implementers of GeckoView needs to call
setVerticalClipping with _negative_ values.

Depends on D50416

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

--HG--
extra : moz-landing-system : lando
2019-11-14 05:59:47 +00:00
Nicholas Nethercote 18fae65f38 Bug 1563139 - Remove StaticPrefs.h. r=glandium
This requires replacing inclusions of it with inclusions of more specific prefs
files.

The exception is that StaticPrefsAll.h, which is equivalent to StaticPrefs.h,
and is used in `Codegen.py` because doing something smarter is tricky and
suitable for a follow-up. As a result, any change to StaticPrefList.yaml will
still trigger recompilation of all the generated DOM bindings files, but that's
still a big improvement over trigger recompilation of every file that uses
static prefs.

Most of the changes in this commit are very boring. The only changes that are
not boring are modules/libpref/*, Codegen.py, and ServoBindings.toml.

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

--HG--
extra : moz-landing-system : lando
2019-07-26 01:10:23 +00:00
Nicholas Nethercote 4c427b464f Bug 1563996 - Make layout.show_previous_page a static pref. r=bzbarsky
This is a weird pref.

First, it is VarCached into two different global variables, one in
nsSubDocumentFrame.cpp, and the other in nsView.cpp.

Second, the pref is not defined by default. When the VarCache variables are
initialized they are therefore set to the default value provided to the
`AddBoolVarCache()` call, which in both cases is `true`. This semantics isn't
possible with `StaticPrefs`, so the patch defines the pref as true by default.

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

--HG--
extra : moz-landing-system : lando
2019-07-09 07:59:55 +00:00
Kartikaya Gupta 46c4b1ff9e Bug 1524232 - Dispatch synthesized mousemoves to OOP iframes if that's where they land. r=tnikkel
Depends on D29731

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

--HG--
extra : moz-landing-system : lando
2019-05-02 19:57:16 +00:00
Masayuki Nakano f3bcf4c6d1 Bug 1547418 - Make CapturingContentInfo a private struct of PresShell and move APIs for it from nsIPresShell to PresShell r=smaug
`CapturingContentInfo` struct is used only in `PresShell.cpp` so that we can
make it a private struct of `PresShell` if we move all users of them,
i.e., API to access them, from `nsIPresShell` to `PresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-30 00:26:57 +00:00
Masayuki Nakano 1f3059e916 Bug 1542663 - Make nsViewManager and nsView (nsIWidgetListener) use mozilla::PresShell directly rather than via nsIPresShell r=tnikkel
This patch makes `nsViewManager::GetPresShell()` and
`nsIWidgetListener::GetPresShell()` (overridden by `nsView` and
`nsWebShellWindow::WidgetListenerDelegate`) return `mozilla::PresShell*`.

Additionally, makes `nsWebShellWindow::GetPresShell()` also return
`mozilla::PresShell()`.

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

--HG--
extra : moz-landing-system : lando
2019-04-13 01:05:21 +00:00
Masayuki Nakano e8446480e1 Bug 1542407 - Make nsIFrame use mozilla::PresShell directly rather than via nsIPresShell r=emilio
Except retrieving from weak reference, `nsIFrame` should treat
`mozilla::PresShell` directly rather than via `nsIPresShell`.

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

--HG--
extra : moz-landing-system : lando
2019-04-06 06:02:28 +00:00
Adam Gashlin da69b873de Bug 1498973: Don't show a popup that should be hidden. r=jmathies
Differential Revision: https://phabricator.services.mozilla.com/D21801

--HG--
extra : moz-landing-system : lando
2019-03-06 18:48:50 +00:00
Timothy Nikkel 5e229fbdaf Bug 1354933. Assert that the frame pointer is null in the nsView destructor. r=mats 2019-02-14 23:07:21 -06:00
Brad Werth c036f7b591 Bug 1503745: Make widgets with empty bounds consistently hide themselves. r=karlt
Previously, popup widgets with empty bounds would not be hidden.
Non-popup GTK widgets with empty bounds would be hidden during ResizeClient().
Skipping the resize for popups is only appropriate when they are hidden.

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

--HG--
extra : moz-landing-system : lando
2019-02-04 06:51:50 +00: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
Jan Horak 229b3f0529 Bug 1493081 - Added nsIWidget::GetDesktopToDeviceScaleByScreen for scale factor lookup by window position; r=mattwoodrow
We've added nsIWidget::GetDesktopToDeviceScaleByScreen which will return scale factor of the newly placed window
according to its position on the display. This change is to move implementation to the nsIWidget derived classes.
We need that for GTK Wayland, because on the Wayland we cannot determine absolute position of the window, we
need to use parent's window scale factor. For other platforms the GetDesktopToDeviceScaleByScreen is implemented
in nsBaseWidget.

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

--HG--
extra : moz-landing-system : lando
2018-10-23 12:49:21 +00:00
Csoregi Natalia f95bae0402 Backed out changeset 9a3a43e8743d (bug 1493081) for bustages on AccessibleWrap.cpp. CLOSED TREE 2018-10-22 12:00:29 +03:00
Jan Horak 9ac0f986e7 Bug 1493081 - Added nsIWidget::GetDesktopToDeviceScaleByScreen for scale factor lookup by window position; r=mattwoodrow
We've added nsIWidget::GetDesktopToDeviceScaleByScreen which will return scale factor of the newly placed window
according to its position on the display. This change is to move implementation to the nsIWidget derived classes.
We need that for GTK Wayland, because on the Wayland we cannot determine absolute position of the window, we
need to use parent's window scale factor. For other platforms the GetDesktopToDeviceScaleByScreen is implemented
in nsBaseWidget.

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

--HG--
extra : moz-landing-system : lando
2018-10-12 17:03:54 +00:00
Narcis Beleuzu 6f7c4e28a5 Backed out changeset 3bc82182725e (bug 1493081) for android bustages. CLOSED TREE 2018-10-09 15:18:51 +03:00
Jan Horak 697b7b3f5d Bug 1493081 - Added nsIWidget::GetDesktopToDeviceScaleByScreen for scale factor lookup by window position; r=mattwoodrow
We've added nsIWidget::GetDesktopToDeviceScaleByScreen which will return scale factor of the newly placed window
according to its position on the display. This change is to move implementation to the nsIWidget derived classes.
We need that for GTK Wayland, because on the Wayland we cannot determine absolute position of the window, we
need to use parent's window scale factor. For other platforms the GetDesktopToDeviceScaleByScreen is implemented
in nsBaseWidget.

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

--HG--
extra : moz-landing-system : lando
2018-10-09 11:00:47 +00:00
Ehsan Akhgari 0a3b2c4634 Backout changeset c5b3caf36ddf (bug 1490297) for causing bug 1493081 and making Nightly unusable; a=Aryx 2018-09-21 13:59:25 -04:00
Jan Horak 44decbf9eb Bug 1490297 Use parent window scale factor for the popup windows under Wayland; r=mattwoodrow
In the Wayland we don't know the absolute position of the window, so we cannot
use it to determine on which monitor the window is. We need to use parent window
scale factor to scale popup windows, otherwise popup windows will be wrongly
placed in the hi+normal dpi monitor setup.

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

--HG--
extra : moz-landing-system : lando
2018-09-20 08:17:18 +00: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
Kartikaya Gupta 697a7719d0 Bug 1455691 - Make the transaction id a struct instead of a uint64_t. r=mattwoodrow
MozReview-Commit-ID: 9yZknygQvFr

--HG--
extra : rebase_source : 8b7a2398bdabf52f2de1c5dbd30b6868c1e0bed0
2018-04-20 15:13:06 -04:00
Brad Werth 8df6529d9a Bug 1451098 Part 2: Update nsView::DoResetWidgetBounds to check for empty rects returned from CalcWidgetBounds(). r=bz
MozReview-Commit-ID: F9Mkf9Yjf07

--HG--
extra : rebase_source : 725305bcf6ad7cf7dba65d45c8e491378fb5ef0e
2018-04-03 12:27:02 -07:00
Milan Sreckovic 3db2b5ee67 Bug 1423551: Use BaseRect access methods instead of member variables in view/. r=jet
MozReview-Commit-ID: 1VlWJWAqRB3

--HG--
extra : rebase_source : 4c713d43fda024ac4f2c590b77c84ad3cfbd9ff5
2018-01-10 11:16:22 -05:00
Sylvestre Ledru eabcdd21b2 Bug 1278282 - Replace #if (MOZ_WIDGET_GTK == 3) by #ifdef MOZ_WIDGET_GTK r=lsalzman
MozReview-Commit-ID: Bo0m7n078oh

--HG--
extra : rebase_source : 1874ac3e0abca65b821b5d04a6610a5cbb63fe24
2018-01-09 11:51:07 +01:00
Mats Palmgren 1c2b8c222e Bug 1414666 part 1 - Add nsIFrame::PresShell() for convenient access to the shell. r=emilio
MozReview-Commit-ID: 8FPTPKWyVtY
2017-11-09 03:00:48 +01:00
Kirk Steuber 6e217001f8 Bug 1362382 - Move RegisterDragDrop to be called during idle time, if possible r=jimm
Additionally, do not call RegisterDragDrop for hidden windows.

MozReview-Commit-ID: Fv8j9FntGGT

--HG--
extra : rebase_source : fccbc576887d000805da8ac915d16fc4fddfeceb
2017-08-30 11:18:25 -07:00
Timothy Nikkel 8dddd316bb Backed out changeset 497dbf087ad5 (add diagnostic asserts) (bug 1354933) 2017-07-07 14:54:55 -05:00
Timothy Nikkel 417163a1db Back out changeset 43af422173e3 (add diagnostic asserts) (bug 1354933) 2017-06-22 15:40:40 -05:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00