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

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

Issue 1157943002: Add a setNeedsLayout method to WebPluginContainer. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 7 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 | « Source/web/WebPluginContainerImpl.h ('k') | public/web/WebPluginContainer.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 * Copyright (C) 2014 Opera Software ASA. All rights reserved. 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 void WebPluginContainerImpl::invalidateRect(const WebRect& rect) 406 void WebPluginContainerImpl::invalidateRect(const WebRect& rect)
407 { 407 {
408 invalidateRect(static_cast<IntRect>(rect)); 408 invalidateRect(static_cast<IntRect>(rect));
409 } 409 }
410 410
411 void WebPluginContainerImpl::scrollRect(const WebRect& rect) 411 void WebPluginContainerImpl::scrollRect(const WebRect& rect)
412 { 412 {
413 invalidateRect(rect); 413 invalidateRect(rect);
414 } 414 }
415 415
416 void WebPluginContainerImpl::setNeedsLayout()
417 {
418 if (m_element->layoutObject())
419 m_element->layoutObject()->setNeedsLayout("Plugin needs layout");
420 }
421
416 void WebPluginContainerImpl::reportGeometry() 422 void WebPluginContainerImpl::reportGeometry()
417 { 423 {
418 // We cannot compute geometry without a parent or layoutObject. 424 // We cannot compute geometry without a parent or layoutObject.
419 if (!parent() || !m_element || !m_element->layoutObject()) 425 if (!parent() || !m_element || !m_element->layoutObject())
420 return; 426 return;
421 427
422 IntRect windowRect, clipRect, unobscuredRect; 428 IntRect windowRect, clipRect, unobscuredRect;
423 Vector<IntRect> cutOutRects; 429 Vector<IntRect> cutOutRects;
424 calculateGeometry(windowRect, clipRect, unobscuredRect, cutOutRects); 430 calculateGeometry(windowRect, clipRect, unobscuredRect, cutOutRects);
425 431
(...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1015 for (size_t i = 0; i < cutOutRects.size(); i++) 1021 for (size_t i = 0; i < cutOutRects.size(); i++)
1016 cutOutRects[i].move(-frameRect().x(), -frameRect().y()); 1022 cutOutRects[i].move(-frameRect().x(), -frameRect().y());
1017 } 1023 }
1018 1024
1019 bool WebPluginContainerImpl::pluginShouldPersist() const 1025 bool WebPluginContainerImpl::pluginShouldPersist() const
1020 { 1026 {
1021 return m_webPlugin->shouldPersist(); 1027 return m_webPlugin->shouldPersist();
1022 } 1028 }
1023 1029
1024 } // namespace blink 1030 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/WebPluginContainerImpl.h ('k') | public/web/WebPluginContainer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698