Bug 1463917 part 1 - Add scrollcorner to -moz-appearance so that widget can render it. r?heycam draft
authorXidorn Quan <me@upsuper.org>
Fri, 11 May 2018 10:12:17 +1000
changeset 808611 5774f7cd457f24aa31af3206b1d0b9a134991eeb
parent 808581 147ee0ef8bd0ff4c351f8364f747a6fb4c543841
child 808612 293e36a18968af0fd221feba85df35c2c9a2be63
push id113435
push userxquan@mozilla.com
push dateWed, 20 Jun 2018 04:44:48 +0000
reviewersheycam
bugs1463917
milestone62.0a1
Bug 1463917 part 1 - Add scrollcorner to -moz-appearance so that widget can render it. r?heycam MozReview-Commit-ID: 1Za22ifONfG
devtools/shared/css/generated/properties-db.js
gfx/src/nsThemeConstants.h
layout/style/nsCSSKeywordList.h
layout/style/nsCSSProps.cpp
servo/components/style/properties/longhand/box.mako.rs
toolkit/themes/osx/global/nativescrollbars.css
toolkit/themes/windows/global/xulscrollbars.css
--- a/devtools/shared/css/generated/properties-db.js
+++ b/devtools/shared/css/generated/properties-db.js
@@ -276,16 +276,17 @@ exports.CSS_PROPERTIES = {
       "scrollbarbutton-down",
       "scrollbarbutton-left",
       "scrollbarbutton-right",
       "scrollbarbutton-up",
       "scrollbarthumb-horizontal",
       "scrollbarthumb-vertical",
       "scrollbartrack-horizontal",
       "scrollbartrack-vertical",
+      "scrollcorner",
       "searchfield",
       "separator",
       "spinner",
       "spinner-downbutton",
       "spinner-textfield",
       "spinner-upbutton",
       "splitter",
       "statusbar",
--- a/gfx/src/nsThemeConstants.h
+++ b/gfx/src/nsThemeConstants.h
@@ -175,16 +175,19 @@ enum ThemeWidgetType : uint8_t {
 
   // The scrollbar thumb
   NS_THEME_SCROLLBARTHUMB_HORIZONTAL,
   NS_THEME_SCROLLBARTHUMB_VERTICAL,
 
   // A non-disappearing scrollbar.
   NS_THEME_SCROLLBAR_NON_DISAPPEARING,
 
+  // The scroll corner
+  NS_THEME_SCROLLCORNER,
+
   // A textfield or text area
   NS_THEME_TEXTFIELD,
 
   // The caret of a text area
   NS_THEME_CARET,
 
   // A multiline text field
   NS_THEME_TEXTFIELD_MULTILINE,
--- a/layout/style/nsCSSKeywordList.h
+++ b/layout/style/nsCSSKeywordList.h
@@ -500,16 +500,17 @@ CSS_KEY(scaley, scaley)
 CSS_KEY(scalez, scalez)
 CSS_KEY(screen, screen)
 CSS_KEY(script, script)
 CSS_KEY(scroll, scroll)
 CSS_KEY(scrollbar, scrollbar)
 CSS_KEY(scrollbar-small, scrollbar_small)
 CSS_KEY(scrollbar-horizontal, scrollbar_horizontal)
 CSS_KEY(scrollbar-vertical, scrollbar_vertical)
+CSS_KEY(scrollcorner, scrollcorner)
 CSS_KEY(se-resize, se_resize)
 CSS_KEY(select-after, select_after)
 CSS_KEY(select-all, select_all)
 CSS_KEY(select-before, select_before)
 CSS_KEY(select-menu, select_menu)
 CSS_KEY(select-same, select_same)
 CSS_KEY(self-end, self_end)
 CSS_KEY(self-start, self_start)
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -348,16 +348,17 @@ const KTableEntry nsCSSProps::kAppearanc
   { eCSSKeyword_scrollbarbutton_up,     NS_THEME_SCROLLBARBUTTON_UP },
   { eCSSKeyword_scrollbarbutton_down,   NS_THEME_SCROLLBARBUTTON_DOWN },
   { eCSSKeyword_scrollbarbutton_left,   NS_THEME_SCROLLBARBUTTON_LEFT },
   { eCSSKeyword_scrollbarbutton_right,  NS_THEME_SCROLLBARBUTTON_RIGHT },
   { eCSSKeyword_scrollbartrack_horizontal,    NS_THEME_SCROLLBARTRACK_HORIZONTAL },
   { eCSSKeyword_scrollbartrack_vertical,      NS_THEME_SCROLLBARTRACK_VERTICAL },
   { eCSSKeyword_scrollbarthumb_horizontal,    NS_THEME_SCROLLBARTHUMB_HORIZONTAL },
   { eCSSKeyword_scrollbarthumb_vertical,      NS_THEME_SCROLLBARTHUMB_VERTICAL },
+  { eCSSKeyword_scrollcorner,           NS_THEME_SCROLLCORNER },
   { eCSSKeyword_textfield,              NS_THEME_TEXTFIELD },
   { eCSSKeyword_textfield_multiline,    NS_THEME_TEXTFIELD_MULTILINE },
   { eCSSKeyword_caret,                  NS_THEME_CARET },
   { eCSSKeyword_searchfield,            NS_THEME_SEARCHFIELD },
   { eCSSKeyword_menulist,               NS_THEME_MENULIST },
   { eCSSKeyword_menulist_button,        NS_THEME_MENULIST_BUTTON },
   { eCSSKeyword_menulist_text,          NS_THEME_MENULIST_TEXT },
   { eCSSKeyword_menulist_textfield,     NS_THEME_MENULIST_TEXTFIELD },
--- a/servo/components/style/properties/longhand/box.mako.rs
+++ b/servo/components/style/properties/longhand/box.mako.rs
@@ -601,18 +601,19 @@
                             dialog dualbutton groupbox inner-spin-button listbox listitem menuarrow menubar menucheckbox
                             menuimage menuitem menuitemtext menulist menulist-button menulist-text menulist-textfield
                             menupopup menuradio menuseparator meterbar meterchunk number-input progressbar
                             progressbar-vertical progresschunk progresschunk-vertical radio radio-container radio-label
                             radiomenuitem range range-thumb resizer resizerpanel scale-horizontal scalethumbend
                             scalethumb-horizontal scalethumbstart scalethumbtick scalethumb-vertical scale-vertical
                             scrollbar scrollbar-horizontal scrollbar-small scrollbar-vertical scrollbarbutton-down
                             scrollbarbutton-left scrollbarbutton-right scrollbarbutton-up scrollbarthumb-horizontal
-                            scrollbarthumb-vertical scrollbartrack-horizontal scrollbartrack-vertical searchfield
-                            separator spinner spinner-downbutton spinner-textfield spinner-upbutton splitter statusbar
+                            scrollbarthumb-vertical scrollbartrack-horizontal scrollbartrack-vertical scrollcorner
+                            searchfield separator
+                            spinner spinner-downbutton spinner-textfield spinner-upbutton splitter statusbar
                             statusbarpanel tab tabpanel tabpanels tab-scroll-arrow-back tab-scroll-arrow-forward
                             textfield textfield-multiline toolbar toolbarbutton toolbarbutton-dropdown toolbargripper
                             toolbox tooltip treeheader treeheadercell treeheadersortarrow treeitem treeline treetwisty
                             treetwistyopen treeview window
                             -moz-gtk-info-bar -moz-mac-active-source-list-selection -moz-mac-disclosure-button-closed
                             -moz-mac-disclosure-button-open -moz-mac-fullscreen-button -moz-mac-help-button
                             -moz-mac-source-list -moz-mac-source-list-selection -moz-mac-vibrancy-dark
                             -moz-mac-vibrancy-light -moz-mac-vibrant-titlebar-light -moz-mac-vibrant-titlebar-dark
--- a/toolkit/themes/osx/global/nativescrollbars.css
+++ b/toolkit/themes/osx/global/nativescrollbars.css
@@ -66,17 +66,17 @@ scrollbarbutton[type="decrement"] {
 
 scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"] {
   -moz-appearance: scrollbarbutton-up;
 }
 
 /* ::::: square at the corner of two scrollbars ::::: */
 
 scrollcorner {
-  /* XXX -moz-appearance: scrollcorner; */
+  -moz-appearance: scrollcorner;
   width: 16px;
   cursor: default;
   background-color: white;
 }
 
 /* ::::::::::::::::::::: MEDIA PRINT :::::::::::::::::::::: */
 @media print {
   html|div scrollbar {
--- a/toolkit/themes/windows/global/xulscrollbars.css
+++ b/toolkit/themes/windows/global/xulscrollbars.css
@@ -58,17 +58,17 @@ thumb[orient="horizontal"] {
 scrollbarbutton {
   min-width: 16px;
   min-height: 16px;
 }
 
 /* ::::: square at the corner of two scrollbars ::::: */
 
 scrollcorner {
-  /* XXX -moz-appearance: scrollcorner; */
+  -moz-appearance: scrollcorner;
   width: 16px;
   cursor: default;
   background-color: -moz-Dialog;
 }
 
 /* ..... increment .... */
 
 scrollbarbutton[type="increment"] {