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

Side by Side Diff: Source/WebCore/rendering/RenderBlock.cpp

Issue 11847002: Merge 138974 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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
« no previous file with comments | « LayoutTests/mathml/mo-stretch-crash-expected.txt ('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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 1272 matching lines...) Expand 10 before | Expand all | Expand 10 after
1283 if (!child->isSelfCollapsingBlock()) 1283 if (!child->isSelfCollapsingBlock())
1284 return false; 1284 return false;
1285 } 1285 }
1286 return true; 1286 return true;
1287 } 1287 }
1288 return false; 1288 return false;
1289 } 1289 }
1290 1290
1291 void RenderBlock::startDelayUpdateScrollInfo() 1291 void RenderBlock::startDelayUpdateScrollInfo()
1292 { 1292 {
1293 if (!gDelayedUpdateScrollInfoSet) { 1293 if (gDelayUpdateScrollInfo == 0) {
1294 ASSERT(!gDelayUpdateScrollInfo); 1294 ASSERT(!gDelayedUpdateScrollInfoSet);
1295 gDelayedUpdateScrollInfoSet = new DelayedUpdateScrollInfoSet; 1295 gDelayedUpdateScrollInfoSet = new DelayedUpdateScrollInfoSet;
1296 } 1296 }
1297 ASSERT(gDelayedUpdateScrollInfoSet); 1297 ASSERT(gDelayedUpdateScrollInfoSet);
1298 ++gDelayUpdateScrollInfo; 1298 ++gDelayUpdateScrollInfo;
1299 } 1299 }
1300 1300
1301 void RenderBlock::finishDelayUpdateScrollInfo() 1301 void RenderBlock::finishDelayUpdateScrollInfo()
1302 { 1302 {
1303 --gDelayUpdateScrollInfo; 1303 --gDelayUpdateScrollInfo;
1304 ASSERT(gDelayUpdateScrollInfo >= 0); 1304 ASSERT(gDelayUpdateScrollInfo >= 0);
1305 if (gDelayUpdateScrollInfo == 0) { 1305 if (gDelayUpdateScrollInfo == 0) {
1306 ASSERT(gDelayedUpdateScrollInfoSet); 1306 ASSERT(gDelayedUpdateScrollInfoSet);
1307 1307
1308 Vector<RenderBlock*> infoSet; 1308 OwnPtr<DelayedUpdateScrollInfoSet> infoSet(adoptPtr(gDelayedUpdateScroll InfoSet));
1309 while (gDelayedUpdateScrollInfoSet && gDelayedUpdateScrollInfoSet->size( )) { 1309 gDelayedUpdateScrollInfoSet = 0;
1310 copyToVector(*gDelayedUpdateScrollInfoSet, infoSet); 1310
1311 for (Vector<RenderBlock*>::iterator it = infoSet.begin(); it != info Set.end(); ++it) { 1311 for (DelayedUpdateScrollInfoSet::iterator it = infoSet->begin(); it != i nfoSet->end(); ++it) {
1312 RenderBlock* block = *it; 1312 RenderBlock* block = *it;
1313 // |block| may have been destroyed at this point, but then it wi ll have been removed from gDelayedUpdateScrollInfoSet. 1313 if (block->hasOverflowClip()) {
1314 if (gDelayedUpdateScrollInfoSet && gDelayedUpdateScrollInfoSet-> contains(block)) { 1314 block->layer()->updateScrollInfoAfterLayout();
1315 gDelayedUpdateScrollInfoSet->remove(block);
1316 if (block->hasOverflowClip())
1317 block->layer()->updateScrollInfoAfterLayout();
1318 }
1319 } 1315 }
1320 } 1316 }
1321 delete gDelayedUpdateScrollInfoSet;
1322 gDelayedUpdateScrollInfoSet = 0;
1323 ASSERT(!gDelayUpdateScrollInfo);
1324 } 1317 }
1325 } 1318 }
1326 1319
1327 void RenderBlock::updateScrollInfoAfterLayout() 1320 void RenderBlock::updateScrollInfoAfterLayout()
1328 { 1321 {
1329 if (hasOverflowClip()) { 1322 if (hasOverflowClip()) {
1330 if (style()->isFlippedBlocksWritingMode()) { 1323 if (style()->isFlippedBlocksWritingMode()) {
1331 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=97937 1324 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=97937
1332 // Workaround for now. We cannot delay the scroll info for overflow 1325 // Workaround for now. We cannot delay the scroll info for overflow
1333 // for items with opposite writing directions, as the contents needs 1326 // for items with opposite writing directions, as the contents needs
(...skipping 6421 matching lines...) Expand 10 before | Expand all | Expand 10 after
7755 { 7748 {
7756 memoryInstrumentation->addRootObject(gColumnInfoMap, WebCoreMemoryTypes::Ren deringStructures); 7749 memoryInstrumentation->addRootObject(gColumnInfoMap, WebCoreMemoryTypes::Ren deringStructures);
7757 memoryInstrumentation->addRootObject(gPositionedDescendantsMap, WebCoreMemor yTypes::RenderingStructures); 7750 memoryInstrumentation->addRootObject(gPositionedDescendantsMap, WebCoreMemor yTypes::RenderingStructures);
7758 memoryInstrumentation->addRootObject(gPercentHeightDescendantsMap, WebCoreMe moryTypes::RenderingStructures); 7751 memoryInstrumentation->addRootObject(gPercentHeightDescendantsMap, WebCoreMe moryTypes::RenderingStructures);
7759 memoryInstrumentation->addRootObject(gPositionedContainerMap, WebCoreMemoryT ypes::RenderingStructures); 7752 memoryInstrumentation->addRootObject(gPositionedContainerMap, WebCoreMemoryT ypes::RenderingStructures);
7760 memoryInstrumentation->addRootObject(gPercentHeightContainerMap, WebCoreMemo ryTypes::RenderingStructures); 7753 memoryInstrumentation->addRootObject(gPercentHeightContainerMap, WebCoreMemo ryTypes::RenderingStructures);
7761 memoryInstrumentation->addRootObject(gDelayedUpdateScrollInfoSet, WebCoreMem oryTypes::RenderingStructures); 7754 memoryInstrumentation->addRootObject(gDelayedUpdateScrollInfoSet, WebCoreMem oryTypes::RenderingStructures);
7762 } 7755 }
7763 7756
7764 } // namespace WebCore 7757 } // namespace WebCore
OLDNEW
« 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