Chromium Code Reviews| 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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 280 bool newHasTransformRelatedProperty = newStyle.hasTransformRelatedProper ty(); | 280 bool newHasTransformRelatedProperty = newStyle.hasTransformRelatedProper ty(); |
| 281 bool oldStyleIsContainer = oldStyle->position() != StaticPosition || old HasTransformRelatedProperty; | 281 bool oldStyleIsContainer = oldStyle->position() != StaticPosition || old HasTransformRelatedProperty; |
| 282 | 282 |
| 283 if (oldStyleIsContainer && (newStyle.position() == StaticPosition || (ol dHasTransformRelatedProperty && !newHasTransformRelatedProperty))) { | 283 if (oldStyleIsContainer && (newStyle.position() == StaticPosition || (ol dHasTransformRelatedProperty && !newHasTransformRelatedProperty))) { |
| 284 // Clear our positioned objects list. Our absolutely positioned desc endants will be | 284 // Clear our positioned objects list. Our absolutely positioned desc endants will be |
| 285 // inserted into our containing block's positioned objects list duri ng layout. | 285 // inserted into our containing block's positioned objects list duri ng layout. |
| 286 removePositionedObjects(0, NewContainingBlock); | 286 removePositionedObjects(0, NewContainingBlock); |
| 287 } else if (!oldStyleIsContainer && (newStyle.position() != StaticPositio n || newHasTransformRelatedProperty)) { | 287 } else if (!oldStyleIsContainer && (newStyle.position() != StaticPositio n || newHasTransformRelatedProperty)) { |
| 288 // Remove our absolutely positioned descendants from their current c ontaining block. | 288 // Remove our absolutely positioned descendants from their current c ontaining block. |
| 289 // They will be inserted into our positioned objects list during lay out. | 289 // They will be inserted into our positioned objects list during lay out. |
| 290 if (LayoutBlock* cb = containingBlock()) | 290 if (LayoutBlock* cb = containerForAbsolutePosition()) |
|
mstensho (USE GERRIT)
2015/06/30 19:47:17
How about doing this in styleDidChange() instead,
| |
| 291 cb->removePositionedObjects(this, NewContainingBlock); | 291 cb->removePositionedObjects(this, NewContainingBlock); |
| 292 } | 292 } |
| 293 } | 293 } |
| 294 | 294 |
| 295 LayoutBox::styleWillChange(diff, newStyle); | 295 LayoutBox::styleWillChange(diff, newStyle); |
| 296 } | 296 } |
| 297 | 297 |
| 298 static bool borderOrPaddingLogicalWidthChanged(const ComputedStyle& oldStyle, co nst ComputedStyle& newStyle) | 298 static bool borderOrPaddingLogicalWidthChanged(const ComputedStyle& oldStyle, co nst ComputedStyle& newStyle) |
| 299 { | 299 { |
| 300 if (newStyle.isHorizontalWritingMode()) { | 300 if (newStyle.isHorizontalWritingMode()) { |
| (...skipping 2620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2921 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const | 2921 void LayoutBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Layout Object* obj) const |
| 2922 { | 2922 { |
| 2923 showLayoutObject(); | 2923 showLayoutObject(); |
| 2924 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) | 2924 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) |
| 2925 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); | 2925 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); |
| 2926 } | 2926 } |
| 2927 | 2927 |
| 2928 #endif | 2928 #endif |
| 2929 | 2929 |
| 2930 } // namespace blink | 2930 } // namespace blink |
| OLD | NEW |