<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[166669] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/166669">166669</a></dd>
<dt>Author</dt> <dd>dino@apple.com</dd>
<dt>Date</dt> <dd>2014-04-02 14:42:30 -0700 (Wed, 02 Apr 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Load Media Controls js/css from bundle
https://bugs.webkit.org/show_bug.cgi?id=131086

Reviewed by Eric Carlson.

Source/WebCore:

Rather than embed encoded versions of the JS and CSS files
into C++ source, just load the files directly from the bundle.

* DerivedSources.make: Removed now unnecessary rules.
* WebCore.xcodeproj/project.pbxproj: Copy mediaControls files to the bundle.
* rendering/RenderThemeIOS.h:
* rendering/RenderThemeIOS.mm:
(WebCore::RenderThemeIOS::RenderThemeIOS):
(WebCore::RenderThemeIOS::mediaControlsStyleSheet): Load from the bundle.
(WebCore::RenderThemeIOS::mediaControlsScript): Ditto.
* rendering/RenderThemeMac.h:
* rendering/RenderThemeMac.mm:
(WebCore::RenderThemeMac::RenderThemeMac):
(WebCore::RenderThemeMac::mediaControlsStyleSheet):
(WebCore::RenderThemeMac::mediaControlsScript):

Tools:

We're now putting CSS files into the bundle, so remove the test for them.

* Scripts/check-for-inappropriate-files-in-framework:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreDerivedSourcesmake">trunk/Source/WebCore/DerivedSources.make</a></li>
<li><a href="#trunkSourceWebCoreWebCorexcodeprojprojectpbxproj">trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeIOSh">trunk/Source/WebCore/rendering/RenderThemeIOS.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeIOSmm">trunk/Source/WebCore/rendering/RenderThemeIOS.mm</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMach">trunk/Source/WebCore/rendering/RenderThemeMac.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderThemeMacmm">trunk/Source/WebCore/rendering/RenderThemeMac.mm</a></li>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptscheckforinappropriatefilesinframework">trunk/Tools/Scripts/check-for-inappropriate-files-in-framework</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (166668 => 166669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-04-02 21:40:26 UTC (rev 166668)
+++ trunk/Source/WebCore/ChangeLog        2014-04-02 21:42:30 UTC (rev 166669)
</span><span class="lines">@@ -1,3 +1,26 @@
</span><ins>+2014-04-01  Dean Jackson  &lt;dino@apple.com&gt;
+
+        Load Media Controls js/css from bundle
+        https://bugs.webkit.org/show_bug.cgi?id=131086
+
+        Reviewed by Eric Carlson.
+
+        Rather than embed encoded versions of the JS and CSS files
+        into C++ source, just load the files directly from the bundle.
+
+        * DerivedSources.make: Removed now unnecessary rules.
+        * WebCore.xcodeproj/project.pbxproj: Copy mediaControls files to the bundle.
+        * rendering/RenderThemeIOS.h:
+        * rendering/RenderThemeIOS.mm:
+        (WebCore::RenderThemeIOS::RenderThemeIOS):
+        (WebCore::RenderThemeIOS::mediaControlsStyleSheet): Load from the bundle.
+        (WebCore::RenderThemeIOS::mediaControlsScript): Ditto.
+        * rendering/RenderThemeMac.h:
+        * rendering/RenderThemeMac.mm:
+        (WebCore::RenderThemeMac::RenderThemeMac):
+        (WebCore::RenderThemeMac::mediaControlsStyleSheet):
+        (WebCore::RenderThemeMac::mediaControlsScript):
+
</ins><span class="cx"> 2014-04-02  Daniel Bates  &lt;dabates@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Move focus management API from HTMLDocument to Document
</span></span></pre></div>
<a id="trunkSourceWebCoreDerivedSourcesmake"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/DerivedSources.make (166668 => 166669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/DerivedSources.make        2014-04-02 21:40:26 UTC (rev 166668)
+++ trunk/Source/WebCore/DerivedSources.make        2014-04-02 21:42:30 UTC (rev 166669)
</span><span class="lines">@@ -882,13 +882,6 @@
</span><span class="cx">     USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/fullscreen.css
</span><span class="cx"> endif
</span><span class="cx"> 
</span><del>-ifeq ($(findstring ENABLE_MEDIA_CONTROLS_SCRIPT,$(FEATURE_DEFINES)), ENABLE_MEDIA_CONTROLS_SCRIPT)
-        USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/Modules/mediacontrols/mediaControlsApple.css
-ifeq ($(WTF_PLATFORM_IOS), 1)
-    USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/Modules/mediacontrols/mediaControlsiOS.css
-endif
-endif
-
</del><span class="cx"> ifeq ($(findstring ENABLE_IMAGE_CONTROLS,$(FEATURE_DEFINES)), ENABLE_IMAGE_CONTROLS)
</span><span class="cx">         USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/html/shadow/mac/imageControlsMac.css
</span><span class="cx"> endif
</span><span class="lines">@@ -906,13 +899,6 @@
</span><span class="cx"> 
</span><span class="cx"> USER_AGENT_SCRIPTS = 
</span><span class="cx"> 
</span><del>-ifeq ($(findstring ENABLE_MEDIA_CONTROLS_SCRIPT,$(FEATURE_DEFINES)), ENABLE_MEDIA_CONTROLS_SCRIPT)
-        USER_AGENT_SCRIPTS := $(USER_AGENT_SCRIPTS) $(WebCore)/Modules/mediacontrols/mediaControlsApple.js
-ifeq ($(WTF_PLATFORM_IOS), 1)
-        USER_AGENT_SCRIPTS := $(USER_AGENT_SCRIPTS) $(WebCore)/Modules/mediacontrols/mediaControlsiOS.js
-endif
-endif
-
</del><span class="cx"> ifeq ($(OS),MACOS)
</span><span class="cx">         USER_AGENT_SCRIPTS := $(USER_AGENT_SCRIPTS) $(WebCore)/Modules/plugins/QuickTimePluginReplacement.js
</span><span class="cx"> endif
</span></span></pre></div>
<a id="trunkSourceWebCoreWebCorexcodeprojprojectpbxproj"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (166668 => 166669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-04-02 21:40:26 UTC (rev 166668)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj        2014-04-02 21:42:30 UTC (rev 166669)
</span><span class="lines">@@ -1152,6 +1152,10 @@
</span><span class="cx">                 31078CC81880AABB008099DC /* OESTextureHalfFloatLinear.h in Headers */ = {isa = PBXBuildFile; fileRef = 31078CC31880A6A6008099DC /* OESTextureHalfFloatLinear.h */; };
</span><span class="cx">                 31078CC91880AAC9008099DC /* JSOESTextureHalfFloatLinear.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31078CC51880AAAA008099DC /* JSOESTextureHalfFloatLinear.cpp */; };
</span><span class="cx">                 31078CCA1880AACE008099DC /* JSOESTextureHalfFloatLinear.h in Headers */ = {isa = PBXBuildFile; fileRef = 31078CC61880AAAA008099DC /* JSOESTextureHalfFloatLinear.h */; };
</span><ins>+                311C08BD18EB7CAF00B65615 /* mediaControlsApple.css in Resources */ = {isa = PBXBuildFile; fileRef = CDC1DD4117CC2C48008CB55D /* mediaControlsApple.css */; };
+                311C08BE18EB7CAF00B65615 /* mediaControlsApple.js in Resources */ = {isa = PBXBuildFile; fileRef = CDE6560E17CA6E7600526BA7 /* mediaControlsApple.js */; };
+                311C08BF18EB7CAF00B65615 /* mediaControlsiOS.css in Resources */ = {isa = PBXBuildFile; fileRef = CDAAF45D1869094E003C1717 /* mediaControlsiOS.css */; };
+                311C08C018EB7CAF00B65615 /* mediaControlsiOS.js in Resources */ = {isa = PBXBuildFile; fileRef = CD32A189184EB46A0029B1BB /* mediaControlsiOS.js */; };
</ins><span class="cx">                 31288E720E3005D6003619AE /* WebKitCSSKeyframeRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31288E6E0E3005D6003619AE /* WebKitCSSKeyframeRule.cpp */; };
</span><span class="cx">                 31288E730E3005D6003619AE /* WebKitCSSKeyframeRule.h in Headers */ = {isa = PBXBuildFile; fileRef = 31288E6F0E3005D6003619AE /* WebKitCSSKeyframeRule.h */; };
</span><span class="cx">                 31288E740E3005D6003619AE /* WebKitCSSKeyframesRule.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31288E700E3005D6003619AE /* WebKitCSSKeyframesRule.cpp */; };
</span><span class="lines">@@ -26425,6 +26429,10 @@
</span><span class="cx">                                 2D9F0E1314FF1CBF00BA0FF7 /* linearSRGB.icc in Resources */,
</span><span class="cx">                                 85136C9C0AED665900F90A3D /* linkCursor.png in Resources */,
</span><span class="cx">                                 BCAD180A131C7A0D00990406 /* Localizable.strings in Resources */,
</span><ins>+                                311C08BD18EB7CAF00B65615 /* mediaControlsApple.css in Resources */,
+                                311C08BE18EB7CAF00B65615 /* mediaControlsApple.js in Resources */,
+                                311C08BF18EB7CAF00B65615 /* mediaControlsiOS.css in Resources */,
+                                311C08C018EB7CAF00B65615 /* mediaControlsiOS.js in Resources */,
</ins><span class="cx">                                 93153BE214195A5700FCF5BE /* missingImage.png in Resources */,
</span><span class="cx">                                 93153BDA14181F7A00FCF5BE /* missingImage@2x.png in Resources */,
</span><span class="cx">                                 85136C9D0AED665900F90A3D /* moveCursor.png in Resources */,
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeIOSh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.h (166668 => 166669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeIOS.h        2014-04-02 21:40:26 UTC (rev 166668)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.h        2014-04-02 21:42:30 UTC (rev 166669)
</span><span class="lines">@@ -116,6 +116,11 @@
</span><span class="cx"> 
</span><span class="cx">     const Color&amp; shadowColor() const;
</span><span class="cx">     FloatRect addRoundedBorderClip(RenderObject* box, GraphicsContext*, const IntRect&amp;);
</span><ins>+
+    String m_mediaControlsScript;
+    String m_mediaControlsStyleSheet;
+    bool m_mediaControlsScriptLoaded;
+    bool m_mediaControlsStyleSheetLoaded;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeIOSmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeIOS.mm (166668 => 166669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2014-04-02 21:40:26 UTC (rev 166668)
+++ trunk/Source/WebCore/rendering/RenderThemeIOS.mm        2014-04-02 21:42:30 UTC (rev 166669)
</span><span class="lines">@@ -76,6 +76,12 @@
</span><span class="cx"> SOFT_LINK_CONSTANT(UIKit, UIContentSizeCategoryDidChangeNotification, CFStringRef)
</span><span class="cx"> #define UIContentSizeCategoryDidChangeNotification getUIContentSizeCategoryDidChangeNotification()
</span><span class="cx"> 
</span><ins>+@interface WebCoreRenderThemeBundle : NSObject
+@end
+
+@implementation WebCoreRenderThemeBundle
+@end
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> const float ControlBaseHeight = 20;
</span><span class="lines">@@ -276,6 +282,8 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RenderThemeIOS::RenderThemeIOS()
</span><ins>+    : m_mediaControlsScriptLoaded(false)
+    , m_mediaControlsStyleSheetLoaded(false)
</ins><span class="cx"> {
</span><span class="cx">     CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, contentSizeCategoryDidChange, UIContentSizeCategoryDidChangeNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately);
</span><span class="cx"> }
</span><span class="lines">@@ -1197,7 +1205,11 @@
</span><span class="cx"> String RenderThemeIOS::mediaControlsStyleSheet()
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(MEDIA_CONTROLS_SCRIPT)
</span><del>-    return String(mediaControlsiOSUserAgentStyleSheet, sizeof(mediaControlsiOSUserAgentStyleSheet));
</del><ins>+    if (!m_mediaControlsStyleSheetLoaded) {
+        m_mediaControlsStyleSheet = [NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@&quot;mediaControlsiOS&quot; ofType:@&quot;css&quot;] encoding:NSUTF8StringEncoding error:nil];
+        m_mediaControlsStyleSheetLoaded = true;
+    }
+    return m_mediaControlsStyleSheet;
</ins><span class="cx"> #else
</span><span class="cx">     return emptyString();
</span><span class="cx"> #endif
</span><span class="lines">@@ -1206,10 +1218,14 @@
</span><span class="cx"> String RenderThemeIOS::mediaControlsScript()
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(MEDIA_CONTROLS_SCRIPT)
</span><del>-    StringBuilder scriptBuilder;
-    scriptBuilder.append(mediaControlsAppleJavaScript, sizeof(mediaControlsAppleJavaScript));
-    scriptBuilder.append(mediaControlsiOSJavaScript, sizeof(mediaControlsiOSJavaScript));
-    return scriptBuilder.toString();
</del><ins>+    if (!m_mediaControlsScriptLoaded) {
+        StringBuilder scriptBuilder;
+        scriptBuilder.append([NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@&quot;mediaControlsApple&quot; ofType:@&quot;js&quot;] encoding:NSUTF8StringEncoding error:nil]);
+        scriptBuilder.append([NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@&quot;mediaControlsiOS&quot; ofType:@&quot;js&quot;] encoding:NSUTF8StringEncoding error:nil]);
+        m_mediaControlsScript = scriptBuilder.toString();
+        m_mediaControlsScriptLoaded = true;
+    }
+    return m_mediaControlsScript;
</ins><span class="cx"> #else
</span><span class="cx">     return emptyString();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMach"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.h (166668 => 166669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.h        2014-04-02 21:40:26 UTC (rev 166668)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.h        2014-04-02 21:42:30 UTC (rev 166669)
</span><span class="lines">@@ -248,6 +248,11 @@
</span><span class="cx">     mutable HashMap&lt;int, RGBA32&gt; m_systemColorCache;
</span><span class="cx"> 
</span><span class="cx">     RetainPtr&lt;WebCoreRenderThemeNotificationObserver&gt; m_notificationObserver;
</span><ins>+
+    String m_mediaControlsScript;
+    String m_mediaControlsStyleSheet;
+    bool m_mediaControlsScriptLoaded;
+    bool m_mediaControlsStyleSheetLoaded;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderThemeMacmm"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderThemeMac.mm (166668 => 166669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderThemeMac.mm        2014-04-02 21:40:26 UTC (rev 166668)
+++ trunk/Source/WebCore/rendering/RenderThemeMac.mm        2014-04-02 21:42:30 UTC (rev 166669)
</span><span class="lines">@@ -165,6 +165,12 @@
</span><span class="cx"> }
</span><span class="cx"> @end
</span><span class="cx"> 
</span><ins>+@interface WebCoreRenderThemeBundle : NSObject
+@end
+
+@implementation WebCoreRenderThemeBundle
+@end
+
</ins><span class="cx"> namespace WebCore {
</span><span class="cx"> 
</span><span class="cx"> using namespace HTMLNames;
</span><span class="lines">@@ -198,6 +204,8 @@
</span><span class="cx">     : m_isSliderThumbHorizontalPressed(false)
</span><span class="cx">     , m_isSliderThumbVerticalPressed(false)
</span><span class="cx">     , m_notificationObserver(adoptNS([[WebCoreRenderThemeNotificationObserver alloc] initWithTheme:this]))
</span><ins>+    , m_mediaControlsScriptLoaded(false)
+    , m_mediaControlsStyleSheetLoaded(false)
</ins><span class="cx"> {
</span><span class="cx">     [[NSNotificationCenter defaultCenter] addObserver:m_notificationObserver.get()
</span><span class="cx">                                                         selector:@selector(systemColorsDidChange:)
</span><span class="lines">@@ -220,7 +228,11 @@
</span><span class="cx"> String RenderThemeMac::mediaControlsStyleSheet()
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(MEDIA_CONTROLS_SCRIPT)
</span><del>-    return String(mediaControlsAppleUserAgentStyleSheet, sizeof(mediaControlsAppleUserAgentStyleSheet));
</del><ins>+    if (!m_mediaControlsStyleSheetLoaded) {
+        m_mediaControlsStyleSheet = [NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@&quot;mediaControlsApple&quot; ofType:@&quot;css&quot;] encoding:NSUTF8StringEncoding error:nil];
+        m_mediaControlsStyleSheetLoaded = true;
+    }
+    return m_mediaControlsStyleSheet;
</ins><span class="cx"> #else
</span><span class="cx">     return emptyString();
</span><span class="cx"> #endif
</span><span class="lines">@@ -229,7 +241,11 @@
</span><span class="cx"> String RenderThemeMac::mediaControlsScript()
</span><span class="cx"> {
</span><span class="cx"> #if ENABLE(MEDIA_CONTROLS_SCRIPT)
</span><del>-    return String(mediaControlsAppleJavaScript, sizeof(mediaControlsAppleJavaScript));
</del><ins>+    if (!m_mediaControlsScriptLoaded) {
+        m_mediaControlsScript = [NSString stringWithContentsOfFile:[[NSBundle bundleForClass:[WebCoreRenderThemeBundle class]] pathForResource:@&quot;mediaControlsApple&quot; ofType:@&quot;js&quot;] encoding:NSUTF8StringEncoding error:nil];
+        m_mediaControlsScriptLoaded = true;
+    }
+    return m_mediaControlsScript;
</ins><span class="cx"> #else
</span><span class="cx">     return emptyString();
</span><span class="cx"> #endif
</span></span></pre></div>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (166668 => 166669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2014-04-02 21:40:26 UTC (rev 166668)
+++ trunk/Tools/ChangeLog        2014-04-02 21:42:30 UTC (rev 166669)
</span><span class="lines">@@ -1,3 +1,14 @@
</span><ins>+2014-04-01  Dean Jackson  &lt;dino@apple.com&gt;
+
+        Load Media Controls js/css from bundle
+        https://bugs.webkit.org/show_bug.cgi?id=131086
+
+        Reviewed by Eric Carlson.
+
+        We're now putting CSS files into the bundle, so remove the test for them.
+
+        * Scripts/check-for-inappropriate-files-in-framework:
+
</ins><span class="cx"> 2014-04-02  Martin Hock  &lt;mhock@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Unify private browsing with sessions.
</span></span></pre></div>
<a id="trunkToolsScriptscheckforinappropriatefilesinframework"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/check-for-inappropriate-files-in-framework (166668 => 166669)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/check-for-inappropriate-files-in-framework        2014-04-02 21:40:26 UTC (rev 166668)
+++ trunk/Tools/Scripts/check-for-inappropriate-files-in-framework        2014-04-02 21:42:30 UTC (rev 166669)
</span><span class="lines">@@ -27,7 +27,7 @@
</span><span class="cx"> project_name = ENV['PROJECT_NAME'] or throw &quot;Unable to find PROJECT_NAME in the environment!&quot;
</span><span class="cx"> is_shallow_bundle = (ENV['SHALLOW_BUNDLE'] || &quot;NO&quot;).upcase == &quot;YES&quot;
</span><span class="cx"> 
</span><del>-$INAPPROPRIATE_FILES = { &quot;WebCore&quot; =&gt; { &quot;Resources&quot; =&gt; [&quot;*.css&quot;, &quot;*.in&quot;, &quot;*.idl&quot;, &quot;*.h&quot;] },
</del><ins>+$INAPPROPRIATE_FILES = { &quot;WebCore&quot; =&gt; { &quot;Resources&quot; =&gt; [&quot;*.in&quot;, &quot;*.idl&quot;, &quot;*.h&quot;] },
</ins><span class="cx">                          &quot;WebKit2&quot; =&gt; { &quot;Resources&quot; =&gt; [&quot;*.in&quot;, &quot;*.h&quot;] },
</span><span class="cx">                        }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>