Commit Graph

23895 Commits

Author SHA1 Message Date
Kris Maglione
031076f2f3 Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL

--HG--
extra : source : fcfb99baa0f0fb60a7c420a712c6ae7c72576871
extra : histedit_source : 5be9b7b29a52a4b8376ee0bdfc5c08b12e3c775a
2018-05-21 16:58:23 -07:00
Kris Maglione
02ba563399 Bug 1463016: Part 5 - Add domWindow property to DocShellTreeItem and update callers to use it. r=nika
MozReview-Commit-ID: FRRAdxLHRtG

--HG--
extra : source : 0d69b4fb1ed43751cfcbc0b4f2fe3b6a49bc0494
extra : histedit_source : d0ce31513ffaae2fd7f01f6567a97b6d2d96b797%2Cfff837de7a00fa90809d2c3e755097180dfd56d8
2018-05-20 18:10:16 -07:00
Narcis Beleuzu
561ccb2ceb Backed out 2 changesets (bug 1463016, bug 1463291) for geckoview failures
Backed out changeset fcfb99baa0f0 (bug 1463291)
Backed out changeset 0d69b4fb1ed4 (bug 1463016)
2018-07-29 03:55:23 +03:00
Kris Maglione
cb1ee1e34d Bug 1463291: Move docShell getter from Document to Window. r=bz
DocShells are associated with outer DOM Windows, rather than Documents, so
having the getter on the document is a bit odd to begin with. But it's also
considerably less convenient, since most of the times when we want a docShell
from JS, we're dealing most directly with a window, and have to detour through
the document to get it.

MozReview-Commit-ID: LUj1H9nG3QL

--HG--
extra : rebase_source : a13c59d1a5ed000187c7fd8e7339408ad6e2dee6
2018-05-21 16:58:23 -07:00
Kris Maglione
636f1839e5 Bug 1463016: Part 5 - Add domWindow property to DocShellTreeItem and update callers to use it. r=nika
MozReview-Commit-ID: FRRAdxLHRtG

--HG--
extra : rebase_source : 36565ef5e74360aad14062005e5bdab2939e888b
2018-05-20 18:10:16 -07:00
Emilio Cobos Álvarez
8c4ec8b3ba Bug 1479216: Restore the order of Scrollbarbutton appearance values. r=xidorn
The patch at bug 1478391 comment 6 changed the way the math in Scrollbarbutton*
worked, which pretty surely caused this.

Restore the original order and math to be the same as before bug 1478391.

MozReview-Commit-ID: CK3iOqeX2NW
2018-07-29 01:02:44 +02:00
Csoregi Natalia
470d472200 Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-27 01:01:27 +03:00
Csoregi Natalia
3708e71462 Merge inbound to mozilla-central. a=merge 2018-07-27 00:58:11 +03:00
Hiroyuki Ikezoe
cb5f411bab Bug 1476212 - Notify the system setting change corresponding to prefers-reduced-motion. r=jimm
Even with this patch, the setting change doesn't affect media queries in sub
frames due to bug 1478212.  But the bug is a pre-existing issue, for example
system color settings don't affect contents in sub frames either.  So we can
land this patch as it is.

Note that there is no way to write an automation test for this unfortunately.

MozReview-Commit-ID: L2Knhp1IjrU

--HG--
extra : rebase_source : 3487a13d0466b68419e55610c8ce3e384df28e64
2018-07-25 14:41:13 +09:00
Emilio Cobos Álvarez
517256e365 Bug 1478391: Autogenerate StyleAppearance. r=jwatt
This builds on bug 1428676 and introduces StyleAppearance, which replaces the
NS_THEME_* constants.

Really sorry for the size of the patch.

There's a non-trivial change in the gtk theme, which I submitted separately as
bug 1478385.

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

MozReview-Commit-ID: DiSmMWK7Krp
2018-07-26 17:06:17 +02:00
Martin Stransky
2866163527 Bug 1478661 - Replace IsComposited() with explicit alpha visual state, r=jhorak
IsComposited() does not reflect Visual selected by GLContextGLX::FindVisual()
which is used by WebRender which leads to shaped window rendering with WebRender.

IsComposited() is replaced by mHasAlphaVisual variable which is explicitly
set when we have an alpha visual and we don't need to use shape X11 extension.

MozReview-Commit-ID: 1kDLwkUyHte

--HG--
extra : rebase_source : 3a60fe8fd66f9e89bfcc729fe5e1fa9e1ce8920d
2018-07-26 13:23:34 +02:00
Jim Chen
1473a1889a Bug 1477469 - Check for null composition pointer; r=esawin
Check for null TextComposition pointer, which can apparently happen
during regular usage.

MozReview-Commit-ID: 6nKjyBVL2vF

--HG--
extra : rebase_source : 68d8ff37612f6908b3983993fc73d19e9c0b0e50
2018-07-24 18:14:05 -04:00
Sebastian Hengst
bd900ee36a Merge mozilla-inbound to mozilla-central. a=merge 2018-07-25 17:16:53 +03:00
Martin Stransky
03659d442a Bug 1406533 - Don't force in process rendering for transparent (popup) windows, r=lsalzman
MozReview-Commit-ID: 2TS1CXsp44A

--HG--
extra : rebase_source : c8e8b7b3eadd07d2bf9bdeb9fa3c9625f914dba5
2018-07-24 16:15:43 +02:00
Martin Stransky
6eaa46bc39 Bug 1406533 - Configure compositor widget to shape X11 window on non-compositing WM, r=lsalzman
Also remove mozilla.widget.use-argb-visuals which is useless since we don't allow transparent
toplevel windows.

MozReview-Commit-ID: 2ep3daeLZTG

--HG--
extra : rebase_source : 9ca5f2d0ded6dec1827caf2cb87e81fcb9b11792
2018-07-24 16:11:37 +02:00
Martin Stransky
7cf247d562 Bug 1406533 - Implement a way to transfer shape option from nsWindow to WindowSurfaceX11Image, r=lsalzman
Add a new config attribute to GtkCompositorWidgetInitData to allow transfer
the shape option from nsWindow. Also when shape is requested don't use XRender
or Shm widgets - only X11Image is supported now.

MozReview-Commit-ID: ElxnGQpLOry

--HG--
extra : rebase_source : 03552fc4103f6b22c512c07fe37102701998ed94
2018-07-24 16:07:04 +02:00
Martin Stransky
c7e7412047 Bug 1406533 - Create and apply XShape mask at WindowSurfaceX11Image, r=lsalzman
Derived routines for shape bitmap mask form nsWindow.cpp,
at WindowSurfaceX11Image we compose a final RGBA image and then create
the shape mask from image alpha channel.

Also the implementation is slightly simplified as it's meant as a fallback only.

MozReview-Commit-ID: 6VtGcsVKlcv

--HG--
extra : rebase_source : e8b96d68082ae687e376bc89c79f88f9c34cdc15
2018-07-24 16:02:05 +02:00
Boris Zbarsky
634a492dda Bug 1476145 part 9. Drop support for getting window utils via getInterface. r=nika 2018-07-24 19:47:43 -04:00
Boris Zbarsky
75abc43e0d Bug 1476145 part 8. Stop using getInterface(nsIDOMWindowUtils) in various test code. r=kmag 2018-07-24 19:47:43 -04:00
Aaron Klotz
afe18923e0 Bug 1477402: Wrap WaitForInputIdle with checks for ERROR_NOT_GUI_PROCESS failures; r=agashlin
widget/windows/WinUtils.h is getting unwieldy and contains a combination of
both header-only and non-header-only code. I thought I'd take the opportunity
with this patch to create a new file for self-contained, header-only utility
functions, with the hope that we can eventually migrate some stuff out of
WinUtils into WinHeaderOnlyUtils in the future.

--HG--
extra : rebase_source : 6c874f78fc7113d1f7011fcd57ad9d024edb6761
2018-07-20 15:54:08 -06:00
Emilio Cobos Álvarez
9004e91bec Bug 1478385: Fix confusion in GetCachedWidgetBorder. r=karlt
aWidgetType is a NS_THEME_* constant. What this code is comparing is not.

This was exposed by a patch of mine converting -moz-appearance to be an enum
class.

MozReview-Commit-ID: 9BsbYk04vop
2018-07-26 14:48:08 +02:00
shindli
f36ee2923a Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-26 14:21:26 +03:00
Jan de Mooij
e67d9e1b9e Bug 1474540 part 0 - Don't try to use mCallback's global in NativeCallbackDelegateSupport::Call. r=jchen
The object could be a cross-compartment wrapper and we want to make it impossible to get a CCWs global.
2018-07-26 11:10:06 +02:00
Brian Hackett
99d34528e4 Bug 1465466 Part 1 - Use a separate compositor in recording/replaying processes, r=nical.
--HG--
extra : rebase_source : 003f6557370f2e4e6959ea14e833f7e2e617c5b0
2018-07-23 21:46:47 +00:00
Gurzau Raul
bdfd20ef30 Merge inbound to mozilla-central. a=merge 2018-07-24 18:48:01 +03:00
Jan Horak
294a592750 Bug 1477967 - Fix the popup menu sizes and redrawing on Wayland/hidpi monitor, r=stransky
This patch fixes redrawing of the popup element by removing the scale factor
from the invalid regions because the wl_surface_damage multiplies it with the
scale factor too.

Also we set scaling factor of the wl_surface right after we create it to avoid
flickering when the compositor switches from unscaled to scaled surface.

MozReview-Commit-ID: 1eGoFu87wtF

--HG--
extra : rebase_source : 08abe86889e34865f3eed0f3979b4a584cc74adb
2018-07-24 12:51:34 +02:00
Hiroyuki Ikezoe
6a18a3f807 Bug 1365045 - Implement prefers-reduced-motion for Windows. r=jimm
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724947(v=vs.85).aspx

MozReview-Commit-ID: APERUPoSaz
2018-07-24 16:50:48 +09:00
Hiroyuki Ikezoe
ea2e577fa3 Bug 1365045 - Introduce keywords for prefers-reduced-motion. r=heycam
https://drafts.csswg.org/mediaqueries-5/#prefers-reduced-motion

MozReview-Commit-ID: RQUo1DBR0W
2018-07-24 16:50:47 +09:00
Stephen A Pohl
e5862c14d3 Bug 1468053: Disable a workaround for an Apple bug described in bug 378645 involving popup windows that was fixed by Apple. r=mstange 2018-07-23 20:20:58 -04:00
Stephen A Pohl
c2ef1ca8f9 Backout 0df7fb702b93 for slightly inaccurate commit message. r=me 2018-07-23 20:19:19 -04:00
Stephen A Pohl
8fb210cb17 Bug 1468053: Disable a workaround on macOS 10.14+ for an Apple bug involving popup windows that was fixed by Apple in macOS 10.14. r=mstange 2018-07-23 20:16:15 -04:00
Martin Stransky
ce20ee9233 Bug 1475193 - Use nsWindow::IsComposited() where possible, r=jhorak
MozReview-Commit-ID: E28fUnRFWaY

--HG--
extra : rebase_source : e9b2d5b1f159479299978353e6521882b6021a8e
2018-07-12 11:51:38 +02:00
Doug Thayer
04f1e1bc1e Bug 1476238 - Use nsresult/promise rejection in initListBuild r=Gijs
I mistranslated the boolean success value of the old initListBuild
method. Simplifying it to just use a promise rejection should be
equivalent and simpler, since this is only run from the update
method of WindowsJumpLists, and the call sites for that don't do
anything afterwards.

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

--HG--
extra : moz-landing-system : lando
2018-07-20 16:56:01 +00:00
Robert Bartlensky
5552be67a8 Bug 1475949 - Fix DEAD_STORE issues in XRemoteClient. r=jhorak
MozReview-Commit-ID: IDFaUR2gK4R

--HG--
extra : amend_source : 3913ac1516e7aa3f5b2e4005c2f1a68dfc5d22a0
2018-07-17 11:45:33 +01:00
Tiberius Oros
10e6320abc Merge inbound to mozilla-central. a=merge 2018-07-20 12:56:59 +03:00
Xidorn Quan
25e715a5f1 Bug 1476476 - Remove some unused const variables in JumpListBuilder. r=jimm
MozReview-Commit-ID: 4UPr0lWd4iQ

--HG--
extra : rebase_source : 43bcec23f460ab004073cea7e4891aea011674be
2018-07-18 10:24:04 +10:00
Bogdan Tara
217447d26d Merge mozilla-central to autoland. a=merge CLOSED TREE 2018-07-20 00:53:24 +03:00
Stephen A Pohl
fc76194aea Bug 1472629: Handle native exceptions when reading accessibility attribute values to avoid crashing. r=mstange 2018-07-19 14:39:52 -04:00
Jed Davis
96c18b6c4a Bug 1467889 - Adjust some uses of XPCOM strings. r=mrbkap r=mstange
MozReview-Commit-ID: 5AG4WAmbLZz
2018-07-19 14:14:50 -06:00
Jeff Muizelaar
c4b5567231 Bug 1477036. Expose wrQualified in telemetry. r=kats
This adds a WEBRENDER_QUALIFIED feature that's set whenever the webrender could
be used on a machine regardless of whether it's actually being used.

MozReview-Commit-ID: Eke6PMKQOnx

--HG--
extra : rebase_source : 977d371c12c9e8ab3273d6e65655e0378c22c226
2018-07-19 14:05:29 -04:00
Jeff Muizelaar
4f9417ef01 Bug 1477033. Cleanup InitFeatureObject. r=kats
This removes an unused gfxConfig check and changes Maybe<FeatureStatus>
into FeatureStatus as none of the callers were using None.

MozReview-Commit-ID: Kep6nYpDI3B

--HG--
extra : rebase_source : d7f71dd9b358bfd2c57380d7bc194d6002a50cb9
2018-07-19 14:11:34 -04:00
Masayuki Nakano
0ed11cb188 Bug 1453629 - nsIWidget::GetNativeIMEContext() should return pseudo IME context if TextInputProcessor has a composition on the widget r=m_kato
Key of TextCompositionArrary to search composition on widget is native IME
context.  However, if TextInputProcessor dispatches composition events via
TextEventDispatcher, TextEventDispatcher::InitEvent() sets native IME context
of dispatching composition events to pseudo IME context (that's raw pointer
of TextEventDispatcher and process ID).

IMEStateManager::DispatchCompositionEvent() looks for existing TextComposition
with native IME context stored in WidgetCompositionEvent before dispatching
an event.  However, after dispatching it, it looks for remaining TextComposition
instance with widget stored in WidgetCompositionEvent.  Then,
TextCompositionArrary::IndexOf(nsIWidget*) will look for an instance with
the result of nsIWidget::GetNativeIMEContext() and this never returns actual
native IME context.  Therefore, IMEStateManager::DispatchCompositionEvent()
always fails to remove TextComposition instance from the array even after
a test composition is finished.

This patch moves nsIWidget::GetNativeIMEContext() to nsBaseWidget to refer
nsBaseWidget::mTextEventDispatcher makes it return pseudo IME context if
TextInputProcessor has input transaction.  Therefore, IMEStateManager becomes
always removes TextComposition from the array when every composition ends.

MozReview-Commit-ID: H1PCtPjBYJR

--HG--
extra : rebase_source : cbb3f3aae9954d65135d3840be8974fa30c4f7ff
2018-07-17 22:31:51 +09:00
Cosmin Sabou
88199de427 Merge mozilla-inbound to mozilla-central. a=merge 2018-07-18 20:19:59 +03:00
Margareta Eliza Balazs
42e6813f3f Merge mozilla-central to inbound. a=merge CLOSED TREE 2018-07-18 12:42:29 +03:00
Xidorn Quan
c6926db959 Bug 1476477 - Replace nsAutoCString with nsCString for local result variables in windows widget. r=masayuki
MozReview-Commit-ID: JN6GVPTZNg2

--HG--
extra : rebase_source : f3b997f3b8fbcefd2de660158f336364282ef2f6
2018-07-18 10:44:00 +10:00
Tiberius Oros
d701ae940f Merge inbound to mozilla-central. a=merge 2018-07-18 00:55:33 +03:00
Bas Schouten
2ffa4da191 Bug 1476506: Move RoundedRect into Moz2D and convert all callers. r=mattwoodrow 2018-07-18 08:55:43 +02:00
Jim Chen
4f6c4496c9 Bug 1470786 - 1. Support async text changes from replacing text; r=esawin
Currently, we expect editing operations in
GeckoEditableSupport::OnImeReplaceText to cause synchronous text change
notifications. However, under e10s, text change notifications can be
asynchornous. The new code keeps track of active OnImeReplaceText calls,
and look for async text changes before replying to the calls.

MozReview-Commit-ID: INM3JLmQebK

--HG--
extra : rebase_source : ff5b728ef437fcd78e4e7eced9c9a537d4698dce
2018-07-17 11:22:34 -04:00
Kris Maglione
0bfdb4329f Bug 1473631: Part 0a - Make preference callbacks typesafe. r=njn
I initially tried to avoid this, but decided it was necessary given the number
of times I had to repeat the same pattern of casting a variable to void*, and
then casting it back in a part of code far distant from the original type.

This changes our preference callback registration functions to match the type
of the callback's closure argument to the actual type of the closure pointer
passed, and then casting it to the type of our generic callback function. This
ensures that the callback function always gets an argument of the type it's
actually expecting without adding any additional runtime memory or
QueryInterface overhead for tracking it.

MozReview-Commit-ID: 9tLKBe10ddP

--HG--
extra : rebase_source : 7524fa8dcd5585f5a31fdeb37d95714f1bb94922
2018-07-06 12:24:41 -07:00
Doug Thayer
56f41b91a9 Bug 1425144 - Init Jump list on lazy idle thread r=aklotz
We're already committing jump lists on mIOThread, and I see
no errors or problems with initting on mIOThread either, so
I think this is okay. Had to restructure some things to
make using a Promise simple, and to avoid dispatching to
mIOThread from within mIOThread (since we can only dispatch
to a LazyIdleThread from the owner thread).

MozReview-Commit-ID: 1imBF8Jzmn6

--HG--
extra : rebase_source : 4f912e819cec898910e72d95311e3924714a3090
2018-06-27 08:59:07 -07:00