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

Side by Side Diff: third_party/WebKit/Source/web/PageOverlay.cpp

Issue 1447273003: Make the FloatSize constructor from an IntSize explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * 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 * 10 *
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 82
83 if (WebDevToolsAgentImpl* devTools = m_viewImpl->mainFrameDevToolsAgentI mpl()) 83 if (WebDevToolsAgentImpl* devTools = m_viewImpl->mainFrameDevToolsAgentI mpl())
84 devTools->willAddPageOverlay(m_layer.get()); 84 devTools->willAddPageOverlay(m_layer.get());
85 85
86 // This is required for contents of overlay to stay in sync with the pag e while scrolling. 86 // This is required for contents of overlay to stay in sync with the pag e while scrolling.
87 WebLayer* platformLayer = m_layer->platformLayer(); 87 WebLayer* platformLayer = m_layer->platformLayer();
88 platformLayer->setShouldScrollOnMainThread(true); 88 platformLayer->setShouldScrollOnMainThread(true);
89 page->frameHost().visualViewport().containerLayer()->addChild(m_layer.ge t()); 89 page->frameHost().visualViewport().containerLayer()->addChild(m_layer.ge t());
90 } 90 }
91 91
92 FloatSize size = page->frameHost().visualViewport().size(); 92 FloatSize size(page->frameHost().visualViewport().size());
93 if (size != m_layer->size()) 93 if (size != m_layer->size())
94 m_layer->setSize(size); 94 m_layer->setSize(size);
95 95
96 m_layer->setNeedsDisplay(); 96 m_layer->setNeedsDisplay();
97 } 97 }
98 98
99 IntRect PageOverlay::computeInterestRect(const GraphicsLayer* graphicsLayer, con st IntRect&) const 99 IntRect PageOverlay::computeInterestRect(const GraphicsLayer* graphicsLayer, con st IntRect&) const
100 { 100 {
101 return IntRect(IntPoint(), expandedIntSize(m_layer->size())); 101 return IntRect(IntPoint(), expandedIntSize(m_layer->size()));
102 } 102 }
103 103
104 void PageOverlay::paintContents(const GraphicsLayer* graphicsLayer, GraphicsCont ext& gc, GraphicsLayerPaintingPhase phase, const IntRect& interestRect) const 104 void PageOverlay::paintContents(const GraphicsLayer* graphicsLayer, GraphicsCont ext& gc, GraphicsLayerPaintingPhase phase, const IntRect& interestRect) const
105 { 105 {
106 ASSERT(m_layer); 106 ASSERT(m_layer);
107 m_delegate->paintPageOverlay(*this, gc, interestRect.size()); 107 m_delegate->paintPageOverlay(*this, gc, interestRect.size());
108 } 108 }
109 109
110 String PageOverlay::debugName(const GraphicsLayer*) const 110 String PageOverlay::debugName(const GraphicsLayer*) const
111 { 111 {
112 return "WebViewImpl Page Overlay Content Layer"; 112 return "WebViewImpl Page Overlay Content Layer";
113 } 113 }
114 114
115 } // namespace blink 115 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/FullscreenController.cpp ('k') | third_party/WebKit/Source/web/RotationViewportAnchor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698