Changeset 64401 in webkit
- Timestamp:
- Jul 30, 2010 7:46:16 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 17 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/ChangeLog
r64390 r64401 1 2010-07-30 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Simon Fraser. 4 5 Enabling view modes to all platforms 6 https://bugs.webkit.org/show_bug.cgi?id=37505 7 8 Removing ENABLE_WIDGETS_10_SUPPORT flag. 9 10 As view mode media feature is not part of widget 1.0 specification 11 any more the ENABLE_WIDGETS_10_SUPPORT flag may be removed. The only use 12 of this flag was related to view mode media feature implementation in Qt. 13 14 * wtf/Platform.h: 15 1 16 2010-07-30 Andy Estes <aestes@apple.com> 2 17 -
trunk/JavaScriptCore/wtf/Platform.h
r64183 r64401 572 572 #if PLATFORM(QT) 573 573 #define WTF_USE_QT4_UNICODE 1 574 #if !defined(ENABLE_WIDGETS_10_SUPPORT)575 #define ENABLE_WIDGETS_10_SUPPORT 1576 #endif577 574 #elif OS(WINCE) 578 575 #define WTF_USE_WINCE_UNICODE 1 … … 838 835 #endif 839 836 840 #if !defined(ENABLE_WIDGETS_10_SUPPORT)841 #define ENABLE_WIDGETS_10_SUPPORT 0842 #endif843 844 837 #if !defined(ENABLE_INSPECTOR) 845 838 #define ENABLE_INSPECTOR 1 -
trunk/LayoutTests/ChangeLog
r64395 r64401 1 2010-07-30 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Simon Fraser. 4 5 Enabling view modes to all platforms 6 https://bugs.webkit.org/show_bug.cgi?id=37505 7 8 Removing 'widget' reference from the layout tests because the view mode media feature 9 is not part of widget 1.0 specification any more. 10 11 The layout tests are stil skipped for all platforms except Qt because of the lack 12 of support of LayoutTestController in those platforms. 13 14 * fast/media/view-mode-media-feature-expected.txt: Renamed from LayoutTests/fast/media/media-feature-wgt-view-mode-expected.txt. 15 * fast/media/view-mode-media-feature.html: Renamed from LayoutTests/fast/media/media-feature-wgt-view-mode.html. 16 * platform/gtk/Skipped: 17 * platform/mac/Skipped: 18 * platform/win/Skipped: 19 1 20 2010-07-30 Andrew Wilson <atwilson@chromium.org> 2 21 -
trunk/LayoutTests/fast/media/view-mode-media-feature.html
r64400 r64401 1 1 <head> 2 <title>Testing Widgets 1.0View Mode Media Feature</title>2 <title>Testing the View Mode Media Feature</title> 3 3 <style type="text/css"> 4 4 div { -
trunk/LayoutTests/platform/gtk/Skipped
r64388 r64401 5457 5457 fast/runin/generated4.html 5458 5458 5459 # No Widgets 1.0 support5460 fast/media/ media-feature-wgt-view-mode.html5459 # view mode media feature 5460 fast/media/view-mode-media-feature.html 5461 5461 5462 5462 # MediaPlayerPrivateGStreamer doesn't return to NETWORK_IDLE and hence doesn't fire a suspend event -
trunk/LayoutTests/platform/mac/Skipped
r64388 r64401 140 140 fast/media/print-restores-previous-mediatype.html 141 141 142 # No Widgets 1.0 support143 fast/media/ media-feature-wgt-view-mode.html142 # view mode media feature 143 fast/media/view-mode-media-feature.html 144 144 145 145 # Test is flaky and thus not useful until fixed. -
trunk/LayoutTests/platform/win/Skipped
r64388 r64401 838 838 fast/dom/HTMLMeterElement/meter-styles-changing-pseudo.html 839 839 840 # No Widgets 1.0 support841 fast/media/ media-feature-wgt-view-mode.html840 # view mode media feature 841 fast/media/view-mode-media-feature.html 842 842 843 843 # Need expectations. See https://bugs.webkit.org/show_bug.cgi?id=36461 -
trunk/WebCore/ChangeLog
r64400 r64401 1 2010-07-30 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Simon Fraser. 4 5 Enabling view modes to all platforms 6 https://bugs.webkit.org/show_bug.cgi?id=37505 7 8 View mode media feature implementation as specified in http://www.w3.org/TR/view-mode. 9 10 The view mode media feature layout tests are stil skipped for all platforms except Qt 11 because of the lack of support of LayoutTestController in those platforms. 12 13 Test: fast/media/view-mode-media-feature.html 14 15 * css/MediaFeatureNames.h: 16 * css/MediaQueryEvaluator.cpp: 17 (WebCore::view_modeMediaFeatureEval): 18 * page/ChromeClient.h: 19 * page/Page.cpp: 20 (WebCore::Page::Page): 21 (WebCore::createViewModesSet): 22 (WebCore::Page::setViewMode): 23 * page/Page.h: 24 (WebCore::Page::viewMode): 25 1 26 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> 2 27 -
trunk/WebCore/css/MediaFeatureNames.h
r56740 r64401 25 25 namespace WebCore { 26 26 namespace MediaFeatureNames { 27 28 #if ENABLE(WIDGETS_10_SUPPORT)29 #define CSS_MEDIAQUERY_NAMES_FOR_WIDGETS_10_MEDIAFEATURE(macro) \30 macro(view_mode, "-webkit-view-mode")31 #else32 #define CSS_MEDIAQUERY_NAMES_FOR_WIDGETS_10_MEDIAFEATURE(macro)33 #endif34 27 35 28 #define CSS_MEDIAQUERY_NAMES_FOR_EACH_MEDIAFEATURE(macro) \ … … 67 60 macro(transition, "-webkit-transition") \ 68 61 macro(animation, "-webkit-animation") \ 69 CSS_MEDIAQUERY_NAMES_FOR_WIDGETS_10_MEDIAFEATURE(macro)62 macro(view_mode, "-webkit-view-mode") 70 63 71 64 // end of macro -
trunk/WebCore/css/MediaQueryEvaluator.cpp
r61016 r64401 499 499 } 500 500 501 #if ENABLE(WIDGETS_10_SUPPORT)502 501 static bool view_modeMediaFeatureEval(CSSValue* value, RenderStyle*, Frame* frame, MediaFeaturePrefix op) 503 502 { 504 if (value) { 505 String mode = static_cast<CSSPrimitiveValue*>(value)->getStringValue(); 506 if (ChromeClient* client = frame->page()->chrome()->client()) { 507 if (mode == "windowed" && client->isWindowed()) 508 return true; 509 if (mode == "floating" && client->isFloating()) 510 return true; 511 if (mode == "fullscreen" && client->isFullscreen()) 512 return true; 513 if (mode == "maximized" && client->isMaximized()) 514 return true; 515 if (mode == "minimized" && client->isMinimized()) 516 return true; 517 return false; 518 } 519 } 520 return true; 521 } 522 #endif 503 UNUSED_PARAM(op); 504 if (!value) 505 return true; 506 return Page::stringToViewMode(static_cast<CSSPrimitiveValue*>(value)->getStringValue()) == frame->page()->viewMode(); 507 } 523 508 524 509 static void createFunctionMap() -
trunk/WebCore/page/ChromeClient.h
r64400 r64401 263 263 #endif 264 264 265 #if ENABLE(WIDGETS_10_SUPPORT)266 virtual bool isWindowed() { return false; }267 virtual bool isFloating() { return false; }268 virtual bool isFullscreen() { return false; }269 virtual bool isMaximized() { return false; }270 virtual bool isMinimized() { return false; }271 #endif272 273 265 protected: 274 266 virtual ~ChromeClient() { } -
trunk/WebCore/page/Page.cpp
r64293 r64401 168 168 , m_customHTMLTokenizerChunkSize(-1) 169 169 , m_canStartMedia(true) 170 , m_viewMode(ViewModeWindowed) 170 171 { 171 172 if (!allPages) { … … 219 220 Frame::cancelAllKeepAlive(); 220 221 #endif 222 } 223 224 struct ViewModeInfo { 225 const char* name; 226 Page::ViewMode type; 227 }; 228 static const int viewModeMapSize = 5; 229 static ViewModeInfo viewModeMap[viewModeMapSize] = { 230 {"windowed", Page::ViewModeWindowed}, 231 {"floating", Page::ViewModeFloating}, 232 {"fullscreen", Page::ViewModeFullscreen}, 233 {"maximized", Page::ViewModeMaximized}, 234 {"minimized", Page::ViewModeMinimized} 235 }; 236 237 Page::ViewMode Page::stringToViewMode(const String& text) 238 { 239 for (int i = 0; i < viewModeMapSize; ++i) { 240 if (text == viewModeMap[i].name) 241 return viewModeMap[i].type; 242 } 243 return Page::ViewModeInvalid; 244 } 245 246 void Page::setViewMode(ViewMode viewMode) 247 { 248 if (viewMode == m_viewMode || viewMode == ViewModeInvalid) 249 return; 250 251 m_viewMode = viewMode; 252 253 if (!m_mainFrame) 254 return; 255 256 if (m_mainFrame->view()) 257 m_mainFrame->view()->forceLayout(); 258 259 if (m_mainFrame->document()) 260 m_mainFrame->document()->updateStyleSelector(); 221 261 } 222 262 -
trunk/WebCore/page/Page.h
r64208 r64401 187 187 Settings* settings() const { return m_settings.get(); } 188 188 ProgressTracker* progress() const { return m_progress.get(); } 189 190 191 enum ViewMode { 192 ViewModeInvalid, 193 ViewModeWindowed, 194 ViewModeFloating, 195 ViewModeFullscreen, 196 ViewModeMaximized, 197 ViewModeMinimized 198 }; 199 static ViewMode stringToViewMode(const String&); 200 201 ViewMode viewMode() const { return m_viewMode; } 202 void setViewMode(ViewMode); 189 203 190 204 void setTabKeyCyclesThroughElements(bool b) { m_tabKeyCyclesThroughElements = b; } … … 362 376 NotificationPresenter* m_notificationPresenter; 363 377 #endif 378 379 ViewMode m_viewMode; 364 380 }; 365 381 -
trunk/WebKit/qt/Api/qwebpage.cpp
r64245 r64401 1219 1219 { 1220 1220 if (event->propertyName() == "_q_viewMode") { 1221 QString mode = q->property("_q_viewMode").toString(); 1222 if (mode != viewMode) { 1223 viewMode = mode; 1224 WebCore::Frame* frame = QWebFramePrivate::core(q->mainFrame()); 1225 WebCore::FrameView* view = frame->view(); 1226 frame->document()->updateStyleSelector(); 1227 view->layout(); 1228 } 1221 page->setViewMode(Page::stringToViewMode(q->property("_q_viewMode").toString())); 1229 1222 } else if (event->propertyName() == "_q_HTMLTokenizerChunkSize") { 1230 1223 int chunkSize = q->property("_q_HTMLTokenizerChunkSize").toInt(); -
trunk/WebKit/qt/Api/qwebpage_p.h
r64245 r64401 202 202 bool inspectorIsInternalOnly; // True if created through the Inspect context menu action 203 203 Qt::DropAction m_lastDropAction; 204 205 QString viewMode;206 204 207 205 static bool drtRun; -
trunk/WebKit/qt/ChangeLog
r64400 r64401 1 2010-07-30 Luiz Agostini <luiz.agostini@openbossa.org> 2 3 Reviewed by Simon Fraser. 4 5 Enabling view modes to all platforms 6 https://bugs.webkit.org/show_bug.cgi?id=37505 7 8 As view mode media feature is now supported by WebCore there is no need 9 to keep its implementation here. QtWebKit now uses WebCore's view mode media feature 10 implementation. 11 12 * Api/qwebpage.cpp: 13 (QWebPagePrivate::dynamicPropertyChangeEvent): 14 * Api/qwebpage_p.h: 15 * WebCoreSupport/ChromeClientQt.cpp: 16 * WebCoreSupport/ChromeClientQt.h: 17 1 18 2010-07-30 Joseph Pecoraro <joepeck@webkit.org> 2 19 -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
r64400 r64401 604 604 } 605 605 606 #if ENABLE(WIDGETS_10_SUPPORT)607 bool ChromeClientQt::isWindowed()608 {609 return m_webPage->d->viewMode == "windowed";610 }611 612 bool ChromeClientQt::isFloating()613 {614 return m_webPage->d->viewMode == "floating";615 }616 617 bool ChromeClientQt::isFullscreen()618 {619 return m_webPage->d->viewMode == "fullscreen";620 }621 622 bool ChromeClientQt::isMaximized()623 {624 return m_webPage->d->viewMode == "maximized";625 }626 627 bool ChromeClientQt::isMinimized()628 {629 return m_webPage->d->viewMode == "minimized";630 }631 #endif632 633 606 void ChromeClientQt::didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const 634 607 { -
trunk/WebKit/qt/WebCoreSupport/ChromeClientQt.h
r64400 r64401 170 170 virtual void cancelGeolocationPermissionRequestForFrame(Frame*, Geolocation*) { } 171 171 172 #if ENABLE(WIDGETS_10_SUPPORT)173 virtual bool isWindowed();174 virtual bool isFloating();175 virtual bool isFullscreen();176 virtual bool isMaximized();177 virtual bool isMinimized();178 #endif179 180 172 QtAbstractWebPopup* createSelectPopup(); 181 173
Note: See TracChangeset
for help on using the changeset viewer.