зеркало из https://github.com/mozilla/gecko-dev.git
Bug 448704 – Eliminate <gripper> as an independent element. r=vlad/dbaron/enndeakin
This commit is contained in:
Родитель
27deb629f8
Коммит
a47a75abf0
|
@ -377,7 +377,6 @@ GK_ATOM(functionAvailable, "function-available")
|
|||
GK_ATOM(generateId, "generate-id")
|
||||
GK_ATOM(getter, "getter")
|
||||
GK_ATOM(grid, "grid")
|
||||
GK_ATOM(gripper, "gripper")
|
||||
GK_ATOM(grippy, "grippy")
|
||||
GK_ATOM(group, "group")
|
||||
GK_ATOM(groupingSeparator, "grouping-separator")
|
||||
|
|
|
@ -153,10 +153,6 @@
|
|||
#define NS_THEME_SCROLLBAR_THUMB_HORIZONTAL 88
|
||||
#define NS_THEME_SCROLLBAR_THUMB_VERTICAL 89
|
||||
|
||||
// The gripper that goes on the thumb
|
||||
#define NS_THEME_SCROLLBAR_GRIPPER_HORIZONTAL 90
|
||||
#define NS_THEME_SCROLLBAR_GRIPPER_VERTICAL 91
|
||||
|
||||
// A textfield or text area
|
||||
#define NS_THEME_TEXTFIELD 95
|
||||
|
||||
|
|
|
@ -532,8 +532,6 @@ CSS_KEY(scrollbartrack-horizontal, scrollbartrack_horizontal)
|
|||
CSS_KEY(scrollbartrack-vertical, scrollbartrack_vertical)
|
||||
CSS_KEY(scrollbarthumb-horizontal, scrollbarthumb_horizontal)
|
||||
CSS_KEY(scrollbarthumb-vertical, scrollbarthumb_vertical)
|
||||
CSS_KEY(scrollbargripper-horizontal, scrollbargripper_horizontal)
|
||||
CSS_KEY(scrollbargripper-vertical, scrollbargripper_vertical)
|
||||
CSS_KEY(textfield, textfield)
|
||||
CSS_KEY(textfield-multiline, textfield_multiline)
|
||||
CSS_KEY(caret, caret)
|
||||
|
|
|
@ -291,8 +291,6 @@ const PRInt32 nsCSSProps::kAppearanceKTable[] = {
|
|||
eCSSKeyword_scrollbartrack_vertical, NS_THEME_SCROLLBAR_TRACK_VERTICAL,
|
||||
eCSSKeyword_scrollbarthumb_horizontal, NS_THEME_SCROLLBAR_THUMB_HORIZONTAL,
|
||||
eCSSKeyword_scrollbarthumb_vertical, NS_THEME_SCROLLBAR_THUMB_VERTICAL,
|
||||
eCSSKeyword_scrollbargripper_horizontal, NS_THEME_SCROLLBAR_GRIPPER_HORIZONTAL,
|
||||
eCSSKeyword_scrollbargripper_vertical, NS_THEME_SCROLLBAR_GRIPPER_VERTICAL,
|
||||
eCSSKeyword_textfield, NS_THEME_TEXTFIELD,
|
||||
eCSSKeyword_textfield_multiline, NS_THEME_TEXTFIELD_MULTILINE,
|
||||
eCSSKeyword_caret, NS_THEME_TEXTFIELD_CARET,
|
||||
|
|
|
@ -5,11 +5,7 @@
|
|||
xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:xbl="http://www.mozilla.org/xbl">
|
||||
|
||||
<binding id="thumb" extends="xul:button">
|
||||
<content>
|
||||
<xul:gripper/>
|
||||
</content>
|
||||
</binding>
|
||||
<binding id="thumb" extends="xul:button" />
|
||||
|
||||
<binding id="scrollbar-base">
|
||||
<handlers>
|
||||
|
|
|
@ -81,14 +81,6 @@ thumb[orient="horizontal"] {
|
|||
min-width: 8px;
|
||||
}
|
||||
|
||||
thumb > gripper {
|
||||
-moz-appearance: scrollbargripper-vertical;
|
||||
}
|
||||
|
||||
thumb[orient="horizontal"] > gripper {
|
||||
-moz-appearance: scrollbargripper-horizontal;
|
||||
}
|
||||
|
||||
/* ::::: scrollbar button ::::: */
|
||||
|
||||
scrollbarbutton {
|
||||
|
@ -197,14 +189,6 @@ scrollbar[orient="vertical"] > scrollbarbutton[type="decrement"][disabled="true"
|
|||
min-width: 8px;
|
||||
}
|
||||
|
||||
html|div thumb > gripper {
|
||||
-moz-appearance: scrollbargripper-vertical;
|
||||
}
|
||||
|
||||
html|div thumb[orient="horizontal"] > gripper {
|
||||
-moz-appearance: scrollbargripper-horizontal;
|
||||
}
|
||||
|
||||
/* ::::: scrollbar button ::::: */
|
||||
|
||||
html|div scrollbarbutton {
|
||||
|
|
|
@ -1265,8 +1265,6 @@ nsNativeThemeGTK::ThemeSupportsWidget(nsPresContext* aPresContext,
|
|||
case NS_THEME_SCROLLBAR_TRACK_VERTICAL:
|
||||
case NS_THEME_SCROLLBAR_THUMB_HORIZONTAL:
|
||||
case NS_THEME_SCROLLBAR_THUMB_VERTICAL:
|
||||
// case NS_THEME_SCROLLBAR_GRIPPER_HORIZONTAL: (n/a for gtk)
|
||||
// case NS_THEME_SCROLLBAR_GRIPPER_VERTICAL: (n/a for gtk)
|
||||
case NS_THEME_TEXTFIELD:
|
||||
case NS_THEME_TEXTFIELD_MULTILINE:
|
||||
case NS_THEME_TEXTFIELD_CARET:
|
||||
|
|
|
@ -304,8 +304,6 @@ nsNativeThemeWin::GetTheme(PRUint8 aWidgetType)
|
|||
case NS_THEME_SCROLLBAR_BUTTON_RIGHT:
|
||||
case NS_THEME_SCROLLBAR_THUMB_VERTICAL:
|
||||
case NS_THEME_SCROLLBAR_THUMB_HORIZONTAL:
|
||||
case NS_THEME_SCROLLBAR_GRIPPER_VERTICAL:
|
||||
case NS_THEME_SCROLLBAR_GRIPPER_HORIZONTAL:
|
||||
return nsUXThemeData::GetTheme(eUXScrollbar);
|
||||
case NS_THEME_SCALE_HORIZONTAL:
|
||||
case NS_THEME_SCALE_VERTICAL:
|
||||
|
@ -615,27 +613,6 @@ nsNativeThemeWin::GetThemePartAndState(nsIFrame* aFrame, PRUint8 aWidgetType,
|
|||
}
|
||||
return NS_OK;
|
||||
}
|
||||
case NS_THEME_SCROLLBAR_GRIPPER_VERTICAL:
|
||||
case NS_THEME_SCROLLBAR_GRIPPER_HORIZONTAL: {
|
||||
aPart = (aWidgetType == NS_THEME_SCROLLBAR_GRIPPER_HORIZONTAL) ?
|
||||
SP_GRIPPERHOR : SP_GRIPPERVERT;
|
||||
if (!aFrame)
|
||||
aState = TS_NORMAL;
|
||||
else if (IsDisabled(aFrame->GetParent()))
|
||||
aState = TS_DISABLED;
|
||||
else {
|
||||
PRInt32 eventState = GetContentState(aFrame->GetParent(), aWidgetType);
|
||||
if (eventState & NS_EVENT_STATE_ACTIVE) // Hover is not also a requirement for
|
||||
// the gripper, since the drag is not canceled
|
||||
// when you move outside the gripper.
|
||||
aState = TS_ACTIVE;
|
||||
else if (eventState & NS_EVENT_STATE_HOVER)
|
||||
aState = TS_HOVER;
|
||||
else
|
||||
aState = TS_NORMAL;
|
||||
}
|
||||
return NS_OK;
|
||||
}
|
||||
case NS_THEME_SCALE_HORIZONTAL:
|
||||
case NS_THEME_SCALE_VERTICAL: {
|
||||
aPart = (aWidgetType == NS_THEME_SCALE_HORIZONTAL) ?
|
||||
|
@ -1176,6 +1153,24 @@ RENDER_AGAIN:
|
|||
widgetRect.bottom = widgetRect.top + TB_SEPARATOR_HEIGHT;
|
||||
nsUXThemeData::drawThemeEdge(theme, hdc, RP_BAND, 0, &widgetRect, EDGE_ETCHED, BF_TOP, NULL);
|
||||
}
|
||||
else if (aWidgetType == NS_THEME_SCROLLBAR_THUMB_HORIZONTAL ||
|
||||
aWidgetType == NS_THEME_SCROLLBAR_THUMB_VERTICAL)
|
||||
{
|
||||
// Draw the decorative gripper for the scrollbar thumb button, if it fits
|
||||
|
||||
SIZE gripSize;
|
||||
MARGINS thumbMgns;
|
||||
int gripPart = (aWidgetType == NS_THEME_SCROLLBAR_THUMB_HORIZONTAL) ?
|
||||
SP_GRIPPERHOR : SP_GRIPPERVERT;
|
||||
|
||||
if (nsUXThemeData::getThemePartSize(theme, hdc, gripPart, state, NULL, TS_TRUE, &gripSize) == S_OK &&
|
||||
nsUXThemeData::getThemeMargins(theme, hdc, part, state, TMT_CONTENTMARGINS, NULL, &thumbMgns) == S_OK &&
|
||||
gripSize.cx + thumbMgns.cxLeftWidth + thumbMgns.cxRightWidth <= widgetRect.right - widgetRect.left &&
|
||||
gripSize.cy + thumbMgns.cyTopHeight + thumbMgns.cyBottomHeight <= widgetRect.bottom - widgetRect.top)
|
||||
{
|
||||
nsUXThemeData::drawThemeBG(theme, hdc, gripPart, state, &widgetRect, &clipRect);
|
||||
}
|
||||
}
|
||||
|
||||
nativeDrawing.EndNativeDrawing();
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче