Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

Allow to compile phantomjs without touch events in webkit #408

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/qt/src/3rdparty/webkit/Source/WebCore/features.pri
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ symbian|maemo5|maemo6 {
}
}

!contains(DEFINES, ENABLE_TOUCH_EVENTS=.): DEFINES += ENABLE_TOUCH_EVENTS=1
# If not requested, do not enable touch events
!contains(DEFINES, ENABLE_TOUCH_EVENTS=.): DEFINES += ENABLE_TOUCH_EVENTS=0

# HTML5 Media Support
# We require QtMultimedia
Expand Down
13 changes: 10 additions & 3 deletions src/qt/src/3rdparty/webkit/Source/WebCore/generated/JSDocument.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@
#include "JSRange.h"
#include "JSStyleSheetList.h"
#include "JSText.h"
#if ENABLE(TOUCH_EVENTS)
#include "JSTouch.h"
#endif
#include "JSTreeWalker.h"
#include "JSXPathExpression.h"
#include "JSXPathNSResolver.h"
Expand All @@ -84,8 +86,10 @@
#include "Range.h"
#include "StyleSheetList.h"
#include "Text.h"
#if ENABLE(TOUCH_EVENTS)
#include "Touch.h"
#include "TouchList.h"
#endif
#include "TreeWalker.h"
#include "XPathExpression.h"
#include "XPathNSResolver.h"
Expand Down Expand Up @@ -296,8 +300,10 @@ static const HashTableValue JSDocumentPrototypeTableValues[40] =
{ "getElementsByClassName", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionGetElementsByClassName), (intptr_t)1 THUNK_GENERATOR(0) },
{ "querySelector", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQuerySelector), (intptr_t)1 THUNK_GENERATOR(0) },
{ "querySelectorAll", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionQuerySelectorAll), (intptr_t)1 THUNK_GENERATOR(0) },
#if ENABLE(TOUCH_EVENTS)
{ "createTouch", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateTouch), (intptr_t)7 THUNK_GENERATOR(0) },
{ "createTouchList", DontDelete | Function, (intptr_t)static_cast<NativeFunction>(jsDocumentPrototypeFunctionCreateTouchList), (intptr_t)0 THUNK_GENERATOR(0) },
#endif
{ 0, 0, 0, 0 THUNK_GENERATOR(0) }
};

Expand Down Expand Up @@ -2569,7 +2575,7 @@ EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQuerySelectorAll(ExecSta
setDOMException(exec, ec);
return JSValue::encode(result);
}

#if ENABLE(TOUCH_EVENTS)
EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateTouch(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
Expand Down Expand Up @@ -2605,7 +2611,8 @@ EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateTouch(ExecState* e
setDOMException(exec, ec);
return JSValue::encode(result);
}

#endif
#if ENABLE(TOUCH_EVENTS)
EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateTouchList(ExecState* exec)
{
JSValue thisValue = exec->hostThisValue();
Expand All @@ -2614,7 +2621,7 @@ EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateTouchList(ExecStat
JSDocument* castedThis = static_cast<JSDocument*>(asObject(thisValue));
return JSValue::encode(castedThis->createTouchList(exec));
}

#endif
Document* toDocument(JSC::JSValue value)
{
return value.inherits(&JSDocument::s_info) ? static_cast<JSDocument*>(asObject(value))->impl() : 0;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ class JSDocument : public JSNode {
void setLocation(JSC::ExecState*, JSC::JSValue);

// Custom functions
#if ENABLE(TOUCH_EVENTS)
JSC::JSValue createTouchList(JSC::ExecState*);
#endif
Document* impl() const
{
return static_cast<Document*>(Base::impl());
Expand Down Expand Up @@ -130,8 +132,10 @@ JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetCSSCanvasContext
JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionGetElementsByClassName(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQuerySelector(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionQuerySelectorAll(JSC::ExecState*);
#if ENABLE(TOUCH_EVENTS)
JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateTouch(JSC::ExecState*);
JSC::EncodedJSValue JSC_HOST_CALL jsDocumentPrototypeFunctionCreateTouchList(JSC::ExecState*);
#endif
// Attributes

JSC::JSValue jsDocumentDoctype(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
Expand Down Expand Up @@ -257,6 +261,7 @@ JSC::JSValue jsDocumentOnselectstart(JSC::ExecState*, JSC::JSValue, const JSC::I
void setJSDocumentOnselectstart(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDocumentOnselectionchange(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
void setJSDocumentOnselectionchange(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
#if ENABLE(TOUCH_EVENTS)
JSC::JSValue jsDocumentOntouchstart(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
void setJSDocumentOntouchstart(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDocumentOntouchmove(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
Expand All @@ -265,6 +270,7 @@ JSC::JSValue jsDocumentOntouchend(JSC::ExecState*, JSC::JSValue, const JSC::Iden
void setJSDocumentOntouchend(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDocumentOntouchcancel(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
void setJSDocumentOntouchcancel(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
#endif
JSC::JSValue jsDocumentOnwebkitfullscreenchange(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
void setJSDocumentOnwebkitfullscreenchange(JSC::ExecState*, JSC::JSObject*, JSC::JSValue);
JSC::JSValue jsDocumentConstructor(JSC::ExecState*, JSC::JSValue, const JSC::Identifier&);
Expand Down