Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: Source/web/WebDevToolsAgentImpl.cpp

Issue 23819019: Refactor fixed layout mode (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 frameView->setLayoutSize(IntSize(overrideWidth, overrideHeight));
338 }
337 339
338 Document* doc = frameView->frame().document(); 340 Document* doc = frameView->frame().document();
339 doc->styleResolverChanged(RecalcStyleImmediately); 341 doc->styleResolverChanged(RecalcStyleImmediately);
340 doc->updateLayout(); 342 doc->updateLayout();
341 } 343 }
342 344
343 WebCore::FrameView* frameView() 345 WebCore::FrameView* frameView()
344 { 346 {
345 return m_webView->mainFrameImpl() ? m_webView->mainFrameImpl()->frameVie w() : 0; 347 return m_webView->mainFrameImpl() ? m_webView->mainFrameImpl()->frameVie w() : 0;
346 } 348 }
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 || commandName == InspectorBackendDispatcher::commandNames[InspectorBack endDispatcher::kProfiler_getCPUProfileCmd] 758 || commandName == InspectorBackendDispatcher::commandNames[InspectorBack endDispatcher::kProfiler_getCPUProfileCmd]
757 || commandName == InspectorBackendDispatcher::commandNames[InspectorBack endDispatcher::kHeapProfiler_getHeapSnapshotCmd]; 759 || commandName == InspectorBackendDispatcher::commandNames[InspectorBack endDispatcher::kHeapProfiler_getHeapSnapshotCmd];
758 } 760 }
759 761
760 void WebDevToolsAgent::processPendingMessages() 762 void WebDevToolsAgent::processPendingMessages()
761 { 763 {
762 PageScriptDebugServer::shared().runPendingTasks(); 764 PageScriptDebugServer::shared().runPendingTasks();
763 } 765 }
764 766
765 } // namespace WebKit 767 } // namespace WebKit
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698