Skip to content

Commit

Permalink
Bug 1825010 Remove NS_NATIVE_DISPLAY as it's not used r=emilio,geckov…
Browse files Browse the repository at this point in the history
…iew-reviewers,m_kato

Differential Revision: https://phabricator.services.mozilla.com/D173841
  • Loading branch information
stransky committed Mar 29, 2023
1 parent 1efc885 commit 5fadb72
Show file tree
Hide file tree
Showing 6 changed files with 0 additions and 18 deletions.
3 changes: 0 additions & 3 deletions widget/android/nsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2579,9 +2579,6 @@ void nsWindow::UpdateOverscrollOffset(const float aX, const float aY) {
void* nsWindow::GetNativeData(uint32_t aDataType) {
switch (aDataType) {
// used by GLContextProviderEGL, nullptr is EGL_DEFAULT_DISPLAY
case NS_NATIVE_DISPLAY:
return nullptr;

case NS_NATIVE_WIDGET:
return (void*)this;

Expand Down
1 change: 0 additions & 1 deletion widget/cocoa/nsChildView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,6 @@ static void PrintViewHierarchy(NSView *view)

switch (aDataType) {
case NS_NATIVE_WIDGET:
case NS_NATIVE_DISPLAY:
retVal = (void*)mView;
break;

Expand Down
1 change: 0 additions & 1 deletion widget/cocoa/nsCocoaWindow.mm
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,6 @@ static unsigned int WindowMaskForBorderStyle(BorderStyle aBorderStyle) {
// to emulate how windows works, we always have to return a NSView
// for NS_NATIVE_WIDGET
case NS_NATIVE_WIDGET:
case NS_NATIVE_DISPLAY:
retVal = [mWindow contentView];
break;

Expand Down
11 changes: 0 additions & 11 deletions widget/gtk/nsWindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3379,17 +3379,6 @@ void* nsWindow::GetNativeData(uint32_t aDataType) {
return mGdkWindow;
}

case NS_NATIVE_DISPLAY: {
#ifdef MOZ_X11
GdkDisplay* gdkDisplay = gdk_display_get_default();
if (GdkIsX11Display(gdkDisplay)) {
return GDK_DISPLAY_XDISPLAY(gdkDisplay);
}
#endif /* MOZ_X11 */
// Don't bother to return native display on Wayland as it's for
// X11 only NPAPI plugins.
return nullptr;
}
case NS_NATIVE_SHELLWIDGET:
return GetToplevelWidget();

Expand Down
1 change: 0 additions & 1 deletion widget/nsIWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ typedef void* nsNativeWidget;
#define NS_NATIVE_GRAPHIC 1
#define NS_NATIVE_TMP_WINDOW 2
#define NS_NATIVE_WIDGET 3
#define NS_NATIVE_DISPLAY 4
#define NS_NATIVE_REGION 5
#define NS_NATIVE_OFFSETX 6
#define NS_NATIVE_OFFSETY 7
Expand Down
1 change: 0 additions & 1 deletion widget/uikit/nsWindow.mm
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,6 @@ - (void)drawRect:(CGRect)aRect inContext:(CGContextRef)aContext {

switch (aDataType) {
case NS_NATIVE_WIDGET:
case NS_NATIVE_DISPLAY:
retVal = (void*)mNativeView;
break;

Expand Down

0 comments on commit 5fadb72

Please sign in to comment.