Title: [140863] trunk/Source
Revision
140863
Author
[email protected]
Date
2013-01-25 13:54:20 -0800 (Fri, 25 Jan 2013)

Log Message

Add a user agent stylesheet for plugins
https://bugs.webkit.org/show_bug.cgi?id=107890

Reviewed by Alexey Proskuryakov.

Source/WebCore:

As a step along the way to providing a Shadow DOM for plug-in elements, add a
User Agent stylesheet that is loaded when an embed or object element is
in the document. At the moment the stylesheet is empty.

The stylesheet can be overridden by the RenderTheme or the ChromeClient, allowing
ports to provide a custom appearance. This involved hooking up some virtual methods
on ChromeClient, the stubs of which are already implemented in WK2.
As a drive-by, since snapshotted plugins will need some localization I've also
exposed the ChromeClient methods to get text labels.

* CMakeLists.txt: Add plugIns.css.
* DerivedSources.make: Ditto.
* DerivedSources.pri: Ditto.
* GNUmakefile.am: Ditto.
* WebCore.gyp/WebCore.gyp: Ditto.
* WebCore.vcproj/WebCore.vcproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj: Ditto.
* WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
* WebCore.xcodeproj/project.pbxproj: Ditoo.
* css/StyleResolver.cpp:
(WebCore::ensureDefaultStyleSheetsForElement): Load and inject new plugInsStyleSheet if there is an object or embed element.
* css/plugIns.css: Added. Empty for now.
* page/ChromeClient.h: New methods for querying the client.
(WebCore::ChromeClient::plugInStartLabelTitle):
(WebCore::ChromeClient::plugInStartLabelSubtitle):
(WebCore::ChromeClient::plugInExtraStyleSheet):
* rendering/RenderTheme.h:
(WebCore::RenderTheme::extraPlugInsStyleSheet): Allow the theme to provide an extra stylesheet.

Source/WebKit2:

* WebProcess/InjectedBundle/API/c/WKBundlePage.h: Rename client callbacks
to have a "create" prefix, making it clear that these generate new Strings.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Actually call into
the injected bundle to retrieve any custom stylesheet for plugins.
(WebKit::InjectedBundlePageUIClient::plugInExtraStyleSheet):
* WebProcess/WebCoreSupport/WebChromeClient.h:
(WebChromeClient): Add override keyword onto virtual functions now
that the base class has implementations.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WebCore/CMakeLists.txt (140862 => 140863)


--- trunk/Source/WebCore/CMakeLists.txt	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebCore/CMakeLists.txt	2013-01-25 21:54:20 UTC (rev 140863)
@@ -2549,6 +2549,7 @@
     ${WEBCORE_DIR}/css/fullscreen.css
     ${WEBCORE_DIR}/css/mathml.css
     ${WEBCORE_DIR}/css/mediaControls.css
+    ${WEBCORE_DIR}/css/plugIns.css
     ${WEBCORE_DIR}/css/quirks.css
     ${WEBCORE_DIR}/css/svg.css
     ${WEBCORE_DIR}/css/view-source.css

Modified: trunk/Source/WebCore/ChangeLog (140862 => 140863)


--- trunk/Source/WebCore/ChangeLog	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebCore/ChangeLog	2013-01-25 21:54:20 UTC (rev 140863)
@@ -1,3 +1,39 @@
+2013-01-25  Dean Jackson  <[email protected]>
+
+        Add a user agent stylesheet for plugins
+        https://bugs.webkit.org/show_bug.cgi?id=107890
+
+        Reviewed by Alexey Proskuryakov.
+
+        As a step along the way to providing a Shadow DOM for plug-in elements, add a
+        User Agent stylesheet that is loaded when an embed or object element is
+        in the document. At the moment the stylesheet is empty.
+
+        The stylesheet can be overridden by the RenderTheme or the ChromeClient, allowing
+        ports to provide a custom appearance. This involved hooking up some virtual methods
+        on ChromeClient, the stubs of which are already implemented in WK2.
+        As a drive-by, since snapshotted plugins will need some localization I've also
+        exposed the ChromeClient methods to get text labels.
+
+        * CMakeLists.txt: Add plugIns.css.
+        * DerivedSources.make: Ditto.
+        * DerivedSources.pri: Ditto.
+        * GNUmakefile.am: Ditto.
+        * WebCore.gyp/WebCore.gyp: Ditto.
+        * WebCore.vcproj/WebCore.vcproj: Ditto.
+        * WebCore.vcxproj/WebCore.vcxproj: Ditto.
+        * WebCore.vcxproj/WebCore.vcxproj.filters: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Ditoo.
+        * css/StyleResolver.cpp:
+        (WebCore::ensureDefaultStyleSheetsForElement): Load and inject new plugInsStyleSheet if there is an object or embed element.
+        * css/plugIns.css: Added. Empty for now.
+        * page/ChromeClient.h: New methods for querying the client.
+        (WebCore::ChromeClient::plugInStartLabelTitle):
+        (WebCore::ChromeClient::plugInStartLabelSubtitle):
+        (WebCore::ChromeClient::plugInExtraStyleSheet):
+        * rendering/RenderTheme.h:
+        (WebCore::RenderTheme::extraPlugInsStyleSheet): Allow the theme to provide an extra stylesheet.
+
 2013-01-25  Eric Carlson  <[email protected]>
 
         Adding a text track should not make controls visible

Modified: trunk/Source/WebCore/DerivedSources.make (140862 => 140863)


--- trunk/Source/WebCore/DerivedSources.make	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebCore/DerivedSources.make	2013-01-25 21:54:20 UTC (rev 140863)
@@ -801,7 +801,7 @@
 
 # user agent style sheets
 
-USER_AGENT_STYLE_SHEETS = $(WebCore)/css/html.css $(WebCore)/css/quirks.css $(WebCore)/css/view-source.css $(WebCore)/css/themeWin.css $(WebCore)/css/themeWinQuirks.css
+USER_AGENT_STYLE_SHEETS = $(WebCore)/css/html.css $(WebCore)/css/quirks.css $(WebCore)/css/view-source.css $(WebCore)/css/themeWin.css $(WebCore)/css/themeWinQuirks.css $(WebCore)/css/plugIns.css
 
 ifeq ($(findstring ENABLE_SVG,$(FEATURE_DEFINES)), ENABLE_SVG)
     USER_AGENT_STYLE_SHEETS := $(USER_AGENT_STYLE_SHEETS) $(WebCore)/css/svg.css

Modified: trunk/Source/WebCore/DerivedSources.pri (140862 => 140863)


--- trunk/Source/WebCore/DerivedSources.pri	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebCore/DerivedSources.pri	2013-01-25 21:54:20 UTC (rev 140863)
@@ -82,6 +82,7 @@
     $$PWD/css/mediaControls.css \
     $$PWD/css/mediaControlsQt.css \
     $$PWD/css/mediaControlsQtFullscreen.css \
+    $$PWD/css/plugIns.css \
     $$PWD/css/themeQtNoListboxes.css \
     $$PWD/css/mobileThemeQt.css
 

Modified: trunk/Source/WebCore/GNUmakefile.am (140862 => 140863)


--- trunk/Source/WebCore/GNUmakefile.am	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebCore/GNUmakefile.am	2013-01-25 21:54:20 UTC (rev 140863)
@@ -414,7 +414,8 @@
 	$(WebCore)/css/svg.css \
 	$(WebCore)/css/mediaControls.css \
 	$(WebCore)/css/mediaControlsGtk.css \
-	$(WebCore)/css/fullscreen.css
+	$(WebCore)/css/fullscreen.css \
+	$(WebCore)/css/plugIns.css
 
 # new-style _javascript_ bindings
 SCRIPTS_FOR_GENERATE_BINDINGS = \
@@ -813,6 +814,7 @@
 	Source/WebCore/css/mathml.css \
 	Source/WebCore/css/mediaControls.css \
 	Source/WebCore/css/mediaControlsGtk.css \
+	Source/WebCore/css/plugIns.css \
 	Source/WebCore/css/quirks.css \
 	Source/WebCore/css/svg.css \
 	Source/WebCore/css/SVGCSSPropertyNames.in \

Modified: trunk/Source/WebCore/WebCore.gyp/WebCore.gyp (140862 => 140863)


--- trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2013-01-25 21:54:20 UTC (rev 140863)
@@ -924,6 +924,7 @@
               '../css/mediaControlsChromium.css',
               '../css/mediaControlsChromiumAndroid.css',
               '../css/fullscreen.css',
+              '../css/plugIns.css',
               # Skip fullscreenQuickTime.
             ],
           },

Modified: trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj (140862 => 140863)


--- trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebCore/WebCore.vcproj/WebCore.vcproj	2013-01-25 21:54:20 UTC (rev 140863)
@@ -38270,6 +38270,10 @@
 				>
 			</File>
 			<File
+				RelativePath="..\css\plugIns.css"
+				>
+			</File>
+			<File
 				RelativePath="..\css\PropertySetCSSStyleDeclaration.cpp"
 				>
 			</File>

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj (140862 => 140863)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj	2013-01-25 21:54:20 UTC (rev 140863)
@@ -8403,6 +8403,7 @@
     <None Include="..\css\fullscreenQuickTime.css" />
     <None Include="..\css\html.css" />
     <None Include="..\css\mediaControls.css" />
+    <None Include="..\css\plugIns.css" />
     <None Include="..\css\quirks.css" />
     <None Include="..\xml\XPathGrammar.y" />
     <None Include="..\bindings\scripts\CodeGenerator.pm" />

Modified: trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters (140862 => 140863)


--- trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebCore/WebCore.vcxproj/WebCore.vcxproj.filters	2013-01-25 21:54:20 UTC (rev 140863)
@@ -14267,6 +14267,9 @@
     <None Include="..\css\mediaControls.css">
       <Filter>css</Filter>
     </None>
+    <None Include="..\css\plugIns.css">
+      <Filter>css</Filter>
+    </None>
     <None Include="..\css\quirks.css">
       <Filter>css</Filter>
     </None>

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (140862 => 140863)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2013-01-25 21:54:20 UTC (rev 140863)
@@ -8205,6 +8205,7 @@
 		316FE10F0E6E1DA700BF6088 /* KeyframeAnimation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KeyframeAnimation.cpp; path = animation/KeyframeAnimation.cpp; sourceTree = "<group>"; };
 		316FE1100E6E1DA700BF6088 /* KeyframeAnimation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KeyframeAnimation.h; path = animation/KeyframeAnimation.h; sourceTree = "<group>"; };
 		31741AAB16635E45008A5B7E /* SimulatedClickOptions.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SimulatedClickOptions.h; sourceTree = "<group>"; };
+		3189E6DB16B2103500386EA3 /* plugIns.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; path = plugIns.css; sourceTree = "<group>"; };
 		319AE061142D6B24006563A1 /* StyleFilterData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StyleFilterData.cpp; path = style/StyleFilterData.cpp; sourceTree = "<group>"; };
 		319AE062142D6B24006563A1 /* StyleFilterData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleFilterData.h; path = style/StyleFilterData.h; sourceTree = "<group>"; };
 		319FBD5D15D2F444009640A6 /* CachedImageClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CachedImageClient.h; sourceTree = "<group>"; };
@@ -21807,6 +21808,7 @@
 				D3AA10F1123A98AA0092152B /* MediaQueryMatcher.cpp */,
 				D3AA10F2123A98AA0092152B /* MediaQueryMatcher.h */,
 				A80E6CD10A1989CA007FB8C5 /* Pair.h */,
+				3189E6DB16B2103500386EA3 /* plugIns.css */,
 				E4BBED0C14F4025D003F0B98 /* PropertySetCSSStyleDeclaration.cpp */,
 				E4BBED0D14F4025D003F0B98 /* PropertySetCSSStyleDeclaration.h */,
 				93CA4C9F09DF93FA00DF8677 /* quirks.css */,

Modified: trunk/Source/WebCore/css/StyleResolver.cpp (140862 => 140863)


--- trunk/Source/WebCore/css/StyleResolver.cpp	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebCore/css/StyleResolver.cpp	2013-01-25 21:54:20 UTC (rev 140863)
@@ -57,6 +57,8 @@
 #endif
 #include "CachedImage.h"
 #include "CalculationValue.h"
+#include "Chrome.h"
+#include "ChromeClient.h"
 #include "ContentData.h"
 #include "ContextFeatures.h"
 #include "Counter.h"
@@ -220,6 +222,7 @@
 static StyleSheetContents* mathMLStyleSheet;
 static StyleSheetContents* mediaControlsStyleSheet;
 static StyleSheetContents* fullscreenStyleSheet;
+static StyleSheetContents* plugInsStyleSheet;
 
 RenderStyle* StyleResolver::s_styleNotYetAvailable;
 
@@ -593,6 +596,12 @@
     }
 #endif
 
+    if (!plugInsStyleSheet && (element->hasTagName(objectTag) || element->hasTagName(embedTag))) {
+        String plugInsRules = String(plugInsUserAgentStyleSheet, sizeof(plugInsUserAgentStyleSheet)) + RenderTheme::themeForPage(element->document()->page())->extraPlugInsStyleSheet() + element->document()->page()->chrome()->client()->plugInExtraStyleSheet();
+        plugInsStyleSheet = parseUASheet(plugInsRules);
+        defaultStyle->addRulesFromSheet(plugInsStyleSheet, screenEval());
+    }
+
     ASSERT(defaultStyle->features().idsInRules.isEmpty());
     ASSERT(mathMLStyleSheet || defaultStyle->features().siblingRules.isEmpty());
 }

Added: trunk/Source/WebCore/css/plugIns.css (0 => 140863)


--- trunk/Source/WebCore/css/plugIns.css	                        (rev 0)
+++ trunk/Source/WebCore/css/plugIns.css	2013-01-25 21:54:20 UTC (rev 140863)
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2013 Apple Inc.  All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE, INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/* plug-ins */
Property changes on: trunk/Source/WebCore/css/plugIns.css
___________________________________________________________________

Added: svn:mime-type

Added: svn:keywords

Added: svn:eol-style

Modified: trunk/Source/WebCore/page/ChromeClient.h (140862 => 140863)


--- trunk/Source/WebCore/page/ChromeClient.h	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebCore/page/ChromeClient.h	2013-01-25 21:54:20 UTC (rev 140863)
@@ -374,6 +374,9 @@
     virtual bool isEmptyChromeClient() const { return false; }
 
     virtual PassRefPtr<Image> plugInStartLabelImage(RenderSnapshottedPlugIn::LabelSize) const { return 0; }
+    virtual String plugInStartLabelTitle() const { return String(); }
+    virtual String plugInStartLabelSubtitle() const { return String(); }
+    virtual String plugInExtraStyleSheet() const { return String(); }
 
     // FIXME: Port should return true using heuristic based on scrollable(RenderBox).
     virtual bool shouldAutoscrollForDragAndDrop(RenderBox*) const { return false; }

Modified: trunk/Source/WebCore/rendering/RenderTheme.h (140862 => 140863)


--- trunk/Source/WebCore/rendering/RenderTheme.h	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebCore/rendering/RenderTheme.h	2013-01-25 21:54:20 UTC (rev 140863)
@@ -86,14 +86,15 @@
     // RenderThemeMac.cpp for Mac OS X.
 
     // These methods return the theme's extra style sheets rules, to let each platform
-    // adjust the default CSS rules in html.css, quirks.css, or mediaControls.css
+    // adjust the default CSS rules in html.css, quirks.css, mediaControls.css, or plugIns.css
     virtual String extraDefaultStyleSheet() { return String(); }
     virtual String extraQuirksStyleSheet() { return String(); }
+    virtual String extraPlugInsStyleSheet() { return String(); }
 #if ENABLE(VIDEO)
-    virtual String extraMediaControlsStyleSheet() { return String(); };
+    virtual String extraMediaControlsStyleSheet() { return String(); }
 #endif
 #if ENABLE(FULLSCREEN_API)
-    virtual String extraFullScreenStyleSheet() { return String(); };
+    virtual String extraFullScreenStyleSheet() { return String(); }
 #endif
 
     // A method to obtain the baseline position for a "leaf" control.  This will only be used if a baseline

Modified: trunk/Source/WebKit2/ChangeLog (140862 => 140863)


--- trunk/Source/WebKit2/ChangeLog	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebKit2/ChangeLog	2013-01-25 21:54:20 UTC (rev 140863)
@@ -1,3 +1,19 @@
+2013-01-25  Dean Jackson  <[email protected]>
+
+        Add a user agent stylesheet for plugins
+        https://bugs.webkit.org/show_bug.cgi?id=107890
+
+        Reviewed by Alexey Proskuryakov.
+
+        * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Rename client callbacks
+        to have a "create" prefix, making it clear that these generate new Strings.
+        * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Actually call into
+        the injected bundle to retrieve any custom stylesheet for plugins.
+        (WebKit::InjectedBundlePageUIClient::plugInExtraStyleSheet):
+        * WebProcess/WebCoreSupport/WebChromeClient.h:
+        (WebChromeClient): Add override keyword onto virtual functions now
+        that the base class has implementations.
+
 2013-01-25  Alexey Proskuryakov  <[email protected]>
 
         NetworkProcess cannot load files with non-ASCII names

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h (140862 => 140863)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h	2013-01-25 21:54:20 UTC (rev 140863)
@@ -249,9 +249,9 @@
 typedef void (*WKBundlePageReachedAppCacheOriginQuotaCallback)(WKBundlePageRef page, WKSecurityOriginRef origin, int64_t totalBytesNeeded, const void *clientInfo);
 typedef uint64_t (*WKBundlePageExceededDatabaseQuotaCallback)(WKBundlePageRef page, WKSecurityOriginRef origin, WKStringRef databaseName, WKStringRef databaseDisplayName, uint64_t currentQuotaBytes, uint64_t currentOriginUsageBytes, uint64_t currentDatabaseUsageBytes, uint64_t expectedUsageBytes, const void *clientInfo);
 typedef WKImageRef (*WKBundlePagePlugInStartLabelImageCallback)(WKBundlePageLabelSize size, const void *clientInfo);
-typedef WKStringRef (*WKBundlePagePlugInStartLabelTitleCallback)(const void *clientInfo);
-typedef WKStringRef (*WKBundlePagePlugInStartLabelSubtitleCallback)(const void *clientInfo);
-typedef WKStringRef (*WKBundlePagePlugInExtraStyleSheetCallback)(const void *clientInfo);
+typedef WKStringRef (*WKBundlePagePlugInCreateStartLabelTitleCallback)(const void *clientInfo);
+typedef WKStringRef (*WKBundlePagePlugInCreateStartLabelSubtitleCallback)(const void *clientInfo);
+typedef WKStringRef (*WKBundlePagePlugInCreateExtraStyleSheetCallback)(const void *clientInfo);
 
 struct WKBundlePageUIClient {
     int                                                                 version;
@@ -277,9 +277,9 @@
     // Version 2.
     WKBundlePageExceededDatabaseQuotaCallback                           didExceedDatabaseQuota;
     WKBundlePagePlugInStartLabelImageCallback                           plugInStartLabelImage;
-    WKBundlePagePlugInStartLabelTitleCallback                           plugInStartLabelTitle;
-    WKBundlePagePlugInStartLabelSubtitleCallback                        plugInStartLabelSubtitle;
-    WKBundlePagePlugInExtraStyleSheetCallback                           plugInExtraStyleSheet;
+    WKBundlePagePlugInCreateStartLabelTitleCallback                     createPlugInStartLabelTitle;
+    WKBundlePagePlugInCreateStartLabelSubtitleCallback                  createPlugInStartLabelSubtitle;
+    WKBundlePagePlugInCreateExtraStyleSheetCallback                     createPlugInExtraStyleSheet;
 };
 typedef struct WKBundlePageUIClient WKBundlePageUIClient;
 

Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp (140862 => 140863)


--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp	2013-01-25 21:54:20 UTC (rev 140863)
@@ -195,7 +195,8 @@
 
 String InjectedBundlePageUIClient::plugInExtraStyleSheet() const
 {
-    return String();
+    RefPtr<WebString> styleSheet = adoptRef(toImpl(m_client.createPlugInExtraStyleSheet(m_client.clientInfo)));
+    return styleSheet ? styleSheet->string() : String();
 }
 
 } // namespace WebKit

Modified: trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h (140862 => 140863)


--- trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h	2013-01-25 21:39:43 UTC (rev 140862)
+++ trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.h	2013-01-25 21:54:20 UTC (rev 140863)
@@ -219,9 +219,9 @@
     virtual void logDiagnosticMessage(const String& message, const String& description, const String& success) OVERRIDE;
 
     virtual PassRefPtr<WebCore::Image> plugInStartLabelImage(WebCore::RenderSnapshottedPlugIn::LabelSize) const OVERRIDE;
-    virtual String plugInStartLabelTitle() const;
-    virtual String plugInStartLabelSubtitle() const;
-    virtual String plugInExtraStyleSheet() const;
+    virtual String plugInStartLabelTitle() const OVERRIDE;
+    virtual String plugInStartLabelSubtitle() const OVERRIDE;
+    virtual String plugInExtraStyleSheet() const OVERRIDE;
 
     String m_cachedToolTip;
     mutable RefPtr<WebFrame> m_cachedFrameSetLargestFrame;
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to