Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: Source/core/rendering/RenderThemeChromiumMac.mm

Issue 338673002: Reduce the number of CachedUAStyles (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Return a create that somehow escaped Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2008, 2009 Google, Inc. 3 * Copyright (C) 2008, 2009 Google, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 492 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 } 503 }
504 504
505 if (needsFallback) 505 if (needsFallback)
506 color = RenderTheme::systemColor(cssValueId); 506 color = RenderTheme::systemColor(cssValueId);
507 507
508 m_systemColorCache.set(cssValueId, color.rgb()); 508 m_systemColorCache.set(cssValueId, color.rgb());
509 509
510 return color; 510 return color;
511 } 511 }
512 512
513 bool RenderThemeChromiumMac::isControlStyled(const RenderStyle* style, const Cac hedUAStyle& uaStyle) const 513 bool RenderThemeChromiumMac::isControlStyled(const RenderStyle* style, const Cac hedUAStyle* uaStyle) const
514 { 514 {
515 ASSERT(uaStyle);
515 if (style->appearance() == TextFieldPart || style->appearance() == TextAreaP art || style->appearance() == ListboxPart) 516 if (style->appearance() == TextFieldPart || style->appearance() == TextAreaP art || style->appearance() == ListboxPart)
516 return style->border() != uaStyle.border || style->boxShadow(); 517 return style->border() != uaStyle->border || style->boxShadow();
517 518
518 // FIXME: This is horrible, but there is not much else that can be done. Me nu lists cannot draw properly when 519 // FIXME: This is horrible, but there is not much else that can be done. Me nu lists cannot draw properly when
519 // scaled. They can't really draw properly when transformed either. We can 't detect the transform case at style 520 // scaled. They can't really draw properly when transformed either. We can 't detect the transform case at style
520 // adjustment time so that will just have to stay broken. We can however de tect that we're zooming. If zooming 521 // adjustment time so that will just have to stay broken. We can however de tect that we're zooming. If zooming
521 // is in effect we treat it like the control is styled. 522 // is in effect we treat it like the control is styled.
522 if (style->appearance() == MenulistPart && style->effectiveZoom() != 1.0f) 523 if (style->appearance() == MenulistPart && style->effectiveZoom() != 1.0f)
523 return true; 524 return true;
524 // FIXME: NSSearchFieldCell doesn't work well when scaled. 525 // FIXME: NSSearchFieldCell doesn't work well when scaled.
525 if (style->appearance() == SearchFieldPart && style->effectiveZoom() != 1) 526 if (style->appearance() == SearchFieldPart && style->effectiveZoom() != 1)
526 return true; 527 return true;
(...skipping 1377 matching lines...) Expand 10 before | Expand all | Expand 10 after
1904 1905
1905 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const 1906 bool RenderThemeChromiumMac::shouldUseFallbackTheme(RenderStyle* style) const
1906 { 1907 {
1907 ControlPart part = style->appearance(); 1908 ControlPart part = style->appearance();
1908 if (part == CheckboxPart || part == RadioPart) 1909 if (part == CheckboxPart || part == RadioPart)
1909 return style->effectiveZoom() != 1; 1910 return style->effectiveZoom() != 1;
1910 return false; 1911 return false;
1911 } 1912 }
1912 1913
1913 } // namespace WebCore 1914 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderThemeChromiumMac.h ('k') | Source/core/rendering/style/CachedUAStyle.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698