Bug 131569 - [GTK] REGRESSION(167145): Many media tests fail
Summary: [GTK] REGRESSION(167145): Many media tests fail
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Martin Robinson
URL:
Keywords:
: 131568 131570 (view as bug list)
Depends on: 120956
Blocks: 131573
  Show dependency treegraph
 
Reported: 2014-04-11 16:02 PDT by Martin Robinson
Modified: 2014-04-11 16:55 PDT (History)
7 users (show)

See Also:


Attachments
Patch (2.13 KB, patch)
2014-04-11 16:05 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff
Patch (2.15 KB, patch)
2014-04-11 16:37 PDT, Martin Robinson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Robinson 2014-04-11 16:02:18 PDT
Looks like we need to pull in the localized string JavaScript file
Comment 1 Brent Fulgham 2014-04-11 16:04:53 PDT
*** Bug 131570 has been marked as a duplicate of this bug. ***
Comment 2 Martin Robinson 2014-04-11 16:05:33 PDT
Created attachment 229174 [details]
Patch
Comment 3 Brent Fulgham 2014-04-11 16:08:29 PDT
I think we need the following changes:

1. Pull in the JS with the strings in it:

--- platform/gtk/RenderThemeGtk.cpp    (revision 167146)
+++ platform/gtk/RenderThemeGtk.cpp    (working copy)
@@ -763,6 +763,7 @@
 String RenderThemeGtk::mediaControlsScript()
 {
     StringBuilder scriptBuilder;
+    scriptBuilder.append(mediaControlsLocalizedStringsJavaScript, sizeof(mediaControlsLocalizedStringsJavaScript));
     scriptBuilder.append(mediaControlsAppleJavaScript, sizeof(mediaControlsAppleJavaScript));
     scriptBuilder.append(mediaControlsGtkJavaScript, sizeof(mediaControlsGtkJavaScript));
     return scriptBuilder.toString();

2. Treat mediaControlsLocalizedStrings as a USER_AGENT_SCRIPT:

--- PlatformGTK.cmake    (revision 167146)
+++ PlatformGTK.cmake    (working copy)
@@ -259,6 +259,7 @@
 )

 set(WebCore_USER_AGENT_SCRIPTS
+    ${WEBCORE_DIR}/English.lproj/mediaControlsLocalizedStrings.js
     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsApple.js
     ${WEBCORE_DIR}/Modules/mediacontrols/mediaControlsGtk.js
 )

3. Make sure the mediaControlsLocalizedStrings.js file gets pulled into the UserAgentGeneratedScripts.cpp.
Comment 4 Brent Fulgham 2014-04-11 16:09:07 PDT
Comment on attachment 229174 [details]
Patch

Yes -- this looks like what I was thinking.  r+ once you confirm the bots are happy.
Comment 5 Martin Robinson 2014-04-11 16:37:47 PDT
Created attachment 229178 [details]
Patch
Comment 6 Xabier Rodríguez Calvar 2014-04-11 16:46:45 PDT
*** Bug 131568 has been marked as a duplicate of this bug. ***
Comment 7 Xabier Rodríguez Calvar 2014-04-11 16:48:45 PDT
Please, fix EFL too with a similar patch.
Comment 8 Martin Robinson 2014-04-11 16:49:57 PDT
Committed r167170: <http://trac.webkit.org/changeset/167170>