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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 | 358 |
359 if (newChild->isText() && newChild->style()->textTransform() == CAPITALIZE) | 359 if (newChild->isText() && newChild->style()->textTransform() == CAPITALIZE) |
360 toLayoutText(newChild)->transformText(); | 360 toLayoutText(newChild)->transformText(); |
361 | 361 |
362 // SVG creates layoutObjects for <g display="none">, as SVG requires childre
n of hidden | 362 // SVG creates layoutObjects for <g display="none">, as SVG requires childre
n of hidden |
363 // <g>s to have layoutObjects - at least that's how our implementation works
. Consider: | 363 // <g>s to have layoutObjects - at least that's how our implementation works
. Consider: |
364 // <g display="none"><foreignObject><body style="position: relative">FOO... | 364 // <g display="none"><foreignObject><body style="position: relative">FOO... |
365 // - layerTypeRequired() would return true for the <body>, creating a new La
yer | 365 // - layerTypeRequired() would return true for the <body>, creating a new La
yer |
366 // - when the document is painted, both layers are painted. The <body> layer
doesn't | 366 // - when the document is painted, both layers are painted. The <body> layer
doesn't |
367 // know that it's inside a "hidden SVG subtree", and thus paints, even if
it shouldn't. | 367 // know that it's inside a "hidden SVG subtree", and thus paints, even if
it shouldn't. |
368 // To avoid the problem alltogether, detect early if we're inside a hidden S
VG subtree | 368 // To avoid the problem altogether, detect early if we're inside a hidden SV
G subtree |
369 // and stop creating layers at all for these cases - they're not used anyway
s. | 369 // and stop creating layers at all for these cases - they're not used anyway
s. |
370 if (newChild->hasLayer() && !layerCreationAllowedForSubtree()) | 370 if (newChild->hasLayer() && !layerCreationAllowedForSubtree()) |
371 toLayoutBoxModelObject(newChild)->layer()->removeOnlyThisLayer(); | 371 toLayoutBoxModelObject(newChild)->layer()->removeOnlyThisLayer(); |
372 } | 372 } |
373 | 373 |
374 void LayoutObject::removeChild(LayoutObject* oldChild) | 374 void LayoutObject::removeChild(LayoutObject* oldChild) |
375 { | 375 { |
376 ASSERT(isAllowedToModifyLayoutTreeStructure(document())); | 376 ASSERT(isAllowedToModifyLayoutTreeStructure(document())); |
377 | 377 |
378 LayoutObjectChildList* children = virtualChildren(); | 378 LayoutObjectChildList* children = virtualChildren(); |
(...skipping 3120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3499 const blink::LayoutObject* root = object1; | 3499 const blink::LayoutObject* root = object1; |
3500 while (root->parent()) | 3500 while (root->parent()) |
3501 root = root->parent(); | 3501 root = root->parent(); |
3502 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3502 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3503 } else { | 3503 } else { |
3504 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3504 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3505 } | 3505 } |
3506 } | 3506 } |
3507 | 3507 |
3508 #endif | 3508 #endif |
OLD | NEW |