Commit b4b8227d authored by commit-queue@webkit.org's avatar commit-queue@webkit.org
Browse files

[Nix] Updating Nix trunk files

https://bugs.webkit.org/show_bug.cgi?id=121752

Patch by Thiago de Barros Lacerda <thiago.lacerda@openbossa.org> on 2013-09-27
Reviewed by Benjamin Poulain.

Source/WebCore:

No new tests needed.

* page/nix/EventHandlerNix.cpp:
(WebCore::EventHandler::focusDocumentView):
(WebCore::EventHandler::passWheelEventToWidget):
(WebCore::EventHandler::passMousePressEventToSubframe):
(WebCore::EventHandler::passMouseMoveEventToSubframe):
(WebCore::EventHandler::passMouseReleaseEventToSubframe):
* platform/DragImage.h:
* platform/graphics/GraphicsContext3D.h:
* platform/nix/DragImageNix.cpp:
(WebCore::createDragImageFromImage):
* platform/nix/GamepadsNix.cpp:
(WebCore::sampleGamepads):
* platform/nix/LanguageNix.cpp:
(WebCore::platformLanguage):
* platform/nix/LocalizedStringsNix.cpp:
(WebCore::unacceptableTLSCertificate):
* platform/nix/PasteboardNix.cpp:
(WebCore::Pasteboard::types):
* platform/nix/RenderThemeNix.cpp:
(WebCore::toColor):
(WebCore::themeEngine):
(WebCore::webCanvas):
(WebCore::getWebThemeState):
(WebCore::RenderThemeNix::paintButton):
(WebCore::RenderThemeNix::paintTextField):
(WebCore::RenderThemeNix::paintCheckbox):
(WebCore::RenderThemeNix::paintRadio):
(WebCore::RenderThemeNix::paintMenuList):
(WebCore::RenderThemeNix::paintProgressBar):
(WebCore::RenderThemeNix::paintInnerSpinButton):
(WebCore::RenderThemeNix::paintMeter):

Source/WTF:

* wtf/nix/FeatureDefinesNix.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@156567 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 4a021a11
2013-09-27 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[Nix] Updating Nix trunk files
https://bugs.webkit.org/show_bug.cgi?id=121752
Reviewed by Benjamin Poulain.
* wtf/nix/FeatureDefinesNix.h:
2013-09-06 Jer Noble <jer.noble@apple.com>
 
[Mac] Implement the media controls in JavaScript.
......
......@@ -38,6 +38,10 @@
#define ENABLE_ACCELERATED_OVERFLOW_SCROLLING 1
#endif
#if !defined(ENABLE_BATTERY_STATUS)
#define ENABLE_BATTERY_STATUS 1
#endif
#if !defined(ENABLE_BLOB)
#define ENABLE_BLOB 1
#endif
......@@ -58,6 +62,10 @@
#define ENABLE_CSS_BOX_DECORATION_BREAK 1
#endif
#if !defined(ENABLE_CSS_DEVICE_ADAPTATION)
#define ENABLE_CSS_DEVICE_ADAPTATION 1
#endif
#if !defined(ENABLE_CSS_EXCLUSIONS)
#define ENABLE_CSS_EXCLUSIONS 1
#endif
......@@ -122,6 +130,10 @@
#define ENABLE_GAMEPAD 1
#endif
#if !defined(ENABLE_GEOLOCATION)
#define ENABLE_GEOLOCATION 1
#endif
#if !defined(ENABLE_GESTURE_EVENTS)
#define ENABLE_GESTURE_EVENTS 1
#endif
......@@ -154,10 +166,6 @@
#define ENABLE_JIT 1
#endif
#if !defined(ENABLE_LEGACY_VENDOR_PREFIXES)
#define ENABLE_LEGACY_VENDOR_PREFIXES 0
#endif
#if !defined(ENABLE_LEGACY_VIEWPORT_ADAPTION)
#define ENABLE_LEGACY_VIEWPORT_ADAPTION 1
#endif
......@@ -178,10 +186,6 @@
#define ENABLE_METER_ELEMENT 1
#endif
#if !defined(ENABLE_MICRODATA)
#define ENABLE_MICRODATA 1
#endif
#if !defined(ENABLE_NAVIGATOR_CONTENT_UTILS)
#define ENABLE_NAVIGATOR_CONTENT_UTILS 1
#endif
......@@ -194,6 +198,10 @@
#define ENABLE_NETWORK_INFO 1
#endif
#if !defined(ENABLE_PAGE_VISIBILITY_API)
#define ENABLE_PAGE_VISIBILITY_API 1
#endif
#if !defined(ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH)
#define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
#endif
......@@ -206,6 +214,10 @@
#define ENABLE_PROGRESS_ELEMENT 1
#endif
#if !defined(ENABLE_PROMISES)
#define ENABLE_PROMISES 1
#endif
#if !defined(ENABLE_REQUEST_ANIMATION_FRAME)
#define ENABLE_REQUEST_ANIMATION_FRAME 1
#endif
......@@ -242,6 +254,10 @@
#define ENABLE_UNDO_MANAGER 0
#endif
#if !defined(ENABLE_VIBRATION)
#define ENABLE_VIBRATION 1
#endif
#if !defined(ENABLE_VIDEO)
#define ENABLE_VIDEO 0
#endif
......
2013-09-27 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[Nix] Updating Nix trunk files
https://bugs.webkit.org/show_bug.cgi?id=121752
Reviewed by Benjamin Poulain.
No new tests needed.
* page/nix/EventHandlerNix.cpp:
(WebCore::EventHandler::focusDocumentView):
(WebCore::EventHandler::passWheelEventToWidget):
(WebCore::EventHandler::passMousePressEventToSubframe):
(WebCore::EventHandler::passMouseMoveEventToSubframe):
(WebCore::EventHandler::passMouseReleaseEventToSubframe):
* platform/DragImage.h:
* platform/graphics/GraphicsContext3D.h:
* platform/nix/DragImageNix.cpp:
(WebCore::createDragImageFromImage):
* platform/nix/GamepadsNix.cpp:
(WebCore::sampleGamepads):
* platform/nix/LanguageNix.cpp:
(WebCore::platformLanguage):
* platform/nix/LocalizedStringsNix.cpp:
(WebCore::unacceptableTLSCertificate):
* platform/nix/PasteboardNix.cpp:
(WebCore::Pasteboard::types):
* platform/nix/RenderThemeNix.cpp:
(WebCore::toColor):
(WebCore::themeEngine):
(WebCore::webCanvas):
(WebCore::getWebThemeState):
(WebCore::RenderThemeNix::paintButton):
(WebCore::RenderThemeNix::paintTextField):
(WebCore::RenderThemeNix::paintCheckbox):
(WebCore::RenderThemeNix::paintRadio):
(WebCore::RenderThemeNix::paintMenuList):
(WebCore::RenderThemeNix::paintProgressBar):
(WebCore::RenderThemeNix::paintInnerSpinButton):
(WebCore::RenderThemeNix::paintMeter):
2013-09-27 Anders Carlsson <andersca@apple.com>
 
Use std::unique_ptr for GraphicsLayer creation
......@@ -58,8 +58,8 @@ bool EventHandler::tabsToAllFormControls(KeyboardEvent*) const
void EventHandler::focusDocumentView()
{
if (Page* page = m_frame->page())
page->focusController()->setFocusedFrame(m_frame);
if (Page* page = m_frame.page())
page->focusController().setFocusedFrame(&m_frame);
}
bool EventHandler::passWidgetMouseDownEventToWidget(const MouseEventWithHitTestResults& event)
......@@ -95,7 +95,7 @@ bool EventHandler::passWheelEventToWidget(const PlatformWheelEvent& event, Widge
if (!widget->isFrameView())
return false;
return static_cast<FrameView*>(widget)->frame()->eventHandler()->handleWheelEvent(event);
return static_cast<FrameView*>(widget)->frame().eventHandler().handleWheelEvent(event);
}
#if ENABLE(DRAG_SUPPORT)
......@@ -107,19 +107,19 @@ PassRefPtr<Clipboard> EventHandler::createDraggingClipboard() const
bool EventHandler::passMousePressEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
{
subframe->eventHandler()->handleMousePressEvent(mev.event());
subframe->eventHandler().handleMousePressEvent(mev.event());
return true;
}
bool EventHandler::passMouseMoveEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe, HitTestResult* hoveredNode)
{
subframe->eventHandler()->handleMouseMoveEvent(mev.event(), hoveredNode);
subframe->eventHandler().handleMouseMoveEvent(mev.event(), hoveredNode);
return true;
}
bool EventHandler::passMouseReleaseEventToSubframe(MouseEventWithHitTestResults& mev, Frame* subframe)
{
subframe->eventHandler()->handleMouseReleaseEvent(mev.event());
subframe->eventHandler().handleMouseReleaseEvent(mev.event());
return true;
}
......
......@@ -41,7 +41,7 @@ class QPixmap;
QT_END_NAMESPACE
#elif PLATFORM(WIN)
typedef struct HBITMAP__* HBITMAP;
#elif PLATFORM(GTK)
#elif PLATFORM(GTK) || PLATFORM(NIX)
typedef struct _cairo_surface cairo_surface_t;
#endif
......@@ -59,9 +59,9 @@ namespace WebCore {
typedef QPixmap* DragImageRef;
#elif PLATFORM(WIN)
typedef HBITMAP DragImageRef;
#elif PLATFORM(GTK)
#elif PLATFORM(GTK) || PLATFORM(NIX)
typedef cairo_surface_t* DragImageRef;
#elif PLATFORM(EFL) || PLATFORM(BLACKBERRY) || PLATFORM(NIX)
#elif PLATFORM(EFL) || PLATFORM(BLACKBERRY)
typedef void* DragImageRef;
#endif
......
......@@ -1030,7 +1030,7 @@ private:
OwnPtr<ShaderNameHash> nameHashMapForShaders;
#endif
#if PLATFORM(BLACKBERRY) || (PLATFORM(QT) && defined(QT_OPENGL_ES_2)) || ((PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN)) && USE(OPENGL_ES_2))
#if PLATFORM(BLACKBERRY) || (PLATFORM(QT) && defined(QT_OPENGL_ES_2)) || ((PLATFORM(GTK) || PLATFORM(EFL) || PLATFORM(WIN) || PLATFORM(NIX)) && USE(OPENGL_ES_2))
friend class Extensions3DOpenGLES;
OwnPtr<Extensions3DOpenGLES> m_extensions;
#else
......
......@@ -55,7 +55,7 @@ DragImageRef dissolveDragImageToFraction(DragImageRef image, float)
return image;
}
DragImageRef createDragImageFromImage(Image*, RespectImageOrientationEnum)
DragImageRef createDragImageFromImage(Image*, ImageOrientationDescription)
{
notImplemented();
return 0;
......
......@@ -37,21 +37,21 @@ class GamepadList;
void sampleGamepads(GamepadList* into)
{
WebKit::WebGamepads gamepads;
Nix::Gamepads gamepads;
WebKit::Platform::current()->sampleGamepads(gamepads);
Nix::Platform::current()->sampleGamepads(gamepads);
for (unsigned i = 0; i < WebKit::WebGamepads::itemsLengthCap; ++i) {
WebKit::WebGamepad& webGamepad = gamepads.items[i];
if (i < gamepads.length && webGamepad.connected) {
for (unsigned i = 0; i < Nix::Gamepads::itemsLengthCap; ++i) {
Nix::Gamepad& nixGamepad = gamepads.items[i];
if (i < gamepads.length && nixGamepad.connected) {
RefPtr<Gamepad> gamepad = into->item(i);
if (!gamepad)
gamepad = Gamepad::create();
gamepad->id(webGamepad.id);
gamepad->id(nixGamepad.id);
gamepad->index(i);
gamepad->timestamp(webGamepad.timestamp);
gamepad->axes(webGamepad.axesLength, webGamepad.axes);
gamepad->buttons(webGamepad.buttonsLength, webGamepad.buttons);
gamepad->timestamp(nixGamepad.timestamp);
gamepad->axes(nixGamepad.axesLength, nixGamepad.axes);
gamepad->buttons(nixGamepad.buttonsLength, nixGamepad.buttons);
into->set(i, gamepad);
} else
into->set(i, 0);
......
......@@ -41,7 +41,7 @@ static String platformLanguage()
char* localeDefault = setlocale(LC_CTYPE, 0);
if (!localeDefault)
return ASCIIString("c");
return ASCIILiteral("c");
String locale = String(localeDefault);
locale.replace('_', '-');
......
......@@ -44,4 +44,9 @@ String localizedString(const char* key)
return String::fromUTF8(key, strlen(key));
}
String unacceptableTLSCertificate()
{
return ASCIILiteral("Unacceptable TLS certificate");
}
}
......@@ -24,17 +24,11 @@
#include "config.h"
#include "Pasteboard.h"
#include "DocumentFragment.h"
#include "NotImplemented.h"
#include <wtf/text/StringHash.h>
namespace WebCore {
using namespace WTF;
Pasteboard* Pasteboard::generalPasteboard()
{
static Pasteboard* pasteboard = new Pasteboard();
return pasteboard;
}
namespace WebCore {
Pasteboard::Pasteboard()
{
......@@ -46,26 +40,11 @@ void Pasteboard::writePlainText(const String&, SmartReplaceOption)
notImplemented();
}
void Pasteboard::writeSelection(Range*, bool, Frame*, ShouldSerializeSelectedTextForClipboard)
{
notImplemented();
}
void Pasteboard::write(const PasteboardURL&)
{
notImplemented();
}
void Pasteboard::writeImage(Node*, const URL&, const String&)
{
notImplemented();
}
void Pasteboard::writeClipboard(Clipboard*)
{
notImplemented();
}
void Pasteboard::clear()
{
notImplemented();
......@@ -77,12 +56,6 @@ bool Pasteboard::canSmartReplace()
return false;
}
PassRefPtr<DocumentFragment> Pasteboard::documentFragment(Frame*, PassRefPtr<Range>, bool, bool&)
{
notImplemented();
return 0;
}
void Pasteboard::read(PasteboardPlainText&)
{
notImplemented();
......@@ -133,10 +106,10 @@ bool Pasteboard::writeString(const String&, const String&)
return false;
}
ListHashSet<String> Pasteboard::types()
Vector<String> Pasteboard::types()
{
notImplemented();
return ListHashSet<String>();
return Vector<String>();
}
Vector<String> Pasteboard::readFilenames()
......
......@@ -29,10 +29,10 @@
#include "InputTypeNames.h"
#include "PaintInfo.h"
#include "PlatformContextCairo.h"
#include "public/Canvas.h"
#include "public/Platform.h"
#include "public/WebCanvas.h"
#include "public/WebRect.h"
#include "public/WebThemeEngine.h"
#include "public/Rect.h"
#include "public/ThemeEngine.h"
#if ENABLE(PROGRESS_ELEMENT)
#include "RenderProgress.h"
#endif
......@@ -53,17 +53,17 @@ static void setSizeIfAuto(RenderStyle* style, const IntSize& size)
style->setHeight(Length(size.height(), Fixed));
}
Color toColor(const WebKit::WebColor& color)
Color toColor(const Nix::Color& color)
{
return WebCore::Color(RGBA32(color));
}
static WebKit::WebThemeEngine* themeEngine()
static Nix::ThemeEngine* themeEngine()
{
return WebKit::Platform::current()->themeEngine();
return Nix::Platform::current()->themeEngine();
}
static WebKit::WebCanvas* webCanvas(const PaintInfo& info)
static Nix::Canvas* webCanvas(const PaintInfo& info)
{
return info.context->platformContext()->cr();
}
......@@ -169,28 +169,28 @@ void RenderThemeNix::systemFont(WebCore::CSSValueID, FontDescription&) const
{
}
static WebKit::WebThemeEngine::State getWebThemeState(const RenderTheme* theme, const RenderObject* o)
static Nix::ThemeEngine::State getWebThemeState(const RenderTheme* theme, const RenderObject* o)
{
if (!theme->isEnabled(o))
return WebKit::WebThemeEngine::StateDisabled;
return Nix::ThemeEngine::StateDisabled;
if (theme->isPressed(o))
return WebKit::WebThemeEngine::StatePressed;
return Nix::ThemeEngine::StatePressed;
if (theme->isHovered(o))
return WebKit::WebThemeEngine::StateHover;
return Nix::ThemeEngine::StateHover;
return WebKit::WebThemeEngine::StateNormal;
return Nix::ThemeEngine::StateNormal;
}
bool RenderThemeNix::paintButton(RenderObject* o, const PaintInfo& i, const IntRect& rect)
{
WebKit::WebThemeEngine::ButtonExtraParams extraParams;
Nix::ThemeEngine::ButtonExtraParams extraParams;
extraParams.isDefault = isDefault(o);
extraParams.hasBorder = true;
extraParams.backgroundColor = defaultButtonBackgroundColor;
if (o->hasBackground())
extraParams.backgroundColor = o->style()->visitedDependentColor(CSSPropertyBackgroundColor).rgb();
themeEngine()->paintButton(webCanvas(i), getWebThemeState(this, o), WebKit::WebRect(rect), extraParams);
themeEngine()->paintButton(webCanvas(i), getWebThemeState(this, o), Nix::Rect(rect), extraParams);
return false;
}
......@@ -201,7 +201,7 @@ bool RenderThemeNix::paintTextField(RenderObject* o, const PaintInfo& i, const I
if (o->style()->hasBorderRadius() || o->style()->hasBackgroundImage())
return true;
themeEngine()->paintTextField(webCanvas(i), getWebThemeState(this, o), WebKit::WebRect(rect));
themeEngine()->paintTextField(webCanvas(i), getWebThemeState(this, o), Nix::Rect(rect));
return false;
}
......@@ -212,11 +212,11 @@ bool RenderThemeNix::paintTextArea(RenderObject* o, const PaintInfo& i, const In
bool RenderThemeNix::paintCheckbox(RenderObject* o, const PaintInfo& i, const IntRect& rect)
{
WebKit::WebThemeEngine::ButtonExtraParams extraParams;
Nix::ThemeEngine::ButtonExtraParams extraParams;
extraParams.checked = isChecked(o);
extraParams.indeterminate = isIndeterminate(o);
themeEngine()->paintCheckbox(webCanvas(i), getWebThemeState(this, o), WebKit::WebRect(rect), extraParams);
themeEngine()->paintCheckbox(webCanvas(i), getWebThemeState(this, o), Nix::Rect(rect), extraParams);
return false;
}
......@@ -232,11 +232,11 @@ void RenderThemeNix::setCheckboxSize(RenderStyle* style) const
bool RenderThemeNix::paintRadio(RenderObject* o, const PaintInfo& i, const IntRect& rect)
{
WebKit::WebThemeEngine::ButtonExtraParams extraParams;
Nix::ThemeEngine::ButtonExtraParams extraParams;
extraParams.checked = isChecked(o);
extraParams.indeterminate = isIndeterminate(o);
themeEngine()->paintRadio(webCanvas(i), getWebThemeState(this, o), WebKit::WebRect(rect), extraParams);
themeEngine()->paintRadio(webCanvas(i), getWebThemeState(this, o), Nix::Rect(rect), extraParams);
return false;
}
......@@ -252,7 +252,7 @@ void RenderThemeNix::setRadioSize(RenderStyle* style) const
bool RenderThemeNix::paintMenuList(RenderObject* o, const PaintInfo& i, const IntRect& rect)
{
themeEngine()->paintMenuList(webCanvas(i), getWebThemeState(this, o), WebKit::WebRect(rect));
themeEngine()->paintMenuList(webCanvas(i), getWebThemeState(this, o), Nix::Rect(rect));
return false;
}
......@@ -281,12 +281,12 @@ void RenderThemeNix::adjustProgressBarStyle(StyleResolver*, RenderStyle* style,
bool RenderThemeNix::paintProgressBar(RenderObject* o, const PaintInfo& i, const IntRect& rect)
{
RenderProgress* renderProgress = toRenderProgress(o);
WebKit::WebThemeEngine::ProgressBarExtraParams extraParams;
Nix::ThemeEngine::ProgressBarExtraParams extraParams;
extraParams.isDeterminate = renderProgress->isDeterminate();
extraParams.position = renderProgress->position();
extraParams.animationProgress = renderProgress->animationProgress();
extraParams.animationStartTime = renderProgress->animationStartTime();
themeEngine()->paintProgressBar(webCanvas(i), getWebThemeState(this, o), WebKit::WebRect(rect), extraParams);
themeEngine()->paintProgressBar(webCanvas(i), getWebThemeState(this, o), Nix::Rect(rect), extraParams);
return false;
}
......@@ -384,11 +384,11 @@ void RenderThemeNix::adjustInnerSpinButtonStyle(StyleResolver*, RenderStyle* sty
bool RenderThemeNix::paintInnerSpinButton(RenderObject* o, const PaintInfo& i, const IntRect& rect)
{
WebKit::WebThemeEngine::InnerSpinButtonExtraParams extraParams;
Nix::ThemeEngine::InnerSpinButtonExtraParams extraParams;
extraParams.spinUp = isSpinUpButtonPartPressed(o);
extraParams.readOnly = isReadOnlyControl(o);
themeEngine()->paintInnerSpinButton(webCanvas(i), getWebThemeState(this, o), WebKit::WebRect(rect), extraParams);
themeEngine()->paintInnerSpinButton(webCanvas(i), getWebThemeState(this, o), Nix::Rect(rect), extraParams);
return false;
}
......@@ -424,7 +424,7 @@ bool RenderThemeNix::paintMeter(RenderObject* o, const PaintInfo& i, const IntRe
RenderMeter* renderMeter = toRenderMeter(o);
HTMLMeterElement* e = renderMeter->meterElement();
WebKit::WebThemeEngine::MeterExtraParams extraParams;
Nix::ThemeEngine::MeterExtraParams extraParams;
extraParams.min = e->min();
extraParams.max = e->max();
extraParams.value = e->value();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment