OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010-2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2010-2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
325 } | 325 } |
326 | 326 |
327 void applySizeOverrideInternal(FrameView* frameView, FitWindowFlag fitWindow
Flag) | 327 void applySizeOverrideInternal(FrameView* frameView, FitWindowFlag fitWindow
Flag) |
328 { | 328 { |
329 WebSize scrollbarDimensions = forcedScrollbarDimensions(frameView); | 329 WebSize scrollbarDimensions = forcedScrollbarDimensions(frameView); |
330 | 330 |
331 WebSize effectiveEmulatedSize = (fitWindowFlag == FitWindowAllowed) ? sc
aledEmulatedFrameSize(frameView) : m_emulatedFrameSize; | 331 WebSize effectiveEmulatedSize = (fitWindowFlag == FitWindowAllowed) ? sc
aledEmulatedFrameSize(frameView) : m_emulatedFrameSize; |
332 int overrideWidth = effectiveEmulatedSize.width + scrollbarDimensions.wi
dth; | 332 int overrideWidth = effectiveEmulatedSize.width + scrollbarDimensions.wi
dth; |
333 int overrideHeight = effectiveEmulatedSize.height + scrollbarDimensions.
height; | 333 int overrideHeight = effectiveEmulatedSize.height + scrollbarDimensions.
height; |
334 | 334 |
335 if (IntSize(overrideWidth, overrideHeight) != frameView->size()) | 335 if (IntSize(overrideWidth, overrideHeight) != frameView->size()) { |
336 frameView->resize(overrideWidth, overrideHeight); | 336 frameView->resize(overrideWidth, overrideHeight); |
337 | 337 |
| 338 // Since we're resizing the main-frame, we need to resize its layout
size too since |
| 339 // main frames' layout sizes are manually managed by WebViewImpl |
| 340 frameView->setLayoutSize(IntSize(overrideWidth, overrideHeight)); |
| 341 } |
| 342 |
338 Document* doc = frameView->frame().document(); | 343 Document* doc = frameView->frame().document(); |
339 doc->styleResolverChanged(RecalcStyleImmediately); | 344 doc->styleResolverChanged(RecalcStyleImmediately); |
340 doc->updateLayout(); | 345 doc->updateLayout(); |
341 } | 346 } |
342 | 347 |
343 WebCore::FrameView* frameView() | 348 WebCore::FrameView* frameView() |
344 { | 349 { |
345 return m_webView->mainFrameImpl() ? m_webView->mainFrameImpl()->frameVie
w() : 0; | 350 return m_webView->mainFrameImpl() ? m_webView->mainFrameImpl()->frameVie
w() : 0; |
346 } | 351 } |
347 | 352 |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 || commandName == InspectorBackendDispatcher::commandNames[InspectorBack
endDispatcher::kProfiler_getCPUProfileCmd] | 765 || commandName == InspectorBackendDispatcher::commandNames[InspectorBack
endDispatcher::kProfiler_getCPUProfileCmd] |
761 || commandName == InspectorBackendDispatcher::commandNames[InspectorBack
endDispatcher::kHeapProfiler_getHeapSnapshotCmd]; | 766 || commandName == InspectorBackendDispatcher::commandNames[InspectorBack
endDispatcher::kHeapProfiler_getHeapSnapshotCmd]; |
762 } | 767 } |
763 | 768 |
764 void WebDevToolsAgent::processPendingMessages() | 769 void WebDevToolsAgent::processPendingMessages() |
765 { | 770 { |
766 PageScriptDebugServer::shared().runPendingTasks(); | 771 PageScriptDebugServer::shared().runPendingTasks(); |
767 } | 772 } |
768 | 773 |
769 } // namespace WebKit | 774 } // namespace WebKit |
OLD | NEW |