Title: [103863] trunk/Source/WebCore
- Revision
- 103863
- Author
- [email protected]
- Date
- 2011-12-31 15:41:55 -0800 (Sat, 31 Dec 2011)
Log Message
RenderThemeMac: Avoid double hash lookup in systemColor().
<http://webkit.org/b/75409>
Reviewed by Anders Carlsson.
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::systemColor):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (103862 => 103863)
--- trunk/Source/WebCore/ChangeLog 2011-12-31 23:39:46 UTC (rev 103862)
+++ trunk/Source/WebCore/ChangeLog 2011-12-31 23:41:55 UTC (rev 103863)
@@ -1,5 +1,15 @@
2012-01-01 Andreas Kling <[email protected]>
+ RenderThemeMac: Avoid double hash lookup in systemColor().
+ <http://webkit.org/b/75409>
+
+ Reviewed by Anders Carlsson.
+
+ * rendering/RenderThemeMac.mm:
+ (WebCore::RenderThemeMac::systemColor):
+
+2012-01-01 Andreas Kling <[email protected]>
+
CSSStyleSelector: Avoid double hash lookup in keyframeStylesForAnimation().
<http://webkit.org/b/75408>
Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (103862 => 103863)
--- trunk/Source/WebCore/rendering/RenderThemeMac.mm 2011-12-31 23:39:46 UTC (rev 103862)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm 2011-12-31 23:41:55 UTC (rev 103863)
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -355,9 +355,12 @@
Color RenderThemeMac::systemColor(int cssValueId) const
{
- if (m_systemColorCache.contains(cssValueId))
- return m_systemColorCache.get(cssValueId);
-
+ {
+ HashMap<int, RGBA32>::iterator it = m_systemColorCache.find(cssValueId);
+ if (it != m_systemColorCache.end())
+ return it->second;
+ }
+
Color color;
switch (cssValueId) {
case CSSValueActiveborder:
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes