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 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
355 Vector<ImageResource*> images; | 355 Vector<ImageResource*> images; |
356 appendImagesFromStyle(images, *newStyle); | 356 appendImagesFromStyle(images, *newStyle); |
357 if (images.isEmpty()) | 357 if (images.isEmpty()) |
358 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->removeRe
nderObject(this); | 358 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->removeRe
nderObject(this); |
359 else | 359 else |
360 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->addRende
rObject(this); | 360 ResourceLoadPriorityOptimizer::resourceLoadPriorityOptimizer()->addRende
rObject(this); |
361 } | 361 } |
362 | 362 |
363 void RenderBlock::repaintTreeAfterLayout() | 363 void RenderBlock::repaintTreeAfterLayout() |
364 { | 364 { |
| 365 bool maybeInvalidated = mayNeedInvalidation(); |
365 RenderBox::repaintTreeAfterLayout(); | 366 RenderBox::repaintTreeAfterLayout(); |
366 | 367 |
| 368 if (!maybeInvalidated) |
| 369 return; |
| 370 |
367 // Take care of positioned objects. This is required as LayoutState keeps a
single clip rect. | 371 // Take care of positioned objects. This is required as LayoutState keeps a
single clip rect. |
368 if (TrackedRendererListHashSet* positionedObjects = this->positionedObjects(
)) { | 372 if (TrackedRendererListHashSet* positionedObjects = this->positionedObjects(
)) { |
369 TrackedRendererListHashSet::iterator end = positionedObjects->end(); | 373 TrackedRendererListHashSet::iterator end = positionedObjects->end(); |
370 LayoutStateMaintainer statePusher(*this, isTableRow() ? LayoutSize() : l
ocationOffset()); | 374 LayoutStateMaintainer statePusher(*this, isTableRow() ? LayoutSize() : l
ocationOffset()); |
371 for (TrackedRendererListHashSet::iterator it = positionedObjects->begin(
); it != end; ++it) | 375 for (TrackedRendererListHashSet::iterator it = positionedObjects->begin(
); it != end; ++it) |
372 (*it)->repaintTreeAfterLayout(); | 376 (*it)->repaintTreeAfterLayout(); |
373 } | 377 } |
374 } | 378 } |
375 | 379 |
376 RenderBlock* RenderBlock::continuationBefore(RenderObject* beforeChild) | 380 RenderBlock* RenderBlock::continuationBefore(RenderObject* beforeChild) |
(...skipping 1241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1618 if (hasColumns()) | 1622 if (hasColumns()) |
1619 view()->layoutState()->clearPaginationInformation(); // Positioned objec
ts are not part of the column flow, so they don't paginate with the columns. | 1623 view()->layoutState()->clearPaginationInformation(); // Positioned objec
ts are not part of the column flow, so they don't paginate with the columns. |
1620 | 1624 |
1621 RenderBox* r; | 1625 RenderBox* r; |
1622 TrackedRendererListHashSet::iterator end = positionedDescendants->end(); | 1626 TrackedRendererListHashSet::iterator end = positionedDescendants->end(); |
1623 for (TrackedRendererListHashSet::iterator it = positionedDescendants->begin(
); it != end; ++it) { | 1627 for (TrackedRendererListHashSet::iterator it = positionedDescendants->begin(
); it != end; ++it) { |
1624 r = *it; | 1628 r = *it; |
1625 | 1629 |
1626 // FIXME: this should only be set from clearNeedsLayout crbug.com/361250 | 1630 // FIXME: this should only be set from clearNeedsLayout crbug.com/361250 |
1627 r->setLayoutDidGetCalled(true); | 1631 r->setLayoutDidGetCalled(true); |
| 1632 r->setMayNeedInvalidation(true); |
1628 | 1633 |
1629 SubtreeLayoutScope layoutScope(*r); | 1634 SubtreeLayoutScope layoutScope(*r); |
1630 // A fixed position element with an absolute positioned ancestor has no
way of knowing if the latter has changed position. So | 1635 // A fixed position element with an absolute positioned ancestor has no
way of knowing if the latter has changed position. So |
1631 // if this is a fixed position element, mark it for layout if it has an
abspos ancestor and needs to move with that ancestor, i.e. | 1636 // if this is a fixed position element, mark it for layout if it has an
abspos ancestor and needs to move with that ancestor, i.e. |
1632 // it has static position. | 1637 // it has static position. |
1633 markFixedPositionObjectForLayoutIfNeeded(r, layoutScope); | 1638 markFixedPositionObjectForLayoutIfNeeded(r, layoutScope); |
1634 if (info == LayoutOnlyFixedPositionedObjects) { | 1639 if (info == LayoutOnlyFixedPositionedObjects) { |
1635 r->layoutIfNeeded(); | 1640 r->layoutIfNeeded(); |
1636 continue; | 1641 continue; |
1637 } | 1642 } |
(...skipping 3335 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4973 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 4978 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
4974 { | 4979 { |
4975 showRenderObject(); | 4980 showRenderObject(); |
4976 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 4981 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
4977 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 4982 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
4978 } | 4983 } |
4979 | 4984 |
4980 #endif | 4985 #endif |
4981 | 4986 |
4982 } // namespace WebCore | 4987 } // namespace WebCore |
OLD | NEW |