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

Unified Diff: Source/core/rendering/RenderThemeChromiumMac.mm

Issue 438843004: Move the user agent styles sheets to blink_resources.grd (Part 3) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 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/rendering/RenderThemeChromiumMac.mm
diff --git a/Source/core/rendering/RenderThemeChromiumMac.mm b/Source/core/rendering/RenderThemeChromiumMac.mm
index 5fe39acf8ad709f25340e6a776be2ccbb941dd70..14ec0fb688e45da3fecf1b4406c2fe71b5e994fd 100644
--- a/Source/core/rendering/RenderThemeChromiumMac.mm
+++ b/Source/core/rendering/RenderThemeChromiumMac.mm
@@ -23,7 +23,6 @@
#import "core/CSSValueKeywords.h"
#import "core/HTMLNames.h"
-#import "core/UserAgentStyleSheets.h"
#import "core/css/CSSValueList.h"
#import "core/dom/Document.h"
#import "core/dom/Element.h"
@@ -55,6 +54,8 @@
#import "platform/mac/WebCoreNSCellExtras.h"
#import "platform/text/PlatformLocale.h"
#import "platform/text/StringTruncator.h"
+#import "public/platform/Platform.h"
+#import "public/platform/WebData.h"
#import <AvailabilityMacros.h>
#import <Carbon/Carbon.h>
@@ -1860,10 +1861,19 @@ String RenderThemeChromiumMac::extraFullScreenStyleSheet()
String RenderThemeChromiumMac::extraDefaultStyleSheet()
{
- return RenderTheme::extraDefaultStyleSheet() +
- String(themeChromiumCss, sizeof(themeChromiumCss)) +
- String(themeInputMultipleFieldsCss, sizeof(themeInputMultipleFieldsCss)) +
- String(themeMacCss, sizeof(themeMacCss));
+ const WebData& themeChromiumCssResource = Platform::current()->loadResource("themeChromium.css");
+ String themeChromiumRules = themeChromiumCssResource.toASCIIString();
+ ASSERT(!themeChromiumRules.isEmpty());
+
+ const WebData& themeInputMultipleFieldsCssResource = Platform::current()->loadResource("themeInputMultipleFields.css");
+ String themeInputMultipleFieldsRules = themeInputMultipleFieldsCssResource.toASCIIString();
+ ASSERT(!themeInputMultipleFieldsRules.isEmpty());
+
+ const WebData& themeMacCssResource = Platform::current()->loadResource("themeMac.css");
+ String themeMacRules = themeMacCssResource.toASCIIString();
+ ASSERT(!themeMacRules.isEmpty());
+
+ return RenderTheme::extraDefaultStyleSheet() + themeChromiumRules + themeInputMultipleFieldsRules + themeMacRules;
}
bool RenderThemeChromiumMac::paintMediaVolumeSliderContainer(RenderObject* object, const PaintInfo& paintInfo, const IntRect& rect)

Powered by Google App Engine
This is Rietveld 408576698