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

Side by Side Diff: Source/core/layout/LayoutThemeMac.mm

Issue 1251523003: Delete AuthorStyleInfo and move its data into ComputedStyle.RareNonInheritedData. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: update comment Created 5 years, 3 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
« no previous file with comments | « Source/core/layout/LayoutThemeMac.h ('k') | Source/core/style/AuthorStyleInfo.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 11 matching lines...) Expand all
22 #import "core/layout/LayoutThemeMac.h" 22 #import "core/layout/LayoutThemeMac.h"
23 23
24 #import "core/CSSValueKeywords.h" 24 #import "core/CSSValueKeywords.h"
25 #import "core/HTMLNames.h" 25 #import "core/HTMLNames.h"
26 #import "core/fileapi/FileList.h" 26 #import "core/fileapi/FileList.h"
27 #import "core/html/HTMLMeterElement.h" 27 #import "core/html/HTMLMeterElement.h"
28 #import "core/layout/LayoutMeter.h" 28 #import "core/layout/LayoutMeter.h"
29 #import "core/layout/LayoutProgress.h" 29 #import "core/layout/LayoutProgress.h"
30 #import "core/layout/LayoutView.h" 30 #import "core/layout/LayoutView.h"
31 #import "core/paint/MediaControlsPainter.h" 31 #import "core/paint/MediaControlsPainter.h"
32 #import "core/style/AuthorStyleInfo.h"
33 #import "core/style/ShadowList.h" 32 #import "core/style/ShadowList.h"
34 #import "platform/LayoutTestSupport.h" 33 #import "platform/LayoutTestSupport.h"
35 #import "platform/PlatformResourceLoader.h" 34 #import "platform/PlatformResourceLoader.h"
36 #import "platform/graphics/BitmapImage.h" 35 #import "platform/graphics/BitmapImage.h"
37 #import "platform/mac/ColorMac.h" 36 #import "platform/mac/ColorMac.h"
38 #import "platform/mac/LocalCurrentGraphicsContext.h" 37 #import "platform/mac/LocalCurrentGraphicsContext.h"
39 #import "platform/mac/ThemeMac.h" 38 #import "platform/mac/ThemeMac.h"
40 #import "platform/mac/VersionUtilMac.h" 39 #import "platform/mac/VersionUtilMac.h"
41 #import "platform/mac/WebCoreNSCellExtras.h" 40 #import "platform/mac/WebCoreNSCellExtras.h"
42 #import "platform/text/PlatformLocale.h" 41 #import "platform/text/PlatformLocale.h"
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 } 438 }
440 439
441 if (needsFallback) 440 if (needsFallback)
442 color = LayoutTheme::systemColor(cssValueId); 441 color = LayoutTheme::systemColor(cssValueId);
443 442
444 m_systemColorCache.set(cssValueId, color.rgb()); 443 m_systemColorCache.set(cssValueId, color.rgb());
445 444
446 return color; 445 return color;
447 } 446 }
448 447
449 bool LayoutThemeMac::isControlStyled(const ComputedStyle& style, const AuthorSty leInfo& authorStyle) const 448 bool LayoutThemeMac::isControlStyled(const ComputedStyle& style) const
450 { 449 {
451 if (style.appearance() == TextFieldPart || style.appearance() == TextAreaPar t) 450 if (style.appearance() == TextFieldPart || style.appearance() == TextAreaPar t)
452 return authorStyle.specifiesBorder() || style.boxShadow(); 451 return style.hasAuthorBorder() || style.boxShadow();
453 452
454 // FIXME: This is horrible, but there is not much else that can be done. 453 // FIXME: This is horrible, but there is not much else that can be done.
455 // Menu lists cannot draw properly when scaled. They can't really draw 454 // Menu lists cannot draw properly when scaled. They can't really draw
456 // properly when transformed either. We can't detect the transform case at 455 // properly when transformed either. We can't detect the transform case at
457 // style adjustment time so that will just have to stay broken. We can 456 // style adjustment time so that will just have to stay broken. We can
458 // however detect that we're zooming. If zooming is in effect we treat it 457 // however detect that we're zooming. If zooming is in effect we treat it
459 // like the control is styled. 458 // like the control is styled.
460 if (style.appearance() == MenulistPart && style.effectiveZoom() != 1.0f) 459 if (style.appearance() == MenulistPart && style.effectiveZoom() != 1.0f)
461 return true; 460 return true;
462 // FIXME: NSSearchFieldCell doesn't work well when scaled. 461 // FIXME: NSSearchFieldCell doesn't work well when scaled.
463 if (style.appearance() == SearchFieldPart && style.effectiveZoom() != 1) 462 if (style.appearance() == SearchFieldPart && style.effectiveZoom() != 1)
464 return true; 463 return true;
465 464
466 return LayoutTheme::isControlStyled(style, authorStyle); 465 return LayoutTheme::isControlStyled(style);
467 } 466 }
468 467
469 void LayoutThemeMac::addVisualOverflow(const LayoutObject& object, IntRect& rect ) 468 void LayoutThemeMac::addVisualOverflow(const LayoutObject& object, IntRect& rect )
470 { 469 {
471 ControlPart part = object.style()->appearance(); 470 ControlPart part = object.style()->appearance();
472 471
473 #if USE(NEW_THEME) 472 #if USE(NEW_THEME)
474 switch (part) { 473 switch (part) {
475 case CheckboxPart: 474 case CheckboxPart:
476 case RadioPart: 475 case RadioPart:
(...skipping 689 matching lines...) Expand 10 before | Expand all | Expand 10 after
1166 1165
1167 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const 1166 bool LayoutThemeMac::shouldUseFallbackTheme(const ComputedStyle& style) const
1168 { 1167 {
1169 ControlPart part = style.appearance(); 1168 ControlPart part = style.appearance();
1170 if (part == CheckboxPart || part == RadioPart) 1169 if (part == CheckboxPart || part == RadioPart)
1171 return style.effectiveZoom() != 1; 1170 return style.effectiveZoom() != 1;
1172 return false; 1171 return false;
1173 } 1172 }
1174 1173
1175 } // namespace blink 1174 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/layout/LayoutThemeMac.h ('k') | Source/core/style/AuthorStyleInfo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698