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

Side by Side Diff: webkit/api/src/WebPluginContainerImpl.cpp

Issue 174513: Add isVisible parameter to WebPlugin::updateGeometry.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « webkit/api/public/WebPlugin.h ('k') | webkit/glue/webplugin_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 using namespace WebCore; 61 using namespace WebCore;
62 62
63 namespace WebKit { 63 namespace WebKit {
64 64
65 // Public methods -------------------------------------------------------------- 65 // Public methods --------------------------------------------------------------
66 66
67 void WebPluginContainerImpl::setFrameRect(const IntRect& frameRect) 67 void WebPluginContainerImpl::setFrameRect(const IntRect& frameRect)
68 { 68 {
69 Widget::setFrameRect(frameRect); 69 Widget::setFrameRect(frameRect);
70 70
71 if (!parent() || !isVisible()) 71 if (!parent())
72 return; 72 return;
73 73
74 IntRect windowRect, clipRect; 74 IntRect windowRect, clipRect;
75 Vector<IntRect> cutOutRects; 75 Vector<IntRect> cutOutRects;
76 calculateGeometry(frameRect, windowRect, clipRect, cutOutRects); 76 calculateGeometry(frameRect, windowRect, clipRect, cutOutRects);
77 77
78 m_webPlugin->updateGeometry(windowRect, clipRect, cutOutRects); 78 m_webPlugin->updateGeometry(windowRect, clipRect, cutOutRects, isVisible());
79 } 79 }
80 80
81 void WebPluginContainerImpl::paint(GraphicsContext* gc, const IntRect& damageRect) 81 void WebPluginContainerImpl::paint(GraphicsContext* gc, const IntRect& damageRect)
82 { 82 {
83 if (gc->paintingDisabled()) 83 if (gc->paintingDisabled())
84 return; 84 return;
85 85
86 if (!parent()) 86 if (!parent())
87 return; 87 return;
88 88
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 roundedIntPoint(iframeRenderer->localToAbsolute()); 452 roundedIntPoint(iframeRenderer->localToAbsolute());
453 RenderBox* rbox = toRenderBox(iframeRenderer); 453 RenderBox* rbox = toRenderBox(iframeRenderer);
454 IntSize size(rbox->width(), rbox->height()); 454 IntSize size(rbox->width(), rbox->height());
455 cutOutRects.append(IntRect(point, size)); 455 cutOutRects.append(IntRect(point, size));
456 } 456 }
457 } 457 }
458 } 458 }
459 } 459 }
460 460
461 } // namespace WebKit 461 } // namespace WebKit
OLDNEW
« no previous file with comments | « webkit/api/public/WebPlugin.h ('k') | webkit/glue/webplugin_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698