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 1314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 screenArea = viewBounds; | 1325 screenArea = viewBounds; |
1326 screenArea.intersect(objectBounds); | 1326 screenArea.intersect(objectBounds); |
1327 } | 1327 } |
1328 | 1328 |
1329 for (Vector<ImageResource*>::iterator it = images.begin(), end = images.end(
); it != end; ++it) | 1329 for (Vector<ImageResource*>::iterator it = images.begin(), end = images.end(
); it != end; ++it) |
1330 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->notifyIm
ageResourceVisibility(*it, status, screenArea); | 1330 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->notifyIm
ageResourceVisibility(*it, status, screenArea); |
1331 | 1331 |
1332 return true; | 1332 return true; |
1333 } | 1333 } |
1334 | 1334 |
1335 LayoutSize RenderBlock::logicalOffsetFromShapeAncestorContainer(const RenderBloc
k* container) const | |
1336 { | |
1337 const RenderBlock* currentBlock = this; | |
1338 LayoutRect blockRect(currentBlock->borderBoxRect()); | |
1339 while (currentBlock && !currentBlock->isRenderFlowThread() && currentBlock !
= container) { | |
1340 RenderBlock* containerBlock = currentBlock->containingBlock(); | |
1341 ASSERT(containerBlock); | |
1342 if (!containerBlock) | |
1343 return LayoutSize(); | |
1344 | |
1345 if (containerBlock->style()->writingMode() != currentBlock->style()->wri
tingMode()) { | |
1346 // We have to put the block rect in container coordinates | |
1347 // and we have to take into account both the container and current b
lock flipping modes | |
1348 // Bug: Flipping inline and block directions at the same time will n
ot work, | |
1349 // as one of the flipped dimensions will not yet have been set to it
s final size | |
1350 if (containerBlock->style()->isFlippedBlocksWritingMode()) { | |
1351 if (containerBlock->isHorizontalWritingMode()) | |
1352 blockRect.setY(currentBlock->height() - blockRect.maxY()); | |
1353 else | |
1354 blockRect.setX(currentBlock->width() - blockRect.maxX()); | |
1355 } | |
1356 currentBlock->flipForWritingMode(blockRect); | |
1357 } | |
1358 | |
1359 blockRect.moveBy(currentBlock->location()); | |
1360 currentBlock = containerBlock; | |
1361 } | |
1362 | |
1363 LayoutSize result = isHorizontalWritingMode() ? LayoutSize(blockRect.x(), bl
ockRect.y()) : LayoutSize(blockRect.y(), blockRect.x()); | |
1364 return result; | |
1365 } | |
1366 | |
1367 void RenderBlock::computeRegionRangeForBlock(RenderFlowThread* flowThread) | 1335 void RenderBlock::computeRegionRangeForBlock(RenderFlowThread* flowThread) |
1368 { | 1336 { |
1369 if (flowThread) | 1337 if (flowThread) |
1370 flowThread->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage()
); | 1338 flowThread->setRegionRangeForBox(this, offsetFromLogicalTopOfFirstPage()
); |
1371 } | 1339 } |
1372 | 1340 |
1373 bool RenderBlock::updateLogicalWidthAndColumnWidth() | 1341 bool RenderBlock::updateLogicalWidthAndColumnWidth() |
1374 { | 1342 { |
1375 LayoutUnit oldWidth = logicalWidth(); | 1343 LayoutUnit oldWidth = logicalWidth(); |
1376 LayoutUnit oldColumnWidth = desiredColumnWidth(); | 1344 LayoutUnit oldColumnWidth = desiredColumnWidth(); |
(...skipping 3522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4899 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 4867 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
4900 { | 4868 { |
4901 showRenderObject(); | 4869 showRenderObject(); |
4902 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 4870 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
4903 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 4871 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
4904 } | 4872 } |
4905 | 4873 |
4906 #endif | 4874 #endif |
4907 | 4875 |
4908 } // namespace WebCore | 4876 } // namespace WebCore |
OLD | NEW |