Title: [195177] trunk/Source/WebCore
- Revision
- 195177
- Author
- [email protected]
- Date
- 2016-01-16 16:00:43 -0800 (Sat, 16 Jan 2016)
Log Message
[GTK] Add a couple comments to ScrollbarThemeGtk
https://bugs.webkit.org/show_bug.cgi?id=153184
Reviewed by Carlos Garcia Campos.
* platform/gtk/ScrollbarThemeGtk.cpp:
(WebCore::ScrollbarThemeGtk::paint):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (195176 => 195177)
--- trunk/Source/WebCore/ChangeLog 2016-01-16 21:05:56 UTC (rev 195176)
+++ trunk/Source/WebCore/ChangeLog 2016-01-17 00:00:43 UTC (rev 195177)
@@ -1,3 +1,13 @@
+2016-01-16 Michael Catanzaro <[email protected]>
+
+ [GTK] Add a couple comments to ScrollbarThemeGtk
+ https://bugs.webkit.org/show_bug.cgi?id=153184
+
+ Reviewed by Carlos Garcia Campos.
+
+ * platform/gtk/ScrollbarThemeGtk.cpp:
+ (WebCore::ScrollbarThemeGtk::paint):
+
2016-01-16 Andreas Kling <[email protected]>
Give RuleSet a BumpArena and start using it for RuleDataVectors.
Modified: trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp (195176 => 195177)
--- trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp 2016-01-16 21:05:56 UTC (rev 195176)
+++ trunk/Source/WebCore/platform/gtk/ScrollbarThemeGtk.cpp 2016-01-17 00:00:43 UTC (rev 195177)
@@ -172,6 +172,9 @@
return orientation == VerticalScrollbar ? "vertical" : "horizontal";
}
+// The GtkStyleContext returned by this function is cached by ScrollbarThemeGtk::paint for the
+// duration of its scope, so a different GtkStyleContext with updated theme properties will be
+// used for each call to paint.
GRefPtr<GtkStyleContext> ScrollbarThemeGtk::getOrCreateStyleContext(ScrollbarOrientation orientation)
{
if (m_cachedStyleContext)
@@ -352,6 +355,7 @@
if (graphicsContext.paintingDisabled())
return false;
+ // Cache a new GtkStyleContext for the duration of this scope.
TemporaryChange<GRefPtr<GtkStyleContext>> tempStyleContext(m_cachedStyleContext, getOrCreateStyleContext(scrollbar.orientation()));
// Create the ScrollbarControlPartMask based on the damageRect
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes