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

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

Issue 723733002: Make WebPluginContainerImpl::invalidateRect check for NULL renderer (Closed) Base URL: https://chromium.googlesource.com/chromium/blink@master
Patch Set: Created 6 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
« no previous file with comments | « no previous file | no next file » | 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 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 129
130 gc->restore(); 130 gc->restore();
131 } 131 }
132 132
133 void WebPluginContainerImpl::invalidateRect(const IntRect& rect) 133 void WebPluginContainerImpl::invalidateRect(const IntRect& rect)
134 { 134 {
135 if (!parent()) 135 if (!parent())
136 return; 136 return;
137 137
138 RenderBox* renderer = toRenderBox(m_element->renderer()); 138 RenderBox* renderer = toRenderBox(m_element->renderer());
139 if (!renderer)
140 return;
139 141
140 IntRect dirtyRect = rect; 142 IntRect dirtyRect = rect;
141 dirtyRect.move(renderer->borderLeft() + renderer->paddingLeft(), 143 dirtyRect.move(renderer->borderLeft() + renderer->paddingLeft(),
142 renderer->borderTop() + renderer->paddingTop()); 144 renderer->borderTop() + renderer->paddingTop());
143 145
144 // For querying RenderLayer::compositingState(). 146 // For querying RenderLayer::compositingState().
145 // This code should be correct. 147 // This code should be correct.
146 DisableCompositingQueryAsserts disabler; 148 DisableCompositingQueryAsserts disabler;
147 renderer->invalidatePaintRectangle(dirtyRect); 149 renderer->invalidatePaintRectangle(dirtyRect);
148 } 150 }
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
973 975
974 return clipRect; 976 return clipRect;
975 } 977 }
976 978
977 bool WebPluginContainerImpl::pluginShouldPersist() const 979 bool WebPluginContainerImpl::pluginShouldPersist() const
978 { 980 {
979 return m_webPlugin->shouldPersist(); 981 return m_webPlugin->shouldPersist();
980 } 982 }
981 983
982 } // namespace blink 984 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698