summaryrefslogtreecommitdiffstats
path: root/WebCore/platform
diff options
context:
space:
mode:
authorPatrick Scott <phanna@android.com>2010-03-22 10:09:16 -0400
committerPatrick Scott <phanna@android.com>2010-03-23 15:52:45 -0400
commit8216a0e796895ec6e736aebbeacee9567ae85515 (patch)
tree4bbf764c32162e0aeff97c3a62b0bd1c0c8e0f0b /WebCore/platform
parentbd150a788daef4180dc4d1afea9d7517b6721eff (diff)
downloadexternal_webkit-8216a0e796895ec6e736aebbeacee9567ae85515.zip
external_webkit-8216a0e796895ec6e736aebbeacee9567ae85515.tar.gz
external_webkit-8216a0e796895ec6e736aebbeacee9567ae85515.tar.bz2
Add on-demand plugin support.
The Settings object now has an on-demand flag for plugins (this was to avoid more edits to webkit code). If plugins are on-demand and a plugin is installed that can handle the content, insert a placeholder widget. If the user clicks on the placeholder, the plugin will be enabled. The widget currently does not clip the context correctly. It only clips based on the widget frame. This is due to a bug (already filed) where the scroll offset is producing bad clip rectangles. Requires a framework change. Bug: 2411524 Change-Id: If3931da8da2339a2385ae78b609c49fa069892ab
Diffstat (limited to 'WebCore/platform')
-rw-r--r--WebCore/platform/android/TemporaryLinkStubs.cpp5
-rw-r--r--WebCore/platform/android/WidgetAndroid.cpp5
2 files changed, 7 insertions, 3 deletions
diff --git a/WebCore/platform/android/TemporaryLinkStubs.cpp b/WebCore/platform/android/TemporaryLinkStubs.cpp
index 9741ad5..6dac5ef 100644
--- a/WebCore/platform/android/TemporaryLinkStubs.cpp
+++ b/WebCore/platform/android/TemporaryLinkStubs.cpp
@@ -67,6 +67,7 @@
#include "Pasteboard.h"
#include "Path.h"
#include "PluginInfoStore.h"
+#include "PluginWidget.h"
#include "ResourceError.h"
#include "ResourceHandle.h"
#include "ResourceLoader.h"
@@ -144,6 +145,10 @@ void refreshPlugins(bool)
#endif // !defined(ANDROID_PLUGINS)
+// Needed to link with PluginWidget as a parent class of PluginToggleWidget. Mac
+// defines this in plugins/mac/PluginWidgetMac.mm
+void PluginWidget::invalidateRect(const IntRect&) {}
+
// This function tells the bridge that a resource was loaded from the cache and thus
// the app may update progress with the amount of data loaded.
void CheckCacheObjectStatus(DocLoader*, CachedResource*)
diff --git a/WebCore/platform/android/WidgetAndroid.cpp b/WebCore/platform/android/WidgetAndroid.cpp
index d122ef7..9ab0b2c 100644
--- a/WebCore/platform/android/WidgetAndroid.cpp
+++ b/WebCore/platform/android/WidgetAndroid.cpp
@@ -49,9 +49,8 @@ Widget::~Widget()
IntRect Widget::frameRect() const
{
- // FIXME: use m_frame instead?
if (!platformWidget())
- return IntRect(0, 0, 0, 0);
+ return m_frame;
return platformWidget()->getBounds();
}
@@ -95,7 +94,7 @@ void Widget::hide()
void Widget::setFrameRect(const IntRect& rect)
{
- // FIXME: set m_frame instead?
+ m_frame = rect;
// platformWidget() is 0 when called from Scrollbar
if (!platformWidget())
return;