зеркало из https://github.com/mozilla/gecko-dev.git
Merge m-c to inbound.
This commit is contained in:
Коммит
5079ebb23d
|
@ -61,9 +61,7 @@ function test()
|
||||||
|
|
||||||
executeSoon(function () {
|
executeSoon(function () {
|
||||||
var win = gBrowser.replaceTabWithWindow(t);
|
var win = gBrowser.replaceTabWithWindow(t);
|
||||||
win.addEventListener("load", function () {
|
whenDelayedStartupFinished(win, function () {
|
||||||
win.removeEventListener("load", arguments.callee, true);
|
|
||||||
|
|
||||||
// Verify that the original window now only has the initial tab left in it.
|
// Verify that the original window now only has the initial tab left in it.
|
||||||
is(gBrowser.tabs[0], tabs[0], "tab0");
|
is(gBrowser.tabs[0], tabs[0], "tab0");
|
||||||
is(gBrowser.getBrowserForTab(gBrowser.tabs[0]).contentWindow.location, "about:blank", "tab0 uri");
|
is(gBrowser.getBrowserForTab(gBrowser.tabs[0]).contentWindow.location, "about:blank", "tab0 uri");
|
||||||
|
@ -82,7 +80,7 @@ function test()
|
||||||
}, false);
|
}, false);
|
||||||
win.gBrowser.goBack();
|
win.gBrowser.goBack();
|
||||||
});
|
});
|
||||||
}, true);
|
});
|
||||||
});
|
});
|
||||||
}, true);
|
}, true);
|
||||||
b.loadURI("about:blank");
|
b.loadURI("about:blank");
|
||||||
|
@ -111,10 +109,10 @@ function test()
|
||||||
gBrowser.getBrowserForTab(tabs[i]).addEventListener("load", fn(waitForLoad,i), true);
|
gBrowser.getBrowserForTab(tabs[i]).addEventListener("load", fn(waitForLoad,i), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
setLocation(1, "data:text/html,<title>tab1</title><body>tab1<iframe>");
|
setLocation(1, "data:text/html;charset=utf-8,<title>tab1</title><body>tab1<iframe>");
|
||||||
setLocation(2, "data:text/plain,tab2");
|
setLocation(2, "data:text/plain;charset=utf-8,tab2");
|
||||||
setLocation(3, "data:text/html,<title>tab3</title><body>tab3<iframe>");
|
setLocation(3, "data:text/html;charset=utf-8,<title>tab3</title><body>tab3<iframe>");
|
||||||
setLocation(4, "data:text/html,<body onload='clicks=0' onclick='++clicks'>"+embed);
|
setLocation(4, "data:text/html;charset=utf-8,<body onload='clicks=0' onclick='++clicks'>"+embed);
|
||||||
gBrowser.selectedTab = tabs[3];
|
gBrowser.selectedTab = tabs[3];
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -124,11 +124,14 @@ var tests = {
|
||||||
let numIcons = Object.keys(Social.provider.ambientNotificationIcons).length;
|
let numIcons = Object.keys(Social.provider.ambientNotificationIcons).length;
|
||||||
ok(numIcons == 3, "prevent adding more than 3 ambient notification icons");
|
ok(numIcons == 3, "prevent adding more than 3 ambient notification icons");
|
||||||
|
|
||||||
let statusIcon = document.getElementById("social-provider-button").nextSibling;
|
let mButton = document.getElementById("social-mark-button");
|
||||||
|
let pButton = document.getElementById("social-provider-button");
|
||||||
waitForCondition(function() {
|
waitForCondition(function() {
|
||||||
statusIcon = document.getElementById("social-provider-button").nextSibling;
|
// wait for a new button to be inserted inbetween the provider and mark
|
||||||
return !!statusIcon;
|
// button
|
||||||
|
return pButton.nextSibling != mButton;
|
||||||
}, function () {
|
}, function () {
|
||||||
|
let statusIcon = pButton.nextSibling;
|
||||||
let badge = statusIcon.getAttribute("badge");
|
let badge = statusIcon.getAttribute("badge");
|
||||||
is(badge, "42", "status value is correct");
|
is(badge, "42", "status value is correct");
|
||||||
// If there is a counter, the aria-label should reflect it.
|
// If there is a counter, the aria-label should reflect it.
|
||||||
|
@ -136,6 +139,7 @@ var tests = {
|
||||||
|
|
||||||
ambience.counter = 0;
|
ambience.counter = 0;
|
||||||
Social.provider.setAmbientNotification(ambience);
|
Social.provider.setAmbientNotification(ambience);
|
||||||
|
statusIcon = pButton.nextSibling;
|
||||||
badge = statusIcon.getAttribute("badge");
|
badge = statusIcon.getAttribute("badge");
|
||||||
is(badge, "", "status value is correct");
|
is(badge, "", "status value is correct");
|
||||||
// If there is no counter, the aria-label should be the same as the label
|
// If there is no counter, the aria-label should be the same as the label
|
||||||
|
|
|
@ -2781,6 +2781,8 @@ let SessionStoreInternal = {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TelemetryStopwatch.start("FX_SESSION_RESTORE_RESTORE_WINDOW_MS");
|
||||||
|
|
||||||
// We're not returning from this before we end up calling restoreHistoryPrecursor
|
// We're not returning from this before we end up calling restoreHistoryPrecursor
|
||||||
// for this window, so make sure we send the SSWindowStateBusy event.
|
// for this window, so make sure we send the SSWindowStateBusy event.
|
||||||
this._setWindowStateBusy(aWindow);
|
this._setWindowStateBusy(aWindow);
|
||||||
|
@ -2933,6 +2935,8 @@ let SessionStoreInternal = {
|
||||||
// set smoothScroll back to the original value
|
// set smoothScroll back to the original value
|
||||||
tabstrip.smoothScroll = smoothScroll;
|
tabstrip.smoothScroll = smoothScroll;
|
||||||
|
|
||||||
|
TelemetryStopwatch.finish("FX_SESSION_RESTORE_RESTORE_WINDOW_MS");
|
||||||
|
|
||||||
this._sendRestoreCompletedNotifications();
|
this._sendRestoreCompletedNotifications();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -488,7 +488,7 @@ class Automation(object):
|
||||||
ldLibraryPath = ldLibraryPath + ":" + env[envVar]
|
ldLibraryPath = ldLibraryPath + ":" + env[envVar]
|
||||||
env[envVar] = ldLibraryPath
|
env[envVar] = ldLibraryPath
|
||||||
elif self.IS_WIN32:
|
elif self.IS_WIN32:
|
||||||
env["PATH"] = env["PATH"] + ";" + ldLibraryPath
|
env["PATH"] = env["PATH"] + ";" + str(ldLibraryPath)
|
||||||
|
|
||||||
if crashreporter:
|
if crashreporter:
|
||||||
env['MOZ_CRASHREPORTER_NO_REPORT'] = '1'
|
env['MOZ_CRASHREPORTER_NO_REPORT'] = '1'
|
||||||
|
|
|
@ -5289,7 +5289,7 @@ class CGJsonifierMethod(CGSpecializedMethod):
|
||||||
' return false;\n'
|
' return false;\n'
|
||||||
'}\n')
|
'}\n')
|
||||||
for m in self.descriptor.interface.members:
|
for m in self.descriptor.interface.members:
|
||||||
if m.isAttr() and not m.isStatic():
|
if m.isAttr() and not m.isStatic() and m.type.isSerializable():
|
||||||
ret += ('{ // scope for "temp"\n'
|
ret += ('{ // scope for "temp"\n'
|
||||||
' JS::Rooted<JS::Value> temp(cx);\n'
|
' JS::Rooted<JS::Value> temp(cx);\n'
|
||||||
' if (!get_%s(cx, obj, self, JSJitGetterCallArgs(&temp))) {\n'
|
' if (!get_%s(cx, obj, self, JSJitGetterCallArgs(&temp))) {\n'
|
||||||
|
|
|
@ -1339,6 +1339,9 @@ class IDLType(IDLObject):
|
||||||
# Should only call this on float types
|
# Should only call this on float types
|
||||||
assert self.isFloat()
|
assert self.isFloat()
|
||||||
|
|
||||||
|
def isSerializable(self):
|
||||||
|
return False
|
||||||
|
|
||||||
def tag(self):
|
def tag(self):
|
||||||
assert False # Override me!
|
assert False # Override me!
|
||||||
|
|
||||||
|
@ -1480,6 +1483,9 @@ class IDLNullableType(IDLType):
|
||||||
def isUnion(self):
|
def isUnion(self):
|
||||||
return self.inner.isUnion()
|
return self.inner.isUnion()
|
||||||
|
|
||||||
|
def isSerializable(self):
|
||||||
|
return self.inner.isSerializable()
|
||||||
|
|
||||||
def tag(self):
|
def tag(self):
|
||||||
return self.inner.tag()
|
return self.inner.tag()
|
||||||
|
|
||||||
|
@ -1565,6 +1571,9 @@ class IDLSequenceType(IDLType):
|
||||||
def isEnum(self):
|
def isEnum(self):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
def isSerializable(self):
|
||||||
|
return self.inner.isSerializable()
|
||||||
|
|
||||||
def includesRestrictedFloat(self):
|
def includesRestrictedFloat(self):
|
||||||
return self.inner.includesRestrictedFloat()
|
return self.inner.includesRestrictedFloat()
|
||||||
|
|
||||||
|
@ -1614,6 +1623,9 @@ class IDLUnionType(IDLType):
|
||||||
def isUnion(self):
|
def isUnion(self):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
def isSerializable(self):
|
||||||
|
return all(m.isSerializable() for m in self.memberTypes)
|
||||||
|
|
||||||
def includesRestrictedFloat(self):
|
def includesRestrictedFloat(self):
|
||||||
return any(t.includesRestrictedFloat() for t in self.memberTypes)
|
return any(t.includesRestrictedFloat() for t in self.memberTypes)
|
||||||
|
|
||||||
|
@ -1950,6 +1962,19 @@ class IDLWrapperType(IDLType):
|
||||||
def isEnum(self):
|
def isEnum(self):
|
||||||
return isinstance(self.inner, IDLEnum)
|
return isinstance(self.inner, IDLEnum)
|
||||||
|
|
||||||
|
def isSerializable(self):
|
||||||
|
if self.isInterface():
|
||||||
|
if self.inner.isExternal():
|
||||||
|
return False
|
||||||
|
return any(m.isMethod() and m.isJsonifier() for m in self.inner.members)
|
||||||
|
elif self.isEnum():
|
||||||
|
return True
|
||||||
|
elif self.isDictionary():
|
||||||
|
return all(m.isSerializable() for m in self.inner.members)
|
||||||
|
else:
|
||||||
|
raise WebIDLError("IDLWrapperType wraps type %s that we don't know if "
|
||||||
|
"is serializable" % type(self.inner), [self.location])
|
||||||
|
|
||||||
def resolveType(self, parentScope):
|
def resolveType(self, parentScope):
|
||||||
assert isinstance(parentScope, IDLScope)
|
assert isinstance(parentScope, IDLScope)
|
||||||
self.inner.resolve(parentScope)
|
self.inner.resolve(parentScope)
|
||||||
|
@ -2154,6 +2179,9 @@ class IDLBuiltinType(IDLType):
|
||||||
return self._typeTag == IDLBuiltinType.Types.unrestricted_float or \
|
return self._typeTag == IDLBuiltinType.Types.unrestricted_float or \
|
||||||
self._typeTag == IDLBuiltinType.Types.unrestricted_double
|
self._typeTag == IDLBuiltinType.Types.unrestricted_double
|
||||||
|
|
||||||
|
def isSerializable(self):
|
||||||
|
return self.isPrimitive() or self.isDOMString() or self.isDate()
|
||||||
|
|
||||||
def includesRestrictedFloat(self):
|
def includesRestrictedFloat(self):
|
||||||
return self.isFloat() and not self.isUnrestricted()
|
return self.isFloat() and not self.isUnrestricted()
|
||||||
|
|
||||||
|
|
|
@ -618,6 +618,12 @@ public:
|
||||||
TestInterface* PutForwardsAttr();
|
TestInterface* PutForwardsAttr();
|
||||||
TestInterface* PutForwardsAttr2();
|
TestInterface* PutForwardsAttr2();
|
||||||
TestInterface* PutForwardsAttr3();
|
TestInterface* PutForwardsAttr3();
|
||||||
|
JS::Value JsonifierShouldSkipThis(JSContext*);
|
||||||
|
void SetJsonifierShouldSkipThis(JSContext*, JS::Rooted<JS::Value>&);
|
||||||
|
TestParentInterface* JsonifierShouldSkipThis2();
|
||||||
|
void SetJsonifierShouldSkipThis2(TestParentInterface&);
|
||||||
|
TestCallbackInterface* JsonifierShouldSkipThis3();
|
||||||
|
void SetJsonifierShouldSkipThis3(TestCallbackInterface&);
|
||||||
void ThrowingMethod(ErrorResult& aRv);
|
void ThrowingMethod(ErrorResult& aRv);
|
||||||
bool GetThrowingAttr(ErrorResult& aRv) const;
|
bool GetThrowingAttr(ErrorResult& aRv) const;
|
||||||
void SetThrowingAttr(bool arg, ErrorResult& aRv);
|
void SetThrowingAttr(bool arg, ErrorResult& aRv);
|
||||||
|
|
|
@ -602,6 +602,10 @@ interface TestInterface {
|
||||||
optional TestInterface? arg2 = null,
|
optional TestInterface? arg2 = null,
|
||||||
optional Dict arg3, optional double arg4 = 5.0,
|
optional Dict arg3, optional double arg4 = 5.0,
|
||||||
optional float arg5);
|
optional float arg5);
|
||||||
|
|
||||||
|
attribute any jsonifierShouldSkipThis;
|
||||||
|
attribute TestParentInterface jsonifierShouldSkipThis2;
|
||||||
|
attribute TestCallbackInterface jsonifierShouldSkipThis3;
|
||||||
jsonifier;
|
jsonifier;
|
||||||
|
|
||||||
// If you add things here, add them to TestExampleGen and TestJSImplGen as well
|
// If you add things here, add them to TestExampleGen and TestJSImplGen as well
|
||||||
|
|
|
@ -499,6 +499,9 @@ interface TestExampleInterface {
|
||||||
optional TestInterface? arg2 = null,
|
optional TestInterface? arg2 = null,
|
||||||
optional Dict arg3, optional double arg4 = 5.0,
|
optional Dict arg3, optional double arg4 = 5.0,
|
||||||
optional float arg5);
|
optional float arg5);
|
||||||
|
attribute any jsonifierShouldSkipThis;
|
||||||
|
attribute TestParentInterface jsonifierShouldSkipThis2;
|
||||||
|
attribute TestCallbackInterface jsonifierShouldSkipThis3;
|
||||||
jsonifier;
|
jsonifier;
|
||||||
|
|
||||||
// If you add things here, add them to TestCodeGen and TestJSImplGen as well
|
// If you add things here, add them to TestCodeGen and TestJSImplGen as well
|
||||||
|
|
|
@ -491,6 +491,9 @@ interface TestJSImplInterface {
|
||||||
optional TestInterface? arg2 = null,
|
optional TestInterface? arg2 = null,
|
||||||
optional Dict arg3, optional double arg4 = 5.0,
|
optional Dict arg3, optional double arg4 = 5.0,
|
||||||
optional float arg5);
|
optional float arg5);
|
||||||
|
attribute any jsonifierShouldSkipThis;
|
||||||
|
attribute TestParentInterface jsonifierShouldSkipThis2;
|
||||||
|
attribute TestCallbackInterface jsonifierShouldSkipThis3;
|
||||||
jsonifier;
|
jsonifier;
|
||||||
|
|
||||||
// If you add things here, add them to TestCodeGen as well
|
// If you add things here, add them to TestCodeGen as well
|
||||||
|
|
|
@ -69,7 +69,7 @@ class MochitestServer:
|
||||||
env["ASAN_OPTIONS"] = "quarantine_size=1:redzone=32"
|
env["ASAN_OPTIONS"] = "quarantine_size=1:redzone=32"
|
||||||
|
|
||||||
if mozinfo.isWin:
|
if mozinfo.isWin:
|
||||||
env["PATH"] = env["PATH"] + ";" + self._xrePath
|
env["PATH"] = env["PATH"] + ";" + str(self._xrePath)
|
||||||
|
|
||||||
args = ["-g", self._xrePath,
|
args = ["-g", self._xrePath,
|
||||||
"-v", "170",
|
"-v", "170",
|
||||||
|
|
|
@ -2545,6 +2545,13 @@
|
||||||
"extended_statistics_ok": true,
|
"extended_statistics_ok": true,
|
||||||
"description": "Session restore: Time to make a backup copy of the session file (ms)"
|
"description": "Session restore: Time to make a backup copy of the session file (ms)"
|
||||||
},
|
},
|
||||||
|
"FX_SESSION_RESTORE_RESTORE_WINDOW_MS": {
|
||||||
|
"kind": "exponential",
|
||||||
|
"high": "3000",
|
||||||
|
"n_buckets": 10,
|
||||||
|
"extended_statistics_ok": true,
|
||||||
|
"description": "Session restore: Time spent blocking the main thread while restoring a window state (ms)"
|
||||||
|
},
|
||||||
"INNERWINDOWS_WITH_MUTATION_LISTENERS": {
|
"INNERWINDOWS_WITH_MUTATION_LISTENERS": {
|
||||||
"kind": "boolean",
|
"kind": "boolean",
|
||||||
"description": "Deleted or to-be-reused innerwindow which has had mutation event listeners."
|
"description": "Deleted or to-be-reused innerwindow which has had mutation event listeners."
|
||||||
|
|
|
@ -1765,27 +1765,6 @@ moz_gtk_treeview_expander_paint(GdkDrawable* drawable, GdkRectangle* rect,
|
||||||
return MOZ_GTK_SUCCESS;
|
return MOZ_GTK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
static gint
|
|
||||||
moz_gtk_expander_paint(GdkDrawable* drawable, GdkRectangle* rect,
|
|
||||||
GdkRectangle* cliprect, GtkWidgetState* state,
|
|
||||||
GtkExpanderStyle expander_state,
|
|
||||||
GtkTextDirection direction)
|
|
||||||
{
|
|
||||||
GtkStyle *style;
|
|
||||||
GtkStateType state_type = ConvertGtkState(state);
|
|
||||||
|
|
||||||
ensure_expander_widget();
|
|
||||||
gtk_widget_set_direction(gExpanderWidget, direction);
|
|
||||||
|
|
||||||
style = gExpanderWidget->style;
|
|
||||||
|
|
||||||
TSOffsetStyleGCs(style, rect->x, rect->y);
|
|
||||||
gtk_paint_expander(style, drawable, state_type, cliprect, gExpanderWidget, "expander",
|
|
||||||
rect->x + rect->width / 2, rect->y + rect->height / 2, expander_state);
|
|
||||||
|
|
||||||
return MOZ_GTK_SUCCESS;
|
|
||||||
}
|
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
moz_gtk_combo_box_paint(GdkDrawable* drawable, GdkRectangle* rect,
|
moz_gtk_combo_box_paint(GdkDrawable* drawable, GdkRectangle* rect,
|
||||||
GdkRectangle* cliprect, GtkWidgetState* state,
|
GdkRectangle* cliprect, GtkWidgetState* state,
|
||||||
|
@ -2969,7 +2948,6 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
|
||||||
case MOZ_GTK_PROGRESS_CHUNK:
|
case MOZ_GTK_PROGRESS_CHUNK:
|
||||||
case MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE:
|
case MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE:
|
||||||
case MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE:
|
case MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE:
|
||||||
case MOZ_GTK_EXPANDER:
|
|
||||||
case MOZ_GTK_TREEVIEW_EXPANDER:
|
case MOZ_GTK_TREEVIEW_EXPANDER:
|
||||||
case MOZ_GTK_TOOLBAR_SEPARATOR:
|
case MOZ_GTK_TOOLBAR_SEPARATOR:
|
||||||
case MOZ_GTK_MENUSEPARATOR:
|
case MOZ_GTK_MENUSEPARATOR:
|
||||||
|
@ -3256,10 +3234,6 @@ moz_gtk_widget_paint(GtkThemeWidgetType widget, GdkDrawable* drawable,
|
||||||
return moz_gtk_treeview_expander_paint(drawable, rect, cliprect, state,
|
return moz_gtk_treeview_expander_paint(drawable, rect, cliprect, state,
|
||||||
(GtkExpanderStyle) flags, direction);
|
(GtkExpanderStyle) flags, direction);
|
||||||
break;
|
break;
|
||||||
case MOZ_GTK_EXPANDER:
|
|
||||||
return moz_gtk_expander_paint(drawable, rect, cliprect, state,
|
|
||||||
(GtkExpanderStyle) flags, direction);
|
|
||||||
break;
|
|
||||||
case MOZ_GTK_ENTRY:
|
case MOZ_GTK_ENTRY:
|
||||||
ensure_entry_widget();
|
ensure_entry_widget();
|
||||||
return moz_gtk_entry_paint(drawable, rect, cliprect, state,
|
return moz_gtk_entry_paint(drawable, rect, cliprect, state,
|
||||||
|
|
|
@ -1570,6 +1570,8 @@ moz_gtk_tree_header_sort_arrow_paint(cairo_t *cr, GdkRectangle* rect,
|
||||||
return MOZ_GTK_SUCCESS;
|
return MOZ_GTK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* See gtk_expander_paint() for reference.
|
||||||
|
*/
|
||||||
static gint
|
static gint
|
||||||
moz_gtk_treeview_expander_paint(cairo_t *cr, GdkRectangle* rect,
|
moz_gtk_treeview_expander_paint(cairo_t *cr, GdkRectangle* rect,
|
||||||
GtkWidgetState* state,
|
GtkWidgetState* state,
|
||||||
|
@ -1577,6 +1579,7 @@ moz_gtk_treeview_expander_paint(cairo_t *cr, GdkRectangle* rect,
|
||||||
GtkTextDirection direction)
|
GtkTextDirection direction)
|
||||||
{
|
{
|
||||||
GtkStyleContext *style;
|
GtkStyleContext *style;
|
||||||
|
GtkStateFlags state_flags;
|
||||||
|
|
||||||
ensure_tree_view_widget();
|
ensure_tree_view_widget();
|
||||||
gtk_widget_set_direction(gTreeViewWidget, direction);
|
gtk_widget_set_direction(gTreeViewWidget, direction);
|
||||||
|
@ -1584,34 +1587,25 @@ moz_gtk_treeview_expander_paint(cairo_t *cr, GdkRectangle* rect,
|
||||||
style = gtk_widget_get_style_context(gTreeViewWidget);
|
style = gtk_widget_get_style_context(gTreeViewWidget);
|
||||||
gtk_style_context_save(style);
|
gtk_style_context_save(style);
|
||||||
gtk_style_context_add_class(style, GTK_STYLE_CLASS_EXPANDER);
|
gtk_style_context_add_class(style, GTK_STYLE_CLASS_EXPANDER);
|
||||||
/* Because the frame we get is of the entire treeview, we can't get the precise
|
|
||||||
* event state of one expander, thus rendering hover and active feedback useless. */
|
state_flags = GetStateFlagsFromGtkWidgetState(state);
|
||||||
gtk_style_context_set_state(style, GetStateFlagsFromGtkWidgetState(state));
|
|
||||||
|
/* GTK_STATE_FLAG_ACTIVE controls expanded/colapsed state rendering
|
||||||
|
* in gtk_render_expander()
|
||||||
|
*/
|
||||||
|
if (expander_state == GTK_EXPANDER_EXPANDED)
|
||||||
|
state_flags |= GTK_STATE_FLAG_ACTIVE;
|
||||||
|
else
|
||||||
|
state_flags &= ~(GTK_STATE_FLAG_ACTIVE);
|
||||||
|
|
||||||
|
gtk_style_context_set_state(style, state_flags);
|
||||||
|
|
||||||
gtk_render_expander(style, cr,
|
gtk_render_expander(style, cr,
|
||||||
rect->x + rect->width / 2, rect->y + rect->height / 2,
|
rect->x,
|
||||||
rect->width, rect->height);
|
rect->y,
|
||||||
gtk_style_context_restore(style);
|
rect->width,
|
||||||
return MOZ_GTK_SUCCESS;
|
rect->height);
|
||||||
}
|
|
||||||
|
|
||||||
static gint
|
|
||||||
moz_gtk_expander_paint(cairo_t *cr, GdkRectangle* rect,
|
|
||||||
GtkWidgetState* state,
|
|
||||||
GtkExpanderStyle expander_state,
|
|
||||||
GtkTextDirection direction)
|
|
||||||
{
|
|
||||||
GtkStyleContext *style;
|
|
||||||
|
|
||||||
ensure_expander_widget();
|
|
||||||
gtk_widget_set_direction(gExpanderWidget, direction);
|
|
||||||
|
|
||||||
style = gtk_widget_get_style_context(gExpanderWidget);
|
|
||||||
gtk_style_context_save(style);
|
|
||||||
gtk_style_context_add_class(style, GTK_STYLE_CLASS_EXPANDER);
|
|
||||||
gtk_style_context_set_state(style, GetStateFlagsFromGtkWidgetState(state));
|
|
||||||
gtk_render_expander(style, cr,
|
|
||||||
rect->x + rect->width / 2, rect->y + rect->height / 2,
|
|
||||||
rect->width, rect->height);
|
|
||||||
gtk_style_context_restore(style);
|
gtk_style_context_restore(style);
|
||||||
return MOZ_GTK_SUCCESS;
|
return MOZ_GTK_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@ -2828,7 +2822,6 @@ moz_gtk_get_widget_border(GtkThemeWidgetType widget, gint* left, gint* top,
|
||||||
case MOZ_GTK_PROGRESS_CHUNK:
|
case MOZ_GTK_PROGRESS_CHUNK:
|
||||||
case MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE:
|
case MOZ_GTK_PROGRESS_CHUNK_INDETERMINATE:
|
||||||
case MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE:
|
case MOZ_GTK_PROGRESS_CHUNK_VERTICAL_INDETERMINATE:
|
||||||
case MOZ_GTK_EXPANDER:
|
|
||||||
case MOZ_GTK_TREEVIEW_EXPANDER:
|
case MOZ_GTK_TREEVIEW_EXPANDER:
|
||||||
case MOZ_GTK_TOOLBAR_SEPARATOR:
|
case MOZ_GTK_TOOLBAR_SEPARATOR:
|
||||||
case MOZ_GTK_MENUSEPARATOR:
|
case MOZ_GTK_MENUSEPARATOR:
|
||||||
|
@ -3134,10 +3127,6 @@ moz_gtk_widget_paint(GtkThemeWidgetType widget, cairo_t *cr,
|
||||||
return moz_gtk_treeview_expander_paint(cr, rect, state,
|
return moz_gtk_treeview_expander_paint(cr, rect, state,
|
||||||
(GtkExpanderStyle) flags, direction);
|
(GtkExpanderStyle) flags, direction);
|
||||||
break;
|
break;
|
||||||
case MOZ_GTK_EXPANDER:
|
|
||||||
return moz_gtk_expander_paint(cr, rect, state,
|
|
||||||
(GtkExpanderStyle) flags, direction);
|
|
||||||
break;
|
|
||||||
case MOZ_GTK_ENTRY:
|
case MOZ_GTK_ENTRY:
|
||||||
ensure_entry_widget();
|
ensure_entry_widget();
|
||||||
return moz_gtk_entry_paint(cr, rect, state,
|
return moz_gtk_entry_paint(cr, rect, state,
|
||||||
|
|
|
@ -161,8 +161,6 @@ typedef enum {
|
||||||
MOZ_GTK_TREE_HEADER_SORTARROW,
|
MOZ_GTK_TREE_HEADER_SORTARROW,
|
||||||
/* Paints an expander for a GtkTreeView */
|
/* Paints an expander for a GtkTreeView */
|
||||||
MOZ_GTK_TREEVIEW_EXPANDER,
|
MOZ_GTK_TREEVIEW_EXPANDER,
|
||||||
/* Paints a GtkExpander */
|
|
||||||
MOZ_GTK_EXPANDER,
|
|
||||||
/* Paints the background of the menu bar. */
|
/* Paints the background of the menu bar. */
|
||||||
MOZ_GTK_MENUBAR,
|
MOZ_GTK_MENUBAR,
|
||||||
/* Paints the background of menus, context menus. */
|
/* Paints the background of menus, context menus. */
|
||||||
|
|
Загрузка…
Ссылка в новой задаче