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

Unified 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: Remove spurious comment Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: Source/core/layout/LayoutThemeMac.mm
diff --git a/Source/core/layout/LayoutThemeMac.mm b/Source/core/layout/LayoutThemeMac.mm
index f5086be000aa847a5bfb9724fca56b921f72c80f..5b783fa6f90e5aa173fcad712f3cf55bf4fabe34 100644
--- a/Source/core/layout/LayoutThemeMac.mm
+++ b/Source/core/layout/LayoutThemeMac.mm
@@ -29,7 +29,6 @@
#import "core/layout/LayoutProgress.h"
#import "core/layout/LayoutView.h"
#import "core/paint/MediaControlsPainter.h"
-#import "core/style/AuthorStyleInfo.h"
#import "core/style/ShadowList.h"
#import "platform/LayoutTestSupport.h"
#import "platform/PlatformResourceLoader.h"
@@ -438,10 +437,10 @@ Color LayoutThemeMac::systemColor(CSSValueID cssValueId) const
return color;
}
-bool LayoutThemeMac::isControlStyled(const ComputedStyle& style, const AuthorStyleInfo& authorStyle) const
+bool LayoutThemeMac::isControlStyled(const ComputedStyle& style) const
{
if (style.appearance() == TextFieldPart || style.appearance() == TextAreaPart)
- return authorStyle.specifiesBorder() || style.boxShadow();
+ return style.hasAuthorBorder() || style.boxShadow();
// FIXME: This is horrible, but there is not much else that can be done.
// Menu lists cannot draw properly when scaled. They can't really draw
@@ -455,7 +454,7 @@ bool LayoutThemeMac::isControlStyled(const ComputedStyle& style, const AuthorSty
if (style.appearance() == SearchFieldPart && style.effectiveZoom() != 1)
return true;
- return LayoutTheme::isControlStyled(style, authorStyle);
+ return LayoutTheme::isControlStyled(style);
}
void LayoutThemeMac::addVisualOverflow(const LayoutObject& object, IntRect& rect)
@@ -785,6 +784,8 @@ void LayoutThemeMac::adjustMenuListStyle(ComputedStyle& style, Element* e) const
// Set the foreground color to black or gray when we have the aqua look.
// Cast to RGB32 is to work around a compiler bug.
style.setColor(e && !e->isDisabledFormControl() ? static_cast<RGBA32>(Color::black) : Color::darkGray);
+ // The style is not cachable since it depends on the element type.
+ style.setUnique();
Timothy Loh 2015/07/29 03:37:08 We probably don't need to do this since the MPC is
meade_UTC10 2015/07/30 05:38:17 Removed
// Set the button's vertical size.
setSizeFromFont(style, menuListButtonSizes());

Powered by Google App Engine
This is Rietveld 408576698