Commit Graph

2043 Commits

Author SHA1 Message Date
Markus Stange
a0e9560488 Bug 1370040 - Use the public API -[NSVisualEffectView setMaskImage:] instead of the private API -[NSWindow _cornerMask]. r=spohl
The idea is the following:
Behind-window vibrancy is mostly rendered by the window server. For a given
vibrant region of a window, the window server renders a vibrancy "backdrop",
which is a blurred version of everything that's behind that region, modified
with a color tint and blended in some way. Then it puts our actual window
contents on top of that background.
The backdrop's shape is usually a rectangle. If we don't want it to be a
rectangle, we need to tell the window server about the shape that we want it to
be. We can't just "draw" a different shape in our own rendering, because our
own rendering is merely placed on top of the backdrop - but here we want to
modify the shape of the backdrop itself.

NSVisualEffectView lets us set a mask image on the view. If this view is the
content view of a window, then the view will automatically communicate the mask
image to the window server.

Traditionally, our popup windows have had a ChildView as their content view. If
we now want an NSVisualEffectView to be the content view of the window, then we
need to nest the ChildView inside that NSVisualEffectView.
But this NSVisualEffectView is only needed when the window is vibrant and the
vibrancy backdrop needs to have a certain shape. This is the case for our menus
which need to have rounded corners. If the window transitions to being
non-vibrant, or not needing a special shape, then we can go back to the way our
window's NSView hierarchy has worked traditionally. So we need to reparent
NSViews during those transitions.

MozReview-Commit-ID: Bo2VzjhhR0A

--HG--
extra : rebase_source : 9eb463cc68c16c3b9281b57455330969c5e2642c
2017-11-19 18:38:35 -05:00
Andreea Pavel
9474960c52 Backed out 1 changesets (bug 1370040) for build bustage at /cocoa/VibrancyManager.mm:207 r=backout on a CLOSED TREE
Backed out changeset 84c737eb3c6e (bug 1370040)
2017-11-20 01:36:36 +02:00
Markus Stange
75bf1f6ae8 Bug 1370040 - Use the public API -[NSVisualEffectView setMaskImage:] instead of the private API -[NSWindow _cornerMask]. r=spohl
The idea is the following:
Behind-window vibrancy is mostly rendered by the window server. For a given
vibrant region of a window, the window server renders a vibrancy "backdrop",
which is a blurred version of everything that's behind that region, modified
with a color tint and blended in some way. Then it puts our actual window
contents on top of that background.
The backdrop's shape is usually a rectangle. If we don't want it to be a
rectangle, we need to tell the window server about the shape that we want it to
be. We can't just "draw" a different shape in our own rendering, because our
own rendering is merely placed on top of the backdrop - but here we want to
modify the shape of the backdrop itself.

NSVisualEffectView lets us set a mask image on the view. If this view is the
content view of a window, then the view will automatically communicate the mask
image to the window server.

Traditionally, our popup windows have had a ChildView as their content view. If
we now want an NSVisualEffectView to be the content view of the window, then we
need to nest the ChildView inside that NSVisualEffectView.
But this NSVisualEffectView is only needed when the window is vibrant and the
vibrancy backdrop needs to have a certain shape. This is the case for our menus
which need to have rounded corners. If the window transitions to being
non-vibrant, or not needing a special shape, then we can go back to the way our
window's NSView hierarchy has worked traditionally. So we need to reparent
NSViews during those transitions.

MozReview-Commit-ID: Bo2VzjhhR0A

--HG--
extra : rebase_source : 0434a17e2cddc94715db6a5fd17bc27e2cddd05c
2017-11-19 17:01:02 -05:00
Brendan Dahl
c161ff02d7 Bug 1409580 - Support edit command mapping in headless MacOS. r=masayuki
Extracts out the creation of an NSEvent from a WidgetKeyEvent in
TextInputHandler.mm into generic helper method. The helper is used by headless
to create a fake NSEvent to then build edit commands from key events.

Fixes:
- test_selectevents.html
- test_bug756984.html
- test_movement_by_characters.html
- test_movement_by_words.html
- test_backspace_vs.html
- test_bug1094000.html
- ... many key event tests

MozReview-Commit-ID: 1Jur5MHOrkp

--HG--
extra : rebase_source : fbe320aff8fd2e1b36f3b46e02336e9fc89c48d0
2017-10-13 17:40:27 -07:00
Boris Zbarsky
198e006805 Bug 1415741. Switch to a different env var, not MOZ_DEBUG, for disabling mouse event taps on Mac. r=mstange
MozReview-Commit-ID: BgFpmE2Juom
2017-11-15 12:23:58 -05:00
Markus Stange
ff02ca90b1 Bug 1417197 - Create constants for hardcoded theme fill colors. r=jrmuizel
MozReview-Commit-ID: KnRKm3TyHIE

--HG--
extra : rebase_source : 8d419344dd67dad5692506c31763e9c3c3d4d968
2017-11-14 16:01:32 -05:00
Markus Stange
a25f1fafb3 Bug 1417197 - Create nsITheme::CreateWebRenderCommands in order to optimize simple theme fills, and add a Mac implementation. r=jrmuizel
MozReview-Commit-ID: 1G9NHPwd5ST

--HG--
extra : rebase_source : 74189f1bad32600979b099663bae27cd24d1f0ec
2017-11-14 15:34:56 -05:00
Yura Zenevich
b2b66a61f5 Bug 1401980 - shutdown accessibility service on accessibliity.force_disable pref change. r=surkov
MozReview-Commit-ID: 8YfCaoB5Stt
2017-11-11 22:21:45 -05:00
Phil Ringnalda
15fafc3560 Backed out 2 changesets (bug 1401980) for failures in browser_shutdown_pref.js
CLOSED TREE

Backed out changeset cea72923c4be (bug 1401980)
Backed out changeset 72f9e62daa10 (bug 1401980)

MozReview-Commit-ID: 2bhiTKZmmib
2017-11-10 21:50:14 -08:00
Yura Zenevich
446a07beed Bug 1401980 - shutdown accessibility service on accessibliity.force_disable pref change. r=surkov
MozReview-Commit-ID: 8YfCaoB5Stt
2017-11-10 22:43:22 -05:00
Ryan VanderMeulen
f44bfd0fc0 Merge m-c to autoland. a=merge 2017-11-01 21:55:56 -04:00
Ryan VanderMeulen
cf94e55fa8 Backed out changesets 9adb0bc561c3 and 9e50716eaebe (bug 1406032) in favor of a different fix.
--HG--
extra : rebase_source : d68493d891fc9d5560e58a41e581ad7f55ea9f09
2017-11-01 21:52:57 -04:00
Ryan VanderMeulen
76b05e595e Backed out changeset f4df790d1477 (bug 1412130) in favor of a better fix.
--HG--
extra : rebase_source : 79103611ce2a4548b27ebcacda23f95a6bdb46af
2017-11-01 21:51:29 -04:00
Tristan Bourvon
357ebb9638 Bug 1412645 - Initialize some uninitialized fields in widget/cocoa/. r=mstange 2017-10-31 11:25:04 +01:00
Stephen A Pohl
89df96b890 Bug 1412130: Fix window levels on macOS to ensure that popups hide when the application is deactivated. r=mstange 2017-10-30 21:33:59 -04:00
Mantaroh Yoshinaga
0945ff4e62 Bug 1411879 - Use kPMDataFormatXMLCompressed parameter into PMPageFormatCreateDataRepresentation(). r=mstange
We can use kPMDataFormatXMLCompressed parameter when storing the page format
data. As result, this preference data will be 20 times smaller.

MozReview-Commit-ID: HMQzhodQyA

--HG--
extra : rebase_source : 941a30cb346b6c15f5a02f527063a437ae0c6121
2017-10-26 17:36:16 +09:00
Brad Werth
925e999d40 Bug 1403690 Part 3: macOS change nsLookAndFeel::NativeGetColor to use cached colors. r=mstange
MozReview-Commit-ID: FHm6d2Vz2sJ

--HG--
extra : rebase_source : 321086e64d84903710a9155fee1817f3d874e8dd
2017-10-02 17:13:48 -07:00
Brad Werth
02cebae10b Bug 1403690 Part 2: Windows change nsLookAndFeel::NativeGetColor to use cached colors. r=jimm
MozReview-Commit-ID: 7CKUrtCYC0j

--HG--
extra : rebase_source : 195a02ee96587980963b3e8c6f6b14d68321b757
2017-10-02 16:17:05 -07:00
Kartikaya Gupta
a8f3618eb0 Bug 1410777 - Remove unnecessary code. r=nical
As per the TODO, a size change on an image is supported now, so there should be
no need to delete and re-create the image key when the window overlay image
changes size. And since the cleanup function is not invoked from anywhere else
it can also be removed.

MozReview-Commit-ID: JSmK5YmXjlX

--HG--
extra : rebase_source : 0078ccfed9a381c82bcb906a87bdf58d8e9c78e1
2017-10-26 14:17:19 -04:00
Kartikaya Gupta
b7e231bc45 Bug 1410777 - Force a full transaction for WR when the window overlay changes. r=mstange
The window buttons are drawn as part of the AddWindowOverlayWebRenderCommands
function which is invoked in the full-transaction codepath. It should be possible
to have the empty transaction codepath simply update the image (without building
a full WR display list) and do a recomposite. That would be more performant but
it requires some plumbing to build and ship across a IpcResourceUpdateQueue on
empty transactions.

MozReview-Commit-ID: 2Mrb0wELD6E

--HG--
extra : rebase_source : 9a94c32f94403050835bf3445176f4fe2c1579fa
2017-10-26 14:17:19 -04:00
Phil Ringnalda
a173b09db6 Backed out changeset ccc0e72f2152 (bug 1403260) for hanging Mac browser-chrome in printing tests
MozReview-Commit-ID: IZNT5Jh8nzB
2017-10-25 23:00:17 -07:00
Haik Aftandilian
362316451f Bug 1403260 - [Mac] Remove access to print server from content process sandbox r=mconley
MozReview-Commit-ID: Ia21je8TTIg

--HG--
extra : rebase_source : 656e9e3ac8d1fb741d46881458bb0b7fb402d688
2017-10-22 23:02:58 -07:00
Yoshi Huang
26c9043304 Bug 1407498 - Don't query loadingprincipal in common case. r=baku
We queried 'loadingprincipal' attribute on the common call path, however
this should be queried if it's loaded by System Principal.

Also rename loadingprincipal to triggeringprincipal
2017-10-24 10:13:31 +08:00
Stephen A Pohl
bb7596b0b2 Bug 1406032: Ensure that popup windows (such as the hamburger menu window) are shown on top of the browser window on macOS. r=mstange 2017-10-19 23:42:23 -04:00
Sebastian Hengst
1c37bb9e1d Backed out changeset 4f7b6f90f1dd (bug 1406032) for failing toolkit/content/tests/chrome/test_largemenu.xul in c3 test suite on OS X. r=backout on a CLOSED TREE
--HG--
extra : amend_source : 056e16f4aaf106705f891277c7a9088cc62fc2c4
2017-10-20 00:28:03 +02:00
Stephen A Pohl
56e3d3e4c8 Bug 1406032: Ensure that popup windows (such as the hamburger menu window) are shown on top of the browser window on macOS. r=mstange 2017-10-19 16:45:54 -04:00
Stephen A Pohl
359def9977 Bug 1373581: Make transition into and out of native fullscreen smoother on macOS. r=mstange 2017-10-18 21:50:47 -04:00
Stephen A Pohl
3814ff1247 Bug 1408701: Ensure that we continue to show dark scrollbar thumbs on macOS 10.13 when scrollbars are always displayed. r=mstange 2017-10-17 14:35:31 -04:00
Haik Aftandilian
a6836496b3 Bug 1403260 - [Mac] Remove access to print server from content process sandbox. r=mconley
MozReview-Commit-ID: Ia21je8TTIg

--HG--
extra : rebase_source : 8a6859d411b332aca404bb6a78b91cdae6b498c0
2017-10-30 11:14:08 -07:00
Kris Maglione
c2da8a30a3 Bug 1404198: Part 2d - Switch to NS_NewTimer* in widget. r=njn
MozReview-Commit-ID: G4S8q9DYPS0

--HG--
extra : rebase_source : 9c6da05bf2ef3cfee551879879330a85688b1f5d
2017-10-15 23:12:54 -07:00
Mantaroh Yoshinaga
b356b2dd1c Bug 1185236 - Shorten print job name on Cocoa. r=mstange
Gecko set job using by PMPrintSettingsSetJobName regardless of job name length.
But IPP allow job-name length up to 255 bytes. (RFC 2911, Section 4.3.1)

This patch will shorten print job name. It is workaround until fixed the
Core Printing[1].

[1] https://openradar.appspot.com/34428043

MozReview-Commit-ID: 6nCwZuD43O9

--HG--
extra : rebase_source : c9c3830890f1f4d84e148fbe281589c23e7803d2
2017-10-13 15:48:40 +09:00
Phil Ringnalda
bcec55eabf Backed out 4 changesets (bug 1185236) for Windows build bustage
CLOSED TREE

Backed out changeset eda76603d637 (bug 1185236)
Backed out changeset 2cbe403d5c16 (bug 1185236)
Backed out changeset 0466471b9f67 (bug 1185236)
Backed out changeset 445f1e6fc862 (bug 1185236)

MozReview-Commit-ID: 2nL4nUNNhcs
2017-10-12 19:50:07 -07:00
Mantaroh Yoshinaga
fda3e57135 Bug 1185236 - Shorten print job name on Cocoa. r=mstange
Gecko set job using by PMPrintSettingsSetJobName regardless of job name length.
But IPP allow job-name length up to 255 bytes. (RFC 2911, Section 4.3.1)

This patch will shorten print job name. It is workaround until fixed the
Core Printing[1].

[1] https://openradar.appspot.com/34428043

MozReview-Commit-ID: 6nCwZuD43O9

--HG--
extra : rebase_source : be6161b464f30d8cec08e3031708cf24805d2f16
2017-10-13 09:50:56 +09:00
Sebastian Hengst
f7efb5fc2c Merge mozilla-central to mozilla-inbound. r=merge a=merge on a CLOSED TREE 2017-10-12 12:03:15 +02:00
Nicholas Nethercote
c0a1cf9b49 Bug 1407103 - Convert wstring attributes to AString in widget/nsIPrint*.idl. r=bobowen.
This avoids a lot of mismatches between nsAString and char16_t*, thus removing
many getter_Copies() and ToNewUnicode() and get() calls, and generally making
things simpler.

Note: the patch removes GetDefaultPrinterNameFromGlobalPrinters() by simply
inlining it at its two callsites, which is easy with the changed types.

--HG--
extra : rebase_source : 9ab9b3694f093fc9b22c7f8e2394a98674d76c11
2017-10-09 10:08:09 +11:00
Emilio Cobos Álvarez
e808575ca4 Bug 1406631: Remove the color-picker-available system metric. r=xidorn
All our widgets support it with a constant true.

MozReview-Commit-ID: JMEItUsxYWq

--HG--
extra : rebase_source : e7e0a3f83001813239338bc5b3895252e1fb3ea6
2017-10-07 14:06:44 +02:00
Sebastian Hengst
aa78440a09 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: EE6DcCgHufi
2017-10-09 11:19:20 +02:00
Nicholas Nethercote
8a68e6fb83 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Stephen A Pohl
eee52e5492 Bug 1403432: Show window titles when the inspector is launched in windowed mode. r=mstange 2017-10-08 20:34:53 -04:00
Nicholas Nethercote
d225f7151b Bug 1400460 - Rename nsIAtom as nsAtom. r=hiro.
(Path is actually r=froydnj.)

Bug 1400459 devirtualized nsIAtom so that it is no longer a subclass of
nsISupports. This means that nsAtom is now a better name for it than nsIAtom.

MozReview-Commit-ID: 91U22X2NydP

--HG--
rename : xpcom/ds/nsIAtom.h => xpcom/ds/nsAtom.h
extra : rebase_source : ac3e904a21b8b48e74534fff964f1623ee937c67
2017-10-03 09:05:19 +11:00
Sebastian Hengst
b29f365446 Backed out changeset f70d6fcdb760 (bug 1406631) for failing color related reftests like layout/reftests/writing-mode/ua-style-sheet-input-color-1.html on Android. r=backout 2017-10-07 20:08:12 +02:00
Emilio Cobos Álvarez
b7befbe6b5 Bug 1406631: Remove the color-picker-available system metric. r=xidorn
All our widgets support it with a constant true.

MozReview-Commit-ID: JMEItUsxYWq

--HG--
extra : rebase_source : a2661dce1ac191fdf098e631cd7878f0215643d5
2017-10-07 14:06:44 +02:00
Catalin Badea
f8162c4bfd Bug 651120 - Remove index argument from content removed/appended/inserted notifications. r=peterv 2017-10-03 11:09:08 +01:00
Sebastian Hengst
2980334050 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: 6My6YCrpLe9
2017-10-01 11:37:14 +02:00
Stephen A Pohl
ca431cdea8 Bug 1404664: Restore pinch zoom gesture support on macOS. r=mstange 2017-09-30 23:30:01 -04:00
Markus Stange
63baf3259d Bug 1400057 - Override _wantsFloatingTitlebar to return NO in order to avoid titlebar glitches on 10.13. r=spohl
MozReview-Commit-ID: 4HffFOSqWxl

--HG--
extra : rebase_source : 12fcd4a78b16b2bc7cd8ad371054406ffa597b4e
2017-09-29 16:49:30 -04:00
Wes Kocher
1674eb3e4f Merge inbound to m-c a=merge
MozReview-Commit-ID: 7zOjePOWzOM
2017-09-28 16:56:44 -07:00
Milan Sreckovic
848f9f69d4 Bug 1403945: Add utility functions to recognize OS X 10.13. r=mstange
MozReview-Commit-ID: Bw0jkyWrIzD

--HG--
extra : rebase_source : bf8bff4e9bf7892efa3f88565af0489257949958
2017-09-28 10:21:10 -04:00
Wes Kocher
61c098eae7 Merge inbound to m-c a=merge CLOSED TREE
MozReview-Commit-ID: 3pMHYV9oXLm

--HG--
rename : dom/base/nsReferencedElement.cpp => dom/base/IDTracker.cpp
rename : dom/base/nsReferencedElement.h => dom/base/IDTracker.h
2017-09-27 16:51:49 -07:00
Stephen A Pohl
902da233bf Bug 1399086 - Refactor comments and remove gesture support code for macOS 10.7. r=mstange 2017-09-27 15:21:42 -04:00