OLD | NEW |
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 1316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1327 if (!child->isSelfCollapsingBlock()) | 1327 if (!child->isSelfCollapsingBlock()) |
1328 return false; | 1328 return false; |
1329 } | 1329 } |
1330 return true; | 1330 return true; |
1331 } | 1331 } |
1332 return false; | 1332 return false; |
1333 } | 1333 } |
1334 | 1334 |
1335 void RenderBlock::startDelayUpdateScrollInfo() | 1335 void RenderBlock::startDelayUpdateScrollInfo() |
1336 { | 1336 { |
1337 if (!gDelayedUpdateScrollInfoSet) { | 1337 if (gDelayUpdateScrollInfo == 0) { |
1338 ASSERT(!gDelayUpdateScrollInfo); | 1338 ASSERT(!gDelayedUpdateScrollInfoSet); |
1339 gDelayedUpdateScrollInfoSet = new DelayedUpdateScrollInfoSet; | 1339 gDelayedUpdateScrollInfoSet = new DelayedUpdateScrollInfoSet; |
1340 } | 1340 } |
1341 ASSERT(gDelayedUpdateScrollInfoSet); | 1341 ASSERT(gDelayedUpdateScrollInfoSet); |
1342 ++gDelayUpdateScrollInfo; | 1342 ++gDelayUpdateScrollInfo; |
1343 } | 1343 } |
1344 | 1344 |
1345 void RenderBlock::finishDelayUpdateScrollInfo() | 1345 void RenderBlock::finishDelayUpdateScrollInfo() |
1346 { | 1346 { |
1347 --gDelayUpdateScrollInfo; | 1347 --gDelayUpdateScrollInfo; |
1348 ASSERT(gDelayUpdateScrollInfo >= 0); | 1348 ASSERT(gDelayUpdateScrollInfo >= 0); |
1349 if (gDelayUpdateScrollInfo == 0) { | 1349 if (gDelayUpdateScrollInfo == 0) { |
1350 ASSERT(gDelayedUpdateScrollInfoSet); | 1350 ASSERT(gDelayedUpdateScrollInfoSet); |
1351 | 1351 |
1352 Vector<RenderBlock*> infoSet; | 1352 OwnPtr<DelayedUpdateScrollInfoSet> infoSet(adoptPtr(gDelayedUpdateScroll
InfoSet)); |
1353 while (gDelayedUpdateScrollInfoSet && gDelayedUpdateScrollInfoSet->size(
)) { | 1353 gDelayedUpdateScrollInfoSet = 0; |
1354 copyToVector(*gDelayedUpdateScrollInfoSet, infoSet); | 1354 |
1355 for (Vector<RenderBlock*>::iterator it = infoSet.begin(); it != info
Set.end(); ++it) { | 1355 for (DelayedUpdateScrollInfoSet::iterator it = infoSet->begin(); it != i
nfoSet->end(); ++it) { |
1356 RenderBlock* block = *it; | 1356 RenderBlock* block = *it; |
1357 // |block| may have been destroyed at this point, but then it wi
ll have been removed from gDelayedUpdateScrollInfoSet. | 1357 if (block->hasOverflowClip()) { |
1358 if (gDelayedUpdateScrollInfoSet && gDelayedUpdateScrollInfoSet->
contains(block)) { | 1358 block->layer()->updateScrollInfoAfterLayout(); |
1359 gDelayedUpdateScrollInfoSet->remove(block); | |
1360 if (block->hasOverflowClip()) | |
1361 block->layer()->updateScrollInfoAfterLayout(); | |
1362 } | |
1363 } | 1359 } |
1364 } | 1360 } |
1365 delete gDelayedUpdateScrollInfoSet; | |
1366 gDelayedUpdateScrollInfoSet = 0; | |
1367 ASSERT(!gDelayUpdateScrollInfo); | |
1368 } | 1361 } |
1369 } | 1362 } |
1370 | 1363 |
1371 void RenderBlock::updateScrollInfoAfterLayout() | 1364 void RenderBlock::updateScrollInfoAfterLayout() |
1372 { | 1365 { |
1373 if (hasOverflowClip()) { | 1366 if (hasOverflowClip()) { |
1374 if (style()->isFlippedBlocksWritingMode()) { | 1367 if (style()->isFlippedBlocksWritingMode()) { |
1375 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=97937 | 1368 // FIXME: https://bugs.webkit.org/show_bug.cgi?id=97937 |
1376 // Workaround for now. We cannot delay the scroll info for overflow | 1369 // Workaround for now. We cannot delay the scroll info for overflow |
1377 // for items with opposite writing directions, as the contents needs | 1370 // for items with opposite writing directions, as the contents needs |
(...skipping 6347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7725 } | 7718 } |
7726 | 7719 |
7727 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) | 7720 String ValueToString<RenderBlock::FloatingObject*>::string(const RenderBlock::Fl
oatingObject* floatingObject) |
7728 { | 7721 { |
7729 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->fr
ameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedY(), floating
Object->frameRect().pixelSnappedMaxX(), floatingObject->frameRect().pixelSnapped
MaxY()); | 7722 return String::format("%p (%dx%d %dx%d)", floatingObject, floatingObject->fr
ameRect().pixelSnappedX(), floatingObject->frameRect().pixelSnappedY(), floating
Object->frameRect().pixelSnappedMaxX(), floatingObject->frameRect().pixelSnapped
MaxY()); |
7730 } | 7723 } |
7731 | 7724 |
7732 #endif | 7725 #endif |
7733 | 7726 |
7734 } // namespace WebCore | 7727 } // namespace WebCore |
OLD | NEW |