Changeset 109288 in webkit
- Timestamp:
- Feb 29, 2012, 5:29:56 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 10 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/fast/autoresize/turn-off-autoresize-expected.txt (added)
-
LayoutTests/fast/autoresize/turn-off-autoresize.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/page/FrameView.cpp (modified) (1 diff)
-
Source/WebKit/chromium/ChangeLog (modified) (1 diff)
-
Source/WebKit/chromium/public/WebView.h (modified) (1 diff)
-
Source/WebKit/chromium/src/WebViewImpl.cpp (modified) (2 diffs)
-
Source/WebKit/chromium/src/WebViewImpl.h (modified) (2 diffs)
-
Tools/ChangeLog (modified) (1 diff)
-
Tools/DumpRenderTree/chromium/LayoutTestController.cpp (modified) (2 diffs)
-
Tools/DumpRenderTree/chromium/LayoutTestController.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r109283 r109288 1 2012-02-29 David Levin <levin@chromium.org> 2 3 [chromium] Add the ability to turn off autoresize. 4 https://bugs.webkit.org/show_bug.cgi?id=77452 5 6 Reviewed by Darin Fisher. 7 8 * fast/autoresize/turn-off-autoresize-expected.txt: Added. 9 * fast/autoresize/turn-off-autoresize.html: Added. 10 1 11 2012-02-29 Adam Klein <adamk@chromium.org> 2 12 -
trunk/Source/WebCore/ChangeLog
r109286 r109288 1 2012-02-29 David Levin <levin@chromium.org> 2 3 [chromium] Add the ability to turn off autoresize. 4 https://bugs.webkit.org/show_bug.cgi?id=77452 5 6 Reviewed by Darin Fisher. 7 8 Test: fast/autoresize/turn-off-autoresize.html 9 10 * page/FrameView.cpp: 11 (WebCore::FrameView::enableAutoSizeMode): Fix the code 12 path for turning off autoresize to set the scrollbars to auto. 13 1 14 2012-02-29 David Barton <dbarton@mathscribe.com> 2 15 -
trunk/Source/WebCore/page/FrameView.cpp
r108392 r109288 3025 3025 m_maxAutoSize = maxSize; 3026 3026 3027 if (!m_shouldAutoSize)3028 return;3029 3030 3027 setNeedsLayout(); 3031 3028 scheduleRelayout(); 3029 if (m_shouldAutoSize) 3030 return; 3031 3032 // Since autosize mode forces the scrollbar mode, change them to being auto. 3033 setVerticalScrollbarLock(false); 3034 setHorizontalScrollbarLock(false); 3035 setScrollbarModes(ScrollbarAuto, ScrollbarAuto); 3032 3036 } 3033 3037 -
trunk/Source/WebKit/chromium/ChangeLog
r109274 r109288 1 2012-02-29 David Levin <levin@chromium.org> 2 3 [chromium] Add the ability to turn off autoresize. 4 https://bugs.webkit.org/show_bug.cgi?id=77452 5 6 Reviewed by Darin Fisher. 7 8 * public/WebView.h: 9 (WebKit::WebViewImpl::enableAutoResizeMode): Cleaned up the api. 10 (WebKit::WebViewImpl::disableAutoResizeMode): Added the ability to disable auto-resize. 11 (WebKit::WebViewImpl::enableAutoResizeMode): Deprecated it. 12 * src/WebViewImpl.cpp: 13 (WebKit::WebViewImpl::enableAutoResizeMode): Adjust for new api. 14 (WebKit::WebViewImpl::disableAutoResizeMode): Allow turning off autoresize. 15 (WebKit::WebViewImpl::enableAutoResizeMode): Call the other two apis, but 16 this api will be deleted shortly. 17 (WebKit::WebViewImpl::configureAutoResizeMode): Common code. 18 * src/WebViewImpl.h: 19 (WebViewImpl): Adjust to new public api. 20 1 21 2012-02-29 Sheriff Bot <webkit.review.bot@gmail.com> 2 22 -
trunk/Source/WebKit/chromium/public/WebView.h
r106146 r109288 261 261 // content within the given bounds. 262 262 virtual void enableAutoResizeMode( 263 const WebSize& minSize, 264 const WebSize& maxSize) = 0; 265 266 // Turn off auto-resize. 267 virtual void disableAutoResizeMode() = 0; 268 269 // DEPRECATED 270 virtual void enableAutoResizeMode( 263 271 bool enable, 264 272 const WebSize& minSize, 265 273 const WebSize& maxSize) = 0; 266 267 274 268 275 // Media --------------------------------------------------------------- -
trunk/Source/WebKit/chromium/src/WebViewImpl.cpp
r108883 r109288 2265 2265 } 2266 2266 2267 void WebViewImpl::enableAutoResizeMode(bool enable, const WebSize& minSize, const WebSize& maxSize) 2268 { 2269 m_shouldAutoResize = enable; 2267 2268 void WebViewImpl::enableAutoResizeMode(const WebSize& minSize, const WebSize& maxSize) 2269 { 2270 m_shouldAutoResize = true; 2270 2271 m_minAutoSize = minSize; 2271 2272 m_maxAutoSize = maxSize; 2272 if (!mainFrameImpl() || !mainFrameImpl()->frame() || !mainFrameImpl()->frame()->view()) 2273 return; 2274 2275 mainFrameImpl()->frame()->view()->enableAutoSizeMode(m_shouldAutoResize, m_minAutoSize, m_maxAutoSize); 2273 configureAutoResizeMode(); 2274 } 2275 2276 void WebViewImpl::disableAutoResizeMode() 2277 { 2278 m_shouldAutoResize = false; 2279 configureAutoResizeMode(); 2280 } 2281 2282 void WebViewImpl::enableAutoResizeMode(bool enable, const WebSize& minSize, const WebSize& maxSize) 2283 { 2284 if (enable) 2285 enableAutoResizeMode(enable, minSize, maxSize); 2286 else 2287 disableAutoResizeMode(); 2276 2288 } 2277 2289 … … 2586 2598 } 2587 2599 2600 void WebViewImpl::configureAutoResizeMode() 2601 { 2602 if (!mainFrameImpl() || !mainFrameImpl()->frame() || !mainFrameImpl()->frame()->view()) 2603 return; 2604 2605 mainFrameImpl()->frame()->view()->enableAutoSizeMode(m_shouldAutoResize, m_minAutoSize, m_maxAutoSize); 2606 } 2607 2588 2608 unsigned long WebViewImpl::createUniqueIdentifierForRequest() 2589 2609 { -
trunk/Source/WebKit/chromium/src/WebViewImpl.h
r108883 r109288 188 188 virtual WebSize fixedLayoutSize() const; 189 189 virtual void setFixedLayoutSize(const WebSize&); 190 virtual void enableAutoResizeMode( 191 const WebSize& minSize, 192 const WebSize& maxSize); 193 virtual void disableAutoResizeMode(); 190 194 virtual void enableAutoResizeMode( 191 195 bool enable, … … 535 539 536 540 void sendResizeEventAndRepaint(); 541 void configureAutoResizeMode(); 537 542 538 543 #if USE(ACCELERATED_COMPOSITING) -
trunk/Tools/ChangeLog
r109282 r109288 1 2012-02-29 David Levin <levin@chromium.org> 2 3 [chromium] Add the ability to turn off autoresize. 4 https://bugs.webkit.org/show_bug.cgi?id=77452 5 6 Reviewed by Darin Fisher. 7 8 * DumpRenderTree/chromium/LayoutTestController.cpp: 9 (LayoutTestController::LayoutTestController): Expose a way to turn off auto-resize. 10 (LayoutTestController::enableAutoResizeMode): Ditto and adjust to new WebKit api. 11 (LayoutTestController::disableAutoResizeMode): Ditto. 12 * DumpRenderTree/chromium/LayoutTestController.h: Ditto. 13 1 14 2012-02-29 Dirk Pranke <dpranke@chromium.org> 2 15 -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.cpp
r109236 r109288 105 105 bindMethod("didLosePointerLock", &LayoutTestController::didLosePointerLock); 106 106 #endif 107 bindMethod("disableAutoResizeMode", &LayoutTestController::disableAutoResizeMode); 107 108 bindMethod("disableImageLoading", &LayoutTestController::disableImageLoading); 108 109 bindMethod("display", &LayoutTestController::display); … … 1130 1131 WebKit::WebSize maxSize(maxWidth, maxHeight); 1131 1132 1132 m_shell->webView()->enableAutoResizeMode(true, minSize, maxSize); 1133 m_shell->webView()->enableAutoResizeMode(minSize, maxSize); 1134 result->set(true); 1135 } 1136 1137 void LayoutTestController::disableAutoResizeMode(const CppArgumentList& arguments, CppVariant* result) 1138 { 1139 if (arguments.size() !=2) { 1140 result->set(false); 1141 return; 1142 } 1143 int newWidth = cppVariantToInt32(arguments[0]); 1144 int newHeight = cppVariantToInt32(arguments[1]); 1145 WebKit::WebSize newSize(newWidth, newHeight); 1146 1147 m_shell->webViewHost()->setWindowRect(WebRect(0, 0, newSize.width, newSize.height)); 1148 m_shell->webView()->disableAutoResizeMode(); 1149 m_shell->webView()->resize(newSize); 1133 1150 result->set(true); 1134 1151 } -
trunk/Tools/DumpRenderTree/chromium/LayoutTestController.h
r109236 r109288 242 242 void elementDoesAutoCompleteForElementWithId(const CppArgumentList&, CppVariant*); 243 243 void enableAutoResizeMode(const CppArgumentList&, CppVariant*); 244 void disableAutoResizeMode(const CppArgumentList&, CppVariant*); 244 245 void numberOfActiveAnimations(const CppArgumentList&, CppVariant*); 245 246 void suspendAnimations(const CppArgumentList&, CppVariant*);
Note:
See TracChangeset
for help on using the changeset viewer.