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

Unified Diff: Source/WebCore/rendering/RenderBlock.cpp

Issue 11583006: Merge 137632 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1312/
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/mathml/mo-stretch-crash-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderBlock.cpp
===================================================================
--- Source/WebCore/rendering/RenderBlock.cpp (revision 137758)
+++ Source/WebCore/rendering/RenderBlock.cpp (working copy)
@@ -1334,8 +1334,8 @@
void RenderBlock::startDelayUpdateScrollInfo()
{
- if (gDelayUpdateScrollInfo == 0) {
- ASSERT(!gDelayedUpdateScrollInfoSet);
+ if (!gDelayedUpdateScrollInfoSet) {
+ ASSERT(!gDelayUpdateScrollInfo);
gDelayedUpdateScrollInfoSet = new DelayedUpdateScrollInfoSet;
}
ASSERT(gDelayedUpdateScrollInfoSet);
@@ -1349,15 +1349,22 @@
if (gDelayUpdateScrollInfo == 0) {
ASSERT(gDelayedUpdateScrollInfoSet);
- OwnPtr<DelayedUpdateScrollInfoSet> infoSet(adoptPtr(gDelayedUpdateScrollInfoSet));
- gDelayedUpdateScrollInfoSet = 0;
-
- for (DelayedUpdateScrollInfoSet::iterator it = infoSet->begin(); it != infoSet->end(); ++it) {
- RenderBlock* block = *it;
- if (block->hasOverflowClip()) {
- block->layer()->updateScrollInfoAfterLayout();
+ Vector<RenderBlock*> infoSet;
+ while (gDelayedUpdateScrollInfoSet && gDelayedUpdateScrollInfoSet->size()) {
+ copyToVector(*gDelayedUpdateScrollInfoSet, infoSet);
+ for (Vector<RenderBlock*>::iterator it = infoSet.begin(); it != infoSet.end(); ++it) {
+ RenderBlock* block = *it;
+ // |block| may have been destroyed at this point, but then it will have been removed from gDelayedUpdateScrollInfoSet.
+ if (gDelayedUpdateScrollInfoSet && gDelayedUpdateScrollInfoSet->contains(block)) {
+ gDelayedUpdateScrollInfoSet->remove(block);
+ if (block->hasOverflowClip())
+ block->layer()->updateScrollInfoAfterLayout();
+ }
}
}
+ delete gDelayedUpdateScrollInfoSet;
+ gDelayedUpdateScrollInfoSet = 0;
+ ASSERT(!gDelayUpdateScrollInfo);
}
}
« no previous file with comments | « LayoutTests/mathml/mo-stretch-crash-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698