Changeset 200534 in webkit
- Timestamp:
- May 6, 2016, 5:05:58 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 6 added
- 43 edited
- 1 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r200533 r200534 1 2016-05-06 Simon Fraser <simon.fraser@apple.com> 2 3 Enable IOS_TEXT_AUTOSIZING on Mac and make it testable 4 https://bugs.webkit.org/show_bug.cgi?id=157432 5 rdar://problem/16406720 6 7 Reviewed by Dean Jackson. 8 9 Enable fast/text-autosizing/ios/ on Mac and iOS 10 11 * fast/text-autosizing/ios/autosize-width-expected.html: Added. 12 * fast/text-autosizing/ios/autosize-width.html: Added. 13 * platform/ios-simulator/TestExpectations: 14 * platform/mac-wk2/TestExpectations: 15 * platform/mac/TestExpectations: 16 1 17 2016-05-06 Joseph Pecoraro <pecoraro@apple.com> 2 18 -
trunk/LayoutTests/fast/text-autosizing/ios/line-height-text-autosizing.html
r200533 r200534 2 2 <html> 3 3 <head> 4 <script src="../../ resources/js-test-pre.js"></script>4 <script src="../../../resources/js-test-pre.js"></script> 5 5 <style> 6 6 #testDivAdjust { … … 12 12 } 13 13 </style> 14 <script> 15 if (window.internals) { 16 window.internals.settings.setTextAutosizingEnabled(true); 17 window.internals.settings.setTextAutosizingWindowSizeOverride(320, 480); 18 } 19 </script> 14 20 </head> 15 21 <boby> … … 54 60 } 55 61 </script> 56 <script src="../../ resources/js-test-post.js"></script>62 <script src="../../../resources/js-test-post.js"></script> 57 63 </body> 58 64 </html> -
trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations
r200488 r200534 794 794 fast/block/min-max-height-percent-height-child.html [ Failure ] 795 795 fast/borders/hidpi-border-clipping-right-after-move.html [ ImageOnlyFailure ] 796 fast/ css/line-height-text-autosizing.html [ Failure ]796 fast/text-autosizing/ios/line-height-text-autosizing.html [ Failure ] 797 797 fast/css/nested-rounded-corners.html [ Failure ] 798 798 fast/css/relative-positioned-block-crash.html [ Failure ] -
trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations
r200487 r200534 546 546 fast/css/hover-display-block-none.html [ Failure ] 547 547 fast/css/hover-display-block.html [ Failure ] 548 fast/ css/line-height-text-autosizing.html [ Failure ]548 fast/text-autosizing/ios/line-height-text-autosizing.html [ Failure ] 549 549 fast/css/nested-layers-with-hover.html [ Failure ] 550 550 fast/dom/HTMLDocument/hasFocus.html [ Failure ] -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r200494 r200534 11 11 quicklook [ Pass ] 12 12 http/tests/quicklook [ Pass ] 13 14 fast/text-autosizing/ios [ Pass ] 13 15 14 16 # <rdar://problem/22898927> Crashes in iWorkImport.framework … … 2211 2213 fast/table/wide-colspan.html [ Failure ] 2212 2214 fast/table/wide-column.html [ Failure ] 2215 2216 # Tests designed for TEXT_AUTOSIZING, not IOS_TEXT_AUTOSIZING behavior. 2213 2217 fast/text-autosizing/cluster-inline-block-or-table.html [ ImageOnlyFailure ] 2214 2218 fast/text-autosizing/cluster-inline-grid-flex-box.html [ ImageOnlyFailure ] … … 2258 2262 fast/text-autosizing/wide-iframe.html [ ImageOnlyFailure ] 2259 2263 fast/text-autosizing/wide-in-narrow-overflow-scroll.html [ ImageOnlyFailure ] 2264 2260 2265 fast/text/decorations-transformed.html [ Failure ] 2261 2266 fast/text/emphasis-avoid-ruby.html [ Failure ] … … 2560 2565 # Mark as passing specific tests in folders that were skipped temporarily above. 2561 2566 ## 2562 webkit.org/b/138970 fast/ css/line-height-text-autosizing.html [ Pass ]2567 webkit.org/b/138970 fast/text-autosizing/ios/line-height-text-autosizing.html [ Pass ] 2563 2568 2564 2569 # Skipped for mac as well: -
trunk/LayoutTests/platform/mac-wk2/TestExpectations
r200392 r200534 8 8 tiled-drawing [ Pass ] 9 9 swipe [ Pass ] 10 11 fast/text-autosizing/ios [ Pass ] 10 12 11 13 fast/events/cancelled-force-click-link-navigation.html [ Pass ] -
trunk/LayoutTests/platform/mac/TestExpectations
r200315 r200534 16 16 17 17 fast/url/user-visible [ Pass ] 18 19 fast/text-autosizing/ios [ Pass ] 18 20 19 21 #////////////////////////////////////////////////////////////////////////////////////////// -
trunk/LayoutTests/platform/mac/fast/text-autosizing/ios/line-height-text-autosizing-expected.txt
r200533 r200534 14 14 PASS window.getComputedStyle(testDivNoAdjust).getPropertyValue('line-height') is "12px" 15 15 Case with text size adjust. 16 Platform does not support -webkit-text-size-adjust 16 Platform supports -webkit-text-size-adjust 17 FAIL window.getComputedStyle(testDivAdjust).getPropertyValue('line-height') should be normal. Was 36px. 18 PASS window.getComputedStyle(testDivAdjust).getPropertyValue('font-size') is "30px" 19 testDivAdjust.style['line-height'] = '1.6' 20 PASS window.getComputedStyle(testDivAdjust).getPropertyValue('line-height') is "48px" 21 testDivAdjust.style['line-height'] = '80%' 22 PASS window.getComputedStyle(testDivAdjust).getPropertyValue('line-height') is "24px" 23 testDivAdjust.style['line-height'] = '12px' 24 PASS window.getComputedStyle(testDivAdjust).getPropertyValue('line-height') is "18px" 17 25 PASS successfullyParsed is true 18 26 -
trunk/Source/JavaScriptCore/ChangeLog
r200533 r200534 1 2016-05-06 Simon Fraser <simon.fraser@apple.com> 2 3 Enable IOS_TEXT_AUTOSIZING on Mac and make it testable 4 https://bugs.webkit.org/show_bug.cgi?id=157432 5 rdar://problem/16406720 6 7 Reviewed by Dean Jackson. 8 9 Enable IOS_TEXT_AUTOSIZING on Mac so it can be tested. 10 11 * Configurations/FeatureDefines.xcconfig: 12 1 13 2016-05-06 Joseph Pecoraro <pecoraro@apple.com> 2 14 -
trunk/Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
r200075 r200534 108 108 ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS; 109 109 110 ENABLE_IOS_TEXT_AUTOSIZING [sdk=iphone*]= ENABLE_IOS_TEXT_AUTOSIZING;110 ENABLE_IOS_TEXT_AUTOSIZING = ENABLE_IOS_TEXT_AUTOSIZING; 111 111 ENABLE_DATA_DETECTION = ENABLE_DATA_DETECTION; 112 112 -
trunk/Source/WebCore/ChangeLog
r200533 r200534 1 2016-05-06 Simon Fraser <simon.fraser@apple.com> 2 3 Enable IOS_TEXT_AUTOSIZING on Mac and make it testable 4 https://bugs.webkit.org/show_bug.cgi?id=157432 5 rdar://problem/16406720 6 7 Reviewed by Dean Jackson. 8 9 Enable IOS_TEXT_AUTOSIZING on Mac so it can be tested. 10 11 Make the setTextAutosizingEnabled() Setting work, and plumb it through WK1 and WK2 12 preferences for WTR and DRT. Make textAutosizingWindowSizeOverride() work, for layout tests. 13 These two settings are shared with TEXT_AUTOSIZING. 14 15 Add a TextAutosizing log channel, which is useful for generated -expected.html results. 16 17 Move adjustComputedFontSizesOnBlocks() and related code from RenderObject to RenderElement 18 without changes. 19 20 An implication of this set of changes is that the way clients enable text autosizing 21 has changed. Previously, they set the "MinimumZoomFontSize" preference to 0. 22 Settings::defaultMinimumZoomFontSize() used to do this in order to enable text autosizing 23 on iPhone only, not iPad. 24 25 Now the preferred technique is to leave minimumZoomFontSize alone, and to use textAutosizingEnabled() 26 instead. Settings::defaultTextAutosizingEnabled() now does the check for iPhone. 27 28 UIWebView calls WebKitGetMinimumZoomFontSize() to setup the default minimum font zoom size, 29 which will now always return 15, but had no other code that toggled this. So it's safe to just rely 30 on Settings::defaultTextAutosizingEnabled() doing the right thing for iPhone/iPad. 31 32 Test: fast/text-autosizing/ios/autosize-width.html 33 34 * Configurations/FeatureDefines.xcconfig: 35 * dom/Document.cpp: 36 (WebCore::Document::addAutoSizingNode): 37 * page/FrameView.cpp: 38 (WebCore::FrameView::layout): 39 * page/Settings.cpp: 40 (WebCore::Settings::Settings): Deleted. 41 (WebCore::Settings::setTextAutosizingEnabled): Deleted. 42 (WebCore::Settings::setTextAutosizingWindowSizeOverride): Deleted. 43 * page/Settings.h: 44 (WebCore::Settings::textAutosizingEnabled): Deleted. 45 (WebCore::Settings::textAutosizingWindowSizeOverride): Deleted. 46 * page/Settings.in: 47 * page/cocoa/SettingsCocoa.mm: 48 (WebCore::Settings::defaultMinimumZoomFontSize): 49 (WebCore::Settings::defaultTextAutosizingEnabled): 50 * platform/Logging.h: 51 * rendering/RenderBlockFlow.cpp: 52 (WebCore::RenderBlockFlow::adjustComputedFontSizes): 53 * rendering/RenderElement.cpp: 54 (WebCore::includeNonFixedHeight): 55 (WebCore::RenderElement::adjustComputedFontSizesOnBlocks): 56 (WebCore::RenderElement::resetTextAutosizing): 57 * rendering/RenderElement.h: 58 * rendering/RenderObject.cpp: 59 (WebCore::includeNonFixedHeight): Deleted. 60 (WebCore::RenderObject::adjustComputedFontSizesOnBlocks): Deleted. 61 (WebCore::RenderObject::resetTextAutosizing): Deleted. 62 * rendering/RenderObject.h: 63 * rendering/TextAutoSizing.cpp: 64 (WebCore::TextAutoSizingValue::adjustNodeSizes): 65 * testing/InternalSettings.cpp: 66 (WebCore::InternalSettings::Backup::Backup): 67 (WebCore::InternalSettings::Backup::restoreTo): 68 (WebCore::InternalSettings::setTextAutosizingEnabled): 69 (WebCore::InternalSettings::setTextAutosizingWindowSizeOverride): 70 * testing/InternalSettings.h: 71 1 72 2016-05-06 Joseph Pecoraro <pecoraro@apple.com> 2 73 -
trunk/Source/WebCore/Configurations/FeatureDefines.xcconfig
r200075 r200534 108 108 ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS; 109 109 110 ENABLE_IOS_TEXT_AUTOSIZING [sdk=iphone*]= ENABLE_IOS_TEXT_AUTOSIZING;110 ENABLE_IOS_TEXT_AUTOSIZING = ENABLE_IOS_TEXT_AUTOSIZING; 111 111 ENABLE_DATA_DETECTION = ENABLE_DATA_DETECTION; 112 112 -
trunk/Source/WebCore/dom/Document.cpp
r200524 r200534 5281 5281 5282 5282 #if ENABLE(IOS_TEXT_AUTOSIZING) 5283 5283 5284 void Document::addAutoSizingNode(Node* node, float candidateSize) 5284 5285 { 5286 LOG(TextAutosizing, " addAutoSizingNode %p candidateSize=%f", node, candidateSize); 5287 5285 5288 TextAutoSizingKey key(&node->renderer()->style()); 5286 5289 auto addResult = m_textAutoSizedNodes.ensure(WTFMove(key), [] { -
trunk/Source/WebCore/page/FrameView.cpp
r200494 r200534 1403 1403 1404 1404 root->layout(); 1405 1405 1406 #if ENABLE(IOS_TEXT_AUTOSIZING) 1406 if ( Page* page = frame().page()) {1407 if (frame().settings().textAutosizingEnabled() && !root->view().printing()) { 1407 1408 float minimumZoomFontSize = frame().settings().minimumZoomFontSize(); 1408 float textAutosizingWidth = page->textAutosizingWidth(); 1409 if (minimumZoomFontSize && textAutosizingWidth && !root->view().printing()) { 1409 float textAutosizingWidth = frame().page() ? frame().page()->textAutosizingWidth() : 0; 1410 if (int overrideWidth = frame().settings().textAutosizingWindowSizeOverride().width()) 1411 textAutosizingWidth = overrideWidth; 1412 1413 LOG(TextAutosizing, "Text Autosizing: minimumZoomFontSize=%.2f textAutosizingWidth=%.2f", minimumZoomFontSize, textAutosizingWidth); 1414 1415 if (minimumZoomFontSize && textAutosizingWidth) { 1410 1416 root->adjustComputedFontSizesOnBlocks(minimumZoomFontSize, textAutosizingWidth); 1411 1417 if (root->needsLayout()) -
trunk/Source/WebCore/page/Settings.cpp
r200166 r200534 186 186 #if ENABLE(TEXT_AUTOSIZING) 187 187 , m_textAutosizingFontScaleFactor(1) 188 #if HACK_FORCE_TEXT_AUTOSIZING_ON_DESKTOP189 , m_textAutosizingWindowSizeOverride(320, 480)190 , m_textAutosizingEnabled(true)191 #else192 , m_textAutosizingEnabled(false)193 #endif194 188 #endif 195 189 SETTINGS_INITIALIZER_LIST … … 327 321 328 322 #if ENABLE(TEXT_AUTOSIZING) 329 void Settings::setTextAutosizingEnabled(bool textAutosizingEnabled)330 {331 if (m_textAutosizingEnabled == textAutosizingEnabled)332 return;333 334 m_textAutosizingEnabled = textAutosizingEnabled;335 if (m_page)336 m_page->setNeedsRecalcStyleInAllFrames();337 }338 339 void Settings::setTextAutosizingWindowSizeOverride(const IntSize& textAutosizingWindowSizeOverride)340 {341 if (m_textAutosizingWindowSizeOverride == textAutosizingWindowSizeOverride)342 return;343 344 m_textAutosizingWindowSizeOverride = textAutosizingWindowSizeOverride;345 if (m_page)346 m_page->setNeedsRecalcStyleInAllFrames();347 }348 349 323 void Settings::setTextAutosizingFontScaleFactor(float fontScaleFactor) 350 324 { … … 360 334 m_page->setNeedsRecalcStyleInAllFrames(); 361 335 } 362 336 #endif 337 338 float Settings::defaultMinimumZoomFontSize() 339 { 340 return 15; 341 } 342 343 #if !PLATFORM(IOS) 344 bool Settings::defaultTextAutosizingEnabled() 345 { 346 return false; 347 } 363 348 #endif 364 349 -
trunk/Source/WebCore/page/Settings.h
r200301 r200534 110 110 111 111 #if ENABLE(TEXT_AUTOSIZING) 112 void setTextAutosizingEnabled(bool);113 bool textAutosizingEnabled() const { return m_textAutosizingEnabled; }114 115 112 void setTextAutosizingFontScaleFactor(float); 116 113 float textAutosizingFontScaleFactor() const { return m_textAutosizingFontScaleFactor; } 117 118 // Only set by Layout Tests, and only used if textAutosizingEnabled() returns true. 119 void setTextAutosizingWindowSizeOverride(const IntSize&); 120 const IntSize& textAutosizingWindowSizeOverride() const { return m_textAutosizingWindowSizeOverride; } 121 #endif 114 #endif 115 116 WEBCORE_EXPORT static bool defaultTextAutosizingEnabled(); 117 WEBCORE_EXPORT static float defaultMinimumZoomFontSize(); 122 118 123 119 // Only set by Layout Tests. … … 291 287 bool isForcePendingWebGLPolicy() const { return m_forcePendingWebGLPolicy; } 292 288 293 #if PLATFORM(IOS)294 WEBCORE_EXPORT static float defaultMinimumZoomFontSize();295 #endif296 297 289 #if USE(APPLE_INTERNAL_SDK) 298 290 #import <WebKitAdditions/SettingsGettersAndSetters.h> … … 315 307 #if ENABLE(TEXT_AUTOSIZING) 316 308 float m_textAutosizingFontScaleFactor; 317 IntSize m_textAutosizingWindowSizeOverride;318 bool m_textAutosizingEnabled : 1;319 309 #endif 320 310 -
trunk/Source/WebCore/page/Settings.in
r200412 r200534 198 198 fixedBackgroundsPaintRelativeToDocument initial=defaultFixedBackgroundsPaintRelativeToDocument 199 199 200 minimumZoomFontSize type=float, initial=15, conditional=IOS_TEXT_AUTOSIZING 200 textAutosizingEnabled initial=false, setNeedsStyleRecalcInAllFrames=1, conditional=TEXT_AUTOSIZING 201 textAutosizingEnabled initial=defaultTextAutosizingEnabled(), setNeedsStyleRecalcInAllFrames=1, conditional=IOS_TEXT_AUTOSIZING 202 203 textAutosizingWindowSizeOverride type=IntSize, setNeedsStyleRecalcInAllFrames=1, conditional=TEXT_AUTOSIZING 204 textAutosizingWindowSizeOverride type=IntSize, setNeedsStyleRecalcInAllFrames=1, conditional=IOS_TEXT_AUTOSIZING 205 206 minimumZoomFontSize type=float, initial=defaultMinimumZoomFontSize(), conditional=IOS_TEXT_AUTOSIZING 201 207 202 208 simpleLineLayoutEnabled initial=true, setNeedsStyleRecalcInAllFrames=1 -
trunk/Source/WebCore/page/cocoa/SettingsCocoa.mm
r194318 r200534 112 112 setSansSerifFontFamily("Helvetica", USCRIPT_COMMON); 113 113 } 114 115 float Settings::defaultMinimumZoomFontSize()114 115 bool Settings::defaultTextAutosizingEnabled() 116 116 { 117 if (deviceHasIPadCapability() && ![[getUIApplicationClass() sharedApplication] _isClassic]) 118 return 0; 119 return 15; 117 return !deviceHasIPadCapability() || [[getUIApplicationClass() sharedApplication] _isClassic]; 120 118 } 121 119 -
trunk/Source/WebCore/platform/Logging.h
r200346 r200534 82 82 M(SpellingAndGrammar) \ 83 83 M(StorageAPI) \ 84 M(TextAutosizing) \ 84 85 M(Threading) \ 85 86 M(WebAudio) \ -
trunk/Source/WebCore/rendering/RenderBlockFlow.cpp
r200524 r200534 33 33 #include "InlineTextBox.h" 34 34 #include "LayoutRepainter.h" 35 #include "Logging.h" 35 36 #include "RenderCombineText.h" 36 37 #include "RenderFlowThread.h" … … 3762 3763 void RenderBlockFlow::adjustComputedFontSizes(float size, float visibleWidth) 3763 3764 { 3765 LOG(TextAutosizing, "RenderBlockFlow %p adjustComputedFontSizes, size=%f visibleWidth=%f, width()=%f. Bailing: %d", this, size, visibleWidth, width().toFloat(), visibleWidth >= width()); 3766 3764 3767 // Don't do any work if the block is smaller than the visible area. 3765 3768 if (visibleWidth >= width()) -
trunk/Source/WebCore/rendering/RenderElement.cpp
r200098 r200534 2168 2168 } 2169 2169 2170 #if ENABLE(IOS_TEXT_AUTOSIZING) 2171 static RenderObject::BlockContentHeightType includeNonFixedHeight(const RenderObject* renderer) 2172 { 2173 const RenderStyle& style = renderer->style(); 2174 if (style.height().type() == Fixed) { 2175 if (is<RenderBlock>(*renderer)) { 2176 // For fixed height styles, if the overflow size of the element spills out of the specified 2177 // height, assume we can apply text auto-sizing. 2178 if (style.overflowY() == OVISIBLE 2179 && style.height().value() < downcast<RenderBlock>(renderer)->layoutOverflowRect().maxY()) 2180 return RenderObject::OverflowHeight; 2181 } 2182 return RenderObject::FixedHeight; 2183 } 2184 return RenderObject::FlexibleHeight; 2185 } 2186 2187 void RenderElement::adjustComputedFontSizesOnBlocks(float size, float visibleWidth) 2188 { 2189 Document* document = view().frameView().frame().document(); 2190 if (!document) 2191 return; 2192 2193 Vector<int> depthStack; 2194 int currentDepth = 0; 2195 int newFixedDepth = 0; 2196 2197 // We don't apply autosizing to nodes with fixed height normally. 2198 // But we apply it to nodes which are located deep enough 2199 // (nesting depth is greater than some const) inside of a parent block 2200 // which has fixed height but its content overflows intentionally. 2201 for (RenderObject* descendent = traverseNext(this, includeNonFixedHeight, currentDepth, newFixedDepth); descendent; descendent = descendent->traverseNext(this, includeNonFixedHeight, currentDepth, newFixedDepth)) { 2202 while (depthStack.size() > 0 && currentDepth <= depthStack[depthStack.size() - 1]) 2203 depthStack.remove(depthStack.size() - 1); 2204 if (newFixedDepth) 2205 depthStack.append(newFixedDepth); 2206 2207 int stackSize = depthStack.size(); 2208 if (is<RenderBlockFlow>(*descendent) && !descendent->isListItem() && (!stackSize || currentDepth - depthStack[stackSize - 1] > TextAutoSizingFixedHeightDepth)) 2209 downcast<RenderBlockFlow>(*descendent).adjustComputedFontSizes(size, visibleWidth); 2210 newFixedDepth = 0; 2211 } 2212 2213 // Remove style from auto-sizing table that are no longer valid. 2214 document->validateAutoSizingNodes(); 2215 } 2216 2217 void RenderElement::resetTextAutosizing() 2218 { 2219 Document* document = view().frameView().frame().document(); 2220 if (!document) 2221 return; 2222 2223 document->resetAutoSizingNodes(); 2224 2225 Vector<int> depthStack; 2226 int currentDepth = 0; 2227 int newFixedDepth = 0; 2228 2229 for (RenderObject* descendent = traverseNext(this, includeNonFixedHeight, currentDepth, newFixedDepth); descendent; descendent = descendent->traverseNext(this, includeNonFixedHeight, currentDepth, newFixedDepth)) { 2230 while (depthStack.size() > 0 && currentDepth <= depthStack[depthStack.size() - 1]) 2231 depthStack.remove(depthStack.size() - 1); 2232 if (newFixedDepth) 2233 depthStack.append(newFixedDepth); 2234 2235 int stackSize = depthStack.size(); 2236 if (is<RenderBlockFlow>(*descendent) && !descendent->isListItem() && (!stackSize || currentDepth - depthStack[stackSize - 1] > TextAutoSizingFixedHeightDepth)) 2237 downcast<RenderBlockFlow>(*descendent).resetComputedFontSize(); 2238 newFixedDepth = 0; 2239 } 2240 } 2241 #endif // ENABLE(IOS_TEXT_AUTOSIZING) 2242 2170 2243 RenderBlock* containingBlockForFixedPosition(const RenderElement* element) 2171 2244 { -
trunk/Source/WebCore/rendering/RenderElement.h
r200098 r200534 216 216 bool hasContinuation() const { return m_hasContinuation; } 217 217 218 #if ENABLE(IOS_TEXT_AUTOSIZING) 219 void adjustComputedFontSizesOnBlocks(float size, float visibleWidth); 220 WEBCORE_EXPORT void resetTextAutosizing(); 221 #endif 222 218 223 protected: 219 224 enum BaseTypeFlag { -
trunk/Source/WebCore/rendering/RenderObject.cpp
r200098 r200534 405 405 return nullptr; 406 406 } 407 408 static RenderObject::BlockContentHeightType includeNonFixedHeight(const RenderObject* renderer)409 {410 const RenderStyle& style = renderer->style();411 if (style.height().type() == Fixed) {412 if (is<RenderBlock>(*renderer)) {413 // For fixed height styles, if the overflow size of the element spills out of the specified414 // height, assume we can apply text auto-sizing.415 if (style.overflowY() == OVISIBLE416 && style.height().value() < downcast<RenderBlock>(renderer)->layoutOverflowRect().maxY())417 return RenderObject::OverflowHeight;418 }419 return RenderObject::FixedHeight;420 }421 return RenderObject::FlexibleHeight;422 }423 424 425 void RenderObject::adjustComputedFontSizesOnBlocks(float size, float visibleWidth)426 {427 Document* document = view().frameView().frame().document();428 if (!document)429 return;430 431 Vector<int> depthStack;432 int currentDepth = 0;433 int newFixedDepth = 0;434 435 // We don't apply autosizing to nodes with fixed height normally.436 // But we apply it to nodes which are located deep enough437 // (nesting depth is greater than some const) inside of a parent block438 // which has fixed height but its content overflows intentionally.439 for (RenderObject* descendent = traverseNext(this, includeNonFixedHeight, currentDepth, newFixedDepth); descendent; descendent = descendent->traverseNext(this, includeNonFixedHeight, currentDepth, newFixedDepth)) {440 while (depthStack.size() > 0 && currentDepth <= depthStack[depthStack.size() - 1])441 depthStack.remove(depthStack.size() - 1);442 if (newFixedDepth)443 depthStack.append(newFixedDepth);444 445 int stackSize = depthStack.size();446 if (is<RenderBlockFlow>(*descendent) && !descendent->isListItem() && (!stackSize || currentDepth - depthStack[stackSize - 1] > TextAutoSizingFixedHeightDepth))447 downcast<RenderBlockFlow>(*descendent).adjustComputedFontSizes(size, visibleWidth);448 newFixedDepth = 0;449 }450 451 // Remove style from auto-sizing table that are no longer valid.452 document->validateAutoSizingNodes();453 }454 455 void RenderObject::resetTextAutosizing()456 {457 Document* document = view().frameView().frame().document();458 if (!document)459 return;460 461 document->resetAutoSizingNodes();462 463 Vector<int> depthStack;464 int currentDepth = 0;465 int newFixedDepth = 0;466 467 for (RenderObject* descendent = traverseNext(this, includeNonFixedHeight, currentDepth, newFixedDepth); descendent; descendent = descendent->traverseNext(this, includeNonFixedHeight, currentDepth, newFixedDepth)) {468 while (depthStack.size() > 0 && currentDepth <= depthStack[depthStack.size() - 1])469 depthStack.remove(depthStack.size() - 1);470 if (newFixedDepth)471 depthStack.append(newFixedDepth);472 473 int stackSize = depthStack.size();474 if (is<RenderBlockFlow>(*descendent) && !descendent->isListItem() && (!stackSize || currentDepth - depthStack[stackSize - 1] > TextAutoSizingFixedHeightDepth))475 downcast<RenderBlockFlow>(*descendent).resetComputedFontSize();476 newFixedDepth = 0;477 }478 }479 407 #endif // ENABLE(IOS_TEXT_AUTOSIZING) 480 408 -
trunk/Source/WebCore/rendering/RenderObject.h
r200098 r200534 196 196 RenderObject* traverseNext(const RenderObject* stayWithin, TraverseNextInclusionFunction) const; 197 197 RenderObject* traverseNext(const RenderObject* stayWithin, HeightTypeTraverseNextInclusionFunction, int& currentDepth, int& newFixedDepth) const; 198 199 void adjustComputedFontSizesOnBlocks(float size, float visibleWidth);200 WEBCORE_EXPORT void resetTextAutosizing();201 198 #endif 202 199 -
trunk/Source/WebCore/rendering/TextAutoSizing.cpp
r200098 r200534 31 31 #include "CSSFontSelector.h" 32 32 #include "Document.h" 33 #include "Logging.h" 33 34 #include "RenderListMarker.h" 34 35 #include "RenderText.h" … … 117 118 scaleChange = averageSize / specifiedSize; 118 119 } 119 120 121 LOG(TextAutosizing, " adjust node size %p firstPass=%d averageSize=%f scaleChange=%f", autoSizingNode.get(), firstPass, averageSize, scaleChange); 122 120 123 auto style = cloneRenderStyleWithState(text->style()); 121 124 auto fontDescription = style.fontDescription(); -
trunk/Source/WebCore/testing/InternalSettings.cpp
r200524 r200534 68 68 InternalSettings::Backup::Backup(Settings& settings) 69 69 : m_originalEditingBehavior(settings.editingBehaviorType()) 70 #if ENABLE(TEXT_AUTOSIZING) 70 #if ENABLE(TEXT_AUTOSIZING) || ENABLE(IOS_TEXT_AUTOSIZING) 71 71 , m_originalTextAutosizingEnabled(settings.textAutosizingEnabled()) 72 72 , m_originalTextAutosizingWindowSizeOverride(settings.textAutosizingWindowSizeOverride()) 73 #endif 74 #if ENABLE(TEXT_AUTOSIZING) 73 75 , m_originalTextAutosizingFontScaleFactor(settings.textAutosizingFontScaleFactor()) 74 76 #endif … … 143 145 m_pictographFontFamilies.clear(); 144 146 145 #if ENABLE(TEXT_AUTOSIZING) 147 #if ENABLE(TEXT_AUTOSIZING) || ENABLE(IOS_TEXT_AUTOSIZING) 146 148 settings.setTextAutosizingEnabled(m_originalTextAutosizingEnabled); 147 149 settings.setTextAutosizingWindowSizeOverride(m_originalTextAutosizingWindowSizeOverride); 150 #endif 151 #if ENABLE(TEXT_AUTOSIZING) 148 152 settings.setTextAutosizingFontScaleFactor(m_originalTextAutosizingFontScaleFactor); 149 153 #endif … … 326 330 void InternalSettings::setTextAutosizingEnabled(bool enabled, ExceptionCode& ec) 327 331 { 328 #if ENABLE(TEXT_AUTOSIZING) 332 #if ENABLE(TEXT_AUTOSIZING) || ENABLE(IOS_TEXT_AUTOSIZING) 329 333 InternalSettingsGuardForSettings(); 330 334 settings()->setTextAutosizingEnabled(enabled); … … 337 341 void InternalSettings::setTextAutosizingWindowSizeOverride(int width, int height, ExceptionCode& ec) 338 342 { 339 #if ENABLE(TEXT_AUTOSIZING) 343 #if ENABLE(TEXT_AUTOSIZING) || ENABLE(IOS_TEXT_AUTOSIZING) 340 344 InternalSettingsGuardForSettings(); 341 345 settings()->setTextAutosizingWindowSizeOverride(IntSize(width, height)); -
trunk/Source/WebCore/testing/InternalSettings.h
r200524 r200534 65 65 ScriptFontFamilyMap m_pictographFontFamilies; 66 66 67 #if ENABLE(TEXT_AUTOSIZING) 67 #if ENABLE(TEXT_AUTOSIZING) || ENABLE(IOS_TEXT_AUTOSIZING) 68 68 bool m_originalTextAutosizingEnabled; 69 69 IntSize m_originalTextAutosizingWindowSizeOverride; 70 #endif 71 72 #if ENABLE(TEXT_AUTOSIZING) 70 73 float m_originalTextAutosizingFontScaleFactor; 71 74 #endif 75 72 76 String m_originalMediaTypeOverride; 73 77 bool m_originalCanvasUsesAcceleratedDrawing; -
trunk/Source/WebKit/ios/ChangeLog
r198289 r200534 1 2016-05-06 Simon Fraser <simon.fraser@apple.com> 2 3 Enable IOS_TEXT_AUTOSIZING on Mac and make it testable 4 https://bugs.webkit.org/show_bug.cgi?id=157432 5 rdar://problem/16406720 6 7 Reviewed by Dean Jackson. 8 9 Enable IOS_TEXT_AUTOSIZING on Mac so it can be tested. 10 11 Make the setTextAutosizingEnabled() Setting work, and plumb it through WK1 and WK2 12 preferences for WTR and DRT. Make textAutosizingWindowSizeOverride() work, for layout tests. 13 These two settings are shared with TEXT_AUTOSIZING. 14 15 Add a TextAutosizing log channel, which is useful for generated -expected.html results. 16 17 Move adjustComputedFontSizesOnBlocks() and related code from RenderObject to RenderElement 18 without changes. 19 20 An implication of this set of changes is that the way clients enable text autosizing 21 has changed. Previously, they set the "MinimumZoomFontSize" preference to 0. 22 Settings::defaultMinimumZoomFontSize() used to do this in order to enable text autosizing 23 on iPhone only, not iPad. 24 25 Now the preferred technique is to leave minimumZoomFontSize alone, and to use textAutosizingEnabled() 26 instead. Settings::defaultTextAutosizingEnabled() now does the check for iPhone. 27 28 UIWebView calls WebKitGetMinimumZoomFontSize() to setup the default minimum font zoom size, 29 which will now always return 15, but had no other code that toggled this. So it's safe to just rely 30 on Settings::defaultTextAutosizingEnabled() doing the right thing for iPhone/iPad. 31 32 * Misc/WebUIKitSupport.mm: 33 (WebKitGetMinimumZoomFontSize): 34 1 35 2016-03-16 Jiewen Tan <jiewen_tan@apple.com> 2 36 -
trunk/Source/WebKit/ios/Misc/WebUIKitSupport.mm
r195180 r200534 85 85 float WebKitGetMinimumZoomFontSize(void) 86 86 { 87 return Settings::defaultMinimumZoomFontSize();87 return WebCore::Settings::defaultMinimumZoomFontSize(); 88 88 } 89 89 -
trunk/Source/WebKit/mac/ChangeLog
r200524 r200534 1 2016-05-06 Simon Fraser <simon.fraser@apple.com> 2 3 Enable IOS_TEXT_AUTOSIZING on Mac and make it testable 4 https://bugs.webkit.org/show_bug.cgi?id=157432 5 rdar://problem/16406720 6 7 Reviewed by Dean Jackson. 8 9 Enable IOS_TEXT_AUTOSIZING on Mac so it can be tested. 10 11 Make the setTextAutosizingEnabled() Setting work, and plumb it through WK1 and WK2 12 preferences for WTR and DRT. Make textAutosizingWindowSizeOverride() work, for layout tests. 13 These two settings are shared with TEXT_AUTOSIZING. 14 15 Add a TextAutosizing log channel, which is useful for generated -expected.html results. 16 17 Move adjustComputedFontSizesOnBlocks() and related code from RenderObject to RenderElement 18 without changes. 19 20 An implication of this set of changes is that the way clients enable text autosizing 21 has changed. Previously, they set the "MinimumZoomFontSize" preference to 0. 22 Settings::defaultMinimumZoomFontSize() used to do this in order to enable text autosizing 23 on iPhone only, not iPad. 24 25 Now the preferred technique is to leave minimumZoomFontSize alone, and to use textAutosizingEnabled() 26 instead. Settings::defaultTextAutosizingEnabled() now does the check for iPhone. 27 28 UIWebView calls WebKitGetMinimumZoomFontSize() to setup the default minimum font zoom size, 29 which will now always return 15, but had no other code that toggled this. So it's safe to just rely 30 on Settings::defaultTextAutosizingEnabled() doing the right thing for iPhone/iPad. 31 32 * Configurations/FeatureDefines.xcconfig: 33 * WebView/WebPreferenceKeysPrivate.h: 34 * WebView/WebPreferences.mm: 35 (+[WebPreferences initialize]): 36 (-[WebPreferences _setTextAutosizingEnabled:]): 37 (-[WebPreferences _textAutosizingEnabled]): 38 * WebView/WebPreferencesPrivate.h: 39 1 40 2016-05-06 Dean Jackson <dino@apple.com> 2 41 -
trunk/Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
r200075 r200534 108 108 ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS; 109 109 110 ENABLE_IOS_TEXT_AUTOSIZING [sdk=iphone*]= ENABLE_IOS_TEXT_AUTOSIZING;110 ENABLE_IOS_TEXT_AUTOSIZING = ENABLE_IOS_TEXT_AUTOSIZING; 111 111 ENABLE_DATA_DETECTION = ENABLE_DATA_DETECTION; 112 112 -
trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
r200524 r200534 185 185 #define WebKitDebugFullPageZoomPreferenceKey @"WebKitDebugFullPageZoomPreferenceKey" 186 186 #define WebKitMinimumZoomFontSizePreferenceKey @"WebKitMinimumZoomFontSizePreferenceKey" 187 #define WebKitTextAutosizingEnabledPreferenceKey @"WebKitTextAutosizingEnabled" 187 188 #define WebKitHTTPEquivEnabledPreferenceKey @"WebKitHTTPEquivEnabled" 188 189 -
trunk/Source/WebKit/mac/WebView/WebPreferences.mm
r200524 r200534 580 580 #if ENABLE(IOS_TEXT_AUTOSIZING) 581 581 [NSNumber numberWithFloat:Settings::defaultMinimumZoomFontSize()], WebKitMinimumZoomFontSizePreferenceKey, 582 [NSNumber numberWithBool:Settings::defaultTextAutosizingEnabled()], WebKitTextAutosizingEnabledPreferenceKey, 582 583 #endif 583 584 [NSNumber numberWithLongLong:ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota, … … 1475 1476 { 1476 1477 return [self _floatValueForKey:WebKitMinimumZoomFontSizePreferenceKey]; 1478 } 1479 1480 - (void)_setTextAutosizingEnabled:(BOOL)enabled 1481 { 1482 [self _setBoolValue:enabled forKey:WebKitTextAutosizingEnabledPreferenceKey]; 1483 } 1484 1485 - (BOOL)_textAutosizingEnabled 1486 { 1487 return [self _boolValueForKey:WebKitTextAutosizingEnabledPreferenceKey]; 1477 1488 } 1478 1489 #endif -
trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h
r200524 r200534 315 315 #endif 316 316 317 - (void)_setTextAutosizingEnabled:(BOOL)enabled; 318 - (BOOL)_textAutosizingEnabled; 319 317 320 - (BOOL)isInheritURIQueryComponentEnabled; 318 321 - (void)setEnableInheritURIQueryComponent:(BOOL)flag; -
trunk/Source/WebKit2/ChangeLog
r200524 r200534 1 2016-05-06 Simon Fraser <simon.fraser@apple.com> 2 3 Enable IOS_TEXT_AUTOSIZING on Mac and make it testable 4 https://bugs.webkit.org/show_bug.cgi?id=157432 5 rdar://problem/16406720 6 7 Reviewed by Dean Jackson. 8 9 Enable IOS_TEXT_AUTOSIZING on Mac so it can be tested. 10 11 Make the setTextAutosizingEnabled() Setting work, and plumb it through WK1 and WK2 12 preferences for WTR and DRT. Make textAutosizingWindowSizeOverride() work, for layout tests. 13 These two settings are shared with TEXT_AUTOSIZING. 14 15 Add a TextAutosizing log channel, which is useful for generated -expected.html results. 16 17 Move adjustComputedFontSizesOnBlocks() and related code from RenderObject to RenderElement 18 without changes. 19 20 An implication of this set of changes is that the way clients enable text autosizing 21 has changed. Previously, they set the "MinimumZoomFontSize" preference to 0. 22 Settings::defaultMinimumZoomFontSize() used to do this in order to enable text autosizing 23 on iPhone only, not iPad. 24 25 Now the preferred technique is to leave minimumZoomFontSize alone, and to use textAutosizingEnabled() 26 instead. Settings::defaultTextAutosizingEnabled() now does the check for iPhone. 27 28 UIWebView calls WebKitGetMinimumZoomFontSize() to setup the default minimum font zoom size, 29 which will now always return 15, but had no other code that toggled this. So it's safe to just rely 30 on Settings::defaultTextAutosizingEnabled() doing the right thing for iPhone/iPad. 31 32 * Configurations/FeatureDefines.xcconfig: 33 * Shared/WebPreferencesDefinitions.h: 34 * UIProcess/API/Cocoa/WKPreferences.mm: 35 (-[WKPreferences _textAutosizingEnabled]): 36 (-[WKPreferences _setTextAutosizingEnabled:]): 37 * UIProcess/API/Cocoa/WKPreferencesPrivate.h: 38 * WebProcess/WebPage/WebPage.cpp: 39 (WebKit::WebPage::updatePreferences): 40 1 41 2016-05-06 Dean Jackson <dino@apple.com> 2 42 -
trunk/Source/WebKit2/Configurations/FeatureDefines.xcconfig
r200075 r200534 108 108 ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS; 109 109 110 ENABLE_IOS_TEXT_AUTOSIZING [sdk=iphone*]= ENABLE_IOS_TEXT_AUTOSIZING;110 ENABLE_IOS_TEXT_AUTOSIZING = ENABLE_IOS_TEXT_AUTOSIZING; 111 111 ENABLE_DATA_DETECTION = ENABLE_DATA_DETECTION; 112 112 -
trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h
r200524 r200534 70 70 #define DEFAULT_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY false 71 71 #define DEFAULT_SHOULD_RESPECT_IMAGE_ORIENTATION true 72 #define DEFAULT_MINIMUM_FONT_ZOOM_SIZE WebCore::Settings::defaultMinimumZoomFontSize()73 72 #define DEFAULT_PASSWORD_ECHO_ENABLED true 74 73 #define DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK false … … 86 85 #define DEFAULT_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY true 87 86 #define DEFAULT_SHOULD_RESPECT_IMAGE_ORIENTATION false 88 #define DEFAULT_MINIMUM_FONT_ZOOM_SIZE 089 87 #define DEFAULT_PASSWORD_ECHO_ENABLED false 90 88 #define DEFAULT_ALLOWS_INLINE_MEDIA_PLAYBACK true … … 195 193 macro(PDFPluginEnabled, pdfPluginEnabled, Bool, bool, DEFAULT_PDFPLUGIN_ENABLED, "", "") \ 196 194 macro(UsesEncodingDetector, usesEncodingDetector, Bool, bool, false, "", "") \ 197 macro(TextAutosizingEnabled, textAutosizingEnabled, Bool, bool, false, "", "") \195 macro(TextAutosizingEnabled, textAutosizingEnabled, Bool, bool, WebCore::Settings::defaultTextAutosizingEnabled(), "", "") \ 198 196 macro(AggressiveTileRetentionEnabled, aggressiveTileRetentionEnabled, Bool, bool, false, "", "") \ 199 197 macro(TemporaryTileCohortRetentionEnabled, temporaryTileCohortRetentionEnabled, Bool, bool, DEFAULT_TEMPORARY_TILE_COHORT_RETENTION_ENABLED, "", "") \ … … 241 239 macro(MinimumFontSize, minimumFontSize, Double, double, 0, "", "") \ 242 240 macro(MinimumLogicalFontSize, minimumLogicalFontSize, Double, double, 9, "", "") \ 243 macro(MinimumZoomFontSize, minimumZoomFontSize, Double, double, DEFAULT_MINIMUM_FONT_ZOOM_SIZE, "", "") \241 macro(MinimumZoomFontSize, minimumZoomFontSize, Double, double, WebCore::Settings::defaultMinimumZoomFontSize(), "", "") \ 244 242 macro(DefaultFontSize, defaultFontSize, Double, double, 16, "", "") \ 245 243 macro(DefaultFixedFontSize, defaultFixedFontSize, Double, double, 13, "", "") \ -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferences.mm
r199700 r200534 304 304 } 305 305 306 - (BOOL)_textAutosizingEnabled 307 { 308 return _preferences->textAutosizingEnabled(); 309 } 310 311 - (void)_setTextAutosizingEnabled:(BOOL)enabled 312 { 313 _preferences->setTextAutosizingEnabled(enabled); 314 } 315 306 316 - (BOOL)_developerExtrasEnabled 307 317 { -
trunk/Source/WebKit2/UIProcess/API/Cocoa/WKPreferencesPrivate.h
r200033 r200534 63 63 @property (nonatomic, setter=_setAcceleratedDrawingEnabled:) BOOL _acceleratedDrawingEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); 64 64 @property (nonatomic, setter=_setDisplayListDrawingEnabled:) BOOL _displayListDrawingEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); 65 @property (nonatomic, setter=_setTextAutosizingEnabled:) BOOL _textAutosizingEnabled WK_AVAILABLE(WK_MAC_TBA, WK_IOS_TBA); 65 66 66 67 @property (nonatomic, setter=_setDeveloperExtrasEnabled:) BOOL _developerExtrasEnabled WK_AVAILABLE(10_11, 9_0); -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r200524 r200534 2969 2969 #endif 2970 2970 2971 #if ENABLE(IOS_TEXT_AUTOSIZING)2972 settings.setMinimumZoomFontSize(store.getDoubleValueForKey(WebPreferencesKey::minimumZoomFontSizeKey()));2973 #endif2974 2975 2971 #if ENABLE(WEB_AUDIO) 2976 2972 settings.setWebAudioEnabled(store.getBoolValueForKey(WebPreferencesKey::webAudioEnabledKey())); … … 3023 3019 settings.setUsesEncodingDetector(store.getBoolValueForKey(WebPreferencesKey::usesEncodingDetectorKey())); 3024 3020 3025 #if ENABLE(TEXT_AUTOSIZING) 3021 #if ENABLE(TEXT_AUTOSIZING) || ENABLE(IOS_TEXT_AUTOSIZING) 3026 3022 settings.setTextAutosizingEnabled(store.getBoolValueForKey(WebPreferencesKey::textAutosizingEnabledKey())); 3023 #endif 3024 #if ENABLE(IOS_TEXT_AUTOSIZING) 3025 settings.setMinimumZoomFontSize(store.getDoubleValueForKey(WebPreferencesKey::minimumZoomFontSizeKey())); 3027 3026 #endif 3028 3027 -
trunk/Tools/ChangeLog
r200524 r200534 1 2016-05-06 Simon Fraser <simon.fraser@apple.com> 2 3 Enable IOS_TEXT_AUTOSIZING on Mac and make it testable 4 https://bugs.webkit.org/show_bug.cgi?id=157432 5 rdar://problem/16406720 6 7 Reviewed by Dean Jackson. 8 9 Enable IOS_TEXT_AUTOSIZING on Mac so it can be tested. 10 11 Make the setTextAutosizingEnabled() Setting work, and plumb it through WK1 and WK2 12 preferences for WTR and DRT. Make textAutosizingWindowSizeOverride() work, for layout tests. 13 These two settings are shared with TEXT_AUTOSIZING. 14 15 Add a TextAutosizing log channel, which is useful for generated -expected.html results. 16 17 Move adjustComputedFontSizesOnBlocks() and related code from RenderObject to RenderElement 18 without changes. 19 20 An implication of this set of changes is that the way clients enable text autosizing 21 has changed. Previously, they set the "MinimumZoomFontSize" preference to 0. 22 Settings::defaultMinimumZoomFontSize() used to do this in order to enable text autosizing 23 on iPhone only, not iPad. 24 25 Now the preferred technique is to leave minimumZoomFontSize alone, and to use textAutosizingEnabled() 26 instead. Settings::defaultTextAutosizingEnabled() now does the check for iPhone. 27 28 UIWebView calls WebKitGetMinimumZoomFontSize() to setup the default minimum font zoom size, 29 which will now always return 15, but had no other code that toggled this. So it's safe to just rely 30 on Settings::defaultTextAutosizingEnabled() doing the right thing for iPhone/iPad. 31 32 * DumpRenderTree/mac/DumpRenderTree.mm: 33 (resetWebPreferencesToConsistentValues): 34 * DumpRenderTree/mac/TestRunnerMac.mm: 35 (TestRunner::setTextAutosizingEnabled): 36 * TestWebKitAPI/Configurations/FeatureDefines.xcconfig: 37 * WebKitTestRunner/ios/TestControllerIOS.mm: 38 (WTR::TestController::platformResetPreferencesToConsistentValues): 39 1 40 2016-05-06 Dean Jackson <dino@apple.com> 2 41 -
trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm
r200524 r200534 955 955 956 956 #if ENABLE(IOS_TEXT_AUTOSIZING) 957 // Disable text autosizing by default. 958 [preferences _setMinimumZoomFontSize:0]; 957 [preferences _setTextAutosizingEnabled:NO]; 959 958 #endif 960 959 … … 975 974 #if ENABLE(WEB_AUDIO) 976 975 [preferences setWebAudioEnabled:YES]; 977 #endif978 979 #if ENABLE(IOS_TEXT_AUTOSIZING)980 // Disable text autosizing by default.981 [preferences _setMinimumZoomFontSize:0];982 976 #endif 983 977 -
trunk/Tools/DumpRenderTree/mac/TestRunnerMac.mm
r199200 r200534 540 540 void TestRunner::setTextAutosizingEnabled(bool enabled) 541 541 { 542 const float phoneMinimumZoomFontSize = 15; 543 [[[mainFrame webView] preferences] _setMinimumZoomFontSize:(enabled ? phoneMinimumZoomFontSize : 0)]; 542 [[[mainFrame webView] preferences] _setTextAutosizingEnabled:enabled]; 544 543 } 545 544 #endif -
trunk/Tools/TestWebKitAPI/Configurations/FeatureDefines.xcconfig
r200075 r200534 108 108 ENABLE_MAC_GESTURE_EVENTS_macosx_WITH_INTERNAL_SDK_YES = ENABLE_MAC_GESTURE_EVENTS; 109 109 110 ENABLE_IOS_TEXT_AUTOSIZING [sdk=iphone*]= ENABLE_IOS_TEXT_AUTOSIZING;110 ENABLE_IOS_TEXT_AUTOSIZING = ENABLE_IOS_TEXT_AUTOSIZING; 111 111 ENABLE_DATA_DETECTION = ENABLE_DATA_DETECTION; 112 112 -
trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm
r190335 r200534 78 78 { 79 79 WKPreferencesRef preferences = platformPreferences(); 80 // Note that WKPreferencesSetTextAutosizingEnabled has no effect on iOS. 81 WKPreferencesSetMinimumZoomFontSize(preferences, 0); 80 WKPreferencesSetTextAutosizingEnabled(preferences, false); 82 81 } 83 82
Note:
See TracChangeset
for help on using the changeset viewer.