OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |