[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
dimich at chromium.org
dimich at chromium.org
Wed Apr 7 23:40:32 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit ce9cfb90c3a8e807f642a239c6278c84474eb059
Author: dimich at chromium.org <dimich at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Nov 13 23:38:23 2009 +0000
Bring the platform/android files inline with Android 2.0
https://bugs.webkit.org/show_bug.cgi?id=31423
Patch by Andrei Popescu <andreip at google.com> on 2009-11-13
Reviewed by Dmitry Titov.
No new tests required: these are all Android-specific files.
* platform/android/ClipboardAndroid.cpp:
(WebCore::ClipboardAndroid::files):
* platform/android/ClipboardAndroid.h:
* platform/android/FileChooserAndroid.cpp:
(WebCore::FileChooser::basenameForWidth):
(WebCore::fileButtonChooseFileLabel):
* platform/android/KeyEventAndroid.cpp:
(WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
* platform/android/LocalizedStringsAndroid.cpp:
(WebCore::contextMenuItemTagOpenLinkInNewWindow):
(WebCore::contextMenuItemTagDownloadLinkToDisk):
(WebCore::contextMenuItemTagCopyLinkToClipboard):
(WebCore::contextMenuItemTagOpenImageInNewWindow):
(WebCore::contextMenuItemTagDownloadImageToDisk):
(WebCore::contextMenuItemTagCopyImageToClipboard):
(WebCore::contextMenuItemTagOpenFrameInNewWindow):
(WebCore::contextMenuItemTagCopy):
(WebCore::contextMenuItemTagGoBack):
(WebCore::contextMenuItemTagGoForward):
(WebCore::contextMenuItemTagStop):
(WebCore::contextMenuItemTagReload):
(WebCore::contextMenuItemTagCut):
(WebCore::contextMenuItemTagPaste):
(WebCore::contextMenuItemTagNoGuessesFound):
(WebCore::contextMenuItemTagIgnoreSpelling):
(WebCore::contextMenuItemTagLearnSpelling):
(WebCore::contextMenuItemTagSearchWeb):
(WebCore::contextMenuItemTagLookUpInDictionary):
(WebCore::contextMenuItemTagOpenLink):
(WebCore::contextMenuItemTagIgnoreGrammar):
(WebCore::contextMenuItemTagSpellingMenu):
(WebCore::contextMenuItemTagShowSpellingPanel):
(WebCore::contextMenuItemTagCheckSpelling):
(WebCore::contextMenuItemTagCheckSpellingWhileTyping):
(WebCore::contextMenuItemTagCheckGrammarWithSpelling):
(WebCore::contextMenuItemTagFontMenu):
(WebCore::contextMenuItemTagBold):
(WebCore::contextMenuItemTagItalic):
(WebCore::contextMenuItemTagUnderline):
(WebCore::contextMenuItemTagOutline):
(WebCore::contextMenuItemTagWritingDirectionMenu):
(WebCore::contextMenuItemTagTextDirectionMenu):
(WebCore::contextMenuItemTagDefaultDirection):
(WebCore::contextMenuItemTagLeftToRight):
(WebCore::contextMenuItemTagRightToLeft):
(WebCore::mediaElementLoadingStateText):
(WebCore::mediaElementLiveBroadcastStateText):
(WebCore::searchableIndexIntroduction):
(WebCore::resetButtonDefaultLabel):
(WebCore::submitButtonDefaultLabel):
(WebCore::inputElementAltText):
* platform/android/RenderThemeAndroid.cpp:
(WebCore::RenderTheme::themeForPage):
(WebCore::RenderThemeAndroid::baselinePosition):
(WebCore::RenderThemeAndroid::paintButton):
(WebCore::adjustMenuListStyleCommon):
(WebCore::RenderThemeAndroid::paintCombo):
* platform/android/ScreenAndroid.cpp:
* platform/android/ScrollViewAndroid.cpp:
(WebCore::ScrollView::platformOffscreenContentRectangle):
* platform/android/TemporaryLinkStubs.cpp:
(JSC::Bindings::dispatchJNICall):
* platform/android/WidgetAndroid.cpp:
(WebCore::Widget::setFrameRect):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@50971 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6d5d205..c4d08e1 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,77 @@
+2009-11-13 Andrei Popescu <andreip at google.com>
+
+ Reviewed by Dmitry Titov.
+
+ Bring the platform/android files inline with Android 2.0
+ https://bugs.webkit.org/show_bug.cgi?id=31423
+
+ No new tests required: these are all Android-specific files.
+
+ * platform/android/ClipboardAndroid.cpp:
+ (WebCore::ClipboardAndroid::files):
+ * platform/android/ClipboardAndroid.h:
+ * platform/android/FileChooserAndroid.cpp:
+ (WebCore::FileChooser::basenameForWidth):
+ (WebCore::fileButtonChooseFileLabel):
+ * platform/android/KeyEventAndroid.cpp:
+ (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
+ * platform/android/LocalizedStringsAndroid.cpp:
+ (WebCore::contextMenuItemTagOpenLinkInNewWindow):
+ (WebCore::contextMenuItemTagDownloadLinkToDisk):
+ (WebCore::contextMenuItemTagCopyLinkToClipboard):
+ (WebCore::contextMenuItemTagOpenImageInNewWindow):
+ (WebCore::contextMenuItemTagDownloadImageToDisk):
+ (WebCore::contextMenuItemTagCopyImageToClipboard):
+ (WebCore::contextMenuItemTagOpenFrameInNewWindow):
+ (WebCore::contextMenuItemTagCopy):
+ (WebCore::contextMenuItemTagGoBack):
+ (WebCore::contextMenuItemTagGoForward):
+ (WebCore::contextMenuItemTagStop):
+ (WebCore::contextMenuItemTagReload):
+ (WebCore::contextMenuItemTagCut):
+ (WebCore::contextMenuItemTagPaste):
+ (WebCore::contextMenuItemTagNoGuessesFound):
+ (WebCore::contextMenuItemTagIgnoreSpelling):
+ (WebCore::contextMenuItemTagLearnSpelling):
+ (WebCore::contextMenuItemTagSearchWeb):
+ (WebCore::contextMenuItemTagLookUpInDictionary):
+ (WebCore::contextMenuItemTagOpenLink):
+ (WebCore::contextMenuItemTagIgnoreGrammar):
+ (WebCore::contextMenuItemTagSpellingMenu):
+ (WebCore::contextMenuItemTagShowSpellingPanel):
+ (WebCore::contextMenuItemTagCheckSpelling):
+ (WebCore::contextMenuItemTagCheckSpellingWhileTyping):
+ (WebCore::contextMenuItemTagCheckGrammarWithSpelling):
+ (WebCore::contextMenuItemTagFontMenu):
+ (WebCore::contextMenuItemTagBold):
+ (WebCore::contextMenuItemTagItalic):
+ (WebCore::contextMenuItemTagUnderline):
+ (WebCore::contextMenuItemTagOutline):
+ (WebCore::contextMenuItemTagWritingDirectionMenu):
+ (WebCore::contextMenuItemTagTextDirectionMenu):
+ (WebCore::contextMenuItemTagDefaultDirection):
+ (WebCore::contextMenuItemTagLeftToRight):
+ (WebCore::contextMenuItemTagRightToLeft):
+ (WebCore::mediaElementLoadingStateText):
+ (WebCore::mediaElementLiveBroadcastStateText):
+ (WebCore::searchableIndexIntroduction):
+ (WebCore::resetButtonDefaultLabel):
+ (WebCore::submitButtonDefaultLabel):
+ (WebCore::inputElementAltText):
+ * platform/android/RenderThemeAndroid.cpp:
+ (WebCore::RenderTheme::themeForPage):
+ (WebCore::RenderThemeAndroid::baselinePosition):
+ (WebCore::RenderThemeAndroid::paintButton):
+ (WebCore::adjustMenuListStyleCommon):
+ (WebCore::RenderThemeAndroid::paintCombo):
+ * platform/android/ScreenAndroid.cpp:
+ * platform/android/ScrollViewAndroid.cpp:
+ (WebCore::ScrollView::platformOffscreenContentRectangle):
+ * platform/android/TemporaryLinkStubs.cpp:
+ (JSC::Bindings::dispatchJNICall):
+ * platform/android/WidgetAndroid.cpp:
+ (WebCore::Widget::setFrameRect):
+
2009-11-13 Norbert Leser <norbert.leser&nokia.com>
Reviewed by Eric Seidel.
diff --git a/WebCore/platform/android/ClipboardAndroid.cpp b/WebCore/platform/android/ClipboardAndroid.cpp
index 0322e01..da2c230 100644
--- a/WebCore/platform/android/ClipboardAndroid.cpp
+++ b/WebCore/platform/android/ClipboardAndroid.cpp
@@ -29,6 +29,7 @@
#include "CachedImage.h"
#include "Element.h"
+#include "FileList.h"
#include "Frame.h"
#include "Range.h"
@@ -71,6 +72,11 @@ HashSet<String> ClipboardAndroid::types() const
return HashSet<String>();
}
+PassRefPtr<FileList> ClipboardAndroid::files() const
+{
+ return 0;
+}
+
void ClipboardAndroid::setDragImage(CachedImage*, const IntPoint&)
{
}
diff --git a/WebCore/platform/android/ClipboardAndroid.h b/WebCore/platform/android/ClipboardAndroid.h
index 8c9d9fa..723c991 100644
--- a/WebCore/platform/android/ClipboardAndroid.h
+++ b/WebCore/platform/android/ClipboardAndroid.h
@@ -47,6 +47,7 @@ public:
// extensions beyond IE's API
HashSet<String> types() const;
+ PassRefPtr<FileList> files() const;
void setDragImage(CachedImage*, const IntPoint&);
void setDragImageElement(Node*, const IntPoint&);
diff --git a/WebCore/platform/android/FileChooserAndroid.cpp b/WebCore/platform/android/FileChooserAndroid.cpp
index caedc7a..69d0883 100644
--- a/WebCore/platform/android/FileChooserAndroid.cpp
+++ b/WebCore/platform/android/FileChooserAndroid.cpp
@@ -36,9 +36,11 @@ String FileChooser::basenameForWidth(const Font& font, int width) const
return String();
// FIXME: This could be a lot faster, but assuming the data will not
// often be much longer than the provided width, this may be fast enough.
+ // If this does not need to be threadsafe, we can use crossThreadString().
+ // See http://trac.webkit.org/changeset/49160.
String output = m_filenames[0].threadsafeCopy();
while (font.width(TextRun(output.impl())) > width && output.length() > 4)
- output = output.replace(output.length() - 4, 4, String("..."));
+ output = output.replace(0, 4, String("..."));
return output;
}
@@ -48,7 +50,7 @@ String FileChooser::basenameForWidth(const Font& font, int width) const
// second string is rendered on the screen when no file has been selected.
String fileButtonChooseFileLabel()
{
- return String("Uploads Disabled");
+ return String("Upload a file");
}
String fileButtonNoFileSelectedLabel()
@@ -57,4 +59,3 @@ String fileButtonNoFileSelectedLabel()
}
} // namesapce WebCore
-
diff --git a/WebCore/platform/android/KeyEventAndroid.cpp b/WebCore/platform/android/KeyEventAndroid.cpp
index d3c48f5..af29598 100644
--- a/WebCore/platform/android/KeyEventAndroid.cpp
+++ b/WebCore/platform/android/KeyEventAndroid.cpp
@@ -211,9 +211,8 @@ static inline String singleCharacterString(UChar32 c)
}
PlatformKeyboardEvent::PlatformKeyboardEvent(int keyCode, UChar32 unichar,
- Type type, int repeatCount,
- ModifierKey mods)
- : m_type(type)
+ int repeatCount, bool down, bool cap, bool alt, bool sym)
+ : m_type(down ? KeyDown : KeyUp)
, m_text(singleCharacterString(unichar))
, m_unmodifiedText(singleCharacterString(unichar))
, m_keyIdentifier(keyIdentifierForAndroidKeyCode(keyCode))
@@ -221,10 +220,10 @@ PlatformKeyboardEvent::PlatformKeyboardEvent(int keyCode, UChar32 unichar,
, m_windowsVirtualKeyCode(windowsKeyCodeForKeyEvent(keyCode))
, m_nativeVirtualKeyCode(keyCode)
, m_isKeypad(false)
- , m_shiftKey((mods & ShiftKey))
- , m_ctrlKey((mods & CtrlKey))
- , m_altKey((mods & AltKey))
- , m_metaKey((mods & MetaKey))
+ , m_shiftKey(cap ? ShiftKey : 0)
+ , m_ctrlKey(sym ? CtrlKey : 0)
+ , m_altKey(alt ? AltKey : 0)
+ , m_metaKey(0)
// added for android
, m_repeatCount(repeatCount)
, m_unichar(unichar)
diff --git a/WebCore/platform/android/LocalizedStringsAndroid.cpp b/WebCore/platform/android/LocalizedStringsAndroid.cpp
index 1fe80d8..fc3b63c 100644
--- a/WebCore/platform/android/LocalizedStringsAndroid.cpp
+++ b/WebCore/platform/android/LocalizedStringsAndroid.cpp
@@ -45,10 +45,260 @@ String unknownFileSizeText()
return String("Unknown");
}
+String contextMenuItemTagOpenLinkInNewWindow()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagDownloadLinkToDisk()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagCopyLinkToClipboard()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagOpenImageInNewWindow()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagDownloadImageToDisk()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagCopyImageToClipboard()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagOpenFrameInNewWindow()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagCopy()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagGoBack()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagGoForward()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagStop()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagReload()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagCut()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagPaste()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagNoGuessesFound()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagIgnoreSpelling()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagLearnSpelling()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagSearchWeb()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagLookUpInDictionary()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagOpenLink()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagIgnoreGrammar()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagSpellingMenu()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagShowSpellingPanel(bool show)
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagCheckSpelling()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagCheckSpellingWhileTyping()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagCheckGrammarWithSpelling()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagFontMenu()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagBold()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagItalic()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagUnderline()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagOutline()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagWritingDirectionMenu()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagTextDirectionMenu()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagDefaultDirection()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagLeftToRight()
+{
+ notImplemented();
+ return String();
+}
+
+String contextMenuItemTagRightToLeft()
+{
+ notImplemented();
+ return String();
+}
+
String imageTitle(const String& filename, const IntSize& size)
{
notImplemented();
return String();
}
+String mediaElementLoadingStateText()
+{
+ notImplemented();
+ return String();
+}
+
+String mediaElementLiveBroadcastStateText()
+{
+ notImplemented();
+ return String();
+}
+
+String searchableIndexIntroduction()
+{
+ notImplemented();
+ return String();
+}
+
+String resetButtonDefaultLabel()
+{
+ return String("Reset");
+}
+
+String submitButtonDefaultLabel()
+{
+ return String("Submit");
+}
+
+String inputElementAltText()
+{
+ notImplemented();
+ return String();
+}
+
} // namespace WebCore
diff --git a/WebCore/platform/android/RenderThemeAndroid.cpp b/WebCore/platform/android/RenderThemeAndroid.cpp
index a1e8bf6..ff20014 100644
--- a/WebCore/platform/android/RenderThemeAndroid.cpp
+++ b/WebCore/platform/android/RenderThemeAndroid.cpp
@@ -27,7 +27,7 @@
#include "RenderThemeAndroid.h"
#include "Color.h"
-#include "FormControlElement.h"
+#include "Element.h"
#include "GraphicsContext.h"
#include "PlatformGraphicsContext.h"
#include "RenderSkinAndroid.h"
@@ -38,8 +38,6 @@
namespace WebCore {
-const int MAX_COMBO_HEIGHT = 20;
-
// Add a constant amount of padding to the textsize to get the final height
// of buttons, so that our button images are large enough to properly fit
// the text.
@@ -65,6 +63,17 @@ RenderTheme* theme()
return &androidTheme;
}
+PassRefPtr<RenderTheme> RenderTheme::themeForPage(Page* page)
+{
+ static RenderTheme* rt = RenderThemeAndroid::create().releaseRef();
+ return rt;
+}
+
+PassRefPtr<RenderTheme> RenderThemeAndroid::create()
+{
+ return adoptRef(new RenderThemeAndroid());
+}
+
RenderThemeAndroid::RenderThemeAndroid()
{
}
@@ -119,7 +128,7 @@ int RenderThemeAndroid::baselinePosition(const RenderObject* obj) const
// controls that need to do this.
//
// Our checkboxes and radio buttons need to be offset to line up properly.
- return RenderTheme::baselinePosition(obj) - 5;
+ return RenderTheme::baselinePosition(obj) - 2;
}
void RenderThemeAndroid::addIntrinsicMargins(RenderStyle* style) const
@@ -181,8 +190,8 @@ bool RenderThemeAndroid::paintButton(RenderObject* obj, const RenderObject::Pain
{
// If it is a disabled button, simply paint it to the master picture.
Node* node = obj->node();
- FormControlElement* formControlElement = toFormControlElement(static_cast<Element*>(node));
- if (formControlElement && !formControlElement->isEnabled())
+ Element* formControlElement = static_cast<Element*>(node);
+ if (formControlElement && !formControlElement->isEnabledFormControl())
RenderSkinButton::Draw(getCanvasFromInfo(info), rect, RenderSkinAndroid::kDisabled);
else
// Store all the important information in the platform context.
@@ -253,12 +262,6 @@ static void adjustMenuListStyleCommon(RenderStyle* style, Element* e)
{
// Added to make room for our arrow.
style->setPaddingRight(Length(RenderSkinCombo::extraWidth(), Fixed));
- // Code copied from RenderThemeMac.mm
- // Makes sure that the text shows up on our treatment
- bool isEnabled = true;
- if (FormControlElement* formControlElement = toFormControlElement(e))
- isEnabled = formControlElement->isEnabled();
- style->setColor(isEnabled ? Color::black : Color::darkGray);
}
void RenderThemeAndroid::adjustMenuListStyle(CSSStyleSelector*, RenderStyle* style, Element* e) const
@@ -271,16 +274,7 @@ bool RenderThemeAndroid::paintCombo(RenderObject* obj, const RenderObject::Paint
{
if (obj->style() && !obj->style()->backgroundColor().alpha())
return true;
- Node* node = obj->node();
- int height = rect.height();
- int y = rect.y();
- // If the combo box is too large, leave it at its max height, and center it.
- if (height > MAX_COMBO_HEIGHT) {
- y += (height - MAX_COMBO_HEIGHT) >> 1;
- height = MAX_COMBO_HEIGHT;
- }
- return RenderSkinCombo::Draw(getCanvasFromInfo(info), node, rect.x(), y,
- rect.width(), height);
+ return RenderSkinCombo::Draw(getCanvasFromInfo(info), obj->node(), rect.x(), rect.y(), rect.width(), rect.height());
}
bool RenderThemeAndroid::paintMenuList(RenderObject* obj, const RenderObject::PaintInfo& info, const IntRect& rect)
diff --git a/WebCore/platform/android/RenderThemeAndroid.h b/WebCore/platform/android/RenderThemeAndroid.h
index 056b2d6..2e54302 100644
--- a/WebCore/platform/android/RenderThemeAndroid.h
+++ b/WebCore/platform/android/RenderThemeAndroid.h
@@ -47,7 +47,7 @@ struct ThemeData {
class RenderThemeAndroid : public RenderTheme {
public:
- RenderThemeAndroid();
+ static PassRefPtr<RenderTheme> create();
~RenderThemeAndroid();
virtual bool stateChanged(RenderObject*, ControlState) const;
@@ -97,10 +97,12 @@ protected:
virtual bool paintSearchField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
private:
+ RenderThemeAndroid();
void addIntrinsicMargins(RenderStyle*) const;
void close();
bool supportsFocus(ControlPart);
+ friend RenderTheme* theme();
};
} // namespace WebCore
diff --git a/WebCore/platform/android/ScreenAndroid.cpp b/WebCore/platform/android/ScreenAndroid.cpp
index dcd2d10..881c246 100644
--- a/WebCore/platform/android/ScreenAndroid.cpp
+++ b/WebCore/platform/android/ScreenAndroid.cpp
@@ -29,13 +29,15 @@
#include "config.h"
#include "Screen.h"
+// This include must come first.
+#undef LOG // FIXME: Still have to do this to get the log to show up
+#include "utils/Log.h"
+
#include "FloatRect.h"
#include "Widget.h"
#include "ui/DisplayInfo.h"
#include "ui/PixelFormat.h"
#include "ui/SurfaceComposerClient.h"
-#undef LOG // FIXME: Still have to do this to get the log to show up
-#include "utils/Log.h"
namespace WebCore {
diff --git a/WebCore/platform/android/ScrollViewAndroid.cpp b/WebCore/platform/android/ScrollViewAndroid.cpp
index 274c04f..db20591 100644
--- a/WebCore/platform/android/ScrollViewAndroid.cpp
+++ b/WebCore/platform/android/ScrollViewAndroid.cpp
@@ -30,6 +30,7 @@
#include "FloatRect.h"
#include "FrameView.h"
#include "IntRect.h"
+#include "SkRegion.h"
#include "WebCoreFrameBridge.h"
#include "WebCoreViewBridge.h"
#include "WebViewCore.h"
@@ -96,9 +97,17 @@ void ScrollView::platformRepaintContentRectangle(const IntRect &rect, bool now)
}
#ifdef ANDROID_CAPTURE_OFFSCREEN_PAINTS
-void ScrollView::platformOffscreenContentRectangle(const IntRect& rect)
+// Compute the offscreen parts of the drawn rectangle by subtracting
+// vis from rect. This can compute up to four rectangular slices.
+void ScrollView::platformOffscreenContentRectangle(const IntRect& vis, const IntRect& rect)
{
- android::WebViewCore::getWebViewCore(this)->offInvalidate(rect);
+ SkRegion rectRgn = SkRegion(rect);
+ rectRgn.op(vis, SkRegion::kDifference_Op);
+ SkRegion::Iterator iter(rectRgn);
+ for (; !iter.done(); iter.next()) {
+ const SkIRect& diff = iter.rect();
+ android::WebViewCore::getWebViewCore(this)->offInvalidate(diff);
+ }
}
#endif
diff --git a/WebCore/platform/android/TemporaryLinkStubs.cpp b/WebCore/platform/android/TemporaryLinkStubs.cpp
index b82edaf..e1889f0 100644
--- a/WebCore/platform/android/TemporaryLinkStubs.cpp
+++ b/WebCore/platform/android/TemporaryLinkStubs.cpp
@@ -44,7 +44,6 @@
#include "EditCommand.h"
#include "Editor.h"
#include "File.h"
-#include "FileList.h"
#include "Font.h"
#include "Frame.h"
#include "FrameLoadRequest.h"
@@ -428,11 +427,6 @@ Vector<String> supportedKeySizes()
return Vector<String>();
}
-String signedPublicKeyAndChallengeString(unsigned int, String const&, WebCore::KURL const&)
-{
- return String();
-}
-
} // namespace WebCore
namespace WebCore {
@@ -465,7 +459,7 @@ PassRefPtr<SharedBuffer> SharedBuffer::createWithContentsOfFile(const String&)
#if USE(JSC)
namespace JSC { namespace Bindings {
bool dispatchJNICall(ExecState*, const void* targetAppletView, jobject obj, bool isStatic, JNIType returnType,
- jmethodID methodID, jvalue* args, jvalue& result, const char* callingURL, JSValuePtr& exceptionDescription)
+ jmethodID methodID, jvalue* args, jvalue& result, const char* callingURL, JSValue& exceptionDescription)
{
notImplemented();
return false;
@@ -487,11 +481,6 @@ void prefetchDNS(const String&)
notImplemented();
}
-void getSupportedKeySizes(Vector<String>&)
-{
- notImplemented();
-}
-
PassRefPtr<Icon> Icon::createIconForFile(const String&)
{
notImplemented();
@@ -520,17 +509,6 @@ ScrollbarTheme* ScrollbarTheme::nativeTheme()
} // namespace WebCore
-FileList::FileList()
-{
- notImplemented();
-}
-
-File* FileList::item(unsigned index) const
-{
- notImplemented();
- return 0;
-}
-
AXObjectCache::~AXObjectCache()
{
notImplemented();
@@ -564,114 +542,4 @@ OpaqueJSClassContextData::~OpaqueJSClassContextData()
notImplemented();
}
-// as we don't use inspector/*.cpp, add stub here.
-
-namespace WebCore {
-
-JSValuePtr toJS(ExecState*, Profile*)
-{
- notImplemented();
- return jsNull();
-}
-
-JSValuePtr JavaScriptCallFrame::evaluate(const UString& script, JSValuePtr& exception) const
-{
- notImplemented();
- return jsNull();
-}
-
-const ScopeChainNode* JavaScriptCallFrame::scopeChain() const
-{
- notImplemented();
- return 0;
-}
-
-JSObject* JavaScriptCallFrame::thisObject() const
-{
- notImplemented();
- return 0;
-}
-
-DebuggerCallFrame::Type JavaScriptCallFrame::type() const
-{
- notImplemented();
- return (DebuggerCallFrame::Type) 0;
-}
-
-JavaScriptCallFrame* JavaScriptCallFrame::caller()
-{
- notImplemented();
- return 0;
-}
-
-String JavaScriptCallFrame::functionName() const
-{
- notImplemented();
- return String();
-}
-
-}
-
-JavaScriptDebugServer::JavaScriptDebugServer() :
- m_recompileTimer(this, 0)
-{
- notImplemented();
-}
-
-JavaScriptDebugServer::~JavaScriptDebugServer()
-{
- notImplemented();
-}
-
-JavaScriptDebugServer& JavaScriptDebugServer::shared()
-{
- static JavaScriptDebugServer server;
- notImplemented();
- return server;
-}
-
-void JavaScriptDebugServer::atStatement(const DebuggerCallFrame&, int, int)
-{
- notImplemented();
-}
-
-void JavaScriptDebugServer::callEvent(const DebuggerCallFrame&, int, int)
-{
- notImplemented();
-}
-
-void JavaScriptDebugServer::didExecuteProgram(const DebuggerCallFrame&, int, int)
-{
- notImplemented();
-}
-
-void JavaScriptDebugServer::didReachBreakpoint(const DebuggerCallFrame&, int, int)
-{
- notImplemented();
-}
-
-void JavaScriptDebugServer::exception(const DebuggerCallFrame&, int, int)
-{
- notImplemented();
-}
-
-void JavaScriptDebugServer::sourceParsed(ExecState*, const SourceCode&, int, const UString&)
-{
- notImplemented();
-}
-
-void JavaScriptDebugServer::pageCreated(Page*)
-{
- notImplemented();
-}
-
-void JavaScriptDebugServer::returnEvent(const DebuggerCallFrame&, int, int)
-{
- notImplemented();
-}
-
-void JavaScriptDebugServer::willExecuteProgram(const DebuggerCallFrame&, int, int)
-{
- notImplemented();
-}
#endif
diff --git a/WebCore/platform/android/WidgetAndroid.cpp b/WebCore/platform/android/WidgetAndroid.cpp
index 850721d..d122ef7 100644
--- a/WebCore/platform/android/WidgetAndroid.cpp
+++ b/WebCore/platform/android/WidgetAndroid.cpp
@@ -96,7 +96,7 @@ void Widget::hide()
void Widget::setFrameRect(const IntRect& rect)
{
// FIXME: set m_frame instead?
- // platformWidget() is NULL when called from Scrollbar
+ // platformWidget() is 0 when called from Scrollbar
if (!platformWidget())
return;
platformWidget()->setLocation(rect.x(), rect.y());
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list