diff options
Diffstat (limited to 'Source/WebKit2')
10 files changed, 288 insertions, 95 deletions
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog index 576cd0538..71a25bbfe 100644 --- a/Source/WebKit2/ChangeLog +++ b/Source/WebKit2/ChangeLog @@ -1,3 +1,169 @@ +2012-11-25 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> + + [WK2] TiledBackingStore: page contents is scaled wrongly + https://bugs.webkit.org/show_bug.cgi?id=103090 + + Reviewed by Kenneth Rohde Christiansen. + + Before this change the page contents scaling in PageViewportController was + defined all the times by m_rawAttributes.initialScale. If initial scale had not + been specified in the viewport meta tag it was set to m_minimumScaleToFit inside + PageViewportController::didChangeViewportAttributes(). + + The problem was that m_minimumScaleToFit could have wrong value as contents size + might have not be updated by the time PageViewportController::didChangeViewportAttributes() + was invoked. + + The solution is to use m_minimumScaleToFit for contents scaling if initial scale + is not specified in the viewport meta tag, as it is updated all the time. + Also a flag m_initiallyFitToViewport is added to PageViewportController to detect + whether m_minimumScaleToFit should be used for scaling. + + * UIProcess/PageViewportController.cpp: + (WebKit::PageViewportController::PageViewportController): + (WebKit::PageViewportController::didChangeContentsSize): + (WebKit::PageViewportController::pageTransitionViewportReady): + (WebKit::PageViewportController::didChangeViewportAttributes): + * UIProcess/PageViewportController.h: + (PageViewportController): + +2012-11-24 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> + + [EFL][WK2] Stop the mess with DECLARE_EWK_VIEW_CALLBACK arg type definition + https://bugs.webkit.org/show_bug.cgi?id=103187 + + Reviewed by Kenneth Rohde Christiansen. + + Now the client should pass to DECLARE_EWK_VIEW_CALLBACK macro exacly the + same arg type s/he wants to have in the Ewk_View callback. + + * UIProcess/API/efl/EwkViewCallbacks.h: + (EvasObjectHolder): + (EwkViewCallbacks::EvasObjectHolder::EvasObjectHolder): + (EwkViewCallbacks): + +2012-11-24 Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> + + [EFL][WK2] Check errors in EwkView callbacks usage at compile time + https://bugs.webkit.org/show_bug.cgi?id=103177 + + Reviewed by Kenneth Rohde Christiansen. + + Errors in EwkView callbacks usage are now checked at compile time. + + * UIProcess/API/efl/EwkViewCallbacks.h: + (CallBack): + (EwkViewCallbacks::CallBack::CallBack): + (EwkViewCallbacks::CallBack::call): + +2012-11-23 Sheriff Bot <webkit.review.bot@gmail.com> + + Unreviewed, rolling out r135575. + http://trac.webkit.org/changeset/135575 + https://bugs.webkit.org/show_bug.cgi?id=103169 + + It made all tests assert (Requested by Ossy on #webkit). + + * qt/MainQt.cpp: + (WebKit): + (main): + +2012-11-23 Alexis Menard <alexis@webkit.org> + + [CSS3 Backgrounds and Borders] Implement new CSS3 background-position parsing. + https://bugs.webkit.org/show_bug.cgi?id=102104 + + Reviewed by Julien Chaffraix. + + Protect the new feature behind a feature flag. + + * Configurations/FeatureDefines.xcconfig: + +2012-11-23 Huang Dongsung <luxtella@company100.net> + + Coordinated Graphics: Match the behavior of selfOrAncestorHaveNonAffineTransforms() to its name. + https://bugs.webkit.org/show_bug.cgi?id=103097 + + Reviewed by Noam Rosenthal. + + CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms() does + not check its ancestor. This patch makes this method check its ancestor + to match its name. + + * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: + (WebCore::CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms): + +2012-11-23 Huang Dongsung <luxtella@company100.net> + + Coordinated Graphics: LayerTreeRenderer::removeTile() does not remove tiles actually. + https://bugs.webkit.org/show_bug.cgi?id=103030 + + Reviewed by Noam Rosenthal. + + LayerTreeRenderer::removeTile() must add a backing store into + m_backingStoresWithPendingBuffers. Otherwise, tiles are not removed. + + * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: + (WebKit::LayerTreeRenderer::removeTile): + +2012-11-23 Huang Dongsung <luxtella@company100.net> + + [TexMap] Remove dependency of TextureMapperLayer on GraphicsLayerTextureMapper. + https://bugs.webkit.org/show_bug.cgi?id=103046 + + Reviewed by Noam Rosenthal. + + This patch makes GraphicsLayerTextureMapper create its own backing + store. However, LayerTreeRenderer also creates its own backing store. So + when LayerTreeRenderer uses GraphicsLayerTextureMapper, + LayerTreeRenderer needs GraphicsLayerTextureMapper to not create its own + backing store. + + * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: + (WebKit::LayerTreeRenderer::createLayer): + (WebKit::LayerTreeRenderer::getBackingStore): + +2012-11-23 Huang Dongsung <luxtella@company100.net> + + REGRESSION(r135486): ASSERT(isMainThread()) hit in LayerTreeRenderer::setActive(bool) + https://bugs.webkit.org/show_bug.cgi?id=103077 + + Reviewed by Noam Rosenthal. + + Currently, the painting thread uses purgeGLResources() and setActive(). + QQuickWebPage::updatePaintNode() indirectly calls both methods after + locking the main thread. + + This patch changes two points. + 1. Remove ASSERT(isMainThread()) in methods that the painting thread can + call. + 2. Make purgeGLResources() and setActive() call methods of + LayerTreeCoordinatorProxy via dispatchOnMainThread(). + + * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: + (WebKit::LayerTreeRenderer::LayerTreeRenderer): + (WebKit::LayerTreeRenderer::renderNextFrame): + (WebKit::LayerTreeRenderer::purgeGLResources): + (WebKit): + (WebKit::LayerTreeRenderer::purgeBackingStores): + (WebKit::LayerTreeRenderer::setActive): + * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: + (LayerTreeRenderer): + +2012-11-23 Christophe Dumez <christophe.dumez@intel.com> + + [EFL][WK2][AC] EwkViewImpl::transformToScreen() does not retrieve the Ecore_X_Window properly + https://bugs.webkit.org/show_bug.cgi?id=103133 + + Reviewed by Kenneth Rohde Christiansen. + + If accelerated compositing is enabled, EwkViewImpl::transformToScreen() should + attempt to retrieve the Ecore_X_Window using ecore_evas_gl_x11_window_get() first + and only fall back to ecore_evas_software_x11_window_get(). + + * UIProcess/API/efl/EwkViewImpl.cpp: + (EwkViewImpl::transformToScreen): + 2012-11-23 Wojciech Bielawski <w.bielawski@samsung.com> [WK2][WKTR] WebKitTestRunner needs eventSender.contextClick() diff --git a/Source/WebKit2/Configurations/FeatureDefines.xcconfig b/Source/WebKit2/Configurations/FeatureDefines.xcconfig index 0e1b15340..b0d2dab41 100644 --- a/Source/WebKit2/Configurations/FeatureDefines.xcconfig +++ b/Source/WebKit2/Configurations/FeatureDefines.xcconfig @@ -48,6 +48,7 @@ ENABLE_CSS_REGIONS = ENABLE_CSS_REGIONS; ENABLE_CSS_SHADERS = ENABLE_CSS_SHADERS; ENABLE_CSS_STICKY_POSITION = ENABLE_CSS_STICKY_POSITION; ENABLE_CSS_VARIABLES = ; +ENABLE_CSS3_BACKGROUND = ; ENABLE_CSS3_CONDITIONAL_RULES = ; ENABLE_CSS3_TEXT = ; ENABLE_CUSTOM_SCHEME_HANDLER = ; @@ -157,4 +158,4 @@ ENABLE_WORKERS = ENABLE_WORKERS; ENABLE_XHR_TIMEOUT = ENABLE_XHR_TIMEOUT; ENABLE_XSLT = ENABLE_XSLT; -FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_TEXT) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_LINK_PRERENDER) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MUTATION_OBSERVERS) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT); +FEATURE_DEFINES = $(ENABLE_3D_RENDERING) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ANIMATION_API) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_EXCLUSIONS) $(ENABLE_CSS_FILTERS) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SHADERS) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_STICKY_POSITION) $(ENABLE_CSS_VARIABLES) $(ENABLE_CSS3_CONDITIONAL_RULES) $(ENABLE_CSS3_BACKGROUND) $(ENABLE_CSS3_TEXT) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIALOG_ELEMENT) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DRAGGABLE_REGION) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_FILE_SYSTEM) $(ENABLE_FILTERS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_HIGH_DPI_CANVAS) $(ENABLE_ICONDATABASE) $(ENABLE_IFRAME_SEAMLESS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LINK_PREFETCH) $(ENABLE_LINK_PRERENDER) $(ENABLE_MATHML) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MICRODATA) $(ENABLE_MUTATION_OBSERVERS) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NOTIFICATIONS) $(ENABLE_PAGE_VISIBILITY_API) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_PROGRESS_ELEMENT) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_SCRIPTED_SPEECH) $(ENABLE_SHADOW_DOM) $(ENABLE_SHARED_WORKERS) $(ENABLE_SQL_DATABASE) $(ENABLE_STYLE_SCOPED) $(ENABLE_SUBPIXEL_LAYOUT) $(ENABLE_SVG) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TEXT_NOTIFICATIONS_ONLY) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_WEBGL) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WORKERS) $(ENABLE_XHR_TIMEOUT) $(ENABLE_XSLT); diff --git a/Source/WebKit2/UIProcess/API/efl/EwkViewCallbacks.h b/Source/WebKit2/UIProcess/API/efl/EwkViewCallbacks.h index 4140c742b..cf822a2ed 100644 --- a/Source/WebKit2/UIProcess/API/efl/EwkViewCallbacks.h +++ b/Source/WebKit2/UIProcess/API/efl/EwkViewCallbacks.h @@ -96,63 +96,58 @@ enum CallbackType { #endif }; -template<typename T> -inline bool callbackArgumentsExpected() -{ - return true; -} +template <CallbackType> +struct CallBackInfo; -template<> -inline bool callbackArgumentsExpected<void>() -{ - return false; -} +class EvasObjectHolder { +protected: + explicit EvasObjectHolder(Evas_Object* object) + : m_object(object) + { + ASSERT(m_object); + } -template <CallbackType> -struct CallBackInfo { - typedef void* Type; + Evas_Object* m_object; +}; - static inline const char* name() +template <CallbackType callbackType, typename ArgType = typename CallBackInfo<callbackType>::Type> +struct CallBack: public EvasObjectHolder { + explicit CallBack(Evas_Object* view) : EvasObjectHolder(view) { } + + void call(ArgType argument) { - ASSERT_NOT_REACHED(); - return ""; + evas_object_smart_callback_call(m_object, CallBackInfo<callbackType>::name(), static_cast<void*>(argument)); } }; template <CallbackType callbackType> -class CallBack { -public: - typedef typename CallBackInfo<callbackType>::Type ArgType; +struct CallBack <callbackType, void> : public EvasObjectHolder { + explicit CallBack(Evas_Object* view) : EvasObjectHolder(view) { } - explicit CallBack(Evas_Object* view) - : m_view(view) + void call() { - ASSERT(m_view); + evas_object_smart_callback_call(m_object, CallBackInfo<callbackType>::name(), 0); } +}; - void call(ArgType* argument = 0) - { - if (argument && !callbackArgumentsExpected<ArgType>()) { - CRITICAL("should not pass arguments for this callback!"); - ASSERT_NOT_REACHED(); - return; - } +template <CallbackType callbackType> +struct CallBack <callbackType, const char*> : public EvasObjectHolder { + explicit CallBack(Evas_Object* view) : EvasObjectHolder(view) { } - evas_object_smart_callback_call(m_view, CallBackInfo<callbackType>::name(), static_cast<void*>(argument)); + void call(const char* arg) + { + evas_object_smart_callback_call(m_object, CallBackInfo<callbackType>::name(), const_cast<char*>(arg)); } void call(const String& arg) { - call(const_cast<char*>(arg.utf8().data())); + call(arg.utf8().data()); } void call(const WKEinaSharedString& arg) { - call(const_cast<char*>(static_cast<const char*>(arg))); + call(static_cast<const char*>(arg)); } - -private: - Evas_Object* m_view; }; #define DECLARE_EWK_VIEW_CALLBACK(callbackType, string, type) \ @@ -163,45 +158,45 @@ struct CallBackInfo<callbackType> { \ } // Note: type 'void' means that no arguments are expected. -DECLARE_EWK_VIEW_CALLBACK(AuthenticationRequest, "authentication,request", Ewk_Auth_Request); +DECLARE_EWK_VIEW_CALLBACK(AuthenticationRequest, "authentication,request", Ewk_Auth_Request*); DECLARE_EWK_VIEW_CALLBACK(BackForwardListChange, "back,forward,list,changed", void); DECLARE_EWK_VIEW_CALLBACK(CancelVibration, "cancel,vibration", void); -DECLARE_EWK_VIEW_CALLBACK(DownloadJobCancelled, "download,cancelled", Ewk_Download_Job); -DECLARE_EWK_VIEW_CALLBACK(DownloadJobFailed, "download,failed", Ewk_Download_Job_Error); -DECLARE_EWK_VIEW_CALLBACK(DownloadJobFinished, "download,finished", Ewk_Download_Job); -DECLARE_EWK_VIEW_CALLBACK(DownloadJobRequested, "download,request", Ewk_Download_Job); -DECLARE_EWK_VIEW_CALLBACK(FileChooserRequest, "file,chooser,request", Ewk_File_Chooser_Request); -DECLARE_EWK_VIEW_CALLBACK(NewFormSubmissionRequest, "form,submission,request", Ewk_Form_Submission_Request); +DECLARE_EWK_VIEW_CALLBACK(DownloadJobCancelled, "download,cancelled", Ewk_Download_Job*); +DECLARE_EWK_VIEW_CALLBACK(DownloadJobFailed, "download,failed", Ewk_Download_Job_Error*); +DECLARE_EWK_VIEW_CALLBACK(DownloadJobFinished, "download,finished", Ewk_Download_Job*); +DECLARE_EWK_VIEW_CALLBACK(DownloadJobRequested, "download,request", Ewk_Download_Job*); +DECLARE_EWK_VIEW_CALLBACK(FileChooserRequest, "file,chooser,request", Ewk_File_Chooser_Request*); +DECLARE_EWK_VIEW_CALLBACK(NewFormSubmissionRequest, "form,submission,request", Ewk_Form_Submission_Request*); DECLARE_EWK_VIEW_CALLBACK(IconChanged, "icon,changed", void); -DECLARE_EWK_VIEW_CALLBACK(LoadError, "load,error", Ewk_Error); +DECLARE_EWK_VIEW_CALLBACK(LoadError, "load,error", Ewk_Error*); DECLARE_EWK_VIEW_CALLBACK(LoadFinished, "load,finished", void); -DECLARE_EWK_VIEW_CALLBACK(LoadProgress, "load,progress", double); -DECLARE_EWK_VIEW_CALLBACK(ProvisionalLoadFailed, "load,provisional,failed", Ewk_Error); +DECLARE_EWK_VIEW_CALLBACK(LoadProgress, "load,progress", double*); +DECLARE_EWK_VIEW_CALLBACK(ProvisionalLoadFailed, "load,provisional,failed", Ewk_Error*); DECLARE_EWK_VIEW_CALLBACK(ProvisionalLoadRedirect, "load,provisional,redirect", void); DECLARE_EWK_VIEW_CALLBACK(ProvisionalLoadStarted, "load,provisional,started", void); -DECLARE_EWK_VIEW_CALLBACK(MenuBarVisible, "menubar,visible", bool); -DECLARE_EWK_VIEW_CALLBACK(NavigationPolicyDecision, "policy,decision,navigation", Ewk_Navigation_Policy_Decision); -DECLARE_EWK_VIEW_CALLBACK(NewWindowPolicyDecision, "policy,decision,new,window", Ewk_Navigation_Policy_Decision); -DECLARE_EWK_VIEW_CALLBACK(ResourceLoadStarted, "resource,request,new", Ewk_Resource_Request); -DECLARE_EWK_VIEW_CALLBACK(ResourceLoadResponse, "resource,request,response", Ewk_Resource_Load_Response); -DECLARE_EWK_VIEW_CALLBACK(ResourceLoadFailed, "resource,request,failed", Ewk_Resource_Load_Error); -DECLARE_EWK_VIEW_CALLBACK(ResourceLoadFinished, "resource,request,finished", Ewk_Resource); -DECLARE_EWK_VIEW_CALLBACK(ResourceRequestSent, "resource,request,sent", Ewk_Resource_Request); -DECLARE_EWK_VIEW_CALLBACK(StatusBarVisible, "statusbar,visible", bool); -DECLARE_EWK_VIEW_CALLBACK(TextFound, "text,found", unsigned); -DECLARE_EWK_VIEW_CALLBACK(TitleChange, "title,changed", char); -DECLARE_EWK_VIEW_CALLBACK(ToolbarVisible, "toolbar,visible", bool); +DECLARE_EWK_VIEW_CALLBACK(MenuBarVisible, "menubar,visible", bool*); +DECLARE_EWK_VIEW_CALLBACK(NavigationPolicyDecision, "policy,decision,navigation", Ewk_Navigation_Policy_Decision*); +DECLARE_EWK_VIEW_CALLBACK(NewWindowPolicyDecision, "policy,decision,new,window", Ewk_Navigation_Policy_Decision*); +DECLARE_EWK_VIEW_CALLBACK(ResourceLoadStarted, "resource,request,new", Ewk_Resource_Request*); +DECLARE_EWK_VIEW_CALLBACK(ResourceLoadResponse, "resource,request,response", Ewk_Resource_Load_Response*); +DECLARE_EWK_VIEW_CALLBACK(ResourceLoadFailed, "resource,request,failed", Ewk_Resource_Load_Error*); +DECLARE_EWK_VIEW_CALLBACK(ResourceLoadFinished, "resource,request,finished", Ewk_Resource*); +DECLARE_EWK_VIEW_CALLBACK(ResourceRequestSent, "resource,request,sent", Ewk_Resource_Request*); +DECLARE_EWK_VIEW_CALLBACK(StatusBarVisible, "statusbar,visible", bool*); +DECLARE_EWK_VIEW_CALLBACK(TextFound, "text,found", unsigned*); +DECLARE_EWK_VIEW_CALLBACK(TitleChange, "title,changed", const char*); +DECLARE_EWK_VIEW_CALLBACK(ToolbarVisible, "toolbar,visible", bool*); DECLARE_EWK_VIEW_CALLBACK(TooltipTextUnset, "tooltip,text,unset", void); -DECLARE_EWK_VIEW_CALLBACK(TooltipTextSet, "tooltip,text,set", char); -DECLARE_EWK_VIEW_CALLBACK(URLChanged, "url,changed", char); -DECLARE_EWK_VIEW_CALLBACK(Vibrate, "vibrate", uint64_t); -DECLARE_EWK_VIEW_CALLBACK(WebProcessCrashed, "webprocess,crashed", bool); -DECLARE_EWK_VIEW_CALLBACK(WindowResizable, "window,resizable", bool); +DECLARE_EWK_VIEW_CALLBACK(TooltipTextSet, "tooltip,text,set", const char*); +DECLARE_EWK_VIEW_CALLBACK(URLChanged, "url,changed", const char*); +DECLARE_EWK_VIEW_CALLBACK(Vibrate, "vibrate", uint64_t*); +DECLARE_EWK_VIEW_CALLBACK(WebProcessCrashed, "webprocess,crashed", bool*); +DECLARE_EWK_VIEW_CALLBACK(WindowResizable, "window,resizable", bool*); #if ENABLE(WEB_INTENTS) -DECLARE_EWK_VIEW_CALLBACK(IntentRequest, "intent,request,new", Ewk_Intent); +DECLARE_EWK_VIEW_CALLBACK(IntentRequest, "intent,request,new", Ewk_Intent*); #endif #if ENABLE(WEB_INTENTS_TAG) -DECLARE_EWK_VIEW_CALLBACK(IntentServiceRegistration, "intent,service,register", Ewk_Intent_Service); +DECLARE_EWK_VIEW_CALLBACK(IntentServiceRegistration, "intent,service,register", Ewk_Intent_Service*); #endif } diff --git a/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp b/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp index e0c59054d..29161ff23 100644 --- a/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp +++ b/Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp @@ -314,7 +314,14 @@ AffineTransform EwkViewImpl::transformToScreen() const #ifdef HAVE_ECORE_X Ecore_Evas* ecoreEvas = ecore_evas_ecore_evas_get(sd->base.evas); - Ecore_X_Window window = ecore_evas_software_x11_window_get(ecoreEvas); // Returns 0 if none. + + Ecore_X_Window window; +#if USE(ACCELERATED_COMPOSITING) + window = ecore_evas_gl_x11_window_get(ecoreEvas); + // Fallback to software mode if necessary. + if (!window) +#endif + window = ecore_evas_software_x11_window_get(ecoreEvas); // Returns 0 if none. int x, y; // x, y are relative to parent (in a reparenting window manager). while (window) { diff --git a/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp b/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp index 305882edd..0c009ec48 100644 --- a/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp +++ b/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp @@ -68,8 +68,8 @@ static FloatPoint boundedScrollPosition(const FloatPoint& scrollPosition, const LayerTreeRenderer::LayerTreeRenderer(LayerTreeCoordinatorProxy* layerTreeCoordinatorProxy) : m_layerTreeCoordinatorProxy(layerTreeCoordinatorProxy) - , m_rootLayerID(InvalidWebLayerID) , m_isActive(false) + , m_rootLayerID(InvalidWebLayerID) , m_animationsLocked(false) #if ENABLE(REQUEST_ANIMATION_FRAME) , m_animationFrameRequested(false) @@ -86,9 +86,8 @@ LayerTreeRenderer::~LayerTreeRenderer() PassOwnPtr<GraphicsLayer> LayerTreeRenderer::createLayer(WebLayerID) { - GraphicsLayer* newLayer = new GraphicsLayerTextureMapper(this); - TextureMapperLayer* layer = toTextureMapperLayer(newLayer); - layer->setShouldUpdateBackingStoreFromLayer(false); + GraphicsLayerTextureMapper* newLayer = new GraphicsLayerTextureMapper(this); + newLayer->setHasOwnBackingStore(false); return adoptPtr(newLayer); } @@ -411,7 +410,7 @@ PassRefPtr<CoordinatedBackingStore> LayerTreeRenderer::getBackingStore(GraphicsL RefPtr<CoordinatedBackingStore> backingStore = static_cast<CoordinatedBackingStore*>(layer->backingStore().get()); if (!backingStore) { backingStore = CoordinatedBackingStore::create(); - layer->setBackingStore(backingStore.get()); + layer->setBackingStore(backingStore); } ASSERT(backingStore); return backingStore; @@ -452,6 +451,7 @@ void LayerTreeRenderer::removeTile(WebLayerID layerID, int tileID) RefPtr<CoordinatedBackingStore> backingStore = getBackingStore(layer); backingStore->removeTile(tileID); resetBackingStoreSizeToLayerSize(layer); + m_backingStoresWithPendingBuffers.add(backingStore); removeBackingStoreIfNeeded(layer); } @@ -550,7 +550,6 @@ void LayerTreeRenderer::flushLayerChanges() void LayerTreeRenderer::renderNextFrame() { - ASSERT(isMainThread()); if (m_layerTreeCoordinatorProxy) m_layerTreeCoordinatorProxy->renderNextFrame(); } @@ -593,7 +592,6 @@ void LayerTreeRenderer::syncRemoteContent() void LayerTreeRenderer::purgeGLResources() { - ASSERT(isMainThread()); TextureMapperLayer* layer = toTextureMapperLayer(rootLayer()); if (layer) @@ -613,6 +611,11 @@ void LayerTreeRenderer::purgeGLResources() m_backingStoresWithPendingBuffers.clear(); setActive(false); + dispatchOnMainThread(bind(&LayerTreeRenderer::purgeBackingStores, this)); +} + +void LayerTreeRenderer::purgeBackingStores() +{ if (m_layerTreeCoordinatorProxy) m_layerTreeCoordinatorProxy->purgeBackingStores(); } @@ -659,7 +662,6 @@ void LayerTreeRenderer::appendUpdate(const Function<void()>& function) void LayerTreeRenderer::setActive(bool active) { - ASSERT(isMainThread()); if (m_isActive == active) return; @@ -669,7 +671,7 @@ void LayerTreeRenderer::setActive(bool active) m_renderQueue.clear(); m_isActive = active; if (m_isActive) - renderNextFrame(); + dispatchOnMainThread(bind(&LayerTreeRenderer::renderNextFrame, this)); } void LayerTreeRenderer::setBackgroundColor(const WebCore::Color& color) diff --git a/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h b/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h index 40333cfa1..b081c5e16 100644 --- a/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h +++ b/Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeRenderer.h @@ -67,7 +67,6 @@ public: }; explicit LayerTreeRenderer(LayerTreeCoordinatorProxy*); virtual ~LayerTreeRenderer(); - void purgeGLResources(); void paintToCurrentGLContext(const WebCore::TransformationMatrix&, float, const WebCore::FloatRect&, WebCore::TextureMapper::PaintFlags = 0); void paintToGraphicsContext(BackingStore::PlatformGraphicsContext); void setContentsSize(const WebCore::FloatSize&); @@ -81,6 +80,10 @@ public: void detach(); void appendUpdate(const Function<void()>&); + + // The painting thread must lock the main thread to use below two methods, because two methods access members that the main thread manages. See m_layerTreeCoordinatorProxy. + // Currently, QQuickWebPage::updatePaintNode() locks the main thread before calling both methods. + void purgeGLResources(); void setActive(bool); void deleteLayer(WebLayerID); @@ -111,7 +114,6 @@ public: #if ENABLE(REQUEST_ANIMATION_FRAME) void requestAnimationFrame(); - void animationFrameReady(); #endif private: @@ -121,22 +123,27 @@ private: WebCore::GraphicsLayer* rootLayer() { return m_rootLayer.get(); } void syncRemoteContent(); + void adjustPositionForFixedLayers(); // Reimplementations from WebCore::GraphicsLayerClient. virtual void notifyAnimationStarted(const WebCore::GraphicsLayer*, double) { } virtual void notifyFlushRequired(const WebCore::GraphicsLayer*) { } virtual void paintContents(const WebCore::GraphicsLayer*, WebCore::GraphicsContext&, WebCore::GraphicsLayerPaintingPhase, const WebCore::IntRect&) OVERRIDE { } - void updateViewport(); void dispatchOnMainThread(const Function<void()>&); - void adjustPositionForFixedLayers(); + void updateViewport(); +#if ENABLE(REQUEST_ANIMATION_FRAME) + void animationFrameReady(); +#endif + void renderNextFrame(); + void purgeBackingStores(); + void assignImageBackingToLayer(WebCore::GraphicsLayer*, CoordinatedImageBackingID); void removeReleasedImageBackingsIfNeeded(); void ensureRootLayer(); void ensureLayer(WebLayerID); void commitTileOperations(); - void renderNextFrame(); PassRefPtr<CoordinatedBackingStore> getBackingStore(WebCore::GraphicsLayer*); void removeBackingStoreIfNeeded(WebCore::GraphicsLayer*); @@ -163,7 +170,10 @@ private: SurfaceBackingStoreMap m_surfaceBackingStores; #endif + // Below two members are accessed by only the main thread. The painting thread must lock the main thread to access both members. LayerTreeCoordinatorProxy* m_layerTreeCoordinatorProxy; + bool m_isActive; + OwnPtr<WebCore::GraphicsLayer> m_rootLayer; LayerMap m_layers; @@ -171,7 +181,6 @@ private: WebLayerID m_rootLayerID; WebCore::IntPoint m_renderedContentsScrollPosition; WebCore::IntPoint m_pendingRenderedContentsScrollPosition; - bool m_isActive; bool m_animationsLocked; #if ENABLE(REQUEST_ANIMATION_FRAME) bool m_animationFrameRequested; diff --git a/Source/WebKit2/UIProcess/PageViewportController.cpp b/Source/WebKit2/UIProcess/PageViewportController.cpp index 5de791920..7c43a5546 100644 --- a/Source/WebKit2/UIProcess/PageViewportController.cpp +++ b/Source/WebKit2/UIProcess/PageViewportController.cpp @@ -44,6 +44,7 @@ PageViewportController::PageViewportController(WebKit::WebPageProxy* proxy, Page , m_client(client) , m_allowsUserScaling(false) , m_minimumScaleToFit(1) + , m_initiallyFitToViewport(true) , m_hasSuspendedContent(false) , m_hadUserInteraction(false) , m_effectiveScale(1) @@ -109,7 +110,17 @@ void PageViewportController::didCommitLoad() void PageViewportController::didChangeContentsSize(const IntSize& newSize) { m_contentsSize = newSize; - if (updateMinimumScaleToFit()) + + bool minimumScaleUpdated = updateMinimumScaleToFit(); + + if (m_initiallyFitToViewport) { + // Restrict scale factors to m_minimumScaleToFit. + ASSERT(m_minimumScaleToFit > 0); + m_rawAttributes.initialScale = m_minimumScaleToFit; + WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable(m_rawAttributes); + } + + if (minimumScaleUpdated) m_client->didChangeViewportAttributes(); } @@ -149,8 +160,8 @@ void PageViewportController::pageTransitionViewportReady() { if (!m_rawAttributes.layoutSize.isEmpty()) { m_hadUserInteraction = false; - ASSERT(m_rawAttributes.initialScale > 0); - applyScaleAfterRenderingContents(innerBoundedViewportScale(toViewportScale(m_rawAttributes.initialScale))); + float initialScale = m_initiallyFitToViewport ? m_minimumScaleToFit : m_rawAttributes.initialScale; + applyScaleAfterRenderingContents(innerBoundedViewportScale(toViewportScale(initialScale))); } // At this point we should already have received the first viewport arguments and the requested scroll @@ -218,18 +229,12 @@ void PageViewportController::didChangeViewportAttributes(const WebCore::Viewport m_rawAttributes = newAttributes; m_allowsUserScaling = !!m_rawAttributes.userScalable; + m_initiallyFitToViewport = (m_rawAttributes.initialScale < 0); - bool minimumScaleUpdated = updateMinimumScaleToFit(); - - ASSERT(m_minimumScaleToFit > 0); - - // Set the initial scale if it was not specified in the viewport meta tag. - if (m_rawAttributes.initialScale < 0) - m_rawAttributes.initialScale = m_minimumScaleToFit; + if (!m_initiallyFitToViewport) + WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable(m_rawAttributes); - WebCore::restrictScaleFactorToInitialScaleIfNotUserScalable(m_rawAttributes); - - if (minimumScaleUpdated) + if (updateMinimumScaleToFit()) m_client->didChangeViewportAttributes(); } diff --git a/Source/WebKit2/UIProcess/PageViewportController.h b/Source/WebKit2/UIProcess/PageViewportController.h index 3be3d2745..052e89ab0 100644 --- a/Source/WebKit2/UIProcess/PageViewportController.h +++ b/Source/WebKit2/UIProcess/PageViewportController.h @@ -94,6 +94,7 @@ private: bool m_allowsUserScaling; float m_minimumScaleToFit; + bool m_initiallyFitToViewport; bool m_hasSuspendedContent; bool m_hadUserInteraction; diff --git a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp index e5639cf79..c7808b2b2 100644 --- a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp +++ b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp @@ -860,7 +860,10 @@ bool CoordinatedGraphicsLayer::selfOrAncestorHaveNonAffineTransforms() if (!m_layerTransform.combined().isAffine()) return true; - return false; + if (!parent()) + return false; + + return toCoordinatedGraphicsLayer(parent())->selfOrAncestorHaveNonAffineTransforms(); } bool CoordinatedGraphicsLayer::addAnimation(const KeyframeValueList& valueList, const IntSize& boxSize, const Animation* anim, const String& keyframesName, double delayAsNegativeTimeOffset) diff --git a/Source/WebKit2/qt/MainQt.cpp b/Source/WebKit2/qt/MainQt.cpp index 17ad8537d..0990c01f8 100644 --- a/Source/WebKit2/qt/MainQt.cpp +++ b/Source/WebKit2/qt/MainQt.cpp @@ -45,6 +45,7 @@ Q_DECL_IMPORT int WebProcessMainQt(QGuiApplication*); #if !defined(QT_NO_WIDGETS) Q_DECL_IMPORT void initializeWebKitWidgets(); #endif +Q_DECL_IMPORT void initializeWebKitQt(); } #if !defined(NDEBUG) && defined(Q_OS_UNIX) @@ -95,7 +96,10 @@ int main(int argc, char** argv) #if !defined(QT_NO_WIDGETS) if (qgetenv("QT_WEBKIT_THEME_NAME") == "qstyle") WebKit::initializeWebKitWidgets(); + else #endif + WebKit::initializeWebKitQt(); + return WebKit::WebProcessMainQt(appInstance); } |
