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 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 // with empty rects. Use LayoutRect::contains in that case. | 1319 // with empty rects. Use LayoutRect::contains in that case. |
1320 bool isVisible; | 1320 bool isVisible; |
1321 if (!objectBounds.isEmpty()) | 1321 if (!objectBounds.isEmpty()) |
1322 isVisible = viewBounds.intersects(objectBounds); | 1322 isVisible = viewBounds.intersects(objectBounds); |
1323 else | 1323 else |
1324 isVisible = viewBounds.contains(objectBounds); | 1324 isVisible = viewBounds.contains(objectBounds); |
1325 | 1325 |
1326 ResourceLoadPriorityOptimizer::VisibilityStatus status = isVisible ? | 1326 ResourceLoadPriorityOptimizer::VisibilityStatus status = isVisible ? |
1327 ResourceLoadPriorityOptimizer::Visible : ResourceLoadPriorityOptimizer::
NotVisible; | 1327 ResourceLoadPriorityOptimizer::Visible : ResourceLoadPriorityOptimizer::
NotVisible; |
1328 | 1328 |
| 1329 LayoutRect screenArea; |
| 1330 if (!objectBounds.isEmpty()) { |
| 1331 screenArea = viewBounds; |
| 1332 screenArea.intersect(objectBounds); |
| 1333 } |
| 1334 |
1329 for (Vector<ImageResource*>::iterator it = images.begin(), end = images.end(
); it != end; ++it) | 1335 for (Vector<ImageResource*>::iterator it = images.begin(), end = images.end(
); it != end; ++it) |
1330 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->notifyIm
ageResourceVisibility(*it, status); | 1336 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->notifyIm
ageResourceVisibility(*it, status, screenArea); |
1331 | 1337 |
1332 return true; | 1338 return true; |
1333 } | 1339 } |
1334 | 1340 |
1335 void RenderBlock::relayoutShapeDescendantIfMoved(RenderBlock* child, LayoutSize
offset) | 1341 void RenderBlock::relayoutShapeDescendantIfMoved(RenderBlock* child, LayoutSize
offset) |
1336 { | 1342 { |
1337 LayoutUnit left = isHorizontalWritingMode() ? offset.width() : offset.height
(); | 1343 LayoutUnit left = isHorizontalWritingMode() ? offset.width() : offset.height
(); |
1338 if (!left || !child || child->shapeInsideInfo() || !layoutShapeInsideInfo()) | 1344 if (!left || !child || child->shapeInsideInfo() || !layoutShapeInsideInfo()) |
1339 return; | 1345 return; |
1340 // Propagate layout markers only up to the child, as we are still in the mid
dle | 1346 // Propagate layout markers only up to the child, as we are still in the mid
dle |
(...skipping 4303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5644 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 5650 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
5645 { | 5651 { |
5646 showRenderObject(); | 5652 showRenderObject(); |
5647 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 5653 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
5648 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 5654 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
5649 } | 5655 } |
5650 | 5656 |
5651 #endif | 5657 #endif |
5652 | 5658 |
5653 } // namespace WebCore | 5659 } // namespace WebCore |
OLD | NEW |