зеркало из https://github.com/mozilla/pjs.git
Put :-moz-system-metric values in nsGkAtoms. (Bug 522149) r=bzbarsky
This commit is contained in:
Родитель
dd737d7779
Коммит
7a7055b825
|
@ -1696,3 +1696,18 @@ GK_ATOM(Unicode, "x-unicode")
|
|||
GK_ATOM(TypingTxnName, "Typing")
|
||||
GK_ATOM(IMETxnName, "IME")
|
||||
GK_ATOM(DeleteTxnName, "Deleting")
|
||||
|
||||
// Names for system metrics
|
||||
GK_ATOM(scrollbar_start_backward, "scrollbar-start-backward")
|
||||
GK_ATOM(scrollbar_start_forward, "scrollbar-start-forward")
|
||||
GK_ATOM(scrollbar_end_backward, "scrollbar-end-backward")
|
||||
GK_ATOM(scrollbar_end_forward, "scrollbar-end-forward")
|
||||
GK_ATOM(scrollbar_thumb_proportional, "scrollbar-thumb-proportional")
|
||||
GK_ATOM(images_in_menus, "images-in-menus")
|
||||
GK_ATOM(images_in_buttons, "images-in-buttons")
|
||||
GK_ATOM(windows_default_theme, "windows-default-theme")
|
||||
GK_ATOM(mac_graphite_theme, "mac-graphite-theme")
|
||||
GK_ATOM(windows_compositor, "windows-compositor")
|
||||
GK_ATOM(windows_classic, "windows-classic")
|
||||
GK_ATOM(touch_enabled, "touch-enabled")
|
||||
GK_ATOM(maemo_classic, "maemo-classic")
|
||||
|
|
|
@ -812,61 +812,61 @@ InitSystemMetrics()
|
|||
PRInt32 metricResult;
|
||||
lookAndFeel->GetMetric(nsILookAndFeel::eMetric_ScrollArrowStyle, metricResult);
|
||||
if (metricResult & nsILookAndFeel::eMetric_ScrollArrowStartBackward) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("scrollbar-start-backward"));
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::scrollbar_start_backward);
|
||||
}
|
||||
if (metricResult & nsILookAndFeel::eMetric_ScrollArrowStartForward) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("scrollbar-start-forward"));
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::scrollbar_start_forward);
|
||||
}
|
||||
if (metricResult & nsILookAndFeel::eMetric_ScrollArrowEndBackward) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("scrollbar-end-backward"));
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::scrollbar_end_backward);
|
||||
}
|
||||
if (metricResult & nsILookAndFeel::eMetric_ScrollArrowEndForward) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("scrollbar-end-forward"));
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::scrollbar_end_forward);
|
||||
}
|
||||
|
||||
lookAndFeel->GetMetric(nsILookAndFeel::eMetric_ScrollSliderStyle, metricResult);
|
||||
if (metricResult != nsILookAndFeel::eMetric_ScrollThumbStyleNormal) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("scrollbar-thumb-proportional"));
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::scrollbar_thumb_proportional);
|
||||
}
|
||||
|
||||
lookAndFeel->GetMetric(nsILookAndFeel::eMetric_ImagesInMenus, metricResult);
|
||||
if (metricResult) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("images-in-menus"));
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::images_in_menus);
|
||||
}
|
||||
|
||||
lookAndFeel->GetMetric(nsILookAndFeel::eMetric_ImagesInButtons, metricResult);
|
||||
if (metricResult) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("images-in-buttons"));
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::images_in_buttons);
|
||||
}
|
||||
|
||||
rv = lookAndFeel->GetMetric(nsILookAndFeel::eMetric_WindowsDefaultTheme, metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("windows-default-theme"));
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::windows_default_theme);
|
||||
}
|
||||
|
||||
rv = lookAndFeel->GetMetric(nsILookAndFeel::eMetric_MacGraphiteTheme, metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("mac-graphite-theme"));
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::mac_graphite_theme);
|
||||
}
|
||||
|
||||
rv = lookAndFeel->GetMetric(nsILookAndFeel::eMetric_DWMCompositor, metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("windows-compositor"));
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::windows_compositor);
|
||||
}
|
||||
|
||||
rv = lookAndFeel->GetMetric(nsILookAndFeel::eMetric_WindowsClassic, metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("windows-classic"));
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::windows_classic);
|
||||
}
|
||||
|
||||
rv = lookAndFeel->GetMetric(nsILookAndFeel::eMetric_TouchEnabled, metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("touch-enabled"));
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::touch_enabled);
|
||||
}
|
||||
|
||||
rv = lookAndFeel->GetMetric(nsILookAndFeel::eMetric_MaemoClassic, metricResult);
|
||||
if (NS_SUCCEEDED(rv) && metricResult) {
|
||||
sSystemMetrics->AppendElement(do_GetAtom("maemo-classic"));
|
||||
sSystemMetrics->AppendElement(nsGkAtoms::maemo_classic);
|
||||
}
|
||||
|
||||
return PR_TRUE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче