Changeset 167861 in webkit
- Timestamp:
- Apr 27, 2014 1:43:52 PM (10 years ago)
- Location:
- trunk/Source
- Files:
-
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r167857 r167861 1 2014-04-27 Sam Weinig <sam@webkit.org> 2 3 [iOS WebKit2] Add support for text autosizing 4 <rdar://problem/16545245> 5 https://bugs.webkit.org/show_bug.cgi?id=132237 6 7 Reviewed by Tim Horton. 8 9 Move text autosizing width from Frame to Page, as it is a Page level concept. 10 11 * WebCore.exp.in: 12 * page/Frame.cpp: 13 (WebCore::Frame::textAutosizingWidth): Deleted. 14 (WebCore::Frame::setTextAutosizingWidth): Deleted. 15 * page/Frame.h: 16 * page/FrameView.cpp: 17 (WebCore::FrameView::layout): 18 * page/Page.cpp: 19 (WebCore::Page::Page): 20 * page/Page.h: 21 (WebCore::Page::textAutosizingWidth): 22 (WebCore::Page::setTextAutosizingWidth): 23 1 24 2014-04-27 Zan Dobersek <zdobersek@igalia.com> 2 25 -
trunk/Source/WebCore/WebCore.exp.in
r167853 r167861 3114 3114 #if ENABLE(IOS_TEXT_AUTOSIZING) 3115 3115 __ZN7WebCore12RenderObject19resetTextAutosizingEv 3116 __ZN7WebCore5Frame22setTextAutosizingWidthEf3117 3116 #endif 3118 3117 -
trunk/Source/WebCore/page/Frame.cpp
r167809 r167861 486 486 } 487 487 488 #if ENABLE(IOS_TEXT_AUTOSIZING)489 float Frame::textAutosizingWidth() const490 {491 return m_textAutosizingWidth;492 }493 494 void Frame::setTextAutosizingWidth(float width)495 {496 m_textAutosizingWidth = width;497 }498 #endif499 500 488 #if PLATFORM(IOS) 501 489 void Frame::scrollOverflowLayer(RenderLayer* layer, const IntRect& visibleRect, const IntRect& exposeRect) -
trunk/Source/WebCore/page/Frame.h
r167594 r167861 241 241 String matchLabelsAgainstElement(const Vector<String>& labels, Element*); 242 242 243 #if ENABLE(IOS_TEXT_AUTOSIZING)244 void setTextAutosizingWidth(float);245 float textAutosizingWidth() const;246 #endif247 248 243 #if PLATFORM(IOS) 249 244 // Scroll the selection in an overflow layer on iOS. … … 326 321 #endif 327 322 328 #if ENABLE(IOS_TEXT_AUTOSIZING)329 float m_textAutosizingWidth;330 #endif331 332 323 float m_pageZoomFactor; 333 324 float m_textZoomFactor; -
trunk/Source/WebCore/page/FrameView.cpp
r167663 r167861 1286 1286 #if ENABLE(IOS_TEXT_AUTOSIZING) 1287 1287 float minZoomFontSize = frame().settings().minimumZoomFontSize(); 1288 float visWidth = frame().page()-> mainFrame().textAutosizingWidth();1288 float visWidth = frame().page()->textAutosizingWidth(); 1289 1289 if (minZoomFontSize && visWidth && !root->view().printing()) { 1290 1290 root->adjustComputedFontSizesOnBlocks(minZoomFontSize, visWidth); -
trunk/Source/WebCore/page/Page.cpp
r167630 r167861 163 163 , m_deviceScaleFactor(1) 164 164 , m_topContentInset(0) 165 #if ENABLE(IOS_TEXT_AUTOSIZING) 166 , m_textAutosizingWidth(0) 167 #endif 165 168 , m_suppressScrollbarAnimations(false) 166 169 , m_verticalScrollElasticity(ScrollElasticityAllowed) … … 784 787 view->topContentInsetDidChange(); 785 788 } 786 789 787 790 void Page::setShouldSuppressScrollbarAnimations(bool suppressAnimations) 788 791 { -
trunk/Source/WebCore/page/Page.h
r167811 r167861 283 283 float topContentInset() const { return m_topContentInset; } 284 284 void setTopContentInset(float); 285 285 286 #if ENABLE(IOS_TEXT_AUTOSIZING) 287 float textAutosizingWidth() const { return m_textAutosizingWidth; } 288 void setTextAutosizingWidth(float textAutosizingWidth) { m_textAutosizingWidth = textAutosizingWidth; } 289 #endif 290 286 291 bool shouldSuppressScrollbarAnimations() const { return m_suppressScrollbarAnimations; } 287 292 void setShouldSuppressScrollbarAnimations(bool suppressAnimations); … … 505 510 506 511 float m_topContentInset; 507 512 513 #if ENABLE(IOS_TEXT_AUTOSIZING) 514 float m_textAutosizingWidth; 515 #endif 516 508 517 bool m_suppressScrollbarAnimations; 509 518 -
trunk/Source/WebKit/mac/ChangeLog
r167825 r167861 1 2014-04-27 Sam Weinig <sam@webkit.org> 2 3 [iOS WebKit2] Add support for text autosizing 4 <rdar://problem/16545245> 5 https://bugs.webkit.org/show_bug.cgi?id=132237 6 7 Reviewed by Tim Horton. 8 9 * WebView/WebFrame.mm: 10 (-[WebFrame _setTextAutosizingWidth:]): 11 Forward setting of the text autosizing width to the Page. 12 1 13 2014-04-25 Dean Jackson <dino@apple.com> 2 14 -
trunk/Source/WebKit/mac/WebView/WebFrame.mm
r165870 r167861 1916 1916 - (void)_setTextAutosizingWidth:(CGFloat)width 1917 1917 { 1918 WebCore::Frame *frame = core(self); 1919 frame->setTextAutosizingWidth(width); 1918 WebCore::Frame* frame = core(self); 1919 Page* page = frame->page(); 1920 if (!page) 1921 return; 1922 1923 page->setTextAutosizingWidth(width); 1920 1924 } 1921 1925 #else -
trunk/Source/WebKit2/ChangeLog
r167860 r167861 1 2014-04-27 Sam Weinig <sam@webkit.org> 2 3 [iOS WebKit2] Add support for text autosizing 4 <rdar://problem/16545245> 5 https://bugs.webkit.org/show_bug.cgi?id=132237 6 7 Reviewed by Tim Horton. 8 9 * Shared/WebPageCreationParameters.cpp: 10 (WebKit::WebPageCreationParameters::encode): 11 (WebKit::WebPageCreationParameters::decode): 12 * Shared/WebPageCreationParameters.h: 13 * UIProcess/WebPageProxy.cpp: 14 (WebKit::WebPageProxy::creationParameters): 15 * UIProcess/WebPageProxy.h: 16 * UIProcess/ios/WebPageProxyIOS.mm: 17 (WebKit::WebPageProxy::textAutosizingWidth): 18 * WebProcess/WebPage/WebPage.cpp: 19 (WebKit::WebPage::WebPage): 20 Pass the text autosizing width from the UIProcess to WebProcess. 21 1 22 2014-04-27 Tim Horton <timothy_horton@apple.com> 2 23 -
trunk/Source/WebKit2/Shared/WebPageCreationParameters.cpp
r167742 r167861 74 74 encoder << screenSize; 75 75 encoder << availableScreenSize; 76 encoder << textAutosizingWidth; 76 77 #endif 77 78 } … … 155 156 if (!decoder.decode(parameters.availableScreenSize)) 156 157 return false; 158 if (!decoder.decode(parameters.textAutosizingWidth)) 159 return false; 157 160 #endif 158 161 -
trunk/Source/WebKit2/Shared/WebPageCreationParameters.h
r167742 r167861 116 116 WebCore::FloatSize screenSize; 117 117 WebCore::FloatSize availableScreenSize; 118 float textAutosizingWidth; 118 119 #endif 119 120 }; -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r167854 r167861 4248 4248 parameters.screenSize = screenSize(); 4249 4249 parameters.availableScreenSize = availableScreenSize(); 4250 parameters.textAutosizingWidth = textAutosizingWidth(); 4250 4251 #endif 4251 4252 -
trunk/Source/WebKit2/UIProcess/WebPageProxy.h
r167854 r167861 1351 1351 WebCore::FloatSize screenSize(); 1352 1352 WebCore::FloatSize availableScreenSize(); 1353 1353 float textAutosizingWidth(); 1354 1354 1355 1355 void dynamicViewportUpdateChangedTarget(double newTargetScale, const WebCore::FloatPoint& newScrollPosition); -
trunk/Source/WebKit2/UIProcess/ios/WebPageProxyIOS.mm
r167774 r167861 478 478 return FloatSize(WKGetAvailableScreenSize()); 479 479 } 480 480 481 float WebPageProxy::textAutosizingWidth() 482 { 483 return WKGetScreenSize().width; 484 } 485 481 486 void WebPageProxy::dynamicViewportUpdateChangedTarget(double newScale, const WebCore::FloatPoint& newScrollPosition) 482 487 { -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r167854 r167861 381 381 m_page->setGroupName(m_pageGroup->identifier()); 382 382 m_page->setDeviceScaleFactor(parameters.deviceScaleFactor); 383 #if PLATFORM(IOS) 384 m_page->setTextAutosizingWidth(parameters.textAutosizingWidth); 385 #endif 383 386 384 387 updatePreferences(parameters.store);
Note: See TracChangeset
for help on using the changeset viewer.