Граф коммитов

150 Коммитов

Автор SHA1 Сообщение Дата
Mike Conley 606458ffcd Bug 1506248 - Backout bug 1498356 (d2b32aa2055f) since bug 1503272 makes it unnecessary now. r=stransky
Depends on D11523

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

--HG--
extra : moz-landing-system : lando
2018-11-12 12:15:28 +00:00
Mike Conley 097208ea2f Bug 1506248 - Backout bug 1498898 (0a63507e990c) since bug 1503272 makes it unnecessary now. r=stransky
Differential Revision: https://phabricator.services.mozilla.com/D11523

--HG--
extra : moz-landing-system : lando
2018-11-12 12:16:22 +00:00
Mats Palmgren 754a89bb89 Bug 1501506 - Add -webkit-appearance:progress-bar and make that the default for <progress> for compatibility with other UAs. r=jwatt
Keep our old 'progressbar' as an alias for now, but unship
'progresschunk' by restricting it to UA/chrome sheets only.
Unship 'progresschunk-vertical' by removing it since it's
not used internally for anything.
2018-11-09 04:25:56 +01:00
Jonathan Watt b5bfd3a7ea Bug 1505316 p2. Rename aWidgetType to aAppearance in widget code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D11156

--HG--
extra : rebase_source : c908a6d6419c6462453cb8b745effc583d767902
extra : source : 07e12bc71a8d96b52b1a1bbc8dc7545ae4454a4f
2018-10-24 16:24:57 +01:00
Jonathan Watt 587108c41f Bug 1505316 p1. Use StyleAppearance instead of WidgetType in widget code. r=emilio
Differential Revision: https://phabricator.services.mozilla.com/D11155

--HG--
extra : rebase_source : 7cbb8c381adfc49803c1bc0e90f4609f6cc7e6d0
2018-10-24 12:47:20 +01:00
Martin Stransky 3264d3e2dd Bug 1498898 - Don't draw container-only widgets, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D9379

--HG--
extra : moz-landing-system : lando
2018-10-25 12:54:35 +00:00
Jonathan Watt 3922f1cb96 Bug 1500423. Make '-webkit-appearance: menulist-textfield' behave like Chrome. r=mats
Differential Revision: https://phabricator.services.mozilla.com/D9339

--HG--
extra : rebase_source : afa3c037857838be2e18d4b47eaf64d318747de7
2018-10-19 18:12:15 +01:00
Martin Stransky 53bbcc32fb Bug 1498356 - Move border and padding from -moz-window-titlebar* to -moz-window-button-box on GTK backend, r=dao
This is based on patch by Mike Conley (:mconley)

The left/right toolbox placement can be adjusted later as we know at toolkit level where the buttons are
so we can set border/padding accordingly.

Depends on D8529

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

--HG--
extra : moz-landing-system : lando
2018-10-12 16:16:50 +00:00
Nicholas Nethercote 7398ecce66 Bug 1449787 - Make static atom pointers `constexpr`. r=froydnj,emilio
This saves one word per static atom, per process.

The `nsGkAtoms` change is only a small part of this commit.

In regen_atoms.py:

- There is now only one link name per platform: nsGkAtoms::sAtoms[].

- But there is a new constant per atom, giving the index into
  nsGkAtoms::sAtoms[].

- And the `atom!` macro for each atom indexes into nsGkAtoms::sAtoms[] using
  the index constant.

- A couple of `*mut` pointers are now `*const`.

Elsewhere, the `(nsStaticAtom*)` casts within the `AppendElement()` calls are
necessary to avoid link errors, presumably due to some template instantiation
wrinkle.

--HG--
extra : rebase_source : 629642e708c8bc6e27d6057beae5f35955fdd837
2018-10-04 09:16:11 +10:00
Martin Stransky 3595f59e15 Bug 1489963 - Draw scrollbars with Gtk widget state and use backdrop state for inactive scrollbars, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D6763

--HG--
extra : moz-landing-system : lando
2018-09-25 11:57:53 +00:00
Martin Stransky e4767bd3b2 Bug 1491374 - Don't use backdrop state for scrollbars, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D6396

--HG--
extra : moz-landing-system : lando
2018-09-20 14:15:30 +00:00
Ehsan Akhgari 8d7c2999dc Bug 1491594 - Remove the XPCOM registration for the native theme renderer r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D6275

--HG--
extra : moz-landing-system : lando
2018-09-20 01:20:55 +00:00
Ehsan Akhgari 77ce9e051f Backout changeset b4f8cb6afab6 (bug 1491594) for talos performance regressions 2018-09-18 18:33:56 -04:00
Ehsan Akhgari 7c90f6f4f5 Bug 1491594 - Remove the XPCOM registration for the native theme renderer; r=mstange
Differential Revision: https://phabricator.services.mozilla.com/D5961
2018-09-16 13:51:21 -04:00
Martin Stransky 49446b1a78 Bug 1489963 - [Linux/Gtk] Draw scrollbars on inactive documents with dropdown state, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D5746

--HG--
extra : moz-landing-system : lando
2018-09-13 09:40:36 +00:00
Martin Stransky f46e2e428f Bug 1442755 - Redraw titlebar widgets when application focus changes and draw inactive titlebar with GTK_STATE_FLAG_BACKDROP state, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D5582

--HG--
extra : moz-landing-system : lando
2018-09-12 11:03:56 +00:00
Cosmin Sabou 3a76399ecb Backed out changeset 19e2c611e889 (bug 1442755) for wpt reftest failures. CLOSED TREE 2018-09-11 15:11:02 +03:00
Martin Stransky 3d7f73594c Bug 1442755 - Redraw titlebar widgets when application focus changes and draw inactive titlebar with GTK_STATE_FLAG_BACKDROP state, r=jhorak
Differential Revision: https://phabricator.services.mozilla.com/D5409

--HG--
extra : moz-landing-system : lando
2018-09-11 11:01:26 +00:00
Xidorn Quan 9daee9a3a5 Bug 1464723 - Implement custom scrollbar support for GTK widget. r=karlt,dholbert
When any scrollbar color is specified, or scrollbar-width is thin, we
switch to use the fallback rendering.

The change to xulscrollbars.css is for ensuring that the scrollbar is
displayed for scrollbar-width: thin when there is no scrollbar color
specified. It wouldn't affect cases where -moz-appearance takes effect.

This also changes the fallback width of the scrollbars. Since the two
widths was picked rather randomly, I think it should be fine to change
it if a value looks better than the old one, especially on Linux which
is the main usecase for this fallback rendering.

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

--HG--
extra : moz-landing-system : lando
2018-08-24 07:40:07 +00:00
Jonathan Watt c39e987a28 Bug 1428676 pt 6. Honor the webkit pref when handling 'menulist-button' on Linux. r=emilio 2018-07-16 19:09:42 +01:00
Jonathan Watt 11e49726b5 Bug 1428676 pt 1. Add a '-moz-menulist-button' value to '-moz-appearance'. r=emilio
The '-moz-menulist-button' value currently behavies identically to the
'menulist-button' value.  This is not implemented as an alias because later
patches in this patch series will change the behavior of our pre-existing
'menulist-button' value to more closely match what Chrome does.
2018-06-19 20:12:45 +01:00
shindli 0a48a3cd3c Backed out 3 changesets (bug 1428676) for bc failures in browser/base/content/test/static/browser_parsable_css.js on a CLOSED TREE
Backed out changeset 6ba5975115fc (bug 1428676)
Backed out changeset 7f1270a9ec3d (bug 1428676)
Backed out changeset 662bfc31a950 (bug 1428676)
2018-07-31 19:30:46 +03:00
Jonathan Watt e8a416046f Bug 1428676 pt 1. Add a '-moz-menulist-button' value to '-moz-appearance'. r=emilio
The '-moz-menulist-button' value currently behavies identically to the
'menulist-button' value.  This is not implemented as an alias because later
patches in this patch series will change the behavior of our pre-existing
'menulist-button' value to more closely match what Chrome does.

--HG--
extra : rebase_source : b66bf6427db5be2eb12f4e0aa36d22a4da46555a
2018-06-19 20:12:45 +01: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
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
Samuel Thibault 01084d60d8 Bug 1376756 - gtk: while drawing nsTreeBodyFrame, fetch current row attributes for proper style rendering. r=karlt 2018-06-27 05:11:00 +03:00
Chris Peterson 2afd829d0f Bug 1469769 - Part 6: Replace non-failing NS_NOTREACHED with MOZ_ASSERT_UNREACHABLE. r=froydnj
This patch is an automatic replacement of s/NS_NOTREACHED/MOZ_ASSERT_UNREACHABLE/. Reindenting long lines and whitespace fixups follow in patch 6b.

MozReview-Commit-ID: 5UQVHElSpCr

--HG--
extra : rebase_source : 4c1b2fc32b269342f07639266b64941e2270e9c4
extra : source : 907543f6eae716f23a6de52b1ffb1c82908d158a
2018-06-17 22:43:11 -07:00
Mats Palmgren 8f2a5e19c9 Bug 1466330 - Make nsITheme::GetWidgetBorder return the border directly instead of using an out-param (idempotent patch). r=emilio 2018-06-02 19:10:48 +02:00
Mats Palmgren 6e331b1d1d Bug 1461222 part 2 - Make GetWidgetPadding return LayoutDeviceIntMargin. r=emilio 2018-05-17 17:30:35 +02:00
Mats Palmgren bae2d6f225 Bug 1461222 part 1 - Make GetWidgetBorder return LayoutDeviceIntMargin. r=emilio 2018-05-17 17:30:35 +02:00
Martin Stransky 659fc0cc75 Bug 1454897 - Ubuntu/Ambiance - Render scrollbar thumb with different sizes in active/normal state, r=jhorak
This patch implements a workaround which alows us to emulate
overlay scrollbars for some Gtk+ themes (Ubuntu/Ambiance),
when an inactive scrollbar thumb is smaller than the active one.

We calculate thumb margin as thumb class margin + difference margin
between active and inactive scrollbars.

Also remove boolean parameter from GetScrollbarMetrics() and implement
GetActiveScrollbarMetrics() to get metrics for active scrollbar.

MozReview-Commit-ID: 2zje5OZskYw

--HG--
extra : rebase_source : dd50dc52d9d0942c9dcfbf72d217f3c6ee82c21a
2018-04-24 12:27:38 +02:00
Martin Stransky d9d0e359b8 Bug 1355143 - Size scrollbars with 'hover' Gtk+ state, r=jhorak
Ubuntu/Ambiance has tiny scrollbars when it's not hovered by mouse and large
ones when it's hovered/active. Our current Gtk+ toolkit code does not support such scrollbar
resize on the fly.

We use a workaround as we get size of active (hovered) scrollbar only and that
we pass to gecko. Then we draw scrolbar smaller when it's not hovered and full sized
when it's hovered.

MozReview-Commit-ID: mxt9q5Bcg9

--HG--
extra : rebase_source : f77304653f730ea1bca6fb453568f945b022c442
2018-04-18 11:09:19 +02:00
Jeff Muizelaar 7bd5060424 Bug 1450134. Replace ToRelativeLayoutRect() with ToRoundedLayoutRect(). r=kats
This function doesn't use any StackingContextHelper state anymore.
We should make what it does clearer and move it to a better place.

--HG--
extra : rebase_source : 1727be9657169547d842ec9b6887837abedbefdf
2018-03-29 17:57:43 -04:00
Boris Zbarsky 29d232e53f Bug 1447098 part 1. Rename FromContent on various DOM classes to FromNode. r=mystor
MozReview-Commit-ID: 202nkbmkwfR
2018-03-21 17:39:04 -04:00
Jeff Muizelaar b0c6c75854 Bug 1439006. Allow multiple kinds of WebRenderUserData on a DisplayItem. r=mstange
Currently we can only have one type of WebRenderUserData on an Item. We already
have a hash table of WebRenderUserData so it's not hard to include type in the
hash to support one per type.

MozReview-Commit-ID: geJ0BeWv8b
2018-03-16 19:15:27 -04:00
Martin Stransky 066945c7bc Bug 1434646 - Titlebar rendering - Place titlebar buttons in GtkBox, r=jhorak
Some themes (Ambiance for instance) uses first-child/last-child css selectors
to style titlebar buttons. Ubuntu Ambiance theme places titlebar buttons closer
by negative margin applied to them.

We put titlebar buttons to GtkBox as well as Gtk+ does and also keep
the button order here to match first-child/last-child selectors. It also means
we must have maximize/restore as one button to keep the correct order.

MozReview-Commit-ID: 9mqljOa4Vu7

--HG--
extra : rebase_source : 9c31a2073d1bb247ce9d0240333143661b8ae4b8
2018-02-23 21:28:37 +01:00
Jan Horak b69949883c Bug 1441108 - Don't print warning for less than 1 scaling factor; r=stransky
A lot of "WARNING: Invalid monitor scale: -1" appering for the puppet widget since
fix for bug 1439881 landed. We don't need to print the warning, fallback to 1 is
sufficient enough.

MozReview-Commit-ID: 73BGc8neUmu

--HG--
extra : rebase_source : 74b2a818a29514095b5c56b05966cff5e4e9ba60
2018-02-26 11:44:25 +01:00
Jan Horak 6958445862 Bug 1439881 - Avoid returning monitor scale 0; r=stransky
Because of rounding errors there's a change that returned monitor scale
is 0. That would lead to SIGFPE because it's later used in division.

MozReview-Commit-ID: 4d7nHaBm4XG

--HG--
extra : rebase_source : d7fb5c64698d1e99afc223d401b30e0eb168fdb4
2018-02-22 13:59:38 +01:00
Jan Horak f77af604c8 Bug 1439857 - Fix too big fonts when devPixelsPerPx is set; r=stransky
This fixes regression introduced by hidpi support for wayland in
case devPixelsPerPx is set (bug 1431337).

MozReview-Commit-ID: DOh0aTcxbVG

--HG--
extra : rebase_source : ac3ac449a99e0123b8a64ea36f25d312bb3c4483
2018-02-22 10:41:30 +01:00
Adrian Wielgosik 2d4df58ad8 Bug 1439751 - Remove all members from nsIDOMHTMLInputElement. r=qdot
MozReview-Commit-ID: JVagEzvSONN

--HG--
extra : rebase_source : a7e1cf2e5ccc1925f3a11c7d935438ef6307c70c
2018-02-20 23:10:44 +01:00
Martin Stransky fb13e4d63d Bug 1433068 - Titlebar/Linux - load and draw HiDPI titlebar icons on HiDPI screens, r=jhorak
MozReview-Commit-ID: KxbBvf6mgo1

--HG--
extra : rebase_source : f1c3b083d4e83684b1046a3c439d802de6547c21
2018-02-20 16:16:23 +01:00
Jan Horak 6c58e369e7 Bug 1431337 - Scale content for the actual monitor, not the first one; r=stransky
We need to use scaling factor of the monitor on which application is actually positioned.
Previously we used ScreenHelperGTK::GetGTKMonitorScaleFactor() which use the first monitor.
This does not work on hidpi+normal dpi monitors setup.

The GetSystemFontInfo() cannot return scaled value of the font by default monitor
scale factor. We need to scale it in nsLookAndFeel::GetFontImpl
by aDevPixPerCSSPixel like implementation for Windows does.

We also need to check layout.css.devPixelsPerPx because we cannot
scale per monitor when this preference is set to positive number.

MozReview-Commit-ID: AwT2NvkEqvz

--HG--
extra : rebase_source : 5b956a6abd7d215b06ebcd8c56e34c038d012940
2018-01-18 11:52:59 +01:00
Andreea Pavel 6e6687ea60 Backed out changeset cf44885dc2ac (bug 1431337) for failing mochitest browser chrome at browser/base/content/test/performance/browser_startup_images.js on a CLOSED TREE 2018-02-15 16:03:40 +02:00
Jan Horak 55b47c7c2e Bug 1431337 - Scale content for the actual monitor, not the first one; r=stransky
We need to use scaling factor of the monitor on which application is actually positioned.
Previously we used ScreenHelperGTK::GetGTKMonitorScaleFactor() which use the first monitor.
This does not work on hidpi+normal dpi monitors setup.

The GetSystemFontInfo() cannot return scaled value of the font by default monitor
scale factor. We need to scale it in nsLookAndFeel::GetFontImpl
by aDevPixPerCSSPixel like implementation for Windows does.

We also need to check layout.css.devPixelsPerPx because we cannot
scale per monitor when this preference is set to positive number.

MozReview-Commit-ID: AwT2NvkEqvz

--HG--
extra : rebase_source : 36d64957e017486d99c4302346ab64e47b5e2cc6
2018-01-18 11:52:59 +01:00
Martin Stransky afa356a144 Bug 1408335 - Render titlebar icons as themed ones, r=jhorak
Render titlebar button icons as a part of -moz-window-button-* appearence. It allows us to
theme the icons accordingly. We add a GtkImage widget to header bar buttons as Gtk+ does and
store icon pixel data there and render it at moz_gtk_header_bar_button_paint() as a part
of the buttons. It means that the toolbar buttons are not containers and
moz_gtk_get_widget_border() returns zero border for them.

Also implement GetToolbarButtonMetrics() per button.

MozReview-Commit-ID: gkAu3VmE3q

--HG--
extra : rebase_source : d1df34537901342969d1e33524b414a2786df541
2018-01-25 11:13:12 +01:00
Martin Stransky 0594ae2db5 Bug 1427999 - Use GetToolbarButtonMetrics() to get correct titlebar button size at nsNativeThemeGTK::GetMinimumWidgetSize, r=jhorak
MozReview-Commit-ID: HfPUk30LaJn

--HG--
extra : rebase_source : ef406e78e686a6ae190a0fbdb9aa945e40503ac6
2018-01-22 12:09:09 +01:00
Noemi Erli a111747a97 Backed out 2 changesets (bug 1431337) for M15 failures in parser/htmlparser/tests/mochitest/test_img_picture_preload.html on a CLOSED TREE
Backed out changeset c70e75e993fc (bug 1431337)
Backed out changeset 016f4ce0803b (bug 1431337)
2018-01-24 18:09:50 +02:00
Jan Horak e5a072e76a Bug 1431337 Scale widget size to the current monitor, not the first one; r=stransky
We need to use scaling factor of the monitor on which application is actually positioned.
Previously we used ScreenHelperGTK::GetGTKMonitorScaleFactor() which use the first monitor.
This does not work on hidpi+normal dpi monitors setup.

MozReview-Commit-ID: 1dVYOe48tPJ

--HG--
extra : rebase_source : af804d3104da91be459b219b261949d84b4f7c26
2018-01-18 11:52:59 +01:00
Lee Salzman a9ae481da3 Bug 1418361 - push GTK window background color rect for WR. r=nical
MozReview-Commit-ID: DUiFHtFGwQF
2018-01-22 08:01:09 -05:00
Martin Stransky 2f65f5a5ab Bug 1430018 - Add namespace mozilla::widget to nsNativeThemeGTK.cpp as it's needed by ScreenHelperGTK, r=jhorak
MozReview-Commit-ID: HG7Zt0LaOU8

--HG--
extra : rebase_source : cf4bf90241461a9cee3352abda93aec9efe3b6ca
2018-01-12 12:40:14 +01:00