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

Side by Side Diff: Source/core/inspector/InspectorOverlay.cpp

Issue 16700002: Remove enclosingIntRect(const IntRect&) and adjust all call sites. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 6 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) 2011 Google Inc. All rights reserved. 2 * Copyright (C) 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 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 void InspectorOverlay::update() 351 void InspectorOverlay::update()
352 { 352 {
353 if (isEmpty()) { 353 if (isEmpty()) {
354 m_client->hideHighlight(); 354 m_client->hideHighlight();
355 return; 355 return;
356 } 356 }
357 357
358 FrameView* view = m_page->mainFrame()->view(); 358 FrameView* view = m_page->mainFrame()->view();
359 if (!view) 359 if (!view)
360 return; 360 return;
361 FloatRect viewRect = view->visibleContentRect(); 361 IntRect viewRect = view->visibleContentRect();
362 FrameView* overlayView = overlayPage()->mainFrame()->view(); 362 FrameView* overlayView = overlayPage()->mainFrame()->view();
363 IntSize viewportSize = enclosingIntRect(viewRect).size(); 363 IntSize frameViewFullSize = view->visibleContentRect(ScrollableArea::Include Scrollbars).size();
364 IntSize frameViewFullSize = enclosingIntRect(view->visibleContentRect(Scroll ableArea::IncludeScrollbars)).size();
365 IntSize size = m_size.isEmpty() ? frameViewFullSize : m_size; 364 IntSize size = m_size.isEmpty() ? frameViewFullSize : m_size;
366 size.scale(m_page->pageScaleFactor()); 365 size.scale(m_page->pageScaleFactor());
367 overlayView->resize(size); 366 overlayView->resize(size);
368 367
369 // Clear canvas and paint things. 368 // Clear canvas and paint things.
370 reset(size, m_size.isEmpty() ? IntSize() : frameViewFullSize, viewRect.x(), viewRect.y()); 369 reset(size, m_size.isEmpty() ? IntSize() : frameViewFullSize, viewRect.x(), viewRect.y());
371 370
372 // Include scrollbars to avoid masking them by the gutter. 371 // Include scrollbars to avoid masking them by the gutter.
373 drawGutter(); 372 drawGutter();
374 drawNodeHighlight(); 373 drawNodeHighlight();
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
627 626
628 void InspectorOverlay::freePage() 627 void InspectorOverlay::freePage()
629 { 628 {
630 m_overlayPage.clear(); 629 m_overlayPage.clear();
631 m_overlayChromeClient.clear(); 630 m_overlayChromeClient.clear();
632 m_timer.stop(); 631 m_timer.stop();
633 } 632 }
634 633
635 } // namespace WebCore 634 } // namespace WebCore
636 635
OLDNEW
« no previous file with comments | « Source/core/inspector/InspectorLayerTreeAgent.cpp ('k') | Source/core/platform/graphics/IntRect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698