| 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 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 278 | 278 |
| 279 RenderBox::willBeDestroyed(); | 279 RenderBox::willBeDestroyed(); |
| 280 } | 280 } |
| 281 | 281 |
| 282 void RenderBlock::styleWillChange(StyleDifference diff, const RenderStyle& newSt
yle) | 282 void RenderBlock::styleWillChange(StyleDifference diff, const RenderStyle& newSt
yle) |
| 283 { | 283 { |
| 284 RenderStyle* oldStyle = style(); | 284 RenderStyle* oldStyle = style(); |
| 285 | 285 |
| 286 setReplaced(newStyle.isDisplayInlineType()); | 286 setReplaced(newStyle.isDisplayInlineType()); |
| 287 | 287 |
| 288 if (oldStyle && parent() && diff.needsFullLayout() && oldStyle->position() !
= newStyle.position()) { | 288 if (oldStyle && parent() && diff == StyleDifferenceLayout && oldStyle->posit
ion() != newStyle.position()) { |
| 289 if (newStyle.position() == StaticPosition) | 289 if (newStyle.position() == StaticPosition) |
| 290 // Clear our positioned objects list. Our absolutely positioned desc
endants will be | 290 // Clear our positioned objects list. Our absolutely positioned desc
endants will be |
| 291 // inserted into our containing block's positioned objects list duri
ng layout. | 291 // inserted into our containing block's positioned objects list duri
ng layout. |
| 292 removePositionedObjects(0, NewContainingBlock); | 292 removePositionedObjects(0, NewContainingBlock); |
| 293 else if (oldStyle->position() == StaticPosition) { | 293 else if (oldStyle->position() == StaticPosition) { |
| 294 // Remove our absolutely positioned descendants from their current c
ontaining block. | 294 // Remove our absolutely positioned descendants from their current c
ontaining block. |
| 295 // They will be inserted into our positioned objects list during lay
out. | 295 // They will be inserted into our positioned objects list during lay
out. |
| 296 RenderObject* cb = parent(); | 296 RenderObject* cb = parent(); |
| 297 while (cb && (cb->style()->position() == StaticPosition || (cb->isIn
line() && !cb->isReplaced())) && !cb->isRenderView()) { | 297 while (cb && (cb->style()->position() == StaticPosition || (cb->isIn
line() && !cb->isReplaced())) && !cb->isRenderView()) { |
| 298 if (cb->style()->position() == RelativePosition && cb->isInline(
) && !cb->isReplaced()) { | 298 if (cb->style()->position() == RelativePosition && cb->isInline(
) && !cb->isReplaced()) { |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 } | 341 } |
| 342 | 342 |
| 343 if (FastTextAutosizer* textAutosizer = document().fastTextAutosizer()) | 343 if (FastTextAutosizer* textAutosizer = document().fastTextAutosizer()) |
| 344 textAutosizer->record(this); | 344 textAutosizer->record(this); |
| 345 | 345 |
| 346 propagateStyleToAnonymousChildren(true); | 346 propagateStyleToAnonymousChildren(true); |
| 347 invalidateLineHeight(); | 347 invalidateLineHeight(); |
| 348 | 348 |
| 349 // It's possible for our border/padding to change, but for the overall logic
al width of the block to | 349 // It's possible for our border/padding to change, but for the overall logic
al width of the block to |
| 350 // end up being the same. We keep track of this change so in layoutBlock, we
can know to set relayoutChildren=true. | 350 // end up being the same. We keep track of this change so in layoutBlock, we
can know to set relayoutChildren=true. |
| 351 m_hasBorderOrPaddingLogicalWidthChanged = oldStyle && diff.needsFullLayout()
&& needsLayout() && borderOrPaddingLogicalWidthChanged(oldStyle, newStyle); | 351 m_hasBorderOrPaddingLogicalWidthChanged = oldStyle && diff == StyleDifferenc
eLayout && needsLayout() && borderOrPaddingLogicalWidthChanged(oldStyle, newStyl
e); |
| 352 | 352 |
| 353 // If the style has unloaded images, want to notify the ResourceLoadPriority
Optimizer so that | 353 // If the style has unloaded images, want to notify the ResourceLoadPriority
Optimizer so that |
| 354 // network priorities can be set. | 354 // network priorities can be set. |
| 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 } |
| (...skipping 4592 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4954 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const | 4954 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m
arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render
Object* obj) const |
| 4955 { | 4955 { |
| 4956 showRenderObject(); | 4956 showRenderObject(); |
| 4957 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) | 4957 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot
Box()) |
| 4958 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); | 4958 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa
bel2, obj, 1); |
| 4959 } | 4959 } |
| 4960 | 4960 |
| 4961 #endif | 4961 #endif |
| 4962 | 4962 |
| 4963 } // namespace WebCore | 4963 } // namespace WebCore |
| OLD | NEW |