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

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

Issue 506553004: Make the compositing assert disabler for paint invalidation more targeted. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix. Created 6 years, 3 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/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | 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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 void WebPluginContainerImpl::invalidateRect(const IntRect& rect) 134 void WebPluginContainerImpl::invalidateRect(const IntRect& rect)
135 { 135 {
136 if (!parent()) 136 if (!parent())
137 return; 137 return;
138 138
139 RenderBox* renderer = toRenderBox(m_element->renderer()); 139 RenderBox* renderer = toRenderBox(m_element->renderer());
140 140
141 IntRect dirtyRect = rect; 141 IntRect dirtyRect = rect;
142 dirtyRect.move(renderer->borderLeft() + renderer->paddingLeft(), 142 dirtyRect.move(renderer->borderLeft() + renderer->paddingLeft(),
143 renderer->borderTop() + renderer->paddingTop()); 143 renderer->borderTop() + renderer->paddingTop());
144
145 // For querying RenderLayer::compositingState().
146 // This code should be correct.
147 DisableCompositingQueryAsserts disabler;
144 renderer->invalidatePaintRectangle(dirtyRect); 148 renderer->invalidatePaintRectangle(dirtyRect);
145 } 149 }
146 150
147 void WebPluginContainerImpl::setFocus(bool focused) 151 void WebPluginContainerImpl::setFocus(bool focused)
148 { 152 {
149 Widget::setFocus(focused); 153 Widget::setFocus(focused);
150 m_webPlugin->updateFocus(focused); 154 m_webPlugin->updateFocus(focused);
151 } 155 }
152 156
153 void WebPluginContainerImpl::show() 157 void WebPluginContainerImpl::show()
(...skipping 800 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 958
955 return clipRect; 959 return clipRect;
956 } 960 }
957 961
958 bool WebPluginContainerImpl::pluginShouldPersist() const 962 bool WebPluginContainerImpl::pluginShouldPersist() const
959 { 963 {
960 return m_webPlugin->shouldPersist(); 964 return m_webPlugin->shouldPersist();
961 } 965 }
962 966
963 } // namespace blink 967 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/compositing/RenderLayerCompositor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698