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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights
reserved. |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 { | 300 { |
301 // Make sure we don't append things after :after-generated content if we hav
e it. | 301 // Make sure we don't append things after :after-generated content if we hav
e it. |
302 if (!beforeChild && isAfterContent(lastChild())) | 302 if (!beforeChild && isAfterContent(lastChild())) |
303 beforeChild = lastChild(); | 303 beforeChild = lastChild(); |
304 | 304 |
305 if (!newChild->isInline() && !newChild->isFloatingOrOutOfFlowPositioned()) { | 305 if (!newChild->isInline() && !newChild->isFloatingOrOutOfFlowPositioned()) { |
306 // We are placing a block inside an inline. We have to perform a split o
f this | 306 // We are placing a block inside an inline. We have to perform a split o
f this |
307 // inline into continuations. This involves creating an anonymous block
box to hold | 307 // inline into continuations. This involves creating an anonymous block
box to hold |
308 // |newChild|. We then make that block box a continuation of this inlin
e. We take all of | 308 // |newChild|. We then make that block box a continuation of this inlin
e. We take all of |
309 // the children after |beforeChild| and put them in a clone of this obje
ct. | 309 // the children after |beforeChild| and put them in a clone of this obje
ct. |
310 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWith
Display(styleRef(), BLOCK); | 310 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWith
Display(containingBlock()->styleRef(), BLOCK); |
311 | 311 |
312 // If inside an inline affected by in-flow positioning the block needs t
o be affected by it too. | 312 // If inside an inline affected by in-flow positioning the block needs t
o be affected by it too. |
313 // Giving the block a layer like this allows it to collect the x/y offse
ts from inline parents later. | 313 // Giving the block a layer like this allows it to collect the x/y offse
ts from inline parents later. |
314 if (LayoutObject* positionedAncestor = inFlowPositionedInlineAncestor(th
is)) | 314 if (LayoutObject* positionedAncestor = inFlowPositionedInlineAncestor(th
is)) |
315 newStyle->setPosition(positionedAncestor->style()->position()); | 315 newStyle->setPosition(positionedAncestor->style()->position()); |
316 | 316 |
317 LayoutBlockFlow* newBox = LayoutBlockFlow::createAnonymous(&document()); | 317 LayoutBlockFlow* newBox = LayoutBlockFlow::createAnonymous(&document()); |
318 newBox->setStyle(newStyle.release()); | 318 newBox->setStyle(newStyle.release()); |
319 LayoutBoxModelObject* oldContinuation = continuation(); | 319 LayoutBoxModelObject* oldContinuation = continuation(); |
320 setContinuation(newBox); | 320 setContinuation(newBox); |
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1406 | 1406 |
1407 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain
tInvalidationContainer, PaintInvalidationReason invalidationReason, const Layout
Rect* paintInvalidationRect) const | 1407 void LayoutInline::invalidateDisplayItemClients(const LayoutBoxModelObject& pain
tInvalidationContainer, PaintInvalidationReason invalidationReason, const Layout
Rect* paintInvalidationRect) const |
1408 { | 1408 { |
1409 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine
r, invalidationReason, paintInvalidationRect); | 1409 LayoutBoxModelObject::invalidateDisplayItemClients(paintInvalidationContaine
r, invalidationReason, paintInvalidationRect); |
1410 // TODO(wangxianzhu): Pass current bounds of lineboxes to PaintController. c
rbug.com/547119. | 1410 // TODO(wangxianzhu): Pass current bounds of lineboxes to PaintController. c
rbug.com/547119. |
1411 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) | 1411 for (InlineFlowBox* box = firstLineBox(); box; box = box->nextLineBox()) |
1412 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in
validationReason, nullptr); | 1412 paintInvalidationContainer.invalidateDisplayItemClientOnBacking(*box, in
validationReason, nullptr); |
1413 } | 1413 } |
1414 | 1414 |
1415 } // namespace blink | 1415 } // namespace blink |
OLD | NEW |