Changeset 135287 in webkit
- Timestamp:
- Nov 20, 2012 9:14:24 AM (11 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r135283 r135287 1 2012-11-20 Thiago Marcos P. Santos <thiago.santos@intel.com> 2 3 [WTR] WebKitTestRunner should be able to run tests using fixed layout 4 https://bugs.webkit.org/show_bug.cgi?id=102517 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 Update EFL private API so we can create a view with fixed layout. We 9 can keep this as private as I don't see a real life use case for it 10 outside WTR and the WebInspector. 11 12 * UIProcess/API/C/efl/WKView.cpp: 13 (WKViewCreate): 14 (WKViewCreateWithFixedLayout): 15 * UIProcess/API/C/efl/WKView.h: 16 * UIProcess/API/efl/ewk_view.cpp: 17 (ewk_view_base_add): 18 * UIProcess/API/efl/ewk_view_private.h: 19 * UIProcess/efl/WebInspectorProxyEfl.cpp: 20 (WebKit::WebInspectorProxy::platformCreateInspectorPage): 21 1 22 2012-11-20 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 23 -
trunk/Source/WebKit2/UIProcess/API/C/efl/WKView.cpp
r132405 r135287 29 29 WKViewRef WKViewCreate(Evas* canvas, WKContextRef contextRef, WKPageGroupRef pageGroupRef) 30 30 { 31 return toAPI(ewk_view_base_add(canvas, contextRef, pageGroupRef)); 31 return toAPI(ewk_view_base_add(canvas, contextRef, pageGroupRef, EwkViewImpl::LegacyBehavior)); 32 } 33 34 WKViewRef WKViewCreateWithFixedLayout(Evas* canvas, WKContextRef contextRef, WKPageGroupRef pageGroupRef) 35 { 36 return toAPI(ewk_view_base_add(canvas, contextRef, pageGroupRef, EwkViewImpl::DefaultBehavior)); 32 37 } 33 38 -
trunk/Source/WebKit2/UIProcess/API/C/efl/WKView.h
r120925 r135287 31 31 WK_EXPORT WKViewRef WKViewCreate(Evas* canvas, WKContextRef context, WKPageGroupRef pageGroup); 32 32 33 WK_EXPORT WKViewRef WKViewCreateWithFixedLayout(Evas* canvas, WKContextRef context, WKPageGroupRef pageGroup); 34 33 35 WK_EXPORT WKPageRef WKViewGetPage(WKViewRef view); 34 36 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
r134953 r135287 522 522 * Constructs a ewk_view Evas_Object with WKType parameters. 523 523 */ 524 Evas_Object* ewk_view_base_add(Evas* canvas, WKContextRef contextRef, WKPageGroupRef pageGroupRef )525 { 526 return createEwkView(canvas, createEwkViewSmartClass(), EwkContext::create(toImpl(contextRef)), pageGroupRef, EwkViewImpl::LegacyBehavior);524 Evas_Object* ewk_view_base_add(Evas* canvas, WKContextRef contextRef, WKPageGroupRef pageGroupRef, EwkViewImpl::ViewBehavior behavior) 525 { 526 return createEwkView(canvas, createEwkViewSmartClass(), EwkContext::create(toImpl(contextRef)), pageGroupRef, behavior); 527 527 } 528 528 -
trunk/Source/WebKit2/UIProcess/API/efl/ewk_view_private.h
r132463 r135287 22 22 #define ewk_view_private_h 23 23 24 #include "EwkViewImpl.h" 24 25 #include <Evas.h> 25 26 #include <WebKit2/WKBase.h> 26 27 27 Evas_Object* ewk_view_base_add(Evas* canvas, WKContextRef, WKPageGroupRef );28 Evas_Object* ewk_view_base_add(Evas* canvas, WKContextRef, WKPageGroupRef, EwkViewImpl::ViewBehavior); 28 29 29 30 #endif // ewk_view_private_h -
trunk/Source/WebKit2/UIProcess/efl/WebInspectorProxyEfl.cpp
r135194 r135287 99 99 return 0; 100 100 101 m_inspectorView = ewk_view_base_add(ecore_evas_get(m_inspectorWindow), toAPI(page()->process()->context()), toAPI(inspectorPageGroup()) );101 m_inspectorView = ewk_view_base_add(ecore_evas_get(m_inspectorWindow), toAPI(page()->process()->context()), toAPI(inspectorPageGroup()), EwkViewImpl::LegacyBehavior); 102 102 EwkViewImpl* inspectorViewImpl = EwkViewImpl::fromEvasObject(m_inspectorView); 103 103 inspectorViewImpl->setThemePath(TEST_THEME_DIR "/default.edj"); -
trunk/Tools/ChangeLog
r135275 r135287 1 2012-11-20 Thiago Marcos P. Santos <thiago.santos@intel.com> 2 3 [WTR] WebKitTestRunner should be able to run tests using fixed layout 4 https://bugs.webkit.org/show_bug.cgi?id=102517 5 6 Reviewed by Kenneth Rohde Christiansen. 7 8 WTR will now request the creation of a view that has a page using 9 fixed layout for CSS Device Adaptation tests, but this feature might 10 be used in the future by any other test that requires a mobile-like type 11 of viewport (i.e. Viewport META tests should be ported). 12 13 The viewport type of the other tests remains unchanged and is restored 14 when the runner leaves the device-adapt/ folder. 15 16 * WebKitTestRunner/PlatformWebView.h: 17 (PlatformWebView): 18 * WebKitTestRunner/TestInvocation.cpp: 19 (WTR): 20 (WTR::shouldUseFixedLayout): 21 (WTR::updateLayoutType): 22 (WTR::TestInvocation::invoke): 23 * WebKitTestRunner/efl/PlatformWebViewEfl.cpp: 24 (WTR::PlatformWebView::PlatformWebView): 25 (WTR::PlatformWebView::viewSupportsOptions): 26 (WTR): 27 1 28 2012-11-20 Csaba Osztrogonác <ossy@webkit.org> 2 29 -
trunk/Tools/WebKitTestRunner/PlatformWebView.h
r132301 r135287 90 90 bool windowIsKey() const { return m_windowIsKey; } 91 91 92 #if PLATFORM(MAC) 92 #if PLATFORM(MAC) || PLATFORM(EFL) 93 93 bool viewSupportsOptions(WKDictionaryRef) const; 94 94 #else … … 102 102 PlatformWindow m_window; 103 103 bool m_windowIsKey; 104 #if PLATFORM(EFL) 105 bool m_usingFixedLayout; 106 #endif 104 107 #if PLATFORM(QT) 105 108 QEventLoop* m_modalEventLoop; -
trunk/Tools/WebKitTestRunner/TestInvocation.cpp
r133768 r135287 1 1 /* 2 2 * Copyright (C) 2010, 2011, 2012 Apple Inc. All rights reserved. 3 * Copyright (C) 2012 Intel Corporation. All rights reserved. 3 4 * 4 5 * Redistribution and use in source and binary forms, with or without … … 166 167 } 167 168 169 #if ENABLE(CSS_DEVICE_ADAPTATION) 170 static bool shouldUseFixedLayout(const char* pathOrURL) 171 { 172 return strstr(pathOrURL, "device-adapt/") || strstr(pathOrURL, "device-adapt\\"); 173 } 174 #endif 175 176 static void updateLayoutType(const char* pathOrURL) 177 { 178 #if ENABLE(CSS_DEVICE_ADAPTATION) 179 WKRetainPtr<WKMutableDictionaryRef> viewOptions = adoptWK(WKMutableDictionaryCreate()); 180 WKRetainPtr<WKStringRef> useFixedLayoutKey = adoptWK(WKStringCreateWithUTF8CString("UseFixedLayout")); 181 WKRetainPtr<WKBooleanRef> useFixedLayoutValue = adoptWK(WKBooleanCreate(shouldUseFixedLayout(pathOrURL))); 182 WKDictionaryAddItem(viewOptions.get(), useFixedLayoutKey.get(), useFixedLayoutValue.get()); 183 184 TestController::shared().ensureViewSupportsOptions(viewOptions.get()); 185 #else 186 UNUSED_PARAM(pathOrURL); 187 #endif 188 } 189 168 190 void TestInvocation::invoke() 169 191 { 170 192 sizeWebViewForCurrentTest(m_pathOrURL.c_str()); 193 updateLayoutType(m_pathOrURL.c_str()); 171 194 updateTiledDrawingForCurrentTest(m_pathOrURL.c_str()); 172 195 -
trunk/Tools/WebKitTestRunner/efl/PlatformWebViewEfl.cpp
r135246 r135287 1 1 /* 2 2 * Copyright (C) 2012 Samsung Electronics 3 * Copyright (C) 2012 Intel Corporation. All rights reserved. 3 4 * 4 5 * This library is free software; you can redistribute it and/or … … 49 50 } 50 51 51 PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKDictionaryRef /*options*/)52 PlatformWebView::PlatformWebView(WKContextRef context, WKPageGroupRef pageGroup, WKDictionaryRef options) 52 53 { 54 WKRetainPtr<WKStringRef> useFixedLayoutKey(AdoptWK, WKStringCreateWithUTF8CString("UseFixedLayout")); 55 m_usingFixedLayout = options ? WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(options, useFixedLayoutKey.get()))) : false; 56 53 57 m_window = initEcoreEvas(); 54 58 Evas* evas = ecore_evas_get(m_window); 55 m_view = toImpl(WKViewCreate(evas, context, pageGroup)); 59 60 if (m_usingFixedLayout) { 61 m_view = toImpl(WKViewCreateWithFixedLayout(evas, context, pageGroup)); 62 evas_object_resize(m_view, 800, 600); 63 } else 64 m_view = toImpl(WKViewCreate(evas, context, pageGroup)); 56 65 57 66 ewk_view_theme_set(m_view, THEME_DIR"/default.edj"); … … 121 130 } 122 131 132 bool PlatformWebView::viewSupportsOptions(WKDictionaryRef options) const 133 { 134 WKRetainPtr<WKStringRef> useFixedLayoutKey(AdoptWK, WKStringCreateWithUTF8CString("UseFixedLayout")); 135 136 return m_usingFixedLayout == (options ? WKBooleanGetValue(static_cast<WKBooleanRef>(WKDictionaryGetItemForKey(options, useFixedLayoutKey.get()))) : false); 137 } 138 123 139 } // namespace WTR 124 140
Note: See TracChangeset
for help on using the changeset viewer.