Changeset 121907 in webkit
- Timestamp:
- Jul 5, 2012 8:38:10 AM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r121897 r121907 1 2012-07-05 John Mellor <johnme@chromium.org> 2 3 Text Autosizing: Add test framework and simple test. 4 https://bugs.webkit.org/show_bug.cgi?id=90561 5 6 Added a RefTest checking that Text Autosizing is active. 7 Skipped the text-autosizing test directory on platforms that 8 currently disable ENABLE(TEXT_AUTOSIZING). 9 10 Reviewed by Adam Barth. 11 12 * fast/text-autosizing/simple-paragraph-expected.html: Added. 13 * fast/text-autosizing/simple-paragraph.html: Added. 14 * platform/efl/TestExpectations: 15 * platform/gtk/TestExpectations: 16 * platform/mac/TestExpectations: 17 * platform/qt/TestExpectations: 18 * platform/win/Skipped: 19 * platform/wincairo/Skipped: 20 * platform/wk2/Skipped: 21 1 22 2012-07-05 Dongwoo Im <dw.im@samsung.com> 2 23 -
trunk/LayoutTests/platform/efl/TestExpectations
r121833 r121907 132 132 // Disable webaudio codec tests, including proprietary codecs. 133 133 BUGWK88794 SKIP : webaudio/codec-tests = PASS 134 135 // Text Autosizing is not yet enabled. 136 BUGWK84186 SKIP : fast/text-autosizing = PASS 134 137 135 138 ////////////////////////////////////////////////////////////////////////////////////////// -
trunk/LayoutTests/platform/gtk/TestExpectations
r121888 r121907 345 345 // Content Security Policy 1.1 (ENABLE_CSP_NEXT) is not enabled 346 346 BUGWK85558 SKIP : http/tests/security/contentSecurityPolicy/1.1 = TEXT 347 348 // Text Autosizing is not yet enabled. 349 BUGWK84186 SKIP : fast/text-autosizing = PASS 347 350 348 351 ////////////////////////////////////////////////////////////////////////////////////////// -
trunk/LayoutTests/platform/mac/TestExpectations
r121874 r121907 287 287 BUGWK88171 : fast/block/float/010.html = TEXT 288 288 BUGWK88171 : css1/formatting_model/floating_elements.html = TEXT 289 290 // Text Autosizing is not enabled. 291 BUGWK84186 SKIP : fast/text-autosizing = PASS -
trunk/LayoutTests/platform/qt/TestExpectations
r121874 r121907 107 107 BUGWK88171 : fast/block/float/010.html = TEXT 108 108 BUGWK88171 : css1/formatting_model/floating_elements.html = TEXT 109 110 // Text Autosizing is not enabled. 111 BUGWK84186 SKIP : fast/text-autosizing = PASS -
trunk/LayoutTests/platform/win/Skipped
r121879 r121907 1286 1286 # viewport meta tag support 1287 1287 fast/viewport 1288 1289 # Text Autosizing is not enabled (http://webkit.org/b/84186). 1290 fast/text-autosizing 1288 1291 1289 1292 # https://bugs.webkit.org/show_bug.cgi?id=45983 -
trunk/LayoutTests/platform/wincairo/Skipped
r121879 r121907 1795 1795 fast/viewport 1796 1796 1797 # Text Autosizing is not enabled (http://webkit.org/b/84186). 1798 fast/text-autosizing 1799 1797 1800 # https://bugs.webkit.org/show_bug.cgi?id=45983 1798 1801 media/media-can-play-mpeg4-video.html -
trunk/LayoutTests/platform/wk2/Skipped
r121879 r121907 813 813 http/tests/security/referrer-policy-redirect-link.html 814 814 815 # Text Autosizing is not yet enabled. 816 # https://bugs.webkit.org/show_bug.cgi?id=84186 817 fast/text-autosizing 818 815 819 ### END OF (1) Classified failures with bug reports 816 820 ######################################## -
trunk/Source/WebCore/ChangeLog
r121906 r121907 1 2012-07-05 John Mellor <johnme@chromium.org> 2 3 Text Autosizing: Add test framework and simple test. 4 https://bugs.webkit.org/show_bug.cgi?id=90561 5 6 Exposes methods allowing Layout Tests to enable Text Autosizing and 7 get the same results as if they were running on a mobile device. 8 9 Reviewed by Adam Barth. 10 11 Test: fast/text-autosizing/simple-paragraph.html 12 13 * page/Settings.cpp: 14 (WebCore::Settings::Settings): 15 (WebCore): 16 (WebCore::Settings::setTextAutosizingWindowSizeOverride): 17 * page/Settings.h: 18 (Settings): 19 (WebCore::Settings::textAutosizingWindowSizeOverride): 20 * rendering/TextAutosizer.cpp: 21 (WebCore::TextAutosizer::boostSubtree): 22 * testing/InternalSettings.cpp: 23 (WebCore::InternalSettings::InternalSettings): 24 (WebCore::InternalSettings::restoreTo): 25 (WebCore::InternalSettings::setTextAutosizingEnabled): 26 (WebCore): 27 (WebCore::InternalSettings::setTextAutosizingWindowSizeOverride): 28 * testing/InternalSettings.h: 29 (InternalSettings): 30 * testing/InternalSettings.idl: 31 1 32 2012-07-04 Andrey Kosyakov <caseq@chromium.org> 2 33 -
trunk/Source/WebCore/page/Settings.cpp
r121861 r121907 140 140 , m_maximumHTMLParserDOMTreeDepth(defaultMaximumHTMLParserDOMTreeDepth) 141 141 #if ENABLE(TEXT_AUTOSIZING) 142 #if HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP 143 , m_textAutosizingWindowSizeOverride(320, 480) 142 144 , m_textAutosizingEnabled(true) 145 #else 146 , m_textAutosizingEnabled(false) 147 #endif 143 148 #endif 144 149 , m_isSpatialNavigationEnabled(false) … … 415 420 m_page->setNeedsRecalcStyleInAllFrames(); 416 421 } 422 423 void Settings::setTextAutosizingWindowSizeOverride(const IntSize& textAutosizingWindowSizeOverride) 424 { 425 if (m_textAutosizingWindowSizeOverride == textAutosizingWindowSizeOverride) 426 return; 427 428 m_textAutosizingWindowSizeOverride = textAutosizingWindowSizeOverride; 429 m_page->setNeedsRecalcStyleInAllFrames(); 430 } 417 431 #endif 418 432 -
trunk/Source/WebCore/page/Settings.h
r121861 r121907 37 37 #include <wtf/unicode/Unicode.h> 38 38 39 #if ENABLE(TEXT_AUTOSIZING) 40 #include "IntSize.h" 41 #endif 42 39 43 namespace WebCore { 40 44 … … 107 111 void setTextAutosizingEnabled(bool); 108 112 bool textAutosizingEnabled() const { return m_textAutosizingEnabled; } 113 114 // Only set by Layout Tests, and only used if textAutosizingEnabled() returns true. 115 void setTextAutosizingWindowSizeOverride(const IntSize&); 116 const IntSize& textAutosizingWindowSizeOverride() const { return m_textAutosizingWindowSizeOverride; } 109 117 #endif 110 118 … … 635 643 unsigned m_maximumHTMLParserDOMTreeDepth; 636 644 #if ENABLE(TEXT_AUTOSIZING) 645 IntSize m_textAutosizingWindowSizeOverride; 637 646 bool m_textAutosizingEnabled : 1; 638 647 #endif -
trunk/Source/WebCore/rendering/TextAutosizer.cpp
r121866 r121907 50 50 return false; 51 51 52 #ifdef HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP 53 IntSize windowSize(320, 480); 54 #else 55 Frame* mainFrame = m_document->page()->mainFrame(); 56 bool includeScrollbars = !InspectorInstrumentation::shouldApplyScreenWidthOverride(mainFrame); 57 IntSize windowSize = mainFrame->view()->visibleContentRect(includeScrollbars).size(); // FIXME: Check that this is always in logical (density-independent) pixels (see wkbug.com/87440). 58 #endif 52 IntSize windowSize = m_document->settings()->textAutosizingWindowSizeOverride(); 53 if (windowSize.isEmpty()) { 54 Frame* mainFrame = m_document->page()->mainFrame(); 55 bool includeScrollbars = !InspectorInstrumentation::shouldApplyScreenWidthOverride(mainFrame); 56 windowSize = mainFrame->view()->visibleContentRect(includeScrollbars).size(); // FIXME: Check that this is always in logical (density-independent) pixels (see wkbug.com/87440). 57 } 59 58 60 59 for (RenderObject* descendant = traverseNext(layoutRoot, layoutRoot); descendant; descendant = traverseNext(descendant, layoutRoot)) { -
trunk/Source/WebCore/testing/InternalSettings.cpp
r121229 r121907 108 108 , m_originalDeviceSupportsTouch(settings()->deviceSupportsTouch()) 109 109 , m_originalDeviceSupportsMouse(settings()->deviceSupportsMouse()) 110 #if ENABLE(TEXT_AUTOSIZING) 111 , m_originalTextAutosizingEnabled(settings()->textAutosizingEnabled()) 112 , m_originalTextAutosizingWindowSizeOverride(settings()->textAutosizingWindowSizeOverride()) 113 #endif 110 114 { 111 115 } … … 129 133 settings->setDeviceSupportsTouch(m_originalDeviceSupportsTouch); 130 134 settings->setDeviceSupportsMouse(m_originalDeviceSupportsMouse); 135 #if ENABLE(TEXT_AUTOSIZING) 136 settings->setTextAutosizingEnabled(m_originalTextAutosizingEnabled); 137 settings->setTextAutosizingWindowSizeOverride(m_originalTextAutosizingWindowSizeOverride); 138 #endif 131 139 } 132 140 … … 319 327 InternalSettingsGuardForSettings(); 320 328 setFontFamily(settings(), family, script, &Settings::setPictographFontFamily); 329 } 330 331 void InternalSettings::setTextAutosizingEnabled(bool enabled, ExceptionCode& ec) 332 { 333 #if ENABLE(TEXT_AUTOSIZING) 334 InternalSettingsGuardForSettings(); 335 settings()->setTextAutosizingEnabled(enabled); 336 #else 337 UNUSED_PARAM(enabled); 338 UNUSED_PARAM(ec); 339 #endif 340 } 341 342 void InternalSettings::setTextAutosizingWindowSizeOverride(int width, int height, ExceptionCode& ec) 343 { 344 #if ENABLE(TEXT_AUTOSIZING) 345 InternalSettingsGuardForSettings(); 346 settings()->setTextAutosizingWindowSizeOverride(IntSize(width, height)); 347 #else 348 UNUSED_PARAM(width); 349 UNUSED_PARAM(height); 350 UNUSED_PARAM(ec); 351 #endif 321 352 } 322 353 -
trunk/Source/WebCore/testing/InternalSettings.h
r121229 r121907 32 32 #include <wtf/RefCounted.h> 33 33 #include <wtf/text/WTFString.h> 34 35 #if ENABLE(TEXT_AUTOSIZING) 36 #include "IntSize.h" 37 #endif 34 38 35 39 namespace WebCore { … … 73 77 void setFantasyFontFamily(const String& family, const String& script, ExceptionCode&); 74 78 void setPictographFontFamily(const String& family, const String& script, ExceptionCode&); 79 void setTextAutosizingEnabled(bool enabled, ExceptionCode&); 80 void setTextAutosizingWindowSizeOverride(int width, int height, ExceptionCode&); 75 81 void setEnableScrollAnimator(bool enabled, ExceptionCode&); 76 82 bool scrollAnimatorEnabled(ExceptionCode&); … … 110 116 bool m_originalDeviceSupportsTouch; 111 117 bool m_originalDeviceSupportsMouse; 118 #if ENABLE(TEXT_AUTOSIZING) 119 bool m_originalTextAutosizingEnabled; 120 IntSize m_originalTextAutosizingWindowSizeOverride; 121 #endif 112 122 }; 113 123 -
trunk/Source/WebCore/testing/InternalSettings.idl
r121229 r121907 52 52 void setFantasyFontFamily(in DOMString family, in DOMString script) raises(DOMException); 53 53 void setPictographFontFamily(in DOMString family, in DOMString script) raises(DOMException); 54 void setTextAutosizingEnabled(in boolean enabled) raises(DOMException); 55 void setTextAutosizingWindowSizeOverride(in long width, in long height) raises(DOMException); 54 56 void setEnableScrollAnimator(in boolean enabled) raises(DOMException); 55 57 boolean scrollAnimatorEnabled() raises(DOMException); -
trunk/Source/WebKit/chromium/ChangeLog
r121904 r121907 1 2012-07-05 John Mellor <johnme@chromium.org> 2 3 Text Autosizing: Add test framework and simple test. 4 https://bugs.webkit.org/show_bug.cgi?id=90561 5 6 ENABLE(TEXT_AUTOSIZING) is now on in Chromium (but disabled at runtime). 7 This allows it to be used in Layout Tests (and in future by Web 8 Inspector's mobile device emulation). 9 10 Reviewed by Adam Barth. 11 12 * features.gypi: 13 1 14 2012-07-05 Oli Lan <olilan@chromium.org> 2 15 -
trunk/Source/WebKit/chromium/features.gypi
r121861 r121907 93 93 'ENABLE_SVG=<(enable_svg)', 94 94 'ENABLE_SVG_FONTS=<(enable_svg)', 95 'ENABLE_TEXT_AUTOSIZING=1', 95 96 'ENABLE_TOUCH_ADJUSTMENT=1', 96 97 'ENABLE_TOUCH_EVENTS=<(enable_touch_events)', … … 154 155 # https://bugs.webkit.org/show_bug.cgi?id=88636 155 156 'ENABLE_SHARED_WORKERS=1', 156 'ENABLE_TEXT_AUTOSIZING=1',157 157 'ENABLE_WEB_AUDIO=0', 158 158 'WTF_USE_NATIVE_FULLSCREEN_VIDEO=1', … … 173 173 'ENABLE_PAGE_POPUP=1', 174 174 'ENABLE_SHARED_WORKERS=1', 175 'ENABLE_TEXT_AUTOSIZING=0',176 175 'ENABLE_WEB_AUDIO=1', 177 176 ],
Note: See TracChangeset
for help on using the changeset viewer.