| 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);
|
| }
|
| }
|
|
|
|
|