widget/nsBaseWidget.h
author Matt Woodrow <mwoodrow@mozilla.com>
Sun, 05 Sep 2021 22:36:45 +0000 (2021-09-05)
changeset 591057 1b49e7328ae43c6565d167f4c391430575097fd3
parent 589858 f1086c70c60e04d45640803305e6839b8b45fb14
child 591098 bd5a397b19adda558f3f4527afa3b17ef693085a
permissions -rw-r--r--
Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel Differential Revision: https://phabricator.services.mozilla.com/D124433
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
     1
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
94475
Gervase Markham <gerv@gerv.net>
parents: 91461
diff changeset
     2
/* This Source Code Form is subject to the terms of the Mozilla Public
Gervase Markham <gerv@gerv.net>
parents: 91461
diff changeset
     3
 * License, v. 2.0. If a copy of the MPL was not distributed with this
Gervase Markham <gerv@gerv.net>
parents: 91461
diff changeset
     4
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
     5
#ifndef nsBaseWidget_h__
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
     6
#define nsBaseWidget_h__
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
     7
306605
d5ff28810cde1a3921f0129851574f07aba30690 Bug 1288187 - Extract a helper function to manage synthetic touch points for widgets that don't have more specific handling. r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 306346
diff changeset
     8
#include "InputData.h"
148650
d3d5df94a2fc526223e1585b9726a61f7eb99dbf Bug 912956 part.14 mozilla/MouseEvents.h should be included directly r=roc
Masayuki Nakano <masayuki@d-toybox.com>
parents: 148428
diff changeset
     9
#include "mozilla/EventForwards.h"
407017
76a8f710da41058f6825d45aa8759c954812b488 Bug 1441498 - Protect mCompositorVsyncDispatcher by lock. r=kats
Sotaro Ikeda <sikeda@mozilla.com>
parents: 404329
diff changeset
    10
#include "mozilla/Mutex.h"
294189
e3c6988a0a55d437c1a99420dc25ec64d25f992d Bug 1265953, part 3 - Convert more widget code from nsAutoPtr to UniquePtr. r=mstange
Jonathan Watt <jwatt@jwatt.org>
parents: 294052
diff changeset
    11
#include "mozilla/RefPtr.h"
e3c6988a0a55d437c1a99420dc25ec64d25f992d Bug 1265953, part 3 - Convert more widget code from nsAutoPtr to UniquePtr. r=mstange
Jonathan Watt <jwatt@jwatt.org>
parents: 294052
diff changeset
    12
#include "mozilla/UniquePtr.h"
100323
97040ffd8e31765ca1ffc6f8c8e3ec12709123a5 Bug 776217: Support gecko-implemented screen rotation with omtc. r=roc
Chris Jones <jones.chris.g@gmail.com>
parents: 99716
diff changeset
    13
#include "mozilla/WidgetUtils.h"
578903
1555ee7b66503dafb841fff54317c0b99e6a7402 Bug 1706420 - Part 1: Add mInputSource to WidgetTouchEvent r=aklotz,edgar
Kagami Sascha Rosylight <krosylight@mozilla.com>
parents: 576745
diff changeset
    14
#include "mozilla/dom/MouseEventBinding.h"
262100
25e572cce005e1f9d7a4805d6c398dea5b1ff797 Bug 1202312 - Use mozilla::Function for the SetAllowedTouchBehavior callback. r=kats
Botond Ballo <botond@mozilla.com>
parents: 259955
diff changeset
    15
#include "mozilla/layers/APZCCallbackHelper.h"
369982
05e705204d3bced8e56631b0ef6fe2abe65710c7 Bug 1381095 - Fallback correctly to non-WebRender if the GPU process/WebRender are disabled when creating a remote compositor session. r=dvander
Andrew Osmond <aosmond@mozilla.com>
parents: 367867
diff changeset
    16
#include "mozilla/layers/CompositorOptions.h"
489800
de0c56e1ffad7de4e606b77a1f7156772f857569 Bug 1574592 - Add CompositorWidget::GetNativeLayerRoot. r=mattwoodrow
Markus Stange <mstange@themasta.com>
parents: 488828
diff changeset
    17
#include "mozilla/layers/NativeLayer.h"
554601
a7080bae91c109472da36f0d197add5746b1be06 Bug 1668875 - Distinguish theme changes that can and cannot affect style/layout. r=tnikkel
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 551065
diff changeset
    18
#include "mozilla/widget/ThemeChangeKind.h"
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    19
#include "nsRect.h"
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    20
#include "nsIWidget.h"
51049
2757103c7e890d4c7dc921c4f42343be9e31d4d3 Bug 582057, part h: Add an nsIWidget::CreateChild interface to sweep (relevant to this bug) code dealing with native widgets under the widget/src/* rug. sr=roc
Chris Jones <jones.chris.g@gmail.com>
parents: 50954
diff changeset
    21
#include "nsWidgetsCID.h"
95826
a15d75939cd5d820507656f64edae9a18e10918e Bug 749930 - Replace uses of nsILocalFile with nsIFile (compiled code only); r=bsmedberg
Geoff Lankow <geoff@darktrojan.net>
parents: 95641
diff changeset
    22
#include "nsIFile.h"
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    23
#include "nsString.h"
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
    24
#include "nsCOMPtr.h"
97477
Mats Palmgren <matspal@gmail.com>
parents: 97343
diff changeset
    25
#include "nsIRollupListener.h"
135289
18a68adb330fe42be6a236512093a6fdafd5e28d Bug 877534 - Use a shutdown listener to destroy the compositor from nsBaseWidget. r=roc
Matt Woodrow <mwoodrow@mozilla.com>
parents: 135282
diff changeset
    26
#include "nsIObserver.h"
148428
f2fce6c8e493f9ed6510f1d69291bcf3e8477380 Bug 912956 part.2 Rename nsEvent.h to mozilla/EventForwards.h and sort out it r=roc
Masayuki Nakano <masayuki@d-toybox.com>
parents: 145203
diff changeset
    27
#include "nsIWidgetListener.h"
f2fce6c8e493f9ed6510f1d69291bcf3e8477380 Bug 912956 part.2 Rename nsEvent.h to mozilla/EventForwards.h and sort out it r=roc
Masayuki Nakano <masayuki@d-toybox.com>
parents: 145203
diff changeset
    28
#include "nsPIDOMWindow.h"
229677
71d030563b18097639ea2bcef8f4242ffa5864af Add weak reference support to nsBaseWidget. (bug 1133150, r=roc)
David Anderson <danderson@mozilla.com>
parents: 229255
diff changeset
    29
#include "nsWeakReference.h"
442586
33523dc590feb2d339e4722fdfe1222d341bead4 Bug 1493081 - Added nsIWidget::GetDesktopToDeviceScaleByScreen for scale factor lookup by window position; r=mattwoodrow
Jan Horak <jhorak@redhat.com>
parents: 442297
diff changeset
    30
118882
037363fa02583ef1f37c80373e46c0a19cf73e64 Bug 786533 - Replace NS_MIN/NS_MAX with std::min/std::max and #include <algorithm> where needed. r=ehsan
Mats Palmgren <matspal@gmail.com>
parents: 117093
diff changeset
    31
#include <algorithm>
305384
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
    32
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
    33
#if defined(XP_WIN)
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
    34
// Scroll capture constants
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
    35
const uint32_t kScrollCaptureFillColor = 0xFFa0a0a0;  // gray
305384
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
    36
const mozilla::gfx::SurfaceFormat kScrollCaptureFormat =
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
    37
    mozilla::gfx::SurfaceFormat::X8R8G8B8_UINT32;
305384
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
    38
#endif
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
    39
8591
f026e5054abb16e6897c71cacd70f21f6ebb27aa Bug 401627, better way of handling click to close menu so that it doesn't reopen the menu again, r+sr=roc
enndeakin@sympatico.ca
parents: 7751
diff changeset
    40
class nsIContent;
38805
c85d57ea1d37fdfea1ba14d487df44bf66acad3a Bug 534425. Part 6: Let nsIWidgets expose a LayerManager to be used to render into the widget, instead of nsPaintEvent::renderingContext which is removed since it's no longer needed. Currently all widgets fall back to a default BasicLayerManager implementation. Also change nsPaintEvent::region to be an nsIntRegion, and get rid of nsPaintEvent::rect since it's redundant.
Robert O'Callahan <robert@ocallahan.org>
parents: 35698
diff changeset
    41
class gfxContext;
8591
f026e5054abb16e6897c71cacd70f21f6ebb27aa Bug 401627, better way of handling click to close menu so that it doesn't reopen the menu again, r+sr=roc
enndeakin@sympatico.ca
parents: 7751
diff changeset
    42
113636
5cb2cc9be615d66b1eb96843a4c8c45b9b60e29d Bug 812466 - namespacify Accessible classes, r=tbsaunde
Alexander Surkov <surkov.alexander@gmail.com>
parents: 113634
diff changeset
    43
namespace mozilla {
296038
a5086ab888367112761074071ce56ce95ca7a113 Use CompositorWidgetProxy for dispatching vsync to the compositor. (bug 1269037 part 1, r=mchang)
David Anderson <danderson@mozilla.com>
parents: 295585
diff changeset
    44
class CompositorVsyncDispatcher;
332017
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
    45
class LiveResizeListener;
587869
e8299f04430316b8ed5a73b8b9f0e824dfe84f38 Bug 1722258 - Convert more LayerManager usage to use WindowRenderer. r=miko
Matt Woodrow <mwoodrow@mozilla.com>
parents: 587301
diff changeset
    46
class FallbackRenderer;
332017
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
    47
102460
92fdc7bd7f5fbd1304b701c4f7d36efdb3943e37 Bug 743975 - remove accessibility events from widget, replace with a nsBaseWidget::GetAccessible method, r=trevsaunders
Neil Deakin <neil@mozilla.com>
parents: 102458
diff changeset
    48
#ifdef ACCESSIBILITY
113636
5cb2cc9be615d66b1eb96843a4c8c45b9b60e29d Bug 812466 - namespacify Accessible classes, r=tbsaunde
Alexander Surkov <surkov.alexander@gmail.com>
parents: 113634
diff changeset
    49
namespace a11y {
568148
0df6a015e7c44653ff9cb114d25644c0515b0cc9 Bug 1693597 - P1: Rename Accessible to LocalAccessible. r=morgan
Eitan Isaacson <eitan@monotonous.org>
parents: 568061
diff changeset
    50
class LocalAccessible;
113636
5cb2cc9be615d66b1eb96843a4c8c45b9b60e29d Bug 812466 - namespacify Accessible classes, r=tbsaunde
Alexander Surkov <surkov.alexander@gmail.com>
parents: 113634
diff changeset
    51
}
102460
92fdc7bd7f5fbd1304b701c4f7d36efdb3943e37 Bug 743975 - remove accessibility events from widget, replace with a nsBaseWidget::GetAccessible method, r=trevsaunders
Neil Deakin <neil@mozilla.com>
parents: 102458
diff changeset
    52
#endif
92fdc7bd7f5fbd1304b701c4f7d36efdb3943e37 Bug 743975 - remove accessibility events from widget, replace with a nsBaseWidget::GetAccessible method, r=trevsaunders
Neil Deakin <neil@mozilla.com>
parents: 102458
diff changeset
    53
290186
0662b0935257f604567b816af81c369674786190 Bug 1254897 - Recycle back buffer in BasicCompositor r=jrmuizel
Sotaro Ikeda <sotaro.ikeda.g@gmail.com>
parents: 289895
diff changeset
    54
namespace gfx {
0662b0935257f604567b816af81c369674786190 Bug 1254897 - Recycle back buffer in BasicCompositor r=jrmuizel
Sotaro Ikeda <sotaro.ikeda.g@gmail.com>
parents: 289895
diff changeset
    55
class DrawTarget;
305384
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
    56
class SourceSurface;
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
    57
}  // namespace gfx
290186
0662b0935257f604567b816af81c369674786190 Bug 1254897 - Recycle back buffer in BasicCompositor r=jrmuizel
Sotaro Ikeda <sotaro.ikeda.g@gmail.com>
parents: 289895
diff changeset
    58
84910
5bd7228ca8a7f416e1cf38adbde530dcdf741f79 Bug 711168 - Implement the compositor protocol for OMTC. r=cjones
Benoit Girard <b56girard@gmail.com>, Ali Juma <ajuma@mozilla.com>
parents: 84517
diff changeset
    59
namespace layers {
289895
4f1482e6da917442cfd73f8994ebac3c58f8fe5c Rename PCompositor to PCompositorBridge. (bug 1258479 part 2, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 289111
diff changeset
    60
class CompositorBridgeChild;
4f1482e6da917442cfd73f8994ebac3c58f8fe5c Rename PCompositor to PCompositorBridge. (bug 1258479 part 2, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 289111
diff changeset
    61
class CompositorBridgeParent;
306172
02f12f2a1fbfadbae78864cd754cf3f721f6abcb Bug 1281575 - Extract interface of APZCTreeManager for moving to GPUProcess. r=kats
Ryan Hunt <rhunt@mozilla.com>
parents: 306086
diff changeset
    62
class IAPZCTreeManager;
219723
3fd3bc9d9cd2f3a742df615483435c99c8391eec Move APZC initialization into nsBaseWidget. (bug 1110540 part 1, r=kats)
David Anderson <danderson@mozilla.com>
parents: 216938
diff changeset
    63
class GeckoContentController;
228806
0c3e7de46a8873ec225e4a6510778cf591c467b2 Bug 1127066 - Use APZEventState in nsBaseWidget. r=kats
Botond Ballo <botond@mozilla.com>
parents: 228801
diff changeset
    64
class APZEventState;
494045
ffc0e1cd529761f99a74914150f84e2320cecb22 Bug 1564195 - Group the results of APZInputBridge::ReceiveInputEvent() into a struct. r=tnikkel
Botond Ballo <botond@mozilla.com>
parents: 493554
diff changeset
    65
struct APZEventResult;
297876
76466e5503993d57ea96eace53742ffb104b3e84 Hide top-level CompositorBridgeParents behind a new API. (bug 1272472 part 4, r=mattwoodrow,kats,gwagner)
David Anderson <danderson@mozilla.com>
parents: 297873
diff changeset
    66
class CompositorSession;
305384
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
    67
class ImageContainer;
591057
1b49e7328ae43c6565d167f4c391430575097fd3 Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel
Matt Woodrow <mwoodrow@mozilla.com>
parents: 589858
diff changeset
    68
class WebRenderLayerManager;
220508
03090de75c45691f9e8c3020313ac5d6f0516b4d Handle in-process APZ events correctly on Windows. (bug 1111873 part 2, r=kats)
David Anderson <danderson@mozilla.com>
parents: 220406
diff changeset
    69
struct ScrollableLayerGuid;
321756
31fe465d39326229db0d29381b6a088b50fb73df Bug 1313199 - Sync a device reset from GPU process to main process. r=dvander
Ryan Hunt <rhunt@eqrion.net>
parents: 321514
diff changeset
    70
class RemoteCompositorSession;
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
    71
}  // namespace layers
220406
4177b97a946c4277e40c3c17fe74d91ca2228a02 Bug 1101974. Part 1: Create VsyncDispatcher at nsBaseWidget. r=roc
Mason Chang <mchang@mozilla.com>
parents: 219723
diff changeset
    72
303383
0cbb330c02c75657c3f4f9265d705217bb005c5b Rename CompositorWidgetProxy files to CompositorWidget. (bug 1281998 part 2, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 303320
diff changeset
    73
namespace widget {
303387
91f81099937fab0b1acf8a5cc930c7ceacd03488 Extract a delegate interface out of WinCompositorWidget. (bug 1281998 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 303386
diff changeset
    74
class CompositorWidgetDelegate;
303383
0cbb330c02c75657c3f4f9265d705217bb005c5b Rename CompositorWidgetProxy files to CompositorWidget. (bug 1281998 part 2, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 303320
diff changeset
    75
class InProcessCompositorWidget;
321514
dd859148673c2ac94c827e2da05e7f89120c633d Bug 1315706 - Pass a wrapper struct to various CompositorWidget functions. r=dvander
Kartikaya Gupta <kgupta@mozilla.com>
parents: 318668
diff changeset
    76
class WidgetRenderingContext;
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
    77
}  // namespace widget
303383
0cbb330c02c75657c3f4f9265d705217bb005c5b Rename CompositorWidgetProxy files to CompositorWidget. (bug 1281998 part 2, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 303320
diff changeset
    78
220712
a736be6898d43d5b040132a4bd1821b1998b02f7 Bug 1113725. Rename VsyncDispatcher to CompositorVsyncDispatcher. r=kats
Mason Chang <mchang@mozilla.com>
parents: 220508
diff changeset
    79
class CompositorVsyncDispatcher;
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
    80
}  // namespace mozilla
84910
5bd7228ca8a7f416e1cf38adbde530dcdf741f79 Bug 711168 - Implement the compositor protocol for OMTC. r=cjones
Benoit Girard <b56girard@gmail.com>, Ali Juma <ajuma@mozilla.com>
parents: 84517
diff changeset
    81
5bd7228ca8a7f416e1cf38adbde530dcdf741f79 Bug 711168 - Implement the compositor protocol for OMTC. r=cjones
Benoit Girard <b56girard@gmail.com>, Ali Juma <ajuma@mozilla.com>
parents: 84517
diff changeset
    82
namespace base {
5bd7228ca8a7f416e1cf38adbde530dcdf741f79 Bug 711168 - Implement the compositor protocol for OMTC. r=cjones
Benoit Girard <b56girard@gmail.com>, Ali Juma <ajuma@mozilla.com>
parents: 84517
diff changeset
    83
class Thread;
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
    84
}  // namespace base
84910
5bd7228ca8a7f416e1cf38adbde530dcdf741f79 Bug 711168 - Implement the compositor protocol for OMTC. r=cjones
Benoit Girard <b56girard@gmail.com>, Ali Juma <ajuma@mozilla.com>
parents: 84517
diff changeset
    85
160524
bd9d5c318301f0b9f605ef47f213b0a597a01976 Bug 941774 - Base widget implementation. r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 159648
diff changeset
    86
// Windows specific constant indicating the maximum number of touch points the
bd9d5c318301f0b9f605ef47f213b0a597a01976 Bug 941774 - Base widget implementation. r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 159648
diff changeset
    87
// inject api will allow. This also sets the maximum numerical value for touch
bd9d5c318301f0b9f605ef47f213b0a597a01976 Bug 941774 - Base widget implementation. r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 159648
diff changeset
    88
// ids we can use when injecting touch points on Windows.
bd9d5c318301f0b9f605ef47f213b0a597a01976 Bug 941774 - Base widget implementation. r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 159648
diff changeset
    89
#define TOUCH_INJECT_MAX_POINTS 256
bd9d5c318301f0b9f605ef47f213b0a597a01976 Bug 941774 - Base widget implementation. r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 159648
diff changeset
    90
135289
18a68adb330fe42be6a236512093a6fdafd5e28d Bug 877534 - Use a shutdown listener to destroy the compositor from nsBaseWidget. r=roc
Matt Woodrow <mwoodrow@mozilla.com>
parents: 135282
diff changeset
    91
class nsBaseWidget;
18a68adb330fe42be6a236512093a6fdafd5e28d Bug 877534 - Use a shutdown listener to destroy the compositor from nsBaseWidget. r=roc
Matt Woodrow <mwoodrow@mozilla.com>
parents: 135282
diff changeset
    92
239650
c24fb4429029af2e88cd7db3a144802a113ccf0b Bug 1153939 - Avoid a race condition with setting nsBaseWidgets WidgetShutdownObserver widget pointer to null. Fixes a crash in nsBaseWidget::DestroyCompositor(). r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 239044
diff changeset
    93
// Helper class used in shutting down gfx related code.
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
    94
class WidgetShutdownObserver final : public nsIObserver {
239650
c24fb4429029af2e88cd7db3a144802a113ccf0b Bug 1153939 - Avoid a race condition with setting nsBaseWidgets WidgetShutdownObserver widget pointer to null. Fixes a crash in nsBaseWidget::DestroyCompositor(). r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 239044
diff changeset
    95
  ~WidgetShutdownObserver();
190542
6a0a566bc00389559e06ad263a1d827af6d73243 Bug 1028588 - Fix dangerous public destructors in widget/ - r=roc
Benoit Jacob <bjacob@mozilla.com>
parents: 187848
diff changeset
    96
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
    97
 public:
239650
c24fb4429029af2e88cd7db3a144802a113ccf0b Bug 1153939 - Avoid a race condition with setting nsBaseWidgets WidgetShutdownObserver widget pointer to null. Fixes a crash in nsBaseWidget::DestroyCompositor(). r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 239044
diff changeset
    98
  explicit WidgetShutdownObserver(nsBaseWidget* aWidget);
135289
18a68adb330fe42be6a236512093a6fdafd5e28d Bug 877534 - Use a shutdown listener to destroy the compositor from nsBaseWidget. r=roc
Matt Woodrow <mwoodrow@mozilla.com>
parents: 135282
diff changeset
    99
18a68adb330fe42be6a236512093a6fdafd5e28d Bug 877534 - Use a shutdown listener to destroy the compositor from nsBaseWidget. r=roc
Matt Woodrow <mwoodrow@mozilla.com>
parents: 135282
diff changeset
   100
  NS_DECL_ISUPPORTS
18a68adb330fe42be6a236512093a6fdafd5e28d Bug 877534 - Use a shutdown listener to destroy the compositor from nsBaseWidget. r=roc
Matt Woodrow <mwoodrow@mozilla.com>
parents: 135282
diff changeset
   101
  NS_DECL_NSIOBSERVER
18a68adb330fe42be6a236512093a6fdafd5e28d Bug 877534 - Use a shutdown listener to destroy the compositor from nsBaseWidget. r=roc
Matt Woodrow <mwoodrow@mozilla.com>
parents: 135282
diff changeset
   102
239650
c24fb4429029af2e88cd7db3a144802a113ccf0b Bug 1153939 - Avoid a race condition with setting nsBaseWidgets WidgetShutdownObserver widget pointer to null. Fixes a crash in nsBaseWidget::DestroyCompositor(). r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 239044
diff changeset
   103
  void Register();
c24fb4429029af2e88cd7db3a144802a113ccf0b Bug 1153939 - Avoid a race condition with setting nsBaseWidgets WidgetShutdownObserver widget pointer to null. Fixes a crash in nsBaseWidget::DestroyCompositor(). r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 239044
diff changeset
   104
  void Unregister();
c24fb4429029af2e88cd7db3a144802a113ccf0b Bug 1153939 - Avoid a race condition with setting nsBaseWidgets WidgetShutdownObserver widget pointer to null. Fixes a crash in nsBaseWidget::DestroyCompositor(). r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 239044
diff changeset
   105
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   106
  nsBaseWidget* mWidget;
239650
c24fb4429029af2e88cd7db3a144802a113ccf0b Bug 1153939 - Avoid a race condition with setting nsBaseWidgets WidgetShutdownObserver widget pointer to null. Fixes a crash in nsBaseWidget::DestroyCompositor(). r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 239044
diff changeset
   107
  bool mRegistered;
135289
18a68adb330fe42be6a236512093a6fdafd5e28d Bug 877534 - Use a shutdown listener to destroy the compositor from nsBaseWidget. r=roc
Matt Woodrow <mwoodrow@mozilla.com>
parents: 135282
diff changeset
   108
};
18a68adb330fe42be6a236512093a6fdafd5e28d Bug 877534 - Use a shutdown listener to destroy the compositor from nsBaseWidget. r=roc
Matt Woodrow <mwoodrow@mozilla.com>
parents: 135282
diff changeset
   109
583969
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   110
// Helper class used for observing locales change.
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   111
class LocalesChangedObserver final : public nsIObserver {
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   112
  ~LocalesChangedObserver();
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   113
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   114
 public:
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   115
  explicit LocalesChangedObserver(nsBaseWidget* aWidget);
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   116
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   117
  NS_DECL_ISUPPORTS
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   118
  NS_DECL_NSIOBSERVER
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   119
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   120
  void Register();
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   121
  void Unregister();
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   122
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   123
  nsBaseWidget* mWidget;
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   124
  bool mRegistered;
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   125
};
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   126
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   127
/**
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   128
 * Common widget implementation used as base class for native
306346
b7d2b159ceb2181f6288ab6db8e9fd0ec568fb88 Bug 1265386: Fix white-space errors in widget/, r=nfroyd
Thomas Zimmermann <tdz@users.sourceforge.net>
parents: 306172
diff changeset
   129
 * or crossplatform implementations of Widgets.
b7d2b159ceb2181f6288ab6db8e9fd0ec568fb88 Bug 1265386: Fix white-space errors in widget/, r=nfroyd
Thomas Zimmermann <tdz@users.sourceforge.net>
parents: 306172
diff changeset
   130
 * All cross-platform behavior that all widgets need to implement
b7d2b159ceb2181f6288ab6db8e9fd0ec568fb88 Bug 1265386: Fix white-space errors in widget/, r=nfroyd
Thomas Zimmermann <tdz@users.sourceforge.net>
parents: 306172
diff changeset
   131
 * should be placed in this class.
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   132
 * (Note: widget implementations are not required to use this
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   133
 * class, but it gives them a head start.)
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   134
 */
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   135
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   136
class nsBaseWidget : public nsIWidget, public nsSupportsWeakReference {
551065
9bc6706e66dd59638aa1eb158fdac232de0cc314 Bug 1666201 - Part 2: Make Dispatch*Thread support multiple types of event; r=kats
Edgar Chen <echen@mozilla.com>
parents: 551002
diff changeset
   137
  template <class EventType, class InputType>
9bc6706e66dd59638aa1eb158fdac232de0cc314 Bug 1666201 - Part 2: Make Dispatch*Thread support multiple types of event; r=kats
Edgar Chen <echen@mozilla.com>
parents: 551002
diff changeset
   138
  friend class DispatchEventOnMainThread;
303383
0cbb330c02c75657c3f4f9265d705217bb005c5b Rename CompositorWidgetProxy files to CompositorWidget. (bug 1281998 part 2, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 303320
diff changeset
   139
  friend class mozilla::widget::InProcessCompositorWidget;
321756
31fe465d39326229db0d29381b6a088b50fb73df Bug 1313199 - Sync a device reset from GPU process to main process. r=dvander
Ryan Hunt <rhunt@eqrion.net>
parents: 321514
diff changeset
   140
  friend class mozilla::layers::RemoteCompositorSession;
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   141
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   142
 protected:
100323
97040ffd8e31765ca1ffc6f8c8e3ec12709123a5 Bug 776217: Support gecko-implemented screen rotation with omtc. r=roc
Chris Jones <jones.chris.g@gmail.com>
parents: 99716
diff changeset
   143
  typedef base::Thread Thread;
290186
0662b0935257f604567b816af81c369674786190 Bug 1254897 - Recycle back buffer in BasicCompositor r=jrmuizel
Sotaro Ikeda <sotaro.ikeda.g@gmail.com>
parents: 289895
diff changeset
   144
  typedef mozilla::gfx::DrawTarget DrawTarget;
305384
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   145
  typedef mozilla::gfx::SourceSurface SourceSurface;
100920
43e3fec490154e7473af28b13c5434ecc9c85c94 Bug 778519 - Don't include Layers.h everywhere Part 2 r=cjones
David Zbarsky <dzbarsky@gmail.com>
parents: 100844
diff changeset
   146
  typedef mozilla::layers::BufferMode BufferMode;
289895
4f1482e6da917442cfd73f8994ebac3c58f8fe5c Rename PCompositor to PCompositorBridge. (bug 1258479 part 2, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 289111
diff changeset
   147
  typedef mozilla::layers::CompositorBridgeChild CompositorBridgeChild;
4f1482e6da917442cfd73f8994ebac3c58f8fe5c Rename PCompositor to PCompositorBridge. (bug 1258479 part 2, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 289111
diff changeset
   148
  typedef mozilla::layers::CompositorBridgeParent CompositorBridgeParent;
306172
02f12f2a1fbfadbae78864cd754cf3f721f6abcb Bug 1281575 - Extract interface of APZCTreeManager for moving to GPUProcess. r=kats
Ryan Hunt <rhunt@mozilla.com>
parents: 306086
diff changeset
   149
  typedef mozilla::layers::IAPZCTreeManager IAPZCTreeManager;
219723
3fd3bc9d9cd2f3a742df615483435c99c8391eec Move APZC initialization into nsBaseWidget. (bug 1110540 part 1, r=kats)
David Anderson <danderson@mozilla.com>
parents: 216938
diff changeset
   150
  typedef mozilla::layers::GeckoContentController GeckoContentController;
220508
03090de75c45691f9e8c3020313ac5d6f0516b4d Handle in-process APZ events correctly on Windows. (bug 1111873 part 2, r=kats)
David Anderson <danderson@mozilla.com>
parents: 220406
diff changeset
   151
  typedef mozilla::layers::ScrollableLayerGuid ScrollableLayerGuid;
228806
0c3e7de46a8873ec225e4a6510778cf591c467b2 Bug 1127066 - Use APZEventState in nsBaseWidget. r=kats
Botond Ballo <botond@mozilla.com>
parents: 228801
diff changeset
   152
  typedef mozilla::layers::APZEventState APZEventState;
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   153
  typedef mozilla::layers::SetAllowedTouchBehaviorCallback
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   154
      SetAllowedTouchBehaviorCallback;
272750
25836f531c30e3119d41d69b71e8c4daccb85f85 Bug 1224482 (part 7) - Make GetScaledScreenBounds() return a CSSIntRect. r=kats.
Nicholas Nethercote <nnethercote@mozilla.com>
parents: 272748
diff changeset
   155
  typedef mozilla::CSSIntRect CSSIntRect;
280859
cfc568b890f8046d9b6828c1d277bc5a062bda35 Bug 1231517 - part 3, Add ZoomToRect function to nsIWidget classes r=kats
Randall Barker <rbarker@mozilla.com>
parents: 280354
diff changeset
   156
  typedef mozilla::CSSRect CSSRect;
100323
97040ffd8e31765ca1ffc6f8c8e3ec12709123a5 Bug 776217: Support gecko-implemented screen rotation with omtc. r=roc
Chris Jones <jones.chris.g@gmail.com>
parents: 99716
diff changeset
   157
  typedef mozilla::ScreenRotation ScreenRotation;
303387
91f81099937fab0b1acf8a5cc930c7ceacd03488 Extract a delegate interface out of WinCompositorWidget. (bug 1281998 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 303386
diff changeset
   158
  typedef mozilla::widget::CompositorWidgetDelegate CompositorWidgetDelegate;
297876
76466e5503993d57ea96eace53742ffb104b3e84 Hide top-level CompositorBridgeParents behind a new API. (bug 1272472 part 4, r=mattwoodrow,kats,gwagner)
David Anderson <danderson@mozilla.com>
parents: 297873
diff changeset
   159
  typedef mozilla::layers::CompositorSession CompositorSession;
305384
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   160
  typedef mozilla::layers::ImageContainer ImageContainer;
47746
88a10532e55510e9673e113e105212e69d664162 Bug 564991. Part 18: Move double-buffering into the layer manager. r=jrmuizel,sr=vlad
Matt Woodrow <mwoodrow@mozilla.com>
parents: 46198
diff changeset
   161
190542
6a0a566bc00389559e06ad263a1d827af6d73243 Bug 1028588 - Fix dangerous public destructors in widget/ - r=roc
Benoit Jacob <bjacob@mozilla.com>
parents: 187848
diff changeset
   162
  virtual ~nsBaseWidget();
6a0a566bc00389559e06ad263a1d827af6d73243 Bug 1028588 - Fix dangerous public destructors in widget/ - r=roc
Benoit Jacob <bjacob@mozilla.com>
parents: 187848
diff changeset
   163
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   164
 public:
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   165
  nsBaseWidget();
100920
43e3fec490154e7473af28b13c5434ecc9c85c94 Bug 778519 - Don't include Layers.h everywhere Part 2 r=cjones
David Zbarsky <dzbarsky@gmail.com>
parents: 100844
diff changeset
   166
588537
36ab9d576d1be8faa32e5fe8adb316a745401503 Bug 1722450 Make nsBaseWidget class thread safe, r=emilio
stransky <stransky@redhat.com>
parents: 588157
diff changeset
   167
  NS_DECL_THREADSAFE_ISUPPORTS
100920
43e3fec490154e7473af28b13c5434ecc9c85c94 Bug 778519 - Don't include Layers.h everywhere Part 2 r=cjones
David Zbarsky <dzbarsky@gmail.com>
parents: 100844
diff changeset
   168
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   169
  // nsIWidget interface
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   170
  void CaptureMouse(bool aCapture) override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   171
  void CaptureRollupEvents(nsIRollupListener* aListener,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   172
                           bool aDoCapture) override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   173
  nsIWidgetListener* GetWidgetListener() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   174
  void SetWidgetListener(nsIWidgetListener* alistener) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   175
  void Destroy() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   176
  void SetParent(nsIWidget* aNewParent) override{};
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   177
  nsIWidget* GetParent() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   178
  nsIWidget* GetTopLevelWidget() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   179
  nsIWidget* GetSheetWindowParent(void) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   180
  float GetDPI() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   181
  void AddChild(nsIWidget* aChild) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   182
  void RemoveChild(nsIWidget* aChild) override;
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   183
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   184
  void SetZIndex(int32_t aZIndex) override;
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   185
  void PlaceBehind(nsTopLevelWidgetZPlacement aPlacement, nsIWidget* aWidget,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   186
                   bool aActivate) override {}
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   187
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   188
  void SetSizeMode(nsSizeMode aMode) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   189
  nsSizeMode SizeMode() override { return mSizeMode; }
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   190
  void GetWorkspaceID(nsAString& workspaceID) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   191
  void MoveToWorkspace(const nsAString& workspaceID) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   192
  bool IsTiled() const override { return mIsTiled; }
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   193
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   194
  bool IsFullyOccluded() const override { return mIsFullyOccluded; }
365281
683bf7d44d1a257fcb81a6739f58ff1ed6b7396c Bug 1236512 - Part 1: Send "occlusionstatechange" custom event when occlusion state in Mac is changed; f=spohl; r=mstange
Edgar Chen <echen@mozilla.com>
parents: 364920
diff changeset
   195
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   196
  void SetCursor(const Cursor&) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   197
  void ClearCachedCursor() final {
576741
9141b021cbeda90952fe2fffd11b0b7383ac696e Bug 1705877 - Introduce nsIWidget::Cursor. r=dholbert
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 575822
diff changeset
   198
    mCursor = {};
9141b021cbeda90952fe2fffd11b0b7383ac696e Bug 1705877 - Introduce nsIWidget::Cursor. r=dholbert
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 575822
diff changeset
   199
    mUpdateCursor = true;
9141b021cbeda90952fe2fffd11b0b7383ac696e Bug 1705877 - Introduce nsIWidget::Cursor. r=dholbert
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 575822
diff changeset
   200
  }
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   201
  void SetTransparencyMode(nsTransparencyMode aMode) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   202
  nsTransparencyMode GetTransparencyMode() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   203
  void GetWindowClipRegion(nsTArray<LayoutDeviceIntRect>* aRects) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   204
  void SetWindowShadowStyle(mozilla::StyleWindowShadow aStyle) override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   205
  void SetShowsToolbarButton(bool aShow) override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   206
  void SetSupportsNativeFullscreen(bool aSupportsNativeFullscreen) override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   207
  void SetWindowAnimationType(WindowAnimationType aType) override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   208
  void HideWindowChrome(bool aShouldHide) override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   209
  bool PrepareForFullscreenTransition(nsISupports** aData) override {
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   210
    return false;
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   211
  }
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   212
  void PerformFullscreenTransition(FullscreenTransitionStage aStage,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   213
                                   uint16_t aDuration, nsISupports* aData,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   214
                                   nsIRunnable* aCallback) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   215
  void CleanupFullscreenTransition() override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   216
  already_AddRefed<nsIScreen> GetWidgetScreen() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   217
  nsresult MakeFullScreen(bool aFullScreen,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   218
                          nsIScreen* aScreen = nullptr) override;
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   219
  void InfallibleMakeFullScreen(bool aFullScreen, nsIScreen* aScreen = nullptr);
252603
5785576458734597778758478ca9265670190633 Bug 1160014 part 0 - Avoid explicitly mentioning DOM Fullscreen concept in widget part. r=roc
Xidorn Quan <quanxunzhen@gmail.com>
parents: 252477
diff changeset
   220
586492
76ccadcf74235eea28f88592488e3b908773c1b2 Bug 1721537 - Split out WindowRenderer base class from LayerManager. r=miko
Matt Woodrow <mwoodrow@mozilla.com>
parents: 586491
diff changeset
   221
  WindowRenderer* GetWindowRenderer() override;
63893
e9ab3e8d43031700ae02ca5104bff6d91cc75453 Bug 617539 - remove nsIWidget_MOZILLA_2_0_BRANCH, r=jimm
Benjamin Smedberg <benjamin@smedbergs.us>
parents: 60289
diff changeset
   222
314601
5ac08fb77360da01e694dd3fb5fef07a64173298 Recreate widget compositors when the GPU process dies. (bug 1300936 part 2, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 311808
diff changeset
   223
  // A remote compositor session tied to this window has been lost and IPC
5ac08fb77360da01e694dd3fb5fef07a64173298 Recreate widget compositors when the GPU process dies. (bug 1300936 part 2, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 311808
diff changeset
   224
  // messages will no longer work. The widget must clean up any lingering
5ac08fb77360da01e694dd3fb5fef07a64173298 Recreate widget compositors when the GPU process dies. (bug 1300936 part 2, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 311808
diff changeset
   225
  // resources and possibly schedule another paint.
5ac08fb77360da01e694dd3fb5fef07a64173298 Recreate widget compositors when the GPU process dies. (bug 1300936 part 2, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 311808
diff changeset
   226
  //
5ac08fb77360da01e694dd3fb5fef07a64173298 Recreate widget compositors when the GPU process dies. (bug 1300936 part 2, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 311808
diff changeset
   227
  // A reference to the session object is held until this function has
5ac08fb77360da01e694dd3fb5fef07a64173298 Recreate widget compositors when the GPU process dies. (bug 1300936 part 2, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 311808
diff changeset
   228
  // returned.
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   229
  void NotifyCompositorSessionLost(
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   230
      mozilla::layers::CompositorSession* aSession);
314601
5ac08fb77360da01e694dd3fb5fef07a64173298 Recreate widget compositors when the GPU process dies. (bug 1300936 part 2, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 311808
diff changeset
   231
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   232
  already_AddRefed<mozilla::CompositorVsyncDispatcher>
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   233
  GetCompositorVsyncDispatcher();
576745
16194d15c0788327d1ee64bdf6d6851cd4990829 Bug 1705877 - Add back some virtual keywords that I shouldn't have removed.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576744
diff changeset
   234
  virtual void CreateCompositorVsyncDispatcher();
16194d15c0788327d1ee64bdf6d6851cd4990829 Bug 1705877 - Add back some virtual keywords that I shouldn't have removed.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576744
diff changeset
   235
  virtual void CreateCompositor();
16194d15c0788327d1ee64bdf6d6851cd4990829 Bug 1705877 - Add back some virtual keywords that I shouldn't have removed.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576744
diff changeset
   236
  virtual void CreateCompositor(int aWidth, int aHeight);
16194d15c0788327d1ee64bdf6d6851cd4990829 Bug 1705877 - Add back some virtual keywords that I shouldn't have removed.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576744
diff changeset
   237
  virtual void SetCompositorWidgetDelegate(CompositorWidgetDelegate*) {}
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   238
  void PrepareWindowEffects() override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   239
  void UpdateThemeGeometries(
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   240
      const nsTArray<ThemeGeometry>& aThemeGeometries) override {}
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   241
  void SetModal(bool aModal) override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   242
  uint32_t GetMaxTouchPoints() const override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   243
  void SetWindowClass(const nsAString& xulWinType) override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   244
  nsresult SetWindowClipRegion(const nsTArray<LayoutDeviceIntRect>& aRects,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   245
                               bool aIntersectWithExisting) override;
128792
deab88ac216ae3eda801a89821e4b00548a801ba bug 861403 - fix mixing of device pixels with global display pixels in MoveClient and ResizeClient calculations. r=roc
Jonathan Kew <jkew@mozilla.com>
parents: 125703
diff changeset
   246
  // Return whether this widget interprets parameters to Move and Resize APIs
279789
b9c868d65f75d92d68a34c49ef326fb493ff0c59 Bug 890156 - patch 0.1 - Switch from 'display pixels' to 'desktop pixels' terminology in widget code. r=kats
Jonathan Kew <jkew@mozilla.com>
parents: 278160
diff changeset
   247
  // as "desktop pixels" rather than "device pixels", and therefore
128792
deab88ac216ae3eda801a89821e4b00548a801ba bug 861403 - fix mixing of device pixels with global display pixels in MoveClient and ResizeClient calculations. r=roc
Jonathan Kew <jkew@mozilla.com>
parents: 125703
diff changeset
   248
  // applies its GetDefaultScale() value to them before using them as mBounds
deab88ac216ae3eda801a89821e4b00548a801ba bug 861403 - fix mixing of device pixels with global display pixels in MoveClient and ResizeClient calculations. r=roc
Jonathan Kew <jkew@mozilla.com>
parents: 125703
diff changeset
   249
  // etc (which are always stored in device pixels).
deab88ac216ae3eda801a89821e4b00548a801ba bug 861403 - fix mixing of device pixels with global display pixels in MoveClient and ResizeClient calculations. r=roc
Jonathan Kew <jkew@mozilla.com>
parents: 125703
diff changeset
   250
  // Note that APIs that -get- the widget's position/size/bounds, rather than
deab88ac216ae3eda801a89821e4b00548a801ba bug 861403 - fix mixing of device pixels with global display pixels in MoveClient and ResizeClient calculations. r=roc
Jonathan Kew <jkew@mozilla.com>
parents: 125703
diff changeset
   251
  // -setting- them (i.e. moving or resizing the widget) will always return
deab88ac216ae3eda801a89821e4b00548a801ba bug 861403 - fix mixing of device pixels with global display pixels in MoveClient and ResizeClient calculations. r=roc
Jonathan Kew <jkew@mozilla.com>
parents: 125703
diff changeset
   252
  // values in the widget's device pixels.
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   253
  bool BoundsUseDesktopPixels() const {
128792
deab88ac216ae3eda801a89821e4b00548a801ba bug 861403 - fix mixing of device pixels with global display pixels in MoveClient and ResizeClient calculations. r=roc
Jonathan Kew <jkew@mozilla.com>
parents: 125703
diff changeset
   254
    return mWindowType <= eWindowType_popup;
deab88ac216ae3eda801a89821e4b00548a801ba bug 861403 - fix mixing of device pixels with global display pixels in MoveClient and ResizeClient calculations. r=roc
Jonathan Kew <jkew@mozilla.com>
parents: 125703
diff changeset
   255
  }
279792
cc09fb02f2c9191098ff2ab9ba97ed57162e806b Bug 890156 - patch 1 - Add nsIWidget::GetDesktopToDeviceScale() method. r=emk
Jonathan Kew <jkew@mozilla.com>
parents: 279790
diff changeset
   256
  // Default implementation, to be overridden by platforms where desktop coords
cc09fb02f2c9191098ff2ab9ba97ed57162e806b Bug 890156 - patch 1 - Add nsIWidget::GetDesktopToDeviceScale() method. r=emk
Jonathan Kew <jkew@mozilla.com>
parents: 279790
diff changeset
   257
  // are virtualized and may not correspond to device pixels on the screen.
cc09fb02f2c9191098ff2ab9ba97ed57162e806b Bug 890156 - patch 1 - Add nsIWidget::GetDesktopToDeviceScale() method. r=emk
Jonathan Kew <jkew@mozilla.com>
parents: 279790
diff changeset
   258
  mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScale() override {
cc09fb02f2c9191098ff2ab9ba97ed57162e806b Bug 890156 - patch 1 - Add nsIWidget::GetDesktopToDeviceScale() method. r=emk
Jonathan Kew <jkew@mozilla.com>
parents: 279790
diff changeset
   259
    return mozilla::DesktopToLayoutDeviceScale(1.0);
cc09fb02f2c9191098ff2ab9ba97ed57162e806b Bug 890156 - patch 1 - Add nsIWidget::GetDesktopToDeviceScale() method. r=emk
Jonathan Kew <jkew@mozilla.com>
parents: 279790
diff changeset
   260
  }
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   261
  mozilla::DesktopToLayoutDeviceScale GetDesktopToDeviceScaleByScreen()
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   262
      override;
442586
33523dc590feb2d339e4722fdfe1222d341bead4 Bug 1493081 - Added nsIWidget::GetDesktopToDeviceScaleByScreen for scale factor lookup by window position; r=mattwoodrow
Jan Horak <jhorak@redhat.com>
parents: 442297
diff changeset
   263
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   264
  void ConstrainPosition(bool aAllowSlop, int32_t* aX, int32_t* aY) override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   265
  void MoveClient(const DesktopPoint& aOffset) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   266
  void ResizeClient(const DesktopSize& aSize, bool aRepaint) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   267
  void ResizeClient(const DesktopRect& aRect, bool aRepaint) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   268
  LayoutDeviceIntRect GetBounds() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   269
  LayoutDeviceIntRect GetClientBounds() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   270
  LayoutDeviceIntRect GetScreenBounds() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   271
  [[nodiscard]] nsresult GetRestoredBounds(LayoutDeviceIntRect& aRect) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   272
  nsresult SetNonClientMargins(LayoutDeviceIntMargin& aMargins) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   273
  LayoutDeviceIntPoint GetClientOffset() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   274
  void EnableDragDrop(bool aEnable) override{};
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   275
  nsresult AsyncEnableDragDrop(bool aEnable) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   276
  [[nodiscard]] nsresult GetAttention(int32_t aCycleCount) override {
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   277
    return NS_OK;
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   278
  }
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   279
  bool HasPendingInputEvent() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   280
  void SetIcon(const nsAString& aIconSpec) override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   281
  void SetDrawsInTitlebar(bool aState) override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   282
  bool ShowsResizeIndicator(LayoutDeviceIntRect* aResizerRect) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   283
  void FreeNativeData(void* data, uint32_t aDataType) override {}
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   284
  [[nodiscard]] nsresult BeginResizeDrag(mozilla::WidgetGUIEvent* aEvent,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   285
                                         int32_t aHorizontal,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   286
                                         int32_t aVertical) override {
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   287
    return NS_ERROR_NOT_IMPLEMENTED;
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   288
  }
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   289
  nsresult ActivateNativeMenuItemAt(const nsAString& indexString) override {
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   290
    return NS_ERROR_NOT_IMPLEMENTED;
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   291
  }
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   292
  nsresult ForceUpdateNativeMenuAt(const nsAString& indexString) override {
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   293
    return NS_ERROR_NOT_IMPLEMENTED;
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   294
  }
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   295
  nsresult NotifyIME(const IMENotification& aIMENotification) final;
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   296
  [[nodiscard]] nsresult AttachNativeKeyEvent(
520688
beb748e23620cf494bed2acd6e10ea2798d04f23 Bug 1624786 - Replace MOZ_MUST_USE with [[nodiscard]] in widget and widget/windows. r=jmathies
Chris Peterson <cpeterson@mozilla.com>
parents: 516446
diff changeset
   297
      mozilla::WidgetKeyboardEvent& aEvent) override {
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   298
    return NS_ERROR_NOT_IMPLEMENTED;
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   299
  }
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   300
  bool ComputeShouldAccelerate();
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   301
  virtual bool WidgetTypeSupportsAcceleration() { return true; }
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   302
  [[nodiscard]] nsresult OnDefaultButtonLoaded(
520688
beb748e23620cf494bed2acd6e10ea2798d04f23 Bug 1624786 - Replace MOZ_MUST_USE with [[nodiscard]] in widget and widget/windows. r=jmathies
Chris Peterson <cpeterson@mozilla.com>
parents: 516446
diff changeset
   303
      const LayoutDeviceIntRect& aButtonRect) override {
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   304
    return NS_ERROR_NOT_IMPLEMENTED;
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   305
  }
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   306
  already_AddRefed<nsIWidget> CreateChild(
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   307
      const LayoutDeviceIntRect& aRect, nsWidgetInitData* aInitData = nullptr,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   308
      bool aForceUseIWidgetParent = false) override;
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   309
  void AttachViewToTopLevel(bool aUseAttachedEvents) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   310
  nsIWidgetListener* GetAttachedWidgetListener() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   311
  void SetAttachedWidgetListener(nsIWidgetListener* aListener) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   312
  nsIWidgetListener* GetPreviouslyAttachedWidgetListener() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   313
  void SetPreviouslyAttachedWidgetListener(nsIWidgetListener*) override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   314
  NativeIMEContext GetNativeIMEContext() override;
404329
b7634d84216c16379ff045db5c155894457506fb Bug 1436263 - Part 3: Remove `virtual` from final virtual function declarations. r=froydnj
Chris Peterson <cpeterson@mozilla.com>
parents: 404328
diff changeset
   315
  TextEventDispatcher* GetTextEventDispatcher() final;
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   316
  TextEventDispatcherListener* GetNativeTextEventDispatcherListener() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   317
  void ZoomToRect(const uint32_t& aPresShellId,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   318
                  const ScrollableLayerGuid::ViewID& aViewId,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   319
                  const CSSRect& aRect, const uint32_t& aFlags) override;
575822
e11655b5fcb81999d2220444f1c3cc330cf8573c Bug 1704070 - Expose the APZ event status in the return value of DispatchInputEvent(). r=tnikkel
Botond Ballo <botond@mozilla.com>
parents: 575786
diff changeset
   320
288178
9cb01b42228e15778142ec5b64d8aee8c075f3e4 Bug 1242690 - Squash together DispatchAPZAwareEvent and DispatchInputEvent. r=dvander
Kartikaya Gupta <kgupta@mozilla.com>
parents: 286060
diff changeset
   321
  // Dispatch an event that must be first be routed through APZ.
575822
e11655b5fcb81999d2220444f1c3cc330cf8573c Bug 1704070 - Expose the APZ event status in the return value of DispatchInputEvent(). r=tnikkel
Botond Ballo <botond@mozilla.com>
parents: 575786
diff changeset
   322
  ContentAndAPZEventStatus DispatchInputEvent(
e11655b5fcb81999d2220444f1c3cc330cf8573c Bug 1704070 - Expose the APZ event status in the return value of DispatchInputEvent(). r=tnikkel
Botond Ballo <botond@mozilla.com>
parents: 575786
diff changeset
   323
      mozilla::WidgetInputEvent* aEvent) override;
294052
746c21b668ac307976d6fb142f4b708146b58ee7 Bug 1260018 - Route drag events to APZ, so it can accurately detect the end of a drag. r=kats
Botond Ballo <botond@mozilla.com>
parents: 293544
diff changeset
   324
  void DispatchEventToAPZOnly(mozilla::WidgetInputEvent* aEvent) override;
282456
a49bae84297ca35cd0ef58e941133037962b6bd5 Back out 3 csets from bug 1242690 for causing bug 1244549. r=backout
Kartikaya Gupta <kgupta@mozilla.com>
parents: 282390
diff changeset
   325
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   326
  void SetConfirmedTargetAPZC(
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   327
      uint64_t aInputBlockId,
520787
5916b41d10e9c8e6731db02a1611a4b28c1c25ba Bug 1622360 - Remove SLGuidAndRenderRoot and convert remaining uses to ScrollableLayerGuid. r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 520688
diff changeset
   328
      const nsTArray<ScrollableLayerGuid>& aTargets) const override;
239044
879e74f2e74cc56c507c7784f05020462c7ad734 Fix APZ target confirmations arriving before dependent layer transactions. (bug 1154130, r=kats)
David Anderson <danderson@mozilla.com>
parents: 239018
diff changeset
   329
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   330
  void UpdateZoomConstraints(
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   331
      const uint32_t& aPresShellId, const ScrollableLayerGuid::ViewID& aViewId,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   332
      const mozilla::Maybe<ZoomConstraints>& aConstraints) override;
249440
dc009c8ce7c31d516969ad9db32b24a395b78bc0 Bug 1055557 - Add a ZoomConstraintsClient class to manage pushing zoom constraints updates to the APZ code. r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 247285
diff changeset
   333
247190
a509c974aa1f07e07b650c18c4dbc91a1e84336b Use widgets for APZ checks, rather than gfxPrefs. (bug 1162064, r=kats,mstange)
David Anderson <danderson@mozilla.com>
parents: 247093
diff changeset
   334
  bool AsyncPanZoomEnabled() const override;
a509c974aa1f07e07b650c18c4dbc91a1e84336b Use widgets for APZ checks, rather than gfxPrefs. (bug 1162064, r=kats,mstange)
David Anderson <danderson@mozilla.com>
parents: 247093
diff changeset
   335
102462
481e19da0409a2979bf4a17449ae6f1b066274f6 Bug 743975 - remove NS_DESTROY event, r=smaug
Neil Deakin <neil@mozilla.com>
parents: 102461
diff changeset
   336
  void NotifyWindowDestroyed();
102458
340f7af0fb8e7f4f17c916b1337c3e46223795d6 Bug 743975 - move theme and window size done events to direct calls, r=smaug
Neil Deakin <neil@mozilla.com>
parents: 100929
diff changeset
   337
  void NotifySizeMoveDone();
171434
d3ce99c9b61ee2c18c5a44e80726ac3057918fcc Bug 968647 - Part 2. Listen window position change for IME. r=roc
Makoto Kato <m_kato@ga2.so-net.ne.jp>
parents: 171425
diff changeset
   338
  void NotifyWindowMoved(int32_t aX, int32_t aY);
102458
340f7af0fb8e7f4f17c916b1337c3e46223795d6 Bug 743975 - move theme and window size done events to direct calls, r=smaug
Neil Deakin <neil@mozilla.com>
parents: 100929
diff changeset
   339
226581
c05f8b0ce6bb97b38d858ce60c23080fc34aa262 Bug 1095754 - Provide a way to track and access native plugin widgets so they can be accessed from global scope. r=aklotz
Jim Mathies <jmathies@mozilla.com>
parents: 226463
diff changeset
   340
  // Register plugin windows for remote updates from the compositor
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   341
  void RegisterPluginWindowForRemoteUpdates() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   342
  void UnregisterPluginWindowForRemoteUpdates() override;
226581
c05f8b0ce6bb97b38d858ce60c23080fc34aa262 Bug 1095754 - Provide a way to track and access native plugin widgets so they can be accessed from global scope. r=aklotz
Jim Mathies <jmathies@mozilla.com>
parents: 226463
diff changeset
   343
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   344
  void SetNativeData(uint32_t aDataType, uintptr_t aVal) override {}
226594
0bc5fb8363a2d87556abf66d957f57cf10e34824 Bug 1095754 - Transfer bounds information from native plugin widgets to GTK socket widgets when the native plugin widget bounds update. r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 226581
diff changeset
   345
102458
340f7af0fb8e7f4f17c916b1337c3e46223795d6 Bug 743975 - move theme and window size done events to direct calls, r=smaug
Neil Deakin <neil@mozilla.com>
parents: 100929
diff changeset
   346
  // Should be called by derived implementations to notify on system color and
340f7af0fb8e7f4f17c916b1337c3e46223795d6 Bug 743975 - move theme and window size done events to direct calls, r=smaug
Neil Deakin <neil@mozilla.com>
parents: 100929
diff changeset
   347
  // theme changes.
554601
a7080bae91c109472da36f0d197add5746b1be06 Bug 1668875 - Distinguish theme changes that can and cannot affect style/layout. r=tnikkel
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 551065
diff changeset
   348
  void NotifyThemeChanged(mozilla::widget::ThemeChangeKind);
476652
8d2dcfb9a9b65fefb90354d5208eef08df60a96d Bug 1545499 - Remove dead code for threading accelerator state. r=NeilDeakin
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 475634
diff changeset
   349
  void NotifyUIStateChanged(UIStateChangeType aShowFocusRings);
102458
340f7af0fb8e7f4f17c916b1337c3e46223795d6 Bug 743975 - move theme and window size done events to direct calls, r=smaug
Neil Deakin <neil@mozilla.com>
parents: 100929
diff changeset
   350
102460
92fdc7bd7f5fbd1304b701c4f7d36efdb3943e37 Bug 743975 - remove accessibility events from widget, replace with a nsBaseWidget::GetAccessible method, r=trevsaunders
Neil Deakin <neil@mozilla.com>
parents: 102458
diff changeset
   351
#ifdef ACCESSIBILITY
92fdc7bd7f5fbd1304b701c4f7d36efdb3943e37 Bug 743975 - remove accessibility events from widget, replace with a nsBaseWidget::GetAccessible method, r=trevsaunders
Neil Deakin <neil@mozilla.com>
parents: 102458
diff changeset
   352
  // Get the accessible for the window.
568148
0df6a015e7c44653ff9cb114d25644c0515b0cc9 Bug 1693597 - P1: Rename Accessible to LocalAccessible. r=morgan
Eitan Isaacson <eitan@monotonous.org>
parents: 568061
diff changeset
   353
  mozilla::a11y::LocalAccessible* GetRootAccessible();
102460
92fdc7bd7f5fbd1304b701c4f7d36efdb3943e37 Bug 743975 - remove accessibility events from widget, replace with a nsBaseWidget::GetAccessible method, r=trevsaunders
Neil Deakin <neil@mozilla.com>
parents: 102458
diff changeset
   354
#endif
92fdc7bd7f5fbd1304b701c4f7d36efdb3943e37 Bug 743975 - remove accessibility events from widget, replace with a nsBaseWidget::GetAccessible method, r=trevsaunders
Neil Deakin <neil@mozilla.com>
parents: 102458
diff changeset
   355
302074
e9723c6c6136e2311374e5e6d4ea9cdc9f42b6b3 Bug 1264365 - Disable hardware acceleration for small popup widgets. r=dvander
Nicolas Silva <nsilva@mozilla.com>
parents: 300650
diff changeset
   356
  // Return true if this is a simple widget (that is typically not worth
e9723c6c6136e2311374e5e6d4ea9cdc9f42b6b3 Bug 1264365 - Disable hardware acceleration for small popup widgets. r=dvander
Nicolas Silva <nsilva@mozilla.com>
parents: 300650
diff changeset
   357
  // accelerating)
e9723c6c6136e2311374e5e6d4ea9cdc9f42b6b3 Bug 1264365 - Disable hardware acceleration for small popup widgets. r=dvander
Nicolas Silva <nsilva@mozilla.com>
parents: 300650
diff changeset
   358
  bool IsSmallPopup() const;
e9723c6c6136e2311374e5e6d4ea9cdc9f42b6b3 Bug 1264365 - Disable hardware acceleration for small popup widgets. r=dvander
Nicolas Silva <nsilva@mozilla.com>
parents: 300650
diff changeset
   359
48254
d8057f320d56b15669dc7ce5d4109e8c48cc09f0 Bug 552982, Part 3: support panel levels, r=mats
Neil Deakin <neil@mozilla.com>
parents: 47857
diff changeset
   360
  nsPopupLevel PopupLevel() { return mPopupLevel; }
d8057f320d56b15669dc7ce5d4109e8c48cc09f0 Bug 552982, Part 3: support panel levels, r=mats
Neil Deakin <neil@mozilla.com>
parents: 47857
diff changeset
   361
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   362
  LayoutDeviceIntSize ClientToWindowSize(
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   363
      const LayoutDeviceIntSize& aClientSize) override {
48256
057b802ec2693a2a576c226cd9dd8e230cb41bc2 Bug 552982, Part 5: support for titlebars on panels, r=mats,sr=roc
Neil Deakin <neil@mozilla.com>
parents: 48254
diff changeset
   364
    return aClientSize;
057b802ec2693a2a576c226cd9dd8e230cb41bc2 Bug 552982, Part 5: support for titlebars on panels, r=mats,sr=roc
Neil Deakin <neil@mozilla.com>
parents: 48254
diff changeset
   365
  }
057b802ec2693a2a576c226cd9dd8e230cb41bc2 Bug 552982, Part 5: support for titlebars on panels, r=mats,sr=roc
Neil Deakin <neil@mozilla.com>
parents: 48254
diff changeset
   366
057b802ec2693a2a576c226cd9dd8e230cb41bc2 Bug 552982, Part 5: support for titlebars on panels, r=mats,sr=roc
Neil Deakin <neil@mozilla.com>
parents: 48254
diff changeset
   367
  // return true if this is a popup widget with a native titlebar
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   368
  bool IsPopupWithTitleBar() const {
306346
b7d2b159ceb2181f6288ab6db8e9fd0ec568fb88 Bug 1265386: Fix white-space errors in widget/, r=nfroyd
Thomas Zimmermann <tdz@users.sourceforge.net>
parents: 306172
diff changeset
   369
    return (mWindowType == eWindowType_popup &&
48256
057b802ec2693a2a576c226cd9dd8e230cb41bc2 Bug 552982, Part 5: support for titlebars on panels, r=mats,sr=roc
Neil Deakin <neil@mozilla.com>
parents: 48254
diff changeset
   370
            mBorderStyle != eBorderStyle_default &&
057b802ec2693a2a576c226cd9dd8e230cb41bc2 Bug 552982, Part 5: support for titlebars on panels, r=mats,sr=roc
Neil Deakin <neil@mozilla.com>
parents: 48254
diff changeset
   371
            mBorderStyle & eBorderStyle_title);
057b802ec2693a2a576c226cd9dd8e230cb41bc2 Bug 552982, Part 5: support for titlebars on panels, r=mats,sr=roc
Neil Deakin <neil@mozilla.com>
parents: 48254
diff changeset
   372
  }
057b802ec2693a2a576c226cd9dd8e230cb41bc2 Bug 552982, Part 5: support for titlebars on panels, r=mats,sr=roc
Neil Deakin <neil@mozilla.com>
parents: 48254
diff changeset
   373
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   374
  void ReparentNativeWidget(nsIWidget* aNewParent) override {}
85420
087c753880cbe3fb95b825c6bc7f5d087a5a20e3 Bug 715232: Don't attempt to CopyTexImage from an RGB framebuffer to an RGBA texture. r=joedrew
Chris Jones <jones.chris.g@gmail.com>
parents: 85067
diff changeset
   375
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   376
  const SizeConstraints GetSizeConstraints() override;
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   377
  void SetSizeConstraints(const SizeConstraints& aConstraints) override;
100929
b8a0228a10faac7d965155e15bd66ff8bf3ddb82 Bug 357725, support minimum and maximum size constraints on windows and popups, r=mats,jmathies,karlt,smichaud,sr=neil
Neil Deakin <neil@mozilla.com>
parents: 100920
diff changeset
   378
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   379
  void StartAsyncScrollbarDrag(const AsyncDragMetrics& aDragMetrics) override;
266699
c9999ccc9a8b7f77ad54b3540196c2725a82bb7b Bug 1199885 - Part 12: Add StartScrollbarDrag IPC message. r=kats
Benoit Girard <b56girard@gmail.com>
parents: 262100
diff changeset
   380
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   381
  bool StartAsyncAutoscroll(const ScreenPoint& aAnchorLocation,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   382
                            const ScrollableLayerGuid& aGuid) override;
372036
ab07a3654f59dfc98ed7a884d84936123af3fca3 Bug 1105109 - Have the parent process notify APZ of the start and stop of autoscrolling. r=kats
Botond Ballo <botond@mozilla.com>
parents: 371640
diff changeset
   383
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   384
  void StopAsyncAutoscroll(const ScrollableLayerGuid& aGuid) override;
372036
ab07a3654f59dfc98ed7a884d84936123af3fca3 Bug 1105109 - Have the parent process notify APZ of the start and stop of autoscrolling. r=kats
Botond Ballo <botond@mozilla.com>
parents: 371640
diff changeset
   385
587301
e02e9a1e0b154758dba67fbb06dfc0440da9277f Bug 1718761 - Move {Start,Stop}ApzAutoscroll to CanonicalBrowsingContext, r=Gijs,hiro
Kashav Madan <kshvmdn@gmail.com>
parents: 587299
diff changeset
   386
  mozilla::layers::LayersId GetRootLayerTreeId() override;
e02e9a1e0b154758dba67fbb06dfc0440da9277f Bug 1718761 - Move {Start,Stop}ApzAutoscroll to CanonicalBrowsingContext, r=Gijs,hiro
Kashav Madan <kshvmdn@gmail.com>
parents: 587299
diff changeset
   387
38805
c85d57ea1d37fdfea1ba14d487df44bf66acad3a Bug 534425. Part 6: Let nsIWidgets expose a LayerManager to be used to render into the widget, instead of nsPaintEvent::renderingContext which is removed since it's no longer needed. Currently all widgets fall back to a default BasicLayerManager implementation. Also change nsPaintEvent::region to be an nsIntRegion, and get rid of nsPaintEvent::rect since it's redundant.
Robert O'Callahan <robert@ocallahan.org>
parents: 35698
diff changeset
   388
  /**
c85d57ea1d37fdfea1ba14d487df44bf66acad3a Bug 534425. Part 6: Let nsIWidgets expose a LayerManager to be used to render into the widget, instead of nsPaintEvent::renderingContext which is removed since it's no longer needed. Currently all widgets fall back to a default BasicLayerManager implementation. Also change nsPaintEvent::region to be an nsIntRegion, and get rid of nsPaintEvent::rect since it's redundant.
Robert O'Callahan <robert@ocallahan.org>
parents: 35698
diff changeset
   389
   * Use this when GetLayerManager() returns a BasicLayerManager
c85d57ea1d37fdfea1ba14d487df44bf66acad3a Bug 534425. Part 6: Let nsIWidgets expose a LayerManager to be used to render into the widget, instead of nsPaintEvent::renderingContext which is removed since it's no longer needed. Currently all widgets fall back to a default BasicLayerManager implementation. Also change nsPaintEvent::region to be an nsIntRegion, and get rid of nsPaintEvent::rect since it's redundant.
Robert O'Callahan <robert@ocallahan.org>
parents: 35698
diff changeset
   390
   * (nsBaseWidget::GetLayerManager() does). This sets up the widget's
c85d57ea1d37fdfea1ba14d487df44bf66acad3a Bug 534425. Part 6: Let nsIWidgets expose a LayerManager to be used to render into the widget, instead of nsPaintEvent::renderingContext which is removed since it's no longer needed. Currently all widgets fall back to a default BasicLayerManager implementation. Also change nsPaintEvent::region to be an nsIntRegion, and get rid of nsPaintEvent::rect since it's redundant.
Robert O'Callahan <robert@ocallahan.org>
parents: 35698
diff changeset
   391
   * layer manager to temporarily render into aTarget.
100323
97040ffd8e31765ca1ffc6f8c8e3ec12709123a5 Bug 776217: Support gecko-implemented screen rotation with omtc. r=roc
Chris Jones <jones.chris.g@gmail.com>
parents: 99716
diff changeset
   392
   *
97040ffd8e31765ca1ffc6f8c8e3ec12709123a5 Bug 776217: Support gecko-implemented screen rotation with omtc. r=roc
Chris Jones <jones.chris.g@gmail.com>
parents: 99716
diff changeset
   393
   * |aNaturalWidgetBounds| is the un-rotated bounds of |aWidget|.
97040ffd8e31765ca1ffc6f8c8e3ec12709123a5 Bug 776217: Support gecko-implemented screen rotation with omtc. r=roc
Chris Jones <jones.chris.g@gmail.com>
parents: 99716
diff changeset
   394
   * |aRotation| is the "virtual rotation" to apply when rendering to
97040ffd8e31765ca1ffc6f8c8e3ec12709123a5 Bug 776217: Support gecko-implemented screen rotation with omtc. r=roc
Chris Jones <jones.chris.g@gmail.com>
parents: 99716
diff changeset
   395
   * the target.  When |aRotation| is ROTATION_0,
97040ffd8e31765ca1ffc6f8c8e3ec12709123a5 Bug 776217: Support gecko-implemented screen rotation with omtc. r=roc
Chris Jones <jones.chris.g@gmail.com>
parents: 99716
diff changeset
   396
   * |aNaturalWidgetBounds| is not used.
38805
c85d57ea1d37fdfea1ba14d487df44bf66acad3a Bug 534425. Part 6: Let nsIWidgets expose a LayerManager to be used to render into the widget, instead of nsPaintEvent::renderingContext which is removed since it's no longer needed. Currently all widgets fall back to a default BasicLayerManager implementation. Also change nsPaintEvent::region to be an nsIntRegion, and get rid of nsPaintEvent::rect since it's redundant.
Robert O'Callahan <robert@ocallahan.org>
parents: 35698
diff changeset
   397
   */
c85d57ea1d37fdfea1ba14d487df44bf66acad3a Bug 534425. Part 6: Let nsIWidgets expose a LayerManager to be used to render into the widget, instead of nsPaintEvent::renderingContext which is removed since it's no longer needed. Currently all widgets fall back to a default BasicLayerManager implementation. Also change nsPaintEvent::region to be an nsIntRegion, and get rid of nsPaintEvent::rect since it's redundant.
Robert O'Callahan <robert@ocallahan.org>
parents: 35698
diff changeset
   398
  class AutoLayerManagerSetup {
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   399
   public:
47746
88a10532e55510e9673e113e105212e69d664162 Bug 564991. Part 18: Move double-buffering into the layer manager. r=jrmuizel,sr=vlad
Matt Woodrow <mwoodrow@mozilla.com>
parents: 46198
diff changeset
   400
    AutoLayerManagerSetup(nsBaseWidget* aWidget, gfxContext* aTarget,
587869
e8299f04430316b8ed5a73b8b9f0e824dfe84f38 Bug 1722258 - Convert more LayerManager usage to use WindowRenderer. r=miko
Matt Woodrow <mwoodrow@mozilla.com>
parents: 587301
diff changeset
   401
                          BufferMode aDoubleBuffering);
38805
c85d57ea1d37fdfea1ba14d487df44bf66acad3a Bug 534425. Part 6: Let nsIWidgets expose a LayerManager to be used to render into the widget, instead of nsPaintEvent::renderingContext which is removed since it's no longer needed. Currently all widgets fall back to a default BasicLayerManager implementation. Also change nsPaintEvent::region to be an nsIntRegion, and get rid of nsPaintEvent::rect since it's redundant.
Robert O'Callahan <robert@ocallahan.org>
parents: 35698
diff changeset
   402
    ~AutoLayerManagerSetup();
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   403
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   404
   private:
38805
c85d57ea1d37fdfea1ba14d487df44bf66acad3a Bug 534425. Part 6: Let nsIWidgets expose a LayerManager to be used to render into the widget, instead of nsPaintEvent::renderingContext which is removed since it's no longer needed. Currently all widgets fall back to a default BasicLayerManager implementation. Also change nsPaintEvent::region to be an nsIntRegion, and get rid of nsPaintEvent::rect since it's redundant.
Robert O'Callahan <robert@ocallahan.org>
parents: 35698
diff changeset
   405
    nsBaseWidget* mWidget;
587870
e505fffd43c3663a2ed608907ed17830cc526ec9 Bug 1722258 - Add FallbackRenderer to replace BasicLayerManager usage. r=miko
Matt Woodrow <mwoodrow@mozilla.com>
parents: 587869
diff changeset
   406
    mozilla::FallbackRenderer* mRenderer = nullptr;
38805
c85d57ea1d37fdfea1ba14d487df44bf66acad3a Bug 534425. Part 6: Let nsIWidgets expose a LayerManager to be used to render into the widget, instead of nsPaintEvent::renderingContext which is removed since it's no longer needed. Currently all widgets fall back to a default BasicLayerManager implementation. Also change nsPaintEvent::region to be an nsIntRegion, and get rid of nsPaintEvent::rect since it's redundant.
Robert O'Callahan <robert@ocallahan.org>
parents: 35698
diff changeset
   407
  };
c85d57ea1d37fdfea1ba14d487df44bf66acad3a Bug 534425. Part 6: Let nsIWidgets expose a LayerManager to be used to render into the widget, instead of nsPaintEvent::renderingContext which is removed since it's no longer needed. Currently all widgets fall back to a default BasicLayerManager implementation. Also change nsPaintEvent::region to be an nsIntRegion, and get rid of nsPaintEvent::rect since it's redundant.
Robert O'Callahan <robert@ocallahan.org>
parents: 35698
diff changeset
   408
  friend class AutoLayerManagerSetup;
c85d57ea1d37fdfea1ba14d487df44bf66acad3a Bug 534425. Part 6: Let nsIWidgets expose a LayerManager to be used to render into the widget, instead of nsPaintEvent::renderingContext which is removed since it's no longer needed. Currently all widgets fall back to a default BasicLayerManager implementation. Also change nsPaintEvent::region to be an nsIntRegion, and get rid of nsPaintEvent::rect since it's redundant.
Robert O'Callahan <robert@ocallahan.org>
parents: 35698
diff changeset
   409
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   410
  virtual bool ShouldUseOffMainThreadCompositing();
111530
6a9691cfc118dc485a8df23c46738c55a4708401 Bug 701760, merge <select> and popup manager rollup handling, so that select elements don't cancel out any popup rollup listeners, r=mats
Neil Deakin <neil@mozilla.com>
parents: 110604
diff changeset
   411
6a9691cfc118dc485a8df23c46738c55a4708401 Bug 701760, merge <select> and popup manager rollup handling, so that select elements don't cancel out any popup rollup listeners, r=mats
Neil Deakin <neil@mozilla.com>
parents: 110604
diff changeset
   412
  static nsIRollupListener* GetActiveRollupListener();
6a9691cfc118dc485a8df23c46738c55a4708401 Bug 701760, merge <select> and popup manager rollup handling, so that select elements don't cancel out any popup rollup listeners, r=mats
Neil Deakin <neil@mozilla.com>
parents: 110604
diff changeset
   413
135289
18a68adb330fe42be6a236512093a6fdafd5e28d Bug 877534 - Use a shutdown listener to destroy the compositor from nsBaseWidget. r=roc
Matt Woodrow <mwoodrow@mozilla.com>
parents: 135282
diff changeset
   414
  void Shutdown();
18a68adb330fe42be6a236512093a6fdafd5e28d Bug 877534 - Use a shutdown listener to destroy the compositor from nsBaseWidget. r=roc
Matt Woodrow <mwoodrow@mozilla.com>
parents: 135282
diff changeset
   415
479076
164ae5b4ff067240721f51c4917961048de3a6d0 Bug 1549930 addendum - Notify widgets of IME blur on quit (on non-Android). r=masayuki
Henri Sivonen <hsivonen@hsivonen.fi>
parents: 476652
diff changeset
   416
  void QuitIME();
164ae5b4ff067240721f51c4917961048de3a6d0 Bug 1549930 addendum - Notify widgets of IME blur on quit (on non-Android). r=masayuki
Henri Sivonen <hsivonen@hsivonen.fi>
parents: 476652
diff changeset
   417
305384
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   418
#if defined(XP_WIN)
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   419
  uint64_t CreateScrollCaptureContainer() override;
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   420
#endif
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   421
332017
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
   422
  // These functions should be called at the start and end of a "live" widget
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
   423
  // resize (i.e. when the window contents are repainting during the resize,
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
   424
  // such as when the user drags a window border). It will suppress the
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
   425
  // displayport during the live resize to avoid unneccessary overpainting.
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
   426
  void NotifyLiveResizeStarted();
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
   427
  void NotifyLiveResizeStopped();
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
   428
354240
81de9d1439b0e352729142f6aa2914674073da03 Bug 1335895 - Android GeckoView Dynamic Toolbar Version 3 r=botond,dvander,jchen,kats
Randall Barker <rbarker@mozilla.com>
parents: 352528
diff changeset
   429
#if defined(MOZ_WIDGET_ANDROID)
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   430
  void RecvToolbarAnimatorMessageFromCompositor(int32_t) override{};
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   431
  void UpdateRootFrameMetrics(const ScreenPoint& aScrollOffset,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   432
                              const CSSToScreenScale& aZoom) override{};
544716
64b98572f2e02462068dac40c656d3c091619143 Bug 1656818 - Move decision to flip WebRender readback closer to the source, and make it correct for SWGL. r=lsalzman,geckoview-reviewers,snorp
Matt Woodrow <mwoodrow@mozilla.com>
parents: 535939
diff changeset
   433
  void RecvScreenPixels(mozilla::ipc::Shmem&& aMem, const ScreenIntSize& aSize,
64b98572f2e02462068dac40c656d3c091619143 Bug 1656818 - Move decision to flip WebRender readback closer to the source, and make it correct for SWGL. r=lsalzman,geckoview-reviewers,snorp
Matt Woodrow <mwoodrow@mozilla.com>
parents: 535939
diff changeset
   434
                        bool aNeedsYFlip) override{};
354240
81de9d1439b0e352729142f6aa2914674073da03 Bug 1335895 - Android GeckoView Dynamic Toolbar Version 3 r=botond,dvander,jchen,kats
Randall Barker <rbarker@mozilla.com>
parents: 352528
diff changeset
   435
#endif
81de9d1439b0e352729142f6aa2914674073da03 Bug 1335895 - Android GeckoView Dynamic Toolbar Version 3 r=botond,dvander,jchen,kats
Randall Barker <rbarker@mozilla.com>
parents: 352528
diff changeset
   436
583969
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   437
  virtual void LocalesChanged() {}
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   438
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   439
 protected:
303383
0cbb330c02c75657c3f4f9265d705217bb005c5b Rename CompositorWidgetProxy files to CompositorWidget. (bug 1281998 part 2, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 303320
diff changeset
   440
  // These are methods for CompositorWidgetWrapper, and should only be
295585
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   441
  // accessed from that class. Derived widgets can choose which methods to
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   442
  // implement, or none if supporting out-of-process compositing.
321514
dd859148673c2ac94c827e2da05e7f89120c633d Bug 1315706 - Pass a wrapper struct to various CompositorWidget functions. r=dvander
Kartikaya Gupta <kgupta@mozilla.com>
parents: 318668
diff changeset
   443
  virtual bool PreRender(mozilla::widget::WidgetRenderingContext* aContext) {
295585
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   444
    return true;
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   445
  }
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   446
  virtual void PostRender(mozilla::widget::WidgetRenderingContext* aContext) {}
489800
de0c56e1ffad7de4e606b77a1f7156772f857569 Bug 1574592 - Add CompositorWidget::GetNativeLayerRoot. r=mattwoodrow
Markus Stange <mstange@themasta.com>
parents: 488828
diff changeset
   447
  virtual RefPtr<mozilla::layers::NativeLayerRoot> GetNativeLayerRoot() {
de0c56e1ffad7de4e606b77a1f7156772f857569 Bug 1574592 - Add CompositorWidget::GetNativeLayerRoot. r=mattwoodrow
Markus Stange <mstange@themasta.com>
parents: 488828
diff changeset
   448
    return nullptr;
de0c56e1ffad7de4e606b77a1f7156772f857569 Bug 1574592 - Add CompositorWidget::GetNativeLayerRoot. r=mattwoodrow
Markus Stange <mstange@themasta.com>
parents: 488828
diff changeset
   449
  }
295585
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   450
  virtual already_AddRefed<DrawTarget> StartRemoteDrawing();
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   451
  virtual already_AddRefed<DrawTarget> StartRemoteDrawingInRegion(
568638
6629b9999267436f509eefcd075b2574abd9f184 Bug 1690216 - Clarify that StartRemoteDrawingInRegion does not actually modify the region. r=mattwoodrow
Lee Salzman <lsalzman@mozilla.com>
parents: 568521
diff changeset
   452
      const LayoutDeviceIntRegion& aInvalidRegion, BufferMode* aBufferMode) {
295585
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   453
    return StartRemoteDrawing();
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   454
  }
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   455
  virtual void EndRemoteDrawing() {}
488828
c69027259ea093daf8256eea683898acd51ea802 Bug 1573343 - Make the aInvalidRegion parameter of EndRemoteDrawing a const reference rather than a regular reference. r=mattwoodrow
Markus Stange <mstange@themasta.com>
parents: 488400
diff changeset
   456
  virtual void EndRemoteDrawingInRegion(
c69027259ea093daf8256eea683898acd51ea802 Bug 1573343 - Make the aInvalidRegion parameter of EndRemoteDrawing a const reference rather than a regular reference. r=mattwoodrow
Markus Stange <mstange@themasta.com>
parents: 488400
diff changeset
   457
      DrawTarget* aDrawTarget, const LayoutDeviceIntRegion& aInvalidRegion) {
295585
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   458
    EndRemoteDrawing();
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   459
  }
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   460
  virtual void CleanupRemoteDrawing() {}
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   461
  virtual void CleanupWindowEffects() {}
295585
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   462
  virtual bool InitCompositor(mozilla::layers::Compositor* aCompositor) {
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   463
    return true;
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   464
  }
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   465
  virtual uint32_t GetGLFrameBufferFormat();
482872
840b6bd9e818d5982c4560c9c712abef3a5d0cfe Bug 1565785 - Skip WR rendering until window becomes ready to draw on Wayland r=nical
sotaro <sotaro.ikeda.g@gmail.com>
parents: 482867
diff changeset
   466
  virtual bool CompositorInitiallyPaused() { return false; }
295581
d1dad3cf31c1590d30af46c2a93e8fdbe6fe8019 Lift compositor-accessed methods from nsIWidget into CompositorWidgetProxy. (bug 1264545 part 2, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 294607
diff changeset
   467
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   468
 protected:
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   469
  void ResolveIconName(const nsAString& aIconName, const nsAString& aIconSuffix,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   470
                       nsIFile** aResult);
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   471
  virtual void OnDestroy();
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   472
  void BaseCreate(nsIWidget* aParent, nsWidgetInitData* aInitData);
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   473
219723
3fd3bc9d9cd2f3a742df615483435c99c8391eec Move APZC initialization into nsBaseWidget. (bug 1110540 part 1, r=kats)
David Anderson <danderson@mozilla.com>
parents: 216938
diff changeset
   474
  virtual void ConfigureAPZCTreeManager();
236042
c2179c027c28922befd5617fdb5c5728cc387b10 Allow dispatching to the APZ controller thread from any thread. (bug 1147681 part 1, r=kats)
David Anderson <danderson@mozilla.com>
parents: 235751
diff changeset
   475
  virtual void ConfigureAPZControllerThread();
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   476
  virtual already_AddRefed<GeckoContentController>
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   477
  CreateRootContentController();
219723
3fd3bc9d9cd2f3a742df615483435c99c8391eec Move APZC initialization into nsBaseWidget. (bug 1110540 part 1, r=kats)
David Anderson <danderson@mozilla.com>
parents: 216938
diff changeset
   478
232336
2d15f031ead0648b05dd6c0260c957618417b078 Factor out how APZ-aware events are dispatched from widgets. (bug 1126090 part 2, r=kats)
dvander@alliedmods.net <danderson@mozilla.com>
parents: 230000
diff changeset
   479
  // Dispatch an event that has already been routed through APZ.
494045
ffc0e1cd529761f99a74914150f84e2320cecb22 Bug 1564195 - Group the results of APZInputBridge::ReceiveInputEvent() into a struct. r=tnikkel
Botond Ballo <botond@mozilla.com>
parents: 493554
diff changeset
   480
  nsEventStatus ProcessUntransformedAPZEvent(
ffc0e1cd529761f99a74914150f84e2320cecb22 Bug 1564195 - Group the results of APZInputBridge::ReceiveInputEvent() into a struct. r=tnikkel
Botond Ballo <botond@mozilla.com>
parents: 493554
diff changeset
   481
      mozilla::WidgetInputEvent* aEvent,
ffc0e1cd529761f99a74914150f84e2320cecb22 Bug 1564195 - Group the results of APZInputBridge::ReceiveInputEvent() into a struct. r=tnikkel
Botond Ballo <botond@mozilla.com>
parents: 493554
diff changeset
   482
      const mozilla::layers::APZEventResult& aApzResult);
220508
03090de75c45691f9e8c3020313ac5d6f0516b4d Handle in-process APZ events correctly on Windows. (bug 1111873 part 2, r=kats)
David Anderson <danderson@mozilla.com>
parents: 220406
diff changeset
   483
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   484
  const LayoutDeviceIntRegion RegionFromArray(
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   485
      const nsTArray<LayoutDeviceIntRect>& aRects);
275567
1602b93dcc413caa7ac8af1a2ca8d3812c6b33b9 Bug 1229665 - Convert widget clip regions to LayoutDevicePixels. r=botond.
Nicholas Nethercote <nnethercote@mozilla.com>
parents: 275419
diff changeset
   486
  void ArrayFromRegion(const LayoutDeviceIntRegion& aRegion,
1602b93dcc413caa7ac8af1a2ca8d3812c6b33b9 Bug 1229665 - Convert widget clip regions to LayoutDevicePixels. r=botond.
Nicholas Nethercote <nnethercote@mozilla.com>
parents: 275419
diff changeset
   487
                       nsTArray<LayoutDeviceIntRect>& aRects);
215360
dcc233b91a99e7d8cfaa39b508d2eb2c2496fab6 Bug 669200 - Various widget changes to support two new types of plugin widget. r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 212000
diff changeset
   488
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   489
  nsresult SynthesizeNativeKeyEvent(int32_t aNativeKeyboardLayout,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   490
                                    int32_t aNativeKeyCode,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   491
                                    uint32_t aModifierFlags,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   492
                                    const nsAString& aCharacters,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   493
                                    const nsAString& aUnmodifiedCharacters,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   494
                                    nsIObserver* aObserver) override {
239018
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   495
    mozilla::widget::AutoObserverNotifier notifier(aObserver, "keyevent");
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   496
    return NS_ERROR_UNEXPECTED;
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   497
  }
14962
8bfd6a5219724104857355f5858d8bb83cbdeba9 Bug 431503. Infrastructure and tests for native key event translation. r=josh,karlt,sr=jst
roc+@cs.cmu.edu
parents: 14886
diff changeset
   498
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   499
  nsresult SynthesizeNativeMouseEvent(LayoutDeviceIntPoint aPoint,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   500
                                      NativeMouseMessage aNativeMessage,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   501
                                      mozilla::MouseButton aButton,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   502
                                      nsIWidget::Modifiers aModifierFlags,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   503
                                      nsIObserver* aObserver) override {
239018
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   504
    mozilla::widget::AutoObserverNotifier notifier(aObserver, "mouseevent");
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   505
    return NS_ERROR_UNEXPECTED;
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   506
  }
32976
810ee87710df51cd90889cb4f846db7ebefa2390 Bug 515003 - Rewrite native mouse event handling. Also add tests for native mouse events (bug 470845). r=josh, sr=roc
Markus Stange <mstange@themasta.com>
parents: 32297
diff changeset
   507
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   508
  nsresult SynthesizeNativeMouseMove(LayoutDeviceIntPoint aPoint,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   509
                                     nsIObserver* aObserver) override {
239018
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   510
    mozilla::widget::AutoObserverNotifier notifier(aObserver, "mouseevent");
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   511
    return NS_ERROR_UNEXPECTED;
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   512
  }
91461
637a5d7228be55ee34dba86a474c9515ac606d36 Bug 633602 - Implement Pointer Lock (Mouse Lock) API. r=roc,smaug
David Humphrey (:humph) <david.humphrey@senecacollege.ca>
parents: 90597
diff changeset
   513
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   514
  nsresult SynthesizeNativeMouseScrollEvent(
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   515
      LayoutDeviceIntPoint aPoint, uint32_t aNativeMessage, double aDeltaX,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   516
      double aDeltaY, double aDeltaZ, uint32_t aModifierFlags,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   517
      uint32_t aAdditionalFlags, nsIObserver* aObserver) override {
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   518
    mozilla::widget::AutoObserverNotifier notifier(aObserver,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   519
                                                   "mousescrollevent");
239018
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   520
    return NS_ERROR_UNEXPECTED;
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   521
  }
89992
78b2188530e5a18ab94dbfa07f6012a603a3b82e Bug 672175 part.15 Add new API nsIDOMWindowUtils.sendNativeMouseScrollEvent() r=roc, sr=smaug
Masayuki Nakano <masayuki@d-toybox.com>
parents: 89891
diff changeset
   522
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   523
  nsresult SynthesizeNativeTouchPoint(uint32_t aPointerId,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   524
                                      TouchPointerState aPointerState,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   525
                                      LayoutDeviceIntPoint aPoint,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   526
                                      double aPointerPressure,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   527
                                      uint32_t aPointerOrientation,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   528
                                      nsIObserver* aObserver) override {
239018
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   529
    mozilla::widget::AutoObserverNotifier notifier(aObserver, "touchpoint");
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   530
    return NS_ERROR_UNEXPECTED;
30b7130a25e436a98ec9e004dfdfbb5c9d067b44 Bug 1146349 - Make the native event synthesization functions in DOMWindowUtils async. r=smaug
Kartikaya Gupta <kgupta@mozilla.com>
parents: 237012
diff changeset
   531
  }
160524
bd9d5c318301f0b9f605ef47f213b0a597a01976 Bug 941774 - Base widget implementation. r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 159648
diff changeset
   532
588156
731c26701653dcf5b542aa52758e54ad70a77171 Bug 1678771. Rename TouchpadPinchPhase to TouchpadGesturePhase. r=hiro
Timothy Nikkel <tnikkel@gmail.com>
parents: 587870
diff changeset
   533
  nsresult SynthesizeNativeTouchPadPinch(TouchpadGesturePhase aEventPhase,
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   534
                                         float aScale,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   535
                                         LayoutDeviceIntPoint aPoint,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   536
                                         int32_t aModifierFlags) override {
568061
f480a36d566f652ed5c39de6f3d2ae5f9542e76d Bug 1640186 - Add machinery for sending native pinch gestures from a test, and a test which uses it r=botond
alaaemad <eng.alaaemad.ae@gmail.com>
parents: 568006
diff changeset
   537
    MOZ_RELEASE_ASSERT(
f480a36d566f652ed5c39de6f3d2ae5f9542e76d Bug 1640186 - Add machinery for sending native pinch gestures from a test, and a test which uses it r=botond
alaaemad <eng.alaaemad.ae@gmail.com>
parents: 568006
diff changeset
   538
        false, "This method is not implemented on the current platform");
f480a36d566f652ed5c39de6f3d2ae5f9542e76d Bug 1640186 - Add machinery for sending native pinch gestures from a test, and a test which uses it r=botond
alaaemad <eng.alaaemad.ae@gmail.com>
parents: 568006
diff changeset
   539
    return NS_ERROR_UNEXPECTED;
f480a36d566f652ed5c39de6f3d2ae5f9542e76d Bug 1640186 - Add machinery for sending native pinch gestures from a test, and a test which uses it r=botond
alaaemad <eng.alaaemad.ae@gmail.com>
parents: 568006
diff changeset
   540
  }
f480a36d566f652ed5c39de6f3d2ae5f9542e76d Bug 1640186 - Add machinery for sending native pinch gestures from a test, and a test which uses it r=botond
alaaemad <eng.alaaemad.ae@gmail.com>
parents: 568006
diff changeset
   541
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   542
  nsresult SynthesizeNativePenInput(uint32_t aPointerId,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   543
                                    TouchPointerState aPointerState,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   544
                                    LayoutDeviceIntPoint aPoint,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   545
                                    double aPressure, uint32_t aRotation,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   546
                                    int32_t aTiltX, int32_t aTiltY,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   547
                                    nsIObserver* aObserver) override {
569376
d869daab2f7dd876f7d15e170d961b977d3fdda2 Bug 1648267 - Part 4: Add OS native pen input injection r=edgar,aklotz
Kagami Sascha Rosylight <krosylight@mozilla.com>
parents: 568647
diff changeset
   548
    MOZ_RELEASE_ASSERT(
d869daab2f7dd876f7d15e170d961b977d3fdda2 Bug 1648267 - Part 4: Add OS native pen input injection r=edgar,aklotz
Kagami Sascha Rosylight <krosylight@mozilla.com>
parents: 568647
diff changeset
   549
        false, "This method is not implemented on the current platform");
d869daab2f7dd876f7d15e170d961b977d3fdda2 Bug 1648267 - Part 4: Add OS native pen input injection r=edgar,aklotz
Kagami Sascha Rosylight <krosylight@mozilla.com>
parents: 568647
diff changeset
   550
    return NS_ERROR_UNEXPECTED;
d869daab2f7dd876f7d15e170d961b977d3fdda2 Bug 1648267 - Part 4: Add OS native pen input injection r=edgar,aklotz
Kagami Sascha Rosylight <krosylight@mozilla.com>
parents: 568647
diff changeset
   551
  }
d869daab2f7dd876f7d15e170d961b977d3fdda2 Bug 1648267 - Part 4: Add OS native pen input injection r=edgar,aklotz
Kagami Sascha Rosylight <krosylight@mozilla.com>
parents: 568647
diff changeset
   552
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   553
  nsresult SynthesizeNativeTouchpadDoubleTap(LayoutDeviceIntPoint aPoint,
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   554
                                             uint32_t aModifierFlags) override {
570781
Timothy Nikkel <tnikkel@gmail.com>
parents: 569376
diff changeset
   555
    MOZ_RELEASE_ASSERT(
Timothy Nikkel <tnikkel@gmail.com>
parents: 569376
diff changeset
   556
        false, "This method is not implemented on the current platform");
Timothy Nikkel <tnikkel@gmail.com>
parents: 569376
diff changeset
   557
    return NS_ERROR_UNEXPECTED;
Timothy Nikkel <tnikkel@gmail.com>
parents: 569376
diff changeset
   558
  }
Timothy Nikkel <tnikkel@gmail.com>
parents: 569376
diff changeset
   559
588157
Timothy Nikkel <tnikkel@gmail.com>
parents: 588156
diff changeset
   560
  nsresult SynthesizeNativeTouchpadPan(TouchpadGesturePhase aEventPhase,
Timothy Nikkel <tnikkel@gmail.com>
parents: 588156
diff changeset
   561
                                       LayoutDeviceIntPoint aPoint,
Timothy Nikkel <tnikkel@gmail.com>
parents: 588156
diff changeset
   562
                                       double aDeltaX, double aDeltaY,
Timothy Nikkel <tnikkel@gmail.com>
parents: 588156
diff changeset
   563
                                       int32_t aModifierFlags) override {
Timothy Nikkel <tnikkel@gmail.com>
parents: 588156
diff changeset
   564
    MOZ_RELEASE_ASSERT(
Timothy Nikkel <tnikkel@gmail.com>
parents: 588156
diff changeset
   565
        false, "This method is not implemented on the current platform");
Timothy Nikkel <tnikkel@gmail.com>
parents: 588156
diff changeset
   566
    return NS_ERROR_UNEXPECTED;
Timothy Nikkel <tnikkel@gmail.com>
parents: 588156
diff changeset
   567
  }
Timothy Nikkel <tnikkel@gmail.com>
parents: 588156
diff changeset
   568
288896
a8dbb4e58e546843c0b0710f8aa2b453f5cfcadc Bug 1137572 part.3 Use pseudo IME context when TextEventDispatcher has input transaction which is not for native event handler r=smaug
Masayuki Nakano <masayuki@d-toybox.com>
parents: 288895
diff changeset
   569
  /**
a8dbb4e58e546843c0b0710f8aa2b453f5cfcadc Bug 1137572 part.3 Use pseudo IME context when TextEventDispatcher has input transaction which is not for native event handler r=smaug
Masayuki Nakano <masayuki@d-toybox.com>
parents: 288895
diff changeset
   570
   * GetPseudoIMEContext() returns pseudo IME context when TextEventDispatcher
a8dbb4e58e546843c0b0710f8aa2b453f5cfcadc Bug 1137572 part.3 Use pseudo IME context when TextEventDispatcher has input transaction which is not for native event handler r=smaug
Masayuki Nakano <masayuki@d-toybox.com>
parents: 288895
diff changeset
   571
   * has non-native input transaction.  Otherwise, returns nullptr.
a8dbb4e58e546843c0b0710f8aa2b453f5cfcadc Bug 1137572 part.3 Use pseudo IME context when TextEventDispatcher has input transaction which is not for native event handler r=smaug
Masayuki Nakano <masayuki@d-toybox.com>
parents: 288895
diff changeset
   572
   */
a8dbb4e58e546843c0b0710f8aa2b453f5cfcadc Bug 1137572 part.3 Use pseudo IME context when TextEventDispatcher has input transaction which is not for native event handler r=smaug
Masayuki Nakano <masayuki@d-toybox.com>
parents: 288895
diff changeset
   573
  void* GetPseudoIMEContext();
a8dbb4e58e546843c0b0710f8aa2b453f5cfcadc Bug 1137572 part.3 Use pseudo IME context when TextEventDispatcher has input transaction which is not for native event handler r=smaug
Masayuki Nakano <masayuki@d-toybox.com>
parents: 288895
diff changeset
   574
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   575
 protected:
226463
c49c54cfb1d3b9974e88c3f5337f3ab2140533db Bug 1126164 - Avoid setting clip regions on plugin windows if the same clip region was already set. r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 226213
diff changeset
   576
  // Utility to check if an array of clip rects is equal to our
c49c54cfb1d3b9974e88c3f5337f3ab2140533db Bug 1126164 - Avoid setting clip regions on plugin windows if the same clip region was already set. r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 226213
diff changeset
   577
  // internally stored clip rect array mClipRects.
275567
1602b93dcc413caa7ac8af1a2ca8d3812c6b33b9 Bug 1229665 - Convert widget clip regions to LayoutDevicePixels. r=botond.
Nicholas Nethercote <nnethercote@mozilla.com>
parents: 275419
diff changeset
   578
  bool IsWindowClipRegionEqual(const nsTArray<LayoutDeviceIntRect>& aRects);
226463
c49c54cfb1d3b9974e88c3f5337f3ab2140533db Bug 1126164 - Avoid setting clip regions on plugin windows if the same clip region was already set. r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 226213
diff changeset
   579
c49c54cfb1d3b9974e88c3f5337f3ab2140533db Bug 1126164 - Avoid setting clip regions on plugin windows if the same clip region was already set. r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 226213
diff changeset
   580
  // Stores the clip rectangles in aRects into mClipRects.
275567
1602b93dcc413caa7ac8af1a2ca8d3812c6b33b9 Bug 1229665 - Convert widget clip regions to LayoutDevicePixels. r=botond.
Nicholas Nethercote <nnethercote@mozilla.com>
parents: 275419
diff changeset
   581
  void StoreWindowClipRegion(const nsTArray<LayoutDeviceIntRect>& aRects);
30515
8d7d268bd181f6b5064c6c5c270e86190c9716d0 Bug 339548. Part 3: Introduce native widget clip region API.
Robert O'Callahan <robert@ocallahan.org>
parents: 30327
diff changeset
   582
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   583
  virtual already_AddRefed<nsIWidget> AllocateChildPopupWidget() {
432687
c9a06dacc095cc7c9968eef179b36174d57c0260 Bug 1484848 - Remove the XPCOM component registrations for window and child window; r=mstange
Ehsan Akhgari <ehsan@mozilla.com>
parents: 428901
diff changeset
   584
    return nsIWidget::CreateChildWindow();
51049
2757103c7e890d4c7dc921c4f42343be9e31d4d3 Bug 582057, part h: Add an nsIWidget::CreateChild interface to sweep (relevant to this bug) code dealing with native widgets under the widget/src/* rug. sr=roc
Chris Jones <jones.chris.g@gmail.com>
parents: 50954
diff changeset
   585
  }
2757103c7e890d4c7dc921c4f42343be9e31d4d3 Bug 582057, part h: Add an nsIWidget::CreateChild interface to sweep (relevant to this bug) code dealing with native widgets under the widget/src/* rug. sr=roc
Chris Jones <jones.chris.g@gmail.com>
parents: 50954
diff changeset
   586
587869
e8299f04430316b8ed5a73b8b9f0e824dfe84f38 Bug 1722258 - Convert more LayerManager usage to use WindowRenderer. r=miko
Matt Woodrow <mwoodrow@mozilla.com>
parents: 587301
diff changeset
   587
  WindowRenderer* CreateBasicLayerManager();
54111
bd2a2bf17e5e583759494e617322d6886e360048 Bug 596410: Use BasicShadowLayerManager when there might be content processes. r=vlad
Chris Jones <jones.chris.g@gmail.com>
parents: 53686
diff changeset
   588
97343
e5fb5ad11849e6e52dd5bfa65f2958312ec2a5da Bug 758048 - Move PopupType from the Windows widget implementation to the cross platform base class and use it to determine when to accelerate windows. r=bbondy
Nicolas Silva <nsilva@mozilla.com>
parents: 96628
diff changeset
   589
  nsPopupType PopupType() const { return mPopupType; }
e5fb5ad11849e6e52dd5bfa65f2958312ec2a5da Bug 758048 - Move PopupType from the Windows widget implementation to the cross platform base class and use it to determine when to accelerate windows. r=bbondy
Nicolas Silva <nsilva@mozilla.com>
parents: 96628
diff changeset
   590
359232
cfe30fc6158c4dcb6c9fe2bc9bff35674ed9b247 Bug 1365660: Part 2 - Add a HasRemoteContent flag to popup widgets that contain remote browsers. r=kats,bas
Kris Maglione <maglione.k@gmail.com>
parents: 358037
diff changeset
   591
  bool HasRemoteContent() const { return mHasRemoteContent; }
cfe30fc6158c4dcb6c9fe2bc9bff35674ed9b247 Bug 1365660: Part 2 - Add a HasRemoteContent flag to popup widgets that contain remote browsers. r=kats,bas
Kris Maglione <maglione.k@gmail.com>
parents: 358037
diff changeset
   592
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   593
  void NotifyRollupGeometryChange() {
111530
6a9691cfc118dc485a8df23c46738c55a4708401 Bug 701760, merge <select> and popup manager rollup handling, so that select elements don't cancel out any popup rollup listeners, r=mats
Neil Deakin <neil@mozilla.com>
parents: 110604
diff changeset
   594
    // XULPopupManager isn't interested in this notification, so only
6a9691cfc118dc485a8df23c46738c55a4708401 Bug 701760, merge <select> and popup manager rollup handling, so that select elements don't cancel out any popup rollup listeners, r=mats
Neil Deakin <neil@mozilla.com>
parents: 110604
diff changeset
   595
    // send it if gRollupListener is set.
6a9691cfc118dc485a8df23c46738c55a4708401 Bug 701760, merge <select> and popup manager rollup handling, so that select elements don't cancel out any popup rollup listeners, r=mats
Neil Deakin <neil@mozilla.com>
parents: 110604
diff changeset
   596
    if (gRollupListener) {
6a9691cfc118dc485a8df23c46738c55a4708401 Bug 701760, merge <select> and popup manager rollup handling, so that select elements don't cancel out any popup rollup listeners, r=mats
Neil Deakin <neil@mozilla.com>
parents: 110604
diff changeset
   597
      gRollupListener->NotifyGeometryChange();
97477
Mats Palmgren <matspal@gmail.com>
parents: 97343
diff changeset
   598
    }
Mats Palmgren <matspal@gmail.com>
parents: 97343
diff changeset
   599
  }
Mats Palmgren <matspal@gmail.com>
parents: 97343
diff changeset
   600
100929
b8a0228a10faac7d965155e15bd66ff8bf3ddb82 Bug 357725, support minimum and maximum size constraints on windows and popups, r=mats,jmathies,karlt,smichaud,sr=neil
Neil Deakin <neil@mozilla.com>
parents: 100920
diff changeset
   601
  /**
b8a0228a10faac7d965155e15bd66ff8bf3ddb82 Bug 357725, support minimum and maximum size constraints on windows and popups, r=mats,jmathies,karlt,smichaud,sr=neil
Neil Deakin <neil@mozilla.com>
parents: 100920
diff changeset
   602
   * Apply the current size constraints to the given size.
b8a0228a10faac7d965155e15bd66ff8bf3ddb82 Bug 357725, support minimum and maximum size constraints on windows and popups, r=mats,jmathies,karlt,smichaud,sr=neil
Neil Deakin <neil@mozilla.com>
parents: 100920
diff changeset
   603
   *
b8a0228a10faac7d965155e15bd66ff8bf3ddb82 Bug 357725, support minimum and maximum size constraints on windows and popups, r=mats,jmathies,karlt,smichaud,sr=neil
Neil Deakin <neil@mozilla.com>
parents: 100920
diff changeset
   604
   * @param aWidth width to constrain
b8a0228a10faac7d965155e15bd66ff8bf3ddb82 Bug 357725, support minimum and maximum size constraints on windows and popups, r=mats,jmathies,karlt,smichaud,sr=neil
Neil Deakin <neil@mozilla.com>
parents: 100920
diff changeset
   605
   * @param aHeight height to constrain
b8a0228a10faac7d965155e15bd66ff8bf3ddb82 Bug 357725, support minimum and maximum size constraints on windows and popups, r=mats,jmathies,karlt,smichaud,sr=neil
Neil Deakin <neil@mozilla.com>
parents: 100920
diff changeset
   606
   */
579570
3f007ac3eea6eaec5bddfc97ef686cf15effac16 Bug 1710533 - Apply the widget size constraints to newBounds r=mstange,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579513
diff changeset
   607
  void ConstrainSize(int32_t* aWidth, int32_t* aHeight) override {
279795
68d1b9a375b0b03f976d254aee2012a8d2b0ddb6 Bug 890156 - patch 4 - Update widget/windows code for per-monitor DPI support. r=emk
Jonathan Kew <jkew@mozilla.com>
parents: 279792
diff changeset
   608
    SizeConstraints c = GetSizeConstraints();
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   609
    *aWidth = std::max(c.mMinSize.width, std::min(c.mMaxSize.width, *aWidth));
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   610
    *aHeight =
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   611
        std::max(c.mMinSize.height, std::min(c.mMaxSize.height, *aHeight));
100929
b8a0228a10faac7d965155e15bd66ff8bf3ddb82 Bug 357725, support minimum and maximum size constraints on windows and popups, r=mats,jmathies,karlt,smichaud,sr=neil
Neil Deakin <neil@mozilla.com>
parents: 100920
diff changeset
   612
  }
b8a0228a10faac7d965155e15bd66ff8bf3ddb82 Bug 357725, support minimum and maximum size constraints on windows and popups, r=mats,jmathies,karlt,smichaud,sr=neil
Neil Deakin <neil@mozilla.com>
parents: 100920
diff changeset
   613
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   614
  CompositorBridgeChild* GetRemoteRenderer() override;
109218
abefcbf2f2ee3b3feefe42fcae7e8b142255e057 Bug 780920, part 2: Let clients query a widget's 'real' compositor, when the widget doesn't draw directly to its OS window. r=roc
Chris Jones <jones.chris.g@gmail.com>
parents: 108627
diff changeset
   615
576744
07f095c42f60ac9977086f167813337a7849361d Bug 1705877 - Remove a bunch of useless virtual keywords in nsBaseWidget.h.
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 576741
diff changeset
   616
  void ClearCachedWebrenderResources() override;
528970
3dd35da1c8bee1353c935e045e7518bc01ea3e77 Bug 1635769 - Call WebRenderLayerManager::ClearCachedResources() during re-creating widget r=tnikkel
sotaro <sotaro.ikeda.g@gmail.com>
parents: 522916
diff changeset
   617
141969
3d4fa3ab3108b285c50145f20940892a6d3535bb Bug 899435. Part 4 - smooth resizing with OMTC. r=roc
Nicholas Cameron <ncameron@mozilla.com>
parents: 140832
diff changeset
   618
  /**
3d4fa3ab3108b285c50145f20940892a6d3535bb Bug 899435. Part 4 - smooth resizing with OMTC. r=roc
Nicholas Cameron <ncameron@mozilla.com>
parents: 140832
diff changeset
   619
   * Notify the widget that this window is being used with OMTC.
3d4fa3ab3108b285c50145f20940892a6d3535bb Bug 899435. Part 4 - smooth resizing with OMTC. r=roc
Nicholas Cameron <ncameron@mozilla.com>
parents: 140832
diff changeset
   620
   */
3d4fa3ab3108b285c50145f20940892a6d3535bb Bug 899435. Part 4 - smooth resizing with OMTC. r=roc
Nicholas Cameron <ncameron@mozilla.com>
parents: 140832
diff changeset
   621
  virtual void WindowUsesOMTC() {}
268493
cb6b065f2a23d263fa47cdcf71016cbdf0f8deb6 Bug 978679. Implement touch events for GTK3. r=karlt
Makoto Kato <m_kato@ga2.so-net.ne.jp>
parents: 268372
diff changeset
   622
  virtual void RegisterTouchWindow() {}
141969
3d4fa3ab3108b285c50145f20940892a6d3535bb Bug 899435. Part 4 - smooth resizing with OMTC. r=roc
Nicholas Cameron <ncameron@mozilla.com>
parents: 140832
diff changeset
   623
452446
f0a91d36587266d7454a450c6044d573664fbed5 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 448947
diff changeset
   624
  mozilla::dom::Document* GetDocument() const;
228801
c55657471570a3a4d8afe11768d5e74670b1f6bd Bug 1127066 - Implement proper sending of target-apzc notification and creation of displayport in the root process. r=kats
Botond Ballo <botond@mozilla.com>
parents: 227810
diff changeset
   625
295585
304b1365d2d73af93e87322caaaca0ff148b31ef Move CompositorWidgetProxy inheritance out of nsIWidget. (bug 1264545 part 6, r=jimm)
David Anderson <danderson@mozilla.com>
parents: 295584
diff changeset
   626
  void EnsureTextEventDispatcher();
288895
b8af9e4c043927f01a858538b0d7e46b6e5c25b0 Bug 1137572 part.2 Add nsIWidget::GetNativeTextEventDispatcherListener() for TextEventDispatcher::NotifyIME() r=smaug, sr=smaug
Masayuki Nakano <masayuki@d-toybox.com>
parents: 288178
diff changeset
   627
286060
966bbc65931a548f4938670fb1835226fecfa0ef Handle device resets by recreating the compositor, rather than the compositor IPDL stack. (bug 1245765 part 7, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 282709
diff changeset
   628
  // Notify the compositor that a device reset has occurred.
358037
ff60b177a442a1b0c73286c51f60ac014685f787 Handle in-process device resets by recreating the entire rendering stack. (bug 1363126 part 2, r=rhunt)
David Anderson <dvander@alliedmods.net>
parents: 354262
diff changeset
   629
  void OnRenderingDeviceReset();
286060
966bbc65931a548f4938670fb1835226fecfa0ef Handle device resets by recreating the compositor, rather than the compositor IPDL stack. (bug 1245765 part 7, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 282709
diff changeset
   630
295584
b45b6eca1e7b239197945e0966674979731834ba Use CompositorWidgetProxy in place of nsIWidget in CompositorBridgeParent. (bug 1264545 part 5, r=jimm,kats)
David Anderson <danderson@mozilla.com>
parents: 295581
diff changeset
   631
  bool UseAPZ();
b45b6eca1e7b239197945e0966674979731834ba Use CompositorWidgetProxy in place of nsIWidget in CompositorBridgeParent. (bug 1264545 part 5, r=jimm,kats)
David Anderson <danderson@mozilla.com>
parents: 295581
diff changeset
   632
399293
a99a53c8f13d7a93eb1c532358d5e36dc6eece61 Bug 1377321 - Only use WebRender for top-level windows and remote content. r=kats
Nicolas Silva <nsilva@mozilla.com>
parents: 396793
diff changeset
   633
  bool AllowWebRenderForThisWindow();
a99a53c8f13d7a93eb1c532358d5e36dc6eece61 Bug 1377321 - Only use WebRender for top-level windows and remote content. r=kats
Nicolas Silva <nsilva@mozilla.com>
parents: 396793
diff changeset
   634
306605
d5ff28810cde1a3921f0129851574f07aba30690 Bug 1288187 - Extract a helper function to manage synthetic touch points for widgets that don't have more specific handling. r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 306346
diff changeset
   635
  /**
d5ff28810cde1a3921f0129851574f07aba30690 Bug 1288187 - Extract a helper function to manage synthetic touch points for widgets that don't have more specific handling. r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 306346
diff changeset
   636
   * For widgets that support synthesizing native touch events, this function
d5ff28810cde1a3921f0129851574f07aba30690 Bug 1288187 - Extract a helper function to manage synthetic touch points for widgets that don't have more specific handling. r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 306346
diff changeset
   637
   * can be used to manage the current state of synthetic pointers. Each widget
d5ff28810cde1a3921f0129851574f07aba30690 Bug 1288187 - Extract a helper function to manage synthetic touch points for widgets that don't have more specific handling. r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 306346
diff changeset
   638
   * must maintain its own MultiTouchInput instance and pass it in as the state,
d5ff28810cde1a3921f0129851574f07aba30690 Bug 1288187 - Extract a helper function to manage synthetic touch points for widgets that don't have more specific handling. r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 306346
diff changeset
   639
   * along with the desired parameters for the changes. This function returns
d5ff28810cde1a3921f0129851574f07aba30690 Bug 1288187 - Extract a helper function to manage synthetic touch points for widgets that don't have more specific handling. r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 306346
diff changeset
   640
   * a new MultiTouchInput object that is ready to be dispatched.
d5ff28810cde1a3921f0129851574f07aba30690 Bug 1288187 - Extract a helper function to manage synthetic touch points for widgets that don't have more specific handling. r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 306346
diff changeset
   641
   */
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   642
  mozilla::MultiTouchInput UpdateSynthesizedTouchState(
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   643
      mozilla::MultiTouchInput* aState, uint32_t aTime,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   644
      mozilla::TimeStamp aTimeStamp, uint32_t aPointerId,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   645
      TouchPointerState aPointerState, LayoutDeviceIntPoint aPoint,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   646
      double aPointerPressure, uint32_t aPointerOrientation);
305384
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   647
308084
60baa125c3ab1e857eda4e6dc1bd6d40a89592b5 Bug 1289435 - Extract a helper function to dispatch MultiTouchInput to APZ if applicable and then to Gecko. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 308083
diff changeset
   648
  /**
60baa125c3ab1e857eda4e6dc1bd6d40a89592b5 Bug 1289435 - Extract a helper function to dispatch MultiTouchInput to APZ if applicable and then to Gecko. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 308083
diff changeset
   649
   * Dispatch the given MultiTouchInput through APZ to Gecko (if APZ is enabled)
60baa125c3ab1e857eda4e6dc1bd6d40a89592b5 Bug 1289435 - Extract a helper function to dispatch MultiTouchInput to APZ if applicable and then to Gecko. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 308083
diff changeset
   650
   * or directly to gecko (if APZ is not enabled). This function must only
60baa125c3ab1e857eda4e6dc1bd6d40a89592b5 Bug 1289435 - Extract a helper function to dispatch MultiTouchInput to APZ if applicable and then to Gecko. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 308083
diff changeset
   651
   * be called from the main thread, and if APZ is enabled, that must also be
60baa125c3ab1e857eda4e6dc1bd6d40a89592b5 Bug 1289435 - Extract a helper function to dispatch MultiTouchInput to APZ if applicable and then to Gecko. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 308083
diff changeset
   652
   * the APZ controller thread.
60baa125c3ab1e857eda4e6dc1bd6d40a89592b5 Bug 1289435 - Extract a helper function to dispatch MultiTouchInput to APZ if applicable and then to Gecko. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 308083
diff changeset
   653
   */
578903
1555ee7b66503dafb841fff54317c0b99e6a7402 Bug 1706420 - Part 1: Add mInputSource to WidgetTouchEvent r=aklotz,edgar
Kagami Sascha Rosylight <krosylight@mozilla.com>
parents: 576745
diff changeset
   654
  void DispatchTouchInput(
1555ee7b66503dafb841fff54317c0b99e6a7402 Bug 1706420 - Part 1: Add mInputSource to WidgetTouchEvent r=aklotz,edgar
Kagami Sascha Rosylight <krosylight@mozilla.com>
parents: 576745
diff changeset
   655
      mozilla::MultiTouchInput& aInput,
1555ee7b66503dafb841fff54317c0b99e6a7402 Bug 1706420 - Part 1: Add mInputSource to WidgetTouchEvent r=aklotz,edgar
Kagami Sascha Rosylight <krosylight@mozilla.com>
parents: 576745
diff changeset
   656
      uint16_t aInputSource =
1555ee7b66503dafb841fff54317c0b99e6a7402 Bug 1706420 - Part 1: Add mInputSource to WidgetTouchEvent r=aklotz,edgar
Kagami Sascha Rosylight <krosylight@mozilla.com>
parents: 576745
diff changeset
   657
          mozilla::dom::MouseEvent_Binding::MOZ_SOURCE_TOUCH);
308084
60baa125c3ab1e857eda4e6dc1bd6d40a89592b5 Bug 1289435 - Extract a helper function to dispatch MultiTouchInput to APZ if applicable and then to Gecko. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 308083
diff changeset
   658
479791
d9f7c87aa3b474e99c789b91708b35a288366f26 Bug 1213601 - implement kinetic/inertial scrolling (fling) for Gtk. r=botond
myfreeweb <greg@unrelenting.technology>
parents: 479076
diff changeset
   659
  /**
d9f7c87aa3b474e99c789b91708b35a288366f26 Bug 1213601 - implement kinetic/inertial scrolling (fling) for Gtk. r=botond
myfreeweb <greg@unrelenting.technology>
parents: 479076
diff changeset
   660
   * Dispatch the given PanGestureInput through APZ to Gecko (if APZ is enabled)
d9f7c87aa3b474e99c789b91708b35a288366f26 Bug 1213601 - implement kinetic/inertial scrolling (fling) for Gtk. r=botond
myfreeweb <greg@unrelenting.technology>
parents: 479076
diff changeset
   661
   * or directly to gecko (if APZ is not enabled). This function must only
d9f7c87aa3b474e99c789b91708b35a288366f26 Bug 1213601 - implement kinetic/inertial scrolling (fling) for Gtk. r=botond
myfreeweb <greg@unrelenting.technology>
parents: 479076
diff changeset
   662
   * be called from the main thread, and if APZ is enabled, that must also be
d9f7c87aa3b474e99c789b91708b35a288366f26 Bug 1213601 - implement kinetic/inertial scrolling (fling) for Gtk. r=botond
myfreeweb <greg@unrelenting.technology>
parents: 479076
diff changeset
   663
   * the APZ controller thread.
d9f7c87aa3b474e99c789b91708b35a288366f26 Bug 1213601 - implement kinetic/inertial scrolling (fling) for Gtk. r=botond
myfreeweb <greg@unrelenting.technology>
parents: 479076
diff changeset
   664
   */
d9f7c87aa3b474e99c789b91708b35a288366f26 Bug 1213601 - implement kinetic/inertial scrolling (fling) for Gtk. r=botond
myfreeweb <greg@unrelenting.technology>
parents: 479076
diff changeset
   665
  void DispatchPanGestureInput(mozilla::PanGestureInput& aInput);
563973
09d418b19d52dab3982d4ee73d6e35d149804422 Bug 1581126 - Hook up pinch gestures on Linux touchpads for APZ zooming r=botond,stransky
Alaa Emad <eng.alaaemad.ae@gmail.com>
parents: 561712
diff changeset
   666
  void DispatchPinchGestureInput(mozilla::PinchGestureInput& aInput);
479791
d9f7c87aa3b474e99c789b91708b35a288366f26 Bug 1213601 - implement kinetic/inertial scrolling (fling) for Gtk. r=botond
myfreeweb <greg@unrelenting.technology>
parents: 479076
diff changeset
   667
305384
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   668
#if defined(XP_WIN)
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   669
  void UpdateScrollCapture() override;
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   670
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   671
  /**
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   672
   * To be overridden by derived classes to return a snapshot that can be used
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   673
   * during scrolling. Returning null means we won't update the container.
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   674
   * @return an already AddRefed SourceSurface containing the snapshot
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   675
   */
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   676
  virtual already_AddRefed<SourceSurface> CreateScrollSnapshot() {
305384
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   677
    return nullptr;
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   678
  };
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   679
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   680
  /**
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   681
   * Used by derived classes to create a fallback scroll image.
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   682
   * @param aSnapshotDrawTarget DrawTarget to fill with fallback image.
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   683
   */
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   684
  void DefaultFillScrollCapture(DrawTarget* aSnapshotDrawTarget);
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   685
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   686
  RefPtr<ImageContainer> mScrollCaptureContainer;
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   687
#endif
4010b27b7c25d9e2c844240464b4998f66d0e4af Bug 1252877 Part 2: On Windows capture an image for windowed plugins to be displayed during APZ scroll. r=jimm, r=mattwoodrow
Bob Owen <bobowencode@gmail.com>
parents: 303387
diff changeset
   688
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   689
 protected:
297873
7de1e31e30dacc57e09b225dcb48805621007b35 Remove nsBaseWidget::NewCompositorBridgeParent. (bug 1272472 part 1, r=kats)
David Anderson <danderson@mozilla.com>
parents: 296038
diff changeset
   690
  // Returns whether compositing should use an external surface size.
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   691
  virtual bool UseExternalCompositingSurface() const { return false; }
297873
7de1e31e30dacc57e09b225dcb48805621007b35 Remove nsBaseWidget::NewCompositorBridgeParent. (bug 1272472 part 1, r=kats)
David Anderson <danderson@mozilla.com>
parents: 296038
diff changeset
   692
94715
328f316179bd128156703ce66cf743f3b3721d62 Bug 722012 - Fixes crash on Gtk widget destruction when using OMTC on linux. r=karlt
Nicolas Silva <nsilva@mozilla.com>
parents: 94601
diff changeset
   693
  /**
328f316179bd128156703ce66cf743f3b3721d62 Bug 722012 - Fixes crash on Gtk widget destruction when using OMTC on linux. r=karlt
Nicolas Silva <nsilva@mozilla.com>
parents: 94601
diff changeset
   694
   * Starts the OMTC compositor destruction sequence.
328f316179bd128156703ce66cf743f3b3721d62 Bug 722012 - Fixes crash on Gtk widget destruction when using OMTC on linux. r=karlt
Nicolas Silva <nsilva@mozilla.com>
parents: 94601
diff changeset
   695
   *
306346
b7d2b159ceb2181f6288ab6db8e9fd0ec568fb88 Bug 1265386: Fix white-space errors in widget/, r=nfroyd
Thomas Zimmermann <tdz@users.sourceforge.net>
parents: 306172
diff changeset
   696
   * When this function returns, the compositor should not be
94715
328f316179bd128156703ce66cf743f3b3721d62 Bug 722012 - Fixes crash on Gtk widget destruction when using OMTC on linux. r=karlt
Nicolas Silva <nsilva@mozilla.com>
parents: 94601
diff changeset
   697
   * able to access the opengl context anymore.
328f316179bd128156703ce66cf743f3b3721d62 Bug 722012 - Fixes crash on Gtk widget destruction when using OMTC on linux. r=karlt
Nicolas Silva <nsilva@mozilla.com>
parents: 94601
diff changeset
   698
   * It is safe to call it several times if platform implementations
328f316179bd128156703ce66cf743f3b3721d62 Bug 722012 - Fixes crash on Gtk widget destruction when using OMTC on linux. r=karlt
Nicolas Silva <nsilva@mozilla.com>
parents: 94601
diff changeset
   699
   * require the compositor to be destroyed before ~nsBaseWidget is
328f316179bd128156703ce66cf743f3b3721d62 Bug 722012 - Fixes crash on Gtk widget destruction when using OMTC on linux. r=karlt
Nicolas Silva <nsilva@mozilla.com>
parents: 94601
diff changeset
   700
   * reached (This is the case with gtk2 for instance).
328f316179bd128156703ce66cf743f3b3721d62 Bug 722012 - Fixes crash on Gtk widget destruction when using OMTC on linux. r=karlt
Nicolas Silva <nsilva@mozilla.com>
parents: 94601
diff changeset
   701
   */
254571
cac950e9abb461a882c4a1abbb36c8820b4d658c Bug 1187345 - Fix HwcComposer2D::mCompositorParent handling r=mwu
Sotaro Ikeda <sikeda@mozilla.com>
parents: 254044
diff changeset
   702
  virtual void DestroyCompositor();
237012
295db120bf1294195fdee467ba8fded9caae4842 Bug 1125848 - Consolidate PCompositor's creation-destruction logic. r=sotaro
Nicolas Silva <nsilva@mozilla.com>
parents: 236925
diff changeset
   703
  void DestroyLayerManager();
303040
0ac0b0b0968d9254b1510918076853364aff29c7 Don't leave temporary dangling nsWindow references to CompositorBridgeParent. (bug 1282343 part 1, r=mattwoodrow,kats)
David Anderson <danderson@mozilla.com>
parents: 302074
diff changeset
   704
  void ReleaseContentController();
323746
7e4570efaff8b823db6e66025893acfe546a4d7c Delay the DidComposite call in ClientLayerManager's destructor. (bug 1305829, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 322481
diff changeset
   705
  void RevokeTransactionIdAllocator();
94715
328f316179bd128156703ce66cf743f3b3721d62 Bug 722012 - Fixes crash on Gtk widget destruction when using OMTC on linux. r=karlt
Nicolas Silva <nsilva@mozilla.com>
parents: 94601
diff changeset
   706
239650
c24fb4429029af2e88cd7db3a144802a113ccf0b Bug 1153939 - Avoid a race condition with setting nsBaseWidgets WidgetShutdownObserver widget pointer to null. Fixes a crash in nsBaseWidget::DestroyCompositor(). r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 239044
diff changeset
   707
  void FreeShutdownObserver();
583969
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   708
  void FreeLocalesChangedObserver();
239650
c24fb4429029af2e88cd7db3a144802a113ccf0b Bug 1153939 - Avoid a race condition with setting nsBaseWidgets WidgetShutdownObserver widget pointer to null. Fixes a crash in nsBaseWidget::DestroyCompositor(). r=roc
Jim Mathies <jmathies@mozilla.com>
parents: 239044
diff changeset
   709
102463
448410c2035ef7bce315bb6b3c46f60fb909145e Bug 743975 - use a widget listener interface instead of the remaining events that don't need an event, r=tn,jmathies,netzen,smichaud,karlt,blassey,chrisjones
Neil Deakin <neil@mozilla.com>
parents: 102462
diff changeset
   710
  nsIWidgetListener* mWidgetListener;
102467
Neil Deakin <neil@mozilla.com>
parents: 102466
diff changeset
   711
  nsIWidgetListener* mAttachedWidgetListener;
254044
60f82e40f039995f757ebd373d968433ac6f6ad7 Bug 1157941 - If the current PresShell is suppressed, paint the old one if it is available r=tn,Enn
George Wright <george@mozilla.com>
parents: 253411
diff changeset
   712
  nsIWidgetListener* mPreviouslyAttachedWidgetListener;
587869
e8299f04430316b8ed5a73b8b9f0e824dfe84f38 Bug 1722258 - Convert more LayerManager usage to use WindowRenderer. r=miko
Matt Woodrow <mwoodrow@mozilla.com>
parents: 587301
diff changeset
   713
  RefPtr<WindowRenderer> mWindowRenderer;
297876
76466e5503993d57ea96eace53742ffb104b3e84 Hide top-level CompositorBridgeParents behind a new API. (bug 1272472 part 4, r=mattwoodrow,kats,gwagner)
David Anderson <danderson@mozilla.com>
parents: 297873
diff changeset
   714
  RefPtr<CompositorSession> mCompositorSession;
289895
4f1482e6da917442cfd73f8994ebac3c58f8fe5c Rename PCompositor to PCompositorBridge. (bug 1258479 part 2, r=mattwoodrow)
David Anderson <danderson@mozilla.com>
parents: 289111
diff changeset
   715
  RefPtr<CompositorBridgeChild> mCompositorBridgeChild;
407017
76a8f710da41058f6825d45aa8759c954812b488 Bug 1441498 - Protect mCompositorVsyncDispatcher by lock. r=kats
Sotaro Ikeda <sikeda@mozilla.com>
parents: 404329
diff changeset
   716
76a8f710da41058f6825d45aa8759c954812b488 Bug 1441498 - Protect mCompositorVsyncDispatcher by lock. r=kats
Sotaro Ikeda <sikeda@mozilla.com>
parents: 404329
diff changeset
   717
  mozilla::UniquePtr<mozilla::Mutex> mCompositorVsyncDispatcherLock;
268184
e8c7dfe727cd970e2c3294934e2927b14143c205 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
Nathan Froyd <froydnj@mozilla.com>
parents: 268182
diff changeset
   718
  RefPtr<mozilla::CompositorVsyncDispatcher> mCompositorVsyncDispatcher;
407017
76a8f710da41058f6825d45aa8759c954812b488 Bug 1441498 - Protect mCompositorVsyncDispatcher by lock. r=kats
Sotaro Ikeda <sikeda@mozilla.com>
parents: 404329
diff changeset
   719
306172
02f12f2a1fbfadbae78864cd754cf3f721f6abcb Bug 1281575 - Extract interface of APZCTreeManager for moving to GPUProcess. r=kats
Ryan Hunt <rhunt@mozilla.com>
parents: 306086
diff changeset
   720
  RefPtr<IAPZCTreeManager> mAPZC;
294607
3d22a2e2a5948493a0ced8568b8c98a8486ecb37 Bug 1264161 - Ensure we null out APZ pointers to the widget when it gets destroyed. r=botond
Kartikaya Gupta <kgupta@mozilla.com>
parents: 294284
diff changeset
   721
  RefPtr<GeckoContentController> mRootContentController;
268184
e8c7dfe727cd970e2c3294934e2927b14143c205 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
Nathan Froyd <froydnj@mozilla.com>
parents: 268182
diff changeset
   722
  RefPtr<APZEventState> mAPZEventState;
262100
25e572cce005e1f9d7a4805d6c398dea5b1ff797 Bug 1202312 - Use mozilla::Function for the SetAllowedTouchBehavior callback. r=kats
Botond Ballo <botond@mozilla.com>
parents: 259955
diff changeset
   723
  SetAllowedTouchBehaviorCallback mSetAllowedTouchBehaviorCallback;
268184
e8c7dfe727cd970e2c3294934e2927b14143c205 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
Nathan Froyd <froydnj@mozilla.com>
parents: 268182
diff changeset
   724
  RefPtr<WidgetShutdownObserver> mShutdownObserver;
583969
064d1e04ff9f5ddac8fe0889f84106489e15ce13 Bug 1717182 - Make nsWindows::mIsRTL dynamic on Windows r=jrmuizel,gfx-reviewers
sotaro <sotaro.ikeda.g@gmail.com>
parents: 579570
diff changeset
   725
  RefPtr<LocalesChangedObserver> mLocalesChangedObserver;
268184
e8c7dfe727cd970e2c3294934e2927b14143c205 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
Nathan Froyd <froydnj@mozilla.com>
parents: 268182
diff changeset
   726
  RefPtr<TextEventDispatcher> mTextEventDispatcher;
576741
9141b021cbeda90952fe2fffd11b0b7383ac696e Bug 1705877 - Introduce nsIWidget::Cursor. r=dholbert
Emilio Cobos Álvarez <emilio@crisal.io>
parents: 575822
diff changeset
   727
  Cursor mCursor;
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   728
  nsBorderStyle mBorderStyle;
280354
88a086706e1e5cdaad5d7fdb7f7e8c799cc276c0 Bug 1239589 - Change nsBaseWidget::mBounds to a LayoutDeviceIntRect. r=kats.
Nicholas Nethercote <nnethercote@mozilla.com>
parents: 279795
diff changeset
   729
  LayoutDeviceIntRect mBounds;
279792
cc09fb02f2c9191098ff2ab9ba97ed57162e806b Bug 890156 - patch 1 - Add nsIWidget::GetDesktopToDeviceScale() method. r=emk
Jonathan Kew <jkew@mozilla.com>
parents: 279790
diff changeset
   730
  LayoutDeviceIntRect* mOriginalBounds;
30515
8d7d268bd181f6b5064c6c5c270e86190c9716d0 Bug 339548. Part 3: Introduce native widget clip region API.
Robert O'Callahan <robert@ocallahan.org>
parents: 30327
diff changeset
   731
  // When this pointer is null, the widget is not clipped
275567
1602b93dcc413caa7ac8af1a2ca8d3812c6b33b9 Bug 1229665 - Convert widget clip regions to LayoutDevicePixels. r=botond.
Nicholas Nethercote <nnethercote@mozilla.com>
parents: 275419
diff changeset
   732
  mozilla::UniquePtr<LayoutDeviceIntRect[]> mClipRects;
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   733
  uint32_t mClipRectCount;
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   734
  nsSizeMode mSizeMode;
493554
3258db2cb365a1cb73748c36ee023edc8848d0f1 Bug 1550721 - Fix GTK title bar for tiled windows. r=stransky,dao
Marius Gedminas <marius@gedmin.as>
parents: 493453
diff changeset
   735
  bool mIsTiled;
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   736
  nsPopupLevel mPopupLevel;
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   737
  nsPopupType mPopupType;
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   738
  SizeConstraints mSizeConstraints;
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   739
  bool mHasRemoteContent;
503596
2d0db7ddd092eed08468bfa23e6774cbee1ae21b Bug 1588484 - Disable Advanced Layers for now when using fission for the window. r=kmag
Matt Woodrow <mwoodrow@mozilla.com>
parents: 503594
diff changeset
   740
  bool mFissionWindow;
8591
f026e5054abb16e6897c71cacd70f21f6ebb27aa Bug 401627, better way of handling click to close menu so that it doesn't reopen the menu again, r+sr=roc
enndeakin@sympatico.ca
parents: 7751
diff changeset
   741
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   742
  bool mUpdateCursor;
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   743
  bool mUseAttachedEvents;
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   744
  bool mIMEHasFocus;
479076
164ae5b4ff067240721f51c4917961048de3a6d0 Bug 1549930 addendum - Notify widgets of IME blur on quit (on non-Android). r=masayuki
Henri Sivonen <hsivonen@hsivonen.fi>
parents: 476652
diff changeset
   745
  bool mIMEHasQuit;
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   746
  bool mIsFullyOccluded;
111530
6a9691cfc118dc485a8df23c46738c55a4708401 Bug 701760, merge <select> and popup manager rollup handling, so that select elements don't cancel out any popup rollup listeners, r=mats
Neil Deakin <neil@mozilla.com>
parents: 110604
diff changeset
   747
  static nsIRollupListener* gRollupListener;
6a9691cfc118dc485a8df23c46738c55a4708401 Bug 701760, merge <select> and popup manager rollup handling, so that select elements don't cancel out any popup rollup listeners, r=mats
Neil Deakin <neil@mozilla.com>
parents: 110604
diff changeset
   748
270087
5978297efa48ec6673ed5e108c70d9edf2cb6959 Bug 1218991 - Save initial zoom constraints to be used once compositor is created r=kats
James Willcox <snorp@snorp.net>
parents: 268493
diff changeset
   749
  struct InitialZoomConstraints {
5978297efa48ec6673ed5e108c70d9edf2cb6959 Bug 1218991 - Save initial zoom constraints to be used once compositor is created r=kats
James Willcox <snorp@snorp.net>
parents: 268493
diff changeset
   750
    InitialZoomConstraints(const uint32_t& aPresShellID,
444295
ad0782d7c503f33cfb554d08dedc96287e1ed3f2 Bug 1504220 - Move ScrollableLayerGuid, ViewID, ZoomConstraints from FrameMetrics.h r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442586
diff changeset
   751
                           const ScrollableLayerGuid::ViewID& aViewID,
270087
5978297efa48ec6673ed5e108c70d9edf2cb6959 Bug 1218991 - Save initial zoom constraints to be used once compositor is created r=kats
James Willcox <snorp@snorp.net>
parents: 268493
diff changeset
   752
                           const ZoomConstraints& aConstraints)
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   753
        : mPresShellID(aPresShellID),
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   754
          mViewID(aViewID),
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   755
          mConstraints(aConstraints) {}
270087
5978297efa48ec6673ed5e108c70d9edf2cb6959 Bug 1218991 - Save initial zoom constraints to be used once compositor is created r=kats
James Willcox <snorp@snorp.net>
parents: 268493
diff changeset
   756
5978297efa48ec6673ed5e108c70d9edf2cb6959 Bug 1218991 - Save initial zoom constraints to be used once compositor is created r=kats
James Willcox <snorp@snorp.net>
parents: 268493
diff changeset
   757
    uint32_t mPresShellID;
444295
ad0782d7c503f33cfb554d08dedc96287e1ed3f2 Bug 1504220 - Move ScrollableLayerGuid, ViewID, ZoomConstraints from FrameMetrics.h r=botond
Ryan Hunt <rhunt@eqrion.net>
parents: 442586
diff changeset
   758
    ScrollableLayerGuid::ViewID mViewID;
270087
5978297efa48ec6673ed5e108c70d9edf2cb6959 Bug 1218991 - Save initial zoom constraints to be used once compositor is created r=kats
James Willcox <snorp@snorp.net>
parents: 268493
diff changeset
   759
    ZoomConstraints mConstraints;
5978297efa48ec6673ed5e108c70d9edf2cb6959 Bug 1218991 - Save initial zoom constraints to be used once compositor is created r=kats
James Willcox <snorp@snorp.net>
parents: 268493
diff changeset
   760
  };
5978297efa48ec6673ed5e108c70d9edf2cb6959 Bug 1218991 - Save initial zoom constraints to be used once compositor is created r=kats
James Willcox <snorp@snorp.net>
parents: 268493
diff changeset
   761
5978297efa48ec6673ed5e108c70d9edf2cb6959 Bug 1218991 - Save initial zoom constraints to be used once compositor is created r=kats
James Willcox <snorp@snorp.net>
parents: 268493
diff changeset
   762
  mozilla::Maybe<InitialZoomConstraints> mInitialZoomConstraints;
5978297efa48ec6673ed5e108c70d9edf2cb6959 Bug 1218991 - Save initial zoom constraints to be used once compositor is created r=kats
James Willcox <snorp@snorp.net>
parents: 268493
diff changeset
   763
332017
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
   764
  // This points to the resize listeners who have been notified that a live
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
   765
  // resize is in progress. This should always be empty when a live-resize is
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
   766
  // not in progress.
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
   767
  nsTArray<RefPtr<mozilla::LiveResizeListener>> mLiveResizeListeners;
37a01852d4205709e9a9bb079a41f429f360ef03 Bug 1328066 - Don't broadcast the live-resize events to all browser windows unnecessarily. r=mstange
Kartikaya Gupta <kgupta@mozilla.com>
parents: 331747
diff changeset
   768
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   769
#ifdef DEBUG
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   770
 protected:
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   771
  static nsAutoString debug_GuiEventToString(
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   772
      mozilla::WidgetGUIEvent* aGuiEvent);
77799
e7854b4d29ba905ae3994f821b160c989bac4260 Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
Michael Wu <mwu@mozilla.com>
parents: 77767
diff changeset
   773
  static bool debug_WantPaintFlashing();
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   774
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   775
  static void debug_DumpInvalidate(FILE* aFileOut, nsIWidget* aWidget,
275419
e091d14c936c948a490457a6420261abe8c16cc6 Bug 1229237 (part 3) - Make nsIWidget::Invalidate() take a LayoutDeviceIntRect. r=botond.
Nicholas Nethercote <nnethercote@mozilla.com>
parents: 275418
diff changeset
   776
                                   const LayoutDeviceIntRect* aRect,
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   777
                                   const char* aWidgetName, int32_t aWindowID);
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   778
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   779
  static void debug_DumpEvent(FILE* aFileOut, nsIWidget* aWidget,
149614
2b65d2f636a67d2cbf0ca03cdb4290e1d207cad5 Bug 920377 part.30 Get rid of nsGUIEvent r=roc
Masayuki Nakano <masayuki@d-toybox.com>
parents: 149190
diff changeset
   780
                              mozilla::WidgetGUIEvent* aGuiEvent,
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   781
                              const char* aWidgetName, int32_t aWindowID);
76359
05e7c10be3a2db79b1546754e4a2434815da30fa Bug 683745 - Fix OGL FPS Counter on Android; r=jrmuizel
Benoit Girard <b56girard@gmail.com>
parents: 76167
diff changeset
   782
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   783
  static void debug_DumpPaintEvent(FILE* aFileOut, nsIWidget* aWidget,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   784
                                   const nsIntRegion& aPaintEvent,
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   785
                                   const char* aWidgetName, int32_t aWindowID);
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   786
77799
e7854b4d29ba905ae3994f821b160c989bac4260 Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
Michael Wu <mwu@mozilla.com>
parents: 77767
diff changeset
   787
  static bool debug_GetCachedBoolPref(const char* aPrefName);
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   788
#endif
369982
05e705204d3bced8e56631b0ef6fe2abe65710c7 Bug 1381095 - Fallback correctly to non-WebRender if the GPU process/WebRender are disabled when creating a remote compositor session. r=dvander
Andrew Osmond <aosmond@mozilla.com>
parents: 367867
diff changeset
   789
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   790
 private:
591057
1b49e7328ae43c6565d167f4c391430575097fd3 Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel
Matt Woodrow <mwoodrow@mozilla.com>
parents: 589858
diff changeset
   791
  already_AddRefed<mozilla::layers::WebRenderLayerManager>
1b49e7328ae43c6565d167f4c391430575097fd3 Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel
Matt Woodrow <mwoodrow@mozilla.com>
parents: 589858
diff changeset
   792
  CreateCompositorSession(int aWidth, int aHeight,
1b49e7328ae43c6565d167f4c391430575097fd3 Bug 1727682 - Make WebRenderLayerManager not inherit LayerManager. r=jrmuizel
Matt Woodrow <mwoodrow@mozilla.com>
parents: 589858
diff changeset
   793
                          mozilla::layers::CompositorOptions* aOptionsOut);
1
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   794
};
9b2a99adc05e53cd4010de512f50118594756650 Free the (distributed) Lizard! Automatic merge from CVS: Module mozilla: tag HG_REPO_INITIAL_IMPORT at 22 Mar 2007 10:30 PDT,
hg@mozilla.com
parents:
diff changeset
   795
448947
6f3709b3878117466168c40affa7bca0b60cf75b Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
Sylvestre Ledru <sledru@mozilla.com>
parents: 444295
diff changeset
   796
#endif  // nsBaseWidget_h__