| 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) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 359 | 359 |
| 360 // SVG creates layoutObjects for <g display="none">, as SVG requires childre
n of hidden | 360 // SVG creates layoutObjects for <g display="none">, as SVG requires childre
n of hidden |
| 361 // <g>s to have layoutObjects - at least that's how our implementation works
. Consider: | 361 // <g>s to have layoutObjects - at least that's how our implementation works
. Consider: |
| 362 // <g display="none"><foreignObject><body style="position: relative">FOO... | 362 // <g display="none"><foreignObject><body style="position: relative">FOO... |
| 363 // - layerTypeRequired() would return true for the <body>, creating a new La
yer | 363 // - layerTypeRequired() would return true for the <body>, creating a new La
yer |
| 364 // - when the document is painted, both layers are painted. The <body> layer
doesn't | 364 // - when the document is painted, both layers are painted. The <body> layer
doesn't |
| 365 // know that it's inside a "hidden SVG subtree", and thus paints, even if
it shouldn't. | 365 // know that it's inside a "hidden SVG subtree", and thus paints, even if
it shouldn't. |
| 366 // To avoid the problem altogether, detect early if we're inside a hidden SV
G subtree | 366 // To avoid the problem altogether, detect early if we're inside a hidden SV
G subtree |
| 367 // and stop creating layers at all for these cases - they're not used anyway
s. | 367 // and stop creating layers at all for these cases - they're not used anyway
s. |
| 368 if (newChild->hasLayer() && !layerCreationAllowedForSubtree()) | 368 if (newChild->hasLayer() && !layerCreationAllowedForSubtree()) |
| 369 toLayoutBoxModelObject(newChild)->layer()->removeOnlyThisLayer(); | 369 toLayoutBoxModelObject(newChild)->layer()->removeOnlyThisLayerAfterStyle
Change(); |
| 370 } | 370 } |
| 371 | 371 |
| 372 void LayoutObject::removeChild(LayoutObject* oldChild) | 372 void LayoutObject::removeChild(LayoutObject* oldChild) |
| 373 { | 373 { |
| 374 ASSERT(isAllowedToModifyLayoutTreeStructure(document())); | 374 ASSERT(isAllowedToModifyLayoutTreeStructure(document())); |
| 375 | 375 |
| 376 LayoutObjectChildList* children = virtualChildren(); | 376 LayoutObjectChildList* children = virtualChildren(); |
| 377 ASSERT(children); | 377 ASSERT(children); |
| 378 if (!children) | 378 if (!children) |
| 379 return; | 379 return; |
| (...skipping 3300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3680 const blink::LayoutObject* root = object1; | 3680 const blink::LayoutObject* root = object1; |
| 3681 while (root->parent()) | 3681 while (root->parent()) |
| 3682 root = root->parent(); | 3682 root = root->parent(); |
| 3683 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3683 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
| 3684 } else { | 3684 } else { |
| 3685 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3685 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
| 3686 } | 3686 } |
| 3687 } | 3687 } |
| 3688 | 3688 |
| 3689 #endif | 3689 #endif |
| OLD | NEW |