Commit Graph

887 Commits

Author SHA1 Message Date
Markus Stange
467f5af7ba Bug 1533562 - Remove code that deals with non-rounded bottom corners on regular windows. r=spohl
Rounded bottom corners have been the default since 10.7.

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

--HG--
extra : moz-landing-system : lando
2019-04-26 17:26:14 +00:00
Gurzau Raul
f05aef3e04 Backed out 9 changesets (bug 1542454, bug 1533562) for failing at /browser/browser_ext_webNavigation_onCreatedNavigationTarget_contextmenu.js on a CLOSED TREE.
Backed out changeset 88756a309968 (bug 1542454)
Backed out changeset 37bd2819d3a7 (bug 1542454)
Backed out changeset 19f0462bb47a (bug 1542454)
Backed out changeset b4440b1833ec (bug 1533562)
Backed out changeset 8970cdb3c04a (bug 1533562)
Backed out changeset 498cd34eea78 (bug 1533562)
Backed out changeset 3a3b4d52e10a (bug 1533562)
Backed out changeset 5fae2f233aa0 (bug 1533562)
Backed out changeset e3fc54ebcd15 (bug 1533562)
2019-04-23 01:09:12 +03:00
Markus Stange
77ddedaacb Bug 1542454 - Factor out some code. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D26402

--HG--
extra : moz-landing-system : lando
2019-04-22 19:41:58 +00:00
Markus Stange
d0ba1d9725 Bug 1542454 - Remove support for drawing the window resizer. r=spohl
The last version of macOS that put resizers in window corners was 10.6.

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

--HG--
extra : moz-landing-system : lando
2019-04-22 19:41:41 +00:00
Markus Stange
0f29789b59 Bug 1542454 - Remove unused function COLOR8TOCOLOR16. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D26400

--HG--
extra : moz-landing-system : lando
2019-04-22 19:41:21 +00:00
Markus Stange
61e81ce45e Bug 1533562 - Remove code that deals with non-rounded bottom corners on regular windows. r=spohl
Rounded bottom corners have been the default since 10.7.

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

--HG--
extra : moz-landing-system : lando
2019-04-22 19:26:15 +00:00
Srujana Peddinti
b44e48bff4 Bug 1259660 - Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag r=masayuki
Moved mozilla::WidgetMosueEventBase::buttonType in MouseEvents.h to mozilla::MouseButton in EventForwards.h, and mozilla::WidgetMouseEventBase::buttonsFlag to mozilla::MouseButtonsFlag so that any referer in header files do not need to include MouseEvents.h only for referring them. Instead, they just need to include EventForwards.h. Now when MouseEvents.h is changed, the rebuild speed becomes faster.

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

--HG--
extra : moz-landing-system : lando
2019-04-21 20:13:34 +00:00
Srujana Peddinti
0260a4f6e1 Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::inputSource to WidgetMouseEventBase::mInputSource r=masayuki
Renamed all class member instances from WidgetMouseEventBase::inputSource to WidgetMouseEventBase::mInputSource

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

--HG--
extra : moz-landing-system : lando
2019-04-21 18:19:43 +00:00
Srujana Peddinti
1f5de9021a Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::pressure to WidgetMouseEventBase::mPressure r=masayuki
Renamed all class member instances from WidgetMouseEventBase::pressure to WidgetMouseEventBase::mPressure

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

--HG--
extra : moz-landing-system : lando
2019-04-21 18:19:18 +00:00
Srujana Peddinti
5f185eb5aa Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::button to WidgetMouseEventBase::mButton. r=masayuki
Renamed all class member instances from WidgetMouseEventBase::button to WidgetMouseEventBase::mButton.

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

--HG--
extra : moz-landing-system : lando
2019-04-21 18:17:10 +00:00
Srujana Peddinti
614949385a Bug 1259660 - Cleaned up WidgetMouseEventBase by renaming WidgetMouseEventBase::buttons to WidgetMouseEventBase::mButtons r=masayuki
Renamed all class member instances from  WidgetMouseEventBase::buttons to WidgetMouseEventBase::mButtons

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

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

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

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

--HG--
extra : moz-landing-system : lando
2019-04-13 01:05:21 +00:00
Masayuki Nakano
fefd623c98 Bug 1530188 - Make nsChildView::GetEditorView() use eQueryContentState without flushing layout r=smaug
`nsChildView::GetEditorView()` is called by `TextInputHandlerBase::GetWindowLevel()`
which is called when Cocoa requests window level of focused widget.

It currently gets widget including focused element (e.g., it may be in a XUL
`<panel>`) with `eQueryTextContent` event.  However, it requires only the widget
(i.e., when a XUL `<panel>` has focused element, the widget for the panel).
Therefore, it does not require to flush the layout.

However, on macOS, `ContentEventHandler` always flushes layout even with
`eQueryContentState` which does not require any layout information.  Whether
it requires flushing layout or not is considered with
`WidgetQueryContentEvent::mNeedsToFlushLayout` but this is set to false only
when `IMEContentObserver` notifies widget (and IME) of focus set.  At this
time, only on macOS, IME caches the layout information, for example, the
character coordinates, but we don't have a way to update it.  This is the reason
why we always flush layout on macOS.

Unfortunately, when a menu popup frame is created, widget for the popup is
created synchronously.  Then, Cocoa retrieves window level of the widget including
focused element.  But this is unsafe to flush the layout.  So, we need to stop
flushing layout in this case.

Therefore, this patch moves the `#ifdef` from `TextEvents.h` to
`IMEContentObserver.cpp`, then, makes `nsChildView::GetEditorView()` use
`eQueryContentState` which is the simplest query content event, and finally,
sets `mNeedsToFlushLayout` to `false`.

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

--HG--
extra : moz-landing-system : lando
2019-04-03 10:27:13 +00:00
Gurzau Raul
bb2f747c28 Backed out 5 changesets (bug 1533562) for osx reftest failures on a CLOSED TREE.
Backed out changeset 8d21cbdfdea7 (bug 1533562)
Backed out changeset 048e88ed260d (bug 1533562)
Backed out changeset 788b5dbea4e8 (bug 1533562)
Backed out changeset 6b5804bc63c3 (bug 1533562)
Backed out changeset fcd1387a1dee (bug 1533562)
2019-03-29 07:24:53 +02:00
Markus Stange
158e615d41 Bug 1533562 - Remove code that deals with non-rounded bottom corners on regular windows. r=spohl
Rounded bottom corners have been the default since 10.7.

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

--HG--
extra : moz-landing-system : lando
2019-03-29 02:47:56 +00:00
Brad Werth
7fc19a53b5 Bug 1501665 Part 4: Use the new function as a replacement for APZAllowZooming. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D19239

--HG--
extra : source : cf42ea4e8443cdcb5f446dfb95d92d5998f55f24
2019-03-18 14:56:55 +00:00
shindli
b7de66af4f Backed out 13 changesets (bug 1501665) for failing a11y tests in accessible/tests/mochitest/relations/test_tabbrowser.xul CLOSED TREE
Backed out changeset 2fa518cb0dfc (bug 1501665)
Backed out changeset afaf26d7df42 (bug 1501665)
Backed out changeset 5bdf0ad9dc66 (bug 1501665)
Backed out changeset 520dd24a73fc (bug 1501665)
Backed out changeset 3542bf2b89dd (bug 1501665)
Backed out changeset 088dc24eabc7 (bug 1501665)
Backed out changeset 178210eb72ba (bug 1501665)
Backed out changeset 9eebe767ef20 (bug 1501665)
Backed out changeset 6a84e97d0e62 (bug 1501665)
Backed out changeset cf42ea4e8443 (bug 1501665)
Backed out changeset 731d7ee06d86 (bug 1501665)
Backed out changeset 8e0afe4a041a (bug 1501665)
Backed out changeset be1026de486b (bug 1501665)
2019-03-18 18:08:58 +02:00
Brad Werth
b43c639430 Bug 1501665 Part 4: Use the new function as a replacement for APZAllowZooming. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D19239

--HG--
extra : moz-landing-system : lando
2019-03-18 14:56:55 +00:00
Sylvestre Ledru
4aa92e3091 Bug 1519636 - Reformat recent changes to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D22514
2019-03-13 10:19:06 +01:00
Markus Stange
d20fc1f3ea Bug 1528490 - Reinstate corner clearing code which I overeagerly removed in bug 1491445. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D22560

--HG--
extra : moz-landing-system : lando
2019-03-07 19:06:49 +00:00
Jeff Gilbert
d6410e953a Bug 1528394 - Reduce includes of GLContext.h. r=lsalzman
Splitting part of OGLShaderProgram.h out into OGLShaderConfig.h makes it
easier to keep GLContext.h included in OGLShaderProgram.h for inlining
purposes.

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

--HG--
extra : moz-landing-system : lando
2019-02-19 23:25:42 +00:00
Chris Peterson
79fdd8bd67 Bug 1528600 - widget/cocoa: Remove empty function EnsureLogInitialized(). r=mstange
widget/cocoa/nsChildView.mm:249:6 [-Wmissing-prototypes] no previous prototype for function 'EnsureLogInitialized'

Depends on D20087

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

--HG--
extra : moz-landing-system : lando
2019-02-17 16:10:57 +00:00
Chris Peterson
43be80fa7a Bug 1528600 - widget/cocoa: Change some global functions to static. r=mstange
widget/cocoa/nsChildView.mm:1932:21 [-Wmissing-prototypes] no previous prototype for function 'TextureSizeForSize'
widget/cocoa/nsCocoaUtils.mm:351:6 [-Wmissing-prototypes] no previous prototype for function 'data_ss_release_callback'

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

--HG--
extra : moz-landing-system : lando
2019-02-17 16:11:53 +00:00
Markus Stange
5030ae1b0e Bug 1491445 - Make the ChildView always non-opaque and let NSVisualEffectView handle clearing of vibrant areas. r=spohl
This is a clearer implementation that achieves the same thing.

Moreover, disabling the clearing by overriding drawRect wouldn't work in
CoreAnimation windows because in CoreAnimation windows, the clearing happens
through a property of the NSVisualEffectView's CALayer, and not through the
view's drawRect implementation - drawRect probably isn't even called in that
context.

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

--HG--
extra : moz-landing-system : lando
2019-02-13 18:51:20 +00:00
Markus Stange
7023a7ce58 Bug 1491445 - Move any drawing from the ChildView into a new subview called PixelHostingView. r=spohl
This has two advantages:
 - The drawing will now correctly be placed "on top" of the vibrancy views.
 - We can turn this new view into a layer-hosting view. Layer-hosting views are
   supposed to be leaf NSViews; they shouldn't have any children.

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

--HG--
extra : moz-landing-system : lando
2019-02-13 17:50:41 +00:00
Markus Stange
5adfba9115 Bug 1491445 - Wrap vibrancy and nondraggable views inside container views. r=spohl
NSView hierarchy before:

 - window contentView
   - ChildView
     - NonDraggableView 1
     - NonDraggableView 2
     - EffectViewWithoutForegroundVibrancy 1
     - EffectViewWithoutForegroundVibrancy 2

NSView hierarchy after:

 - window contentView
   - ChildView
     - ViewRegionContainerView
       - NonDraggableView 1
       - NonDraggableView 2
     - ViewRegionContainerView
       - EffectViewWithoutForegroundVibrancy 1
       - EffectViewWithoutForegroundVibrancy 2

This allows us to give those container views a new sibling view which stays
fixed in z-order with respect to the NSViews that get created by
mNonDraggableRegion and mVibrancyManager. More specifically, I'm going to add a
view for the drawing of our ChildView ("PixelHostingView") which is going to be
a direct child of the Gecko "ChildView" and a sibling of the
ViewRegionContainerViews; the PixelHostingView needs to always stay on top of
the vibrancy views.
Without the wrapper around the vibrancy views, whenever the vibrant region
changes, a vibrant view would be placed on top of the PixelHostingView and the
order would be wrong.

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

--HG--
extra : moz-landing-system : lando
2019-02-13 17:50:12 +00:00
Markus Stange
8401b64d46 Bug 1527412 - Remove swizzling of -[NSView mouseDownCanMoveWindow]. r=spohl
This was added in bug 476393 in order to work around a problem with the Java plug-in.
We no longer support that plug-in.
The comment also mentions NSTexturedBackgroundWindowMask which we stopped using in bug 1335191.

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

--HG--
extra : moz-landing-system : lando
2019-02-13 11:14:03 +00:00
Markus Stange
02e8f0bcef Bug 1527412 - Make nsChildView::mView a ChildView*, because that's what it is. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D19556

--HG--
extra : moz-landing-system : lando
2019-02-13 11:14:02 +00:00
Markus Stange
20949d20bb Bug 1527412 - Remove unused contextMenu method. r=spohl
This method could only return something non-null in embedding situations,
in which our ChildView was a subview of somebody else's NSView that conforms
to the mozView protocol. Such a situation hasn't existed for about 10 years.

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

--HG--
extra : moz-landing-system : lando
2019-02-13 11:14:02 +00:00
Markus Stange
1b8351b1e6 Bug 1527412 - Fix mParentView's type (it doesn't necessarily implement the mozView protocol) and tweak a few comments. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D19554

--HG--
extra : moz-landing-system : lando
2019-02-13 11:14:02 +00:00
Eitan Isaacson
da315919ab Bug 1515774 - Introduce mScreenOffset for pinch and multitouch events. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D17043

--HG--
extra : moz-landing-system : lando
2019-01-31 16:46:10 +00:00
Brindusan Cristian
e17de7336e Backed out 4 changesets (bug 1515774) for mochitest failrues at test_group_touchevents-3.html and test_touch_action.html.
Backed out changeset 45c6f07160d9 (bug 1515774)
Backed out changeset 3d97f1e46c1a (bug 1515774)
Backed out changeset 69c8787c67d6 (bug 1515774)
Backed out changeset 8e17cc234256 (bug 1515774)
2019-01-30 04:39:55 +02:00
Eitan Isaacson
8ae47905e7 Bug 1515774 - Introduce mScreenOffset for pinch and multitouch events. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D17043

--HG--
extra : moz-landing-system : lando
2019-01-29 21:11:35 +00:00
Emilio Cobos Álvarez
ef7d8198eb Bug 1520502 - Set the standard cursor and the custom cursor in the same IPC message. r=jmathies
This cleans up a bit and allows us to be smarter about which cursors
should we allow from content or what not, which will help with bug 1445844 and
co.

Differential Revision: https://phabricator.services.mozilla.com/D16711
2019-01-26 07:49:28 +01:00
Sylvestre Ledru
49f8917074 Bug 1521460 - Ride along: remove conflict r=me CLOSED TREE 2019-01-22 22:07:00 +01:00
Sylvestre Ledru
0b4021fcad Bug 1521460 - Also reformat objective-c files r=mstange,ehsan,spohl
# ignore-this-changeset

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

--HG--
extra : histedit_source : 084f340503d2e1a2d9e1753c38b2c4ee9c7819f3
2019-01-21 18:18:16 +01:00
Markus Stange
060f074a81 Bug 1515183 - Ignore calls to viewWillDraw and drawRect on non-main threads. r=spohl
Differential Revision: https://phabricator.services.mozilla.com/D16909

--HG--
extra : moz-landing-system : lando
2019-01-17 23:25:34 +00:00
Tom Schuster
79d3c5244b Bug 571074 - Mark nsITransferable.getTransferData as [must_use]. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D13454

--HG--
extra : moz-landing-system : lando
2019-01-04 16:16:59 +00:00
Kartikaya Gupta
dc7bd74b05 Bug 1491512 - Allow rendering minimized windows on macOS. r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D14567

--HG--
extra : moz-landing-system : lando
2018-12-14 20:16:56 +00:00
Andreea Pavel
987516303f Backed out changeset f9900ac6071c (bug 571074) for failing clipboard at browser/base/content/test/general/browser_clipboard.js on a CLOSED TREE 2018-11-30 02:30:22 +02:00
Tom Schuster
891f0040e6 Bug 571074 - Mark nsITransferable.getTransferData as [must_use]. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D13454

--HG--
extra : moz-landing-system : lando
2018-11-29 21:57:40 +00:00
Tom Schuster
6296f48a85 Bug 1493292 - Remove aDataLen parameters from nsITransferable.setTransferData. r=smaug
Depends on D11201

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

--HG--
extra : moz-landing-system : lando
2018-11-20 17:00:09 +00:00
Tom Schuster
5a9d2a428c Bug 1493292 - Remove aDataLen parameters from nsITransferable.getTransferData. r=smaug
Depends on D11200

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

--HG--
extra : moz-landing-system : lando
2018-11-20 16:59:56 +00:00
Csoregi Natalia
df7483024d Backed out 6 changesets (bug 1493292) for bustage on /nsTransferable.cpp. CLOSED TREE
Backed out changeset f198bf91320b (bug 1493292)
Backed out changeset 6487aa307123 (bug 1493292)
Backed out changeset f2cabd69c568 (bug 1493292)
Backed out changeset 71430fceb4a3 (bug 1493292)
Backed out changeset 3a9b6d65d8c7 (bug 1493292)
Backed out changeset 55769869037c (bug 1493292)
2018-11-20 17:13:18 +02:00
Tom Schuster
8be0fec340 Bug 1493292 - Remove aDataLen parameters from nsITransferable.setTransferData. r=smaug
Depends on D11201

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

--HG--
extra : moz-landing-system : lando
2018-11-20 14:47:04 +00:00
Tom Schuster
b292ec7c2c Bug 1493292 - Remove aDataLen parameters from nsITransferable.getTransferData. r=smaug
Depends on D11200

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

--HG--
extra : moz-landing-system : lando
2018-11-20 14:47:02 +00:00
Markus Stange
7ff5b8352b Bug 1503424 - Null-check NSWorkspaceAccessibilityDisplayOptionsDidChangeNotification before using it in order to fix a startup crash on 10.10. r=hiro
Differential Revision: https://phabricator.services.mozilla.com/D11239

--HG--
extra : moz-landing-system : lando
2018-11-07 21:38:21 +00:00
Markus Stange
a14e1357ef Bug 1496823 - Remove declaration of -[NSView _regionForOpaqueDescendants:forMove:]. r=spohl
Our implementation of this method was removed in bug 1070710. I forgot to remove the declaration in that bug.

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

--HG--
extra : moz-landing-system : lando
2018-10-17 20:50:09 +00:00
Markus Stange
43ec702b66 Bug 1496823 - Inline -[ChildView drawRect:inContext:] into -[ChildView drawRect:]. r=spohl
This was separate because at some point in the past we were calling
-[ChildView drawRect:inContext:] from a separate draw-in-titlebar pass. That separate
pass was removed in bug 676241.

Depends on D7929

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

--HG--
extra : moz-landing-system : lando
2018-10-17 20:49:18 +00:00
Markus Stange
4dd2f66dab Bug 1496823 - Inline drawUsingOpenGL into drawRect:inContext: and tweak a comment. r=spohl
Depends on D7928

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

--HG--
extra : moz-landing-system : lando
2018-10-17 20:48:20 +00:00