[SCM] WebKit Debian packaging branch, webkit-1.2, updated. upstream/1.1.90-6072-g9a69373
eric at webkit.org
eric at webkit.org
Thu Apr 8 02:02:08 UTC 2010
The following commit has been merged in the webkit-1.2 branch:
commit ef535f91e57b248f711b2769fade7d03b72880a7
Author: eric at webkit.org <eric at webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Sat Feb 27 01:51:42 2010 +0000
2010-02-26 Leandro Pereira <leandro at profusion.mobi>
Reviewed by NOBODY.
Add EFL port files to platform/efl.
http://webkit.org/b/35087
* WebCore/platform/efl/ClipboardEfl.cpp: Added.
* WebCore/platform/efl/PopupMenuEfl.cpp: Added.
* WebCore/platform/efl/SharedTimerEfl.cpp: Added.
* WebCore/platform/efl/RenderThemeEfl.h: Added.
* WebCore/platform/efl/Language.cpp: Added.
* WebCore/platform/efl/CookieJarEfl.cpp: Added.
* WebCore/platform/efl/MIMETypeRegistryEfl.cpp: Added.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@55328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index bb02697..eef5107 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,18 @@
+2010-02-26 Leandro Pereira <leandro at profusion.mobi>
+
+ Reviewed by NOBODY.
+
+ Add EFL port files to platform/efl.
+ http://webkit.org/b/35087
+
+ * WebCore/platform/efl/ClipboardEfl.cpp: Added.
+ * WebCore/platform/efl/PopupMenuEfl.cpp: Added.
+ * WebCore/platform/efl/SharedTimerEfl.cpp: Added.
+ * WebCore/platform/efl/RenderThemeEfl.h: Added.
+ * WebCore/platform/efl/Language.cpp: Added.
+ * WebCore/platform/efl/CookieJarEfl.cpp: Added.
+ * WebCore/platform/efl/MIMETypeRegistryEfl.cpp: Added.
+
2010-02-26 Robert Kroeger <rjkroege at chromium.org>
Reviewed by Nate Chapin
diff --git a/WebCore/platform/efl/ClipboardEfl.cpp b/WebCore/platform/efl/ClipboardEfl.cpp
new file mode 100644
index 0000000..6ef51cf
--- /dev/null
+++ b/WebCore/platform/efl/ClipboardEfl.cpp
@@ -0,0 +1,141 @@
+/*
+ * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
+ * Copyright (C) 2009-2010 ProFUSION embedded systems
+ * Copyright (C) 2009-2010 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "config.h"
+#include "ClipboardEfl.h"
+
+#include "Editor.h"
+#include "FileList.h"
+#include "NotImplemented.h"
+#include "StringHash.h"
+
+namespace WebCore {
+PassRefPtr<Clipboard> Editor::newGeneralClipboard(ClipboardAccessPolicy policy)
+{
+ return new ClipboardEfl(policy, false);
+}
+
+ClipboardEfl::ClipboardEfl(ClipboardAccessPolicy policy, bool forDragging)
+ : Clipboard(policy, forDragging)
+{
+ notImplemented();
+}
+
+ClipboardEfl::~ClipboardEfl()
+{
+ notImplemented();
+}
+
+void ClipboardEfl::clearData(const String&)
+{
+ notImplemented();
+}
+
+void ClipboardEfl::writePlainText(const WebCore::String&)
+{
+ notImplemented();
+}
+
+void ClipboardEfl::clearAllData()
+{
+ notImplemented();
+}
+
+String ClipboardEfl::getData(const String&, bool &success) const
+{
+ notImplemented();
+ success = false;
+ return String();
+}
+
+bool ClipboardEfl::setData(const String&, const String&)
+{
+ notImplemented();
+ return false;
+}
+
+HashSet<String> ClipboardEfl::types() const
+{
+ notImplemented();
+ return HashSet<String>();
+}
+
+PassRefPtr<FileList> ClipboardEfl::files() const
+{
+ notImplemented();
+ return 0;
+}
+
+IntPoint ClipboardEfl::dragLocation() const
+{
+ notImplemented();
+ return IntPoint(0, 0);
+}
+
+CachedImage* ClipboardEfl::dragImage() const
+{
+ notImplemented();
+ return 0;
+}
+
+void ClipboardEfl::setDragImage(CachedImage*, const IntPoint&)
+{
+ notImplemented();
+}
+
+Node* ClipboardEfl::dragImageElement()
+{
+ notImplemented();
+ return 0;
+}
+
+void ClipboardEfl::setDragImageElement(Node*, const IntPoint&)
+{
+ notImplemented();
+}
+
+DragImageRef ClipboardEfl::createDragImage(IntPoint&) const
+{
+ notImplemented();
+ return 0;
+}
+
+void ClipboardEfl::declareAndWriteDragImage(Element*, const KURL&, const String&, Frame*)
+{
+ notImplemented();
+}
+
+void ClipboardEfl::writeURL(const KURL&, const String&, Frame*)
+{
+ notImplemented();
+}
+
+void ClipboardEfl::writeRange(Range*, Frame*)
+{
+ notImplemented();
+}
+
+bool ClipboardEfl::hasData()
+{
+ notImplemented();
+ return false;
+}
+
+}
diff --git a/WebCore/platform/efl/CookieJarEfl.cpp b/WebCore/platform/efl/CookieJarEfl.cpp
new file mode 100644
index 0000000..01dcddb
--- /dev/null
+++ b/WebCore/platform/efl/CookieJarEfl.cpp
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2003, 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2009-2010 ProFUSION embedded systems
+ * Copyright (C) 2009-2010 Samsung Electronics
+ *
+ * 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 COMPUTER, 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 COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * 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.
+ */
+
+#include "config.h"
+#include "CookieJar.h"
+
+#include "KURL.h"
+#include "PlatformString.h"
+#include "StringHash.h"
+
+#include <wtf/HashMap.h>
+
+namespace WebCore {
+
+static HashMap<String, String> cookieJar;
+
+void setCookies(Document* document, const KURL& url, const KURL& policyURL, const String& value)
+{
+ cookieJar.set(url.string(), value);
+}
+
+String cookies(const Document* document, const KURL& url)
+{
+ return cookieJar.get(url.string());
+}
+
+bool cookiesEnabled(const Document* document)
+{
+ return true;
+}
+
+}
diff --git a/WebCore/platform/efl/Language.cpp b/WebCore/platform/efl/Language.cpp
new file mode 100644
index 0000000..1da7925
--- /dev/null
+++ b/WebCore/platform/efl/Language.cpp
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2003, 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
+ * Copyright (C) 2009-2010 ProFUSION embedded systems
+ * Copyright (C) 2009-2010 Samsung Electronics
+ *
+ * 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 COMPUTER, 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 COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * 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.
+ */
+
+#include "config.h"
+#include "Language.h"
+
+#include "NotImplemented.h"
+#include "PlatformString.h"
+
+namespace WebCore {
+
+String defaultLanguage()
+{
+ notImplemented();
+ return String();
+}
+
+}
diff --git a/WebCore/platform/efl/MIMETypeRegistryEfl.cpp b/WebCore/platform/efl/MIMETypeRegistryEfl.cpp
new file mode 100644
index 0000000..dd8b28c
--- /dev/null
+++ b/WebCore/platform/efl/MIMETypeRegistryEfl.cpp
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2006 Zack Rusin <zack at kde.org>
+ * Copyright (C) 2006 Apple Computer, Inc. All rights reserved.
+ * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
+ * Copyright (C) 2008 Torch Mobile Inc. http://www.torchmobile.com/
+ * Copyright (C) 2009-2010 ProFUSION embedded systems
+ * Copyright (C) 2009-2010 Samsung Electronics
+ *
+ * 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 COMPUTER, 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 COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * 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.
+ */
+
+#include "config.h"
+#include "MIMETypeRegistry.h"
+
+namespace WebCore {
+
+struct ExtensionMap {
+ const char* extension;
+ const char* mimeType;
+};
+
+static const ExtensionMap extensionMap[] = {
+ { "bmp", "image/bmp" },
+ { "css", "text/css" },
+ { "gif", "image/gif" },
+ { "html", "text/html" },
+ { "htm", "text/html" },
+ { "ico", "image/x-icon" },
+ { "jpeg", "image/jpeg" },
+ { "jpg", "image/jpeg" },
+ { "js", "application/x-javascript" },
+ { "mng", "video/x-mng" },
+ { "pbm", "image/x-portable-bitmap" },
+ { "pgm", "image/x-portable-graymap" },
+ { "pdf", "application/pdf" },
+ { "png", "image/png" },
+ { "ppm", "image/x-portable-pixmap" },
+ { "rss", "application/rss+xml" },
+ { "svg", "image/svg+xml" },
+ { "text", "text/plain" },
+ { "tif", "image/tiff" },
+ { "tiff", "image/tiff" },
+ { "txt", "text/plain" },
+ { "xbm", "image/x-xbitmap" },
+ { "xml", "text/xml" },
+ { "xpm", "image/x-xpm" },
+ { "xsl", "text/xsl" },
+ { "xhtml", "application/xhtml+xml" },
+ { "wml", "text/vnd.wap.wml" },
+ { "wmlc", "application/vnd.wap.wmlc" },
+ { 0, 0 }
+};
+
+String MIMETypeRegistry::getMIMETypeForExtension(const String &ext)
+{
+ String s = ext.lower();
+ const ExtensionMap *e = extensionMap;
+ while (e->extension) {
+ if (s == e->extension)
+ return e->mimeType;
+ ++e;
+ }
+
+ return "application/octet-stream";
+}
+
+}
diff --git a/WebCore/platform/efl/PopupMenuEfl.cpp b/WebCore/platform/efl/PopupMenuEfl.cpp
new file mode 100644
index 0000000..80096c2
--- /dev/null
+++ b/WebCore/platform/efl/PopupMenuEfl.cpp
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
+ * Copyright (C) 2009-2010 ProFUSION embedded systems
+ * Copyright (C) 2009-2010 Samsung Electronics
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#include "config.h"
+#include "PopupMenu.h"
+
+#include "FrameView.h"
+#include "NotImplemented.h"
+
+namespace WebCore {
+
+PopupMenu::PopupMenu(PopupMenuClient* client)
+ : m_popupClient(client)
+{
+}
+
+PopupMenu::~PopupMenu()
+{
+}
+
+void PopupMenu::show(const IntRect& rect, FrameView* view, int index)
+{
+ ASSERT(client());
+ notImplemented();
+}
+
+void PopupMenu::hide()
+{
+ notImplemented();
+}
+
+void PopupMenu::updateFromElement()
+{
+ client()->setTextFromItem(client()->selectedIndex());
+}
+
+bool PopupMenu::itemWritingDirectionIsNatural()
+{
+ return true;
+}
+
+}
diff --git a/WebCore/platform/efl/RenderThemeEfl.h b/WebCore/platform/efl/RenderThemeEfl.h
new file mode 100644
index 0000000..3ebd29d
--- /dev/null
+++ b/WebCore/platform/efl/RenderThemeEfl.h
@@ -0,0 +1,201 @@
+/*
+ * This file is part of the WebKit project.
+ *
+ * Copyright (C) 2006 Apple Computer, Inc.
+ * Copyright (C) 2006 Michael Emmel mike.emmel at gmail.com
+ * Copyright (C) 2007 Holger Hans Peter Freyther
+ * Copyright (C) 2007 Alp Toker <alp at atoker.com>
+ * Copyright (C) 2008 INdT - Instituto Nokia de Tecnologia
+ * Copyright (C) 2009-2010 ProFUSION embedded systems
+ * Copyright (C) 2009-2010 Samsung Electronics
+ * All rights reserved.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+
+#ifndef RenderThemeEfl_h
+#define RenderThemeEfl_h
+
+#include "RenderTheme.h"
+
+#include <Ecore_Evas.h>
+#include <Evas.h>
+#include <cairo.h>
+
+namespace WebCore {
+
+enum FormType { // KEEP IN SYNC WITH edjeGroupFromFormType()
+ Button,
+ RadioButton,
+ TextField,
+ CheckBox,
+ ComboBox,
+ SearchField,
+ SearchFieldDecoration,
+ SearchFieldResultsButton,
+ SearchFieldResultsDecoration,
+ SearchFieldCancelButton,
+ FormTypeLast
+};
+
+class RenderThemeEfl : public RenderTheme {
+private:
+ RenderThemeEfl(Page*);
+ ~RenderThemeEfl();
+
+public:
+ static PassRefPtr<RenderTheme> create(Page*);
+
+ // A method asking if the theme's controls actually care about redrawing when hovered.
+ virtual bool supportsHover(const RenderStyle*) const { return true; }
+
+ // A method asking if the theme is able to draw the focus ring.
+ virtual bool supportsFocusRing(const RenderStyle*) const;
+
+ // A method asking if the control changes its tint when the window has focus or not.
+ virtual bool controlSupportsTints(const RenderObject*) const;
+
+ // A general method asking if any control tinting is supported at all.
+ virtual bool supportsControlTints() const { return true; }
+
+ // A method to obtain the baseline position for a "leaf" control. This will only be used if a baseline
+ // position cannot be determined by examining child content. Checkboxes and radio buttons are examples of
+ // controls that need to do this.
+ virtual int baselinePosition(const RenderObject*) const;
+
+ virtual Color platformActiveSelectionBackgroundColor() const { return m_activeSelectionBackgroundColor; }
+ virtual Color platformInactiveSelectionBackgroundColor() const { return m_inactiveSelectionBackgroundColor; }
+ virtual Color platformActiveSelectionForegroundColor() const { return m_activeSelectionForegroundColor; }
+ virtual Color platformInactiveSelectionForegroundColor() const { return m_inactiveSelectionForegroundColor; }
+ virtual Color platformFocusRingColor() const { return m_focusRingColor; }
+
+ virtual void themeChanged();
+
+ // Set platform colors and notify they changed
+ void setActiveSelectionColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
+ void setInactiveSelectionColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
+ void setFocusRingColor(int r, int g, int b, int a);
+
+ void setButtonTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
+ void setComboTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
+ void setEntryTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
+ void setSearchTextColor(int foreR, int foreG, int foreB, int foreA, int backR, int backG, int backB, int backA);
+
+ void adjustSizeConstraints(RenderStyle* style, FormType type) const;
+
+
+ // System fonts.
+ virtual void systemFont(int propId, FontDescription&) const;
+
+ virtual void adjustCheckboxStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintCheckbox(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+
+ virtual void adjustRadioStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintRadio(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+
+ virtual void adjustButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+
+ virtual void adjustTextFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintTextField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+
+ virtual void adjustTextAreaStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintTextArea(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+
+ virtual void adjustMenuListStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintMenuList(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+
+ virtual void adjustSearchFieldResultsDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintSearchFieldResultsDecoration(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+
+ virtual void adjustSearchFieldDecorationStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintSearchFieldDecoration(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+
+ virtual void adjustSearchFieldStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintSearchField(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+
+ virtual void adjustSearchFieldResultsButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintSearchFieldResultsButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+
+ virtual void adjustSearchFieldCancelButtonStyle(CSSStyleSelector*, RenderStyle*, Element*) const;
+ virtual bool paintSearchFieldCancelButton(RenderObject*, const RenderObject::PaintInfo&, const IntRect&);
+
+private:
+ void createCanvas();
+ void createEdje();
+ void applyEdjeColors();
+ void applyPartDescriptions();
+ const char* edjeGroupFromFormType(FormType type) const;
+ void applyEdjeStateFromForm(Evas_Object* o, ControlStates states);
+ bool paintThemePart(RenderObject* o, FormType type, const RenderObject::PaintInfo& i, const IntRect& rect);
+
+ Page* m_page;
+ Color m_activeSelectionBackgroundColor;
+ Color m_activeSelectionForegroundColor;
+ Color m_inactiveSelectionBackgroundColor;
+ Color m_inactiveSelectionForegroundColor;
+ Color m_focusRingColor;
+ Color m_buttonTextBackgroundColor;
+ Color m_buttonTextForegroundColor;
+ Color m_comboTextBackgroundColor;
+ Color m_comboTextForegroundColor;
+ Color m_entryTextBackgroundColor;
+ Color m_entryTextForegroundColor;
+ Color m_searchTextBackgroundColor;
+ Color m_searchTextForegroundColor;
+ Ecore_Evas* m_canvas;
+ Evas_Object* m_edje;
+
+ struct ThemePartDesc {
+ FormType type;
+ LengthSize min;
+ LengthSize max;
+ LengthBox padding;
+ };
+ void applyPartDescriptionFallback(struct ThemePartDesc* desc);
+ void applyPartDescription(Evas_Object* o, struct ThemePartDesc* desc);
+
+ struct ThemePartCacheEntry {
+ FormType type;
+ IntSize size;
+ Ecore_Evas* ee;
+ Evas_Object* o;
+ cairo_surface_t* surface;
+ };
+
+ struct ThemePartDesc m_partDescs[FormTypeLast];
+
+ // this should be small and not so frequently used,
+ // so use a vector and do linear searches
+ Vector<struct ThemePartCacheEntry *> m_partCache;
+
+ // get (use, create or replace) entry from cache
+ struct ThemePartCacheEntry* cacheThemePartGet(FormType type, const IntSize& size);
+ // flush cache, deleting all entries
+ void cacheThemePartFlush();
+
+ // internal, used by cacheThemePartGet()
+ bool themePartCacheEntryReset(struct ThemePartCacheEntry* ce, FormType type);
+ bool themePartCacheEntrySurfaceCreate(struct ThemePartCacheEntry* ce);
+ struct ThemePartCacheEntry* cacheThemePartNew(FormType type, const IntSize& size);
+ struct ThemePartCacheEntry* cacheThemePartReset(FormType type, struct ThemePartCacheEntry* ce);
+ struct ThemePartCacheEntry* cacheThemePartResizeAndReset(FormType type, const IntSize& size, struct ThemePartCacheEntry* ce);
+
+};
+}
+
+#endif // RenderThemeEfl_h
diff --git a/WebCore/platform/efl/SharedTimerEfl.cpp b/WebCore/platform/efl/SharedTimerEfl.cpp
new file mode 100644
index 0000000..122c8c3
--- /dev/null
+++ b/WebCore/platform/efl/SharedTimerEfl.cpp
@@ -0,0 +1,73 @@
+/*
+ * Copyright (C) 2008 Kenneth Rohde Christiansen
+ * (C) 2008 Afonso Rabelo Costa Jr.
+ * (C) 2009-2010 ProFUSION embedded systems
+ * (C) 2009-2010 Samsung Electronics
+ *
+ * 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 COMPUTER, 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 COMPUTER, INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * 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.
+ */
+
+#include "config.h"
+#include "SharedTimer.h"
+
+#include <Ecore.h>
+#include <stdio.h>
+#include <wtf/Assertions.h>
+#include <wtf/CurrentTime.h>
+
+namespace WebCore {
+
+static Ecore_Timer *g_sharedTimer = 0;
+
+static void (*g_timerFunction)();
+
+void setSharedTimerFiredFunction(void (*func)())
+{
+ g_timerFunction = func;
+}
+
+static int timerEvent(void*)
+{
+ if (g_timerFunction)
+ g_timerFunction();
+
+ return ECORE_CALLBACK_CANCEL;
+}
+
+void stopSharedTimer()
+{
+ if (g_sharedTimer) {
+ ecore_timer_del(g_sharedTimer);
+ g_sharedTimer = 0;
+ }
+}
+
+void setSharedTimerFireTime(double fireTime)
+{
+ double interval = fireTime - currentTime();
+
+ stopSharedTimer();
+ g_sharedTimer = ecore_timer_add(interval, timerEvent, 0);
+}
+
+}
+
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list