summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-06 16:37:06 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-06 16:37:06 +0000
commitc942b1e8fd4da83d9eecbe94bc2cd91a0aa605cd (patch)
tree46a5d0b4b4fe8717c1fa41c2ffe46d522ddc4892 /webkit
parentf89003678335e4ac777beb864aeae8de381d4ce9 (diff)
downloadchromium_src-c942b1e8fd4da83d9eecbe94bc2cd91a0aa605cd.zip
chromium_src-c942b1e8fd4da83d9eecbe94bc2cd91a0aa605cd.tar.gz
chromium_src-c942b1e8fd4da83d9eecbe94bc2cd91a0aa605cd.tar.bz2
Remove the Mac QuickTime quirk, which we don't need after all
See bug for full explanation of why the quirk isn't necessary. The short version is that the quirk was actually compensating for a bug of our own that has since been fixed, not a real problem with QuickTime. BUG=29357 TEST=See bug; given URLs shouldn't crash. Review URL: http://codereview.chromium.org/523083 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35626 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl.h6
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_mac.mm27
2 files changed, 7 insertions, 26 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl.h b/webkit/glue/plugins/webplugin_delegate_impl.h
index 8a22538..8fd15a8 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl.h
+++ b/webkit/glue/plugins/webplugin_delegate_impl.h
@@ -50,7 +50,6 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
PLUGIN_QUIRK_NO_WINDOWLESS = 1024, // Windows
PLUGIN_QUIRK_PATCH_REGENUMKEYEXW = 2048, // Windows
PLUGIN_QUIRK_ALWAYS_NOTIFY_SUCCESS = 4096, // Windows
- PLUGIN_QUIRK_IGNORE_NEGOTIATED_DRAWING_MODEL = 8192, // Mac
};
static WebPluginDelegateImpl* Create(const FilePath& filename,
@@ -194,11 +193,6 @@ class WebPluginDelegateImpl : public webkit_glue::WebPluginDelegate {
WPARAM wParam, LPARAM lParam);
#endif
-#if defined(OS_MACOSX)
- // Returns the drawing model to use for the plugin.
- int PluginDrawingModel();
-#endif
-
//----------------------------
// used for windowless plugins
void WindowlessUpdateGeometry(const gfx::Rect& window_rect,
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
index 5754ac8..280c445 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
+++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
@@ -95,13 +95,6 @@ WebPluginDelegateImpl::WebPluginDelegateImpl(
#endif
instance->set_windowless(true);
- const WebPluginInfo& plugin_info = instance_->plugin_lib()->plugin_info();
- if (plugin_info.name.find(L"QuickTime") != std::wstring::npos) {
- // In some cases, QuickTime inexpicably negotiates the CoreGraphics drawing
- // model, but then proceeds as if it were using QuickDraw. Until we support
- // CoreAnimation, just ignore what QuickTime asks for.
- quirks_ |= PLUGIN_QUIRK_IGNORE_NEGOTIATED_DRAWING_MODEL;
- }
std::set<WebPluginDelegateImpl*>* delegates = g_active_delegates.Pointer();
delegates->insert(this);
}
@@ -115,7 +108,7 @@ WebPluginDelegateImpl::~WebPluginDelegateImpl() {
void WebPluginDelegateImpl::PluginDestroyed() {
if (instance_->event_model() == NPEventModelCarbon) {
- if (PluginDrawingModel() == NPDrawingModelQuickDraw) {
+ if (instance()->drawing_model() == NPDrawingModelQuickDraw) {
// Tell the plugin it should stop drawing into the window (which will go
// away when the next idle event arrives).
window_.x = 0;
@@ -160,7 +153,7 @@ void WebPluginDelegateImpl::PlatformInitialize() {
qd_port_.port =
GetWindowPort(reinterpret_cast<WindowRef>(cg_context_.window));
- switch (PluginDrawingModel()) {
+ switch (instance()->drawing_model()) {
#ifndef NP_NO_QUICKDRAW
case NPDrawingModelQuickDraw:
window_.window = &qd_port_;
@@ -263,7 +256,7 @@ void WebPluginDelegateImpl::WindowlessPaint(gfx::NativeDrawingContext context,
static StatsRate plugin_paint("Plugin.Paint");
StatsScope<StatsRate> scope(plugin_paint);
- switch (PluginDrawingModel()) {
+ switch (instance()->drawing_model()) {
#ifndef NP_NO_QUICKDRAW
case NPDrawingModelQuickDraw: {
// Plugins using the QuickDraw drawing model do not restrict their
@@ -318,7 +311,7 @@ void WebPluginDelegateImpl::WindowlessSetWindow(bool force_set_window) {
return;
int y_offset = 0;
- if (PluginDrawingModel() == NPDrawingModelCoreGraphics) {
+ if (instance()->drawing_model() == NPDrawingModelCoreGraphics) {
// Get the dummy window structure height; we're pretenting the plugin takes up
// the whole (dummy) window, but the clip rect and x/y are relative to the
// full window region, not just the content region.
@@ -391,12 +384,6 @@ void WebPluginDelegateImpl::SetFocus() {
FocusNotify(this);
}
-int WebPluginDelegateImpl::PluginDrawingModel() {
- if (quirks_ & PLUGIN_QUIRK_IGNORE_NEGOTIATED_DRAWING_MODEL)
- return NPDrawingModelQuickDraw;
- return instance()->drawing_model();
-}
-
void WebPluginDelegateImpl::UpdateWindowLocation(const WebMouseEvent& event) {
last_window_x_offset_ = event.globalX - event.windowX;
last_window_y_offset_ = event.globalY - event.windowY;
@@ -701,7 +688,7 @@ bool WebPluginDelegateImpl::HandleInputEvent(const WebInputEvent& event,
#endif
bool ret = false;
- switch (PluginDrawingModel()) {
+ switch (instance()->drawing_model()) {
#ifndef NP_NO_QUICKDRAW
case NPDrawingModelQuickDraw:
SetPort(qd_port_.port);
@@ -731,7 +718,7 @@ bool WebPluginDelegateImpl::HandleInputEvent(const WebInputEvent& event,
}
}
- if (PluginDrawingModel() == NPDrawingModelCoreGraphics)
+ if (instance()->drawing_model() == NPDrawingModelCoreGraphics)
CGContextRestoreGState(cg_context_.context);
return ret;
@@ -786,7 +773,7 @@ void WebPluginDelegateImpl::OnNullEvent() {
// repaint.
// TODO: only do this if the contents of the offscreen window has changed,
// so as not to spam the renderer with an unchanging image.
- if (PluginDrawingModel() == NPDrawingModelQuickDraw)
+ if (instance()->drawing_model() == NPDrawingModelQuickDraw)
instance()->webplugin()->Invalidate();
#endif