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. | 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. |
5 * All rights reserved. | 5 * All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
395 LayoutObject* beforeChild, | 395 LayoutObject* beforeChild, |
396 LayoutBoxModelObject* oldCont) { | 396 LayoutBoxModelObject* oldCont) { |
397 ASSERT(isDescendantOf(fromBlock)); | 397 ASSERT(isDescendantOf(fromBlock)); |
398 | 398 |
399 // If we're splitting the inline containing the fullscreened element, | 399 // If we're splitting the inline containing the fullscreened element, |
400 // |beforeChild| may be the layoutObject for the fullscreened element. | 400 // |beforeChild| may be the layoutObject for the fullscreened element. |
401 // However, that layoutObject is wrapped in a LayoutFullScreen, so |this| is | 401 // However, that layoutObject is wrapped in a LayoutFullScreen, so |this| is |
402 // not its parent. Since the splitting logic expects |this| to be the parent, | 402 // not its parent. Since the splitting logic expects |this| to be the parent, |
403 // set |beforeChild| to be the LayoutFullScreen. | 403 // set |beforeChild| to be the LayoutFullScreen. |
404 if (Fullscreen* fullscreen = Fullscreen::fromIfExists(document())) { | 404 if (Fullscreen* fullscreen = Fullscreen::fromIfExists(document())) { |
405 const Element* fullscreenElement = fullscreen->fullscreenElement(); | 405 const Element* fullScreenElement = fullscreen->currentFullScreenElement(); |
406 if (fullscreenElement && beforeChild && | 406 if (fullScreenElement && beforeChild && |
407 beforeChild->node() == fullscreenElement) | 407 beforeChild->node() == fullScreenElement) |
408 beforeChild = fullscreen->fullScreenLayoutObject(); | 408 beforeChild = fullscreen->fullScreenLayoutObject(); |
409 } | 409 } |
410 | 410 |
411 // FIXME: Because splitting is O(n^2) as tags nest pathologically, we cap the | 411 // FIXME: Because splitting is O(n^2) as tags nest pathologically, we cap the |
412 // depth at which we're willing to clone. | 412 // depth at which we're willing to clone. |
413 // There will eventually be a better approach to this problem that will let us | 413 // There will eventually be a better approach to this problem that will let us |
414 // nest to a much greater depth (see bugzilla bug 13430) but for now we have a | 414 // nest to a much greater depth (see bugzilla bug 13430) but for now we have a |
415 // limit. This *will* result in incorrect rendering, but the alternative is to | 415 // limit. This *will* result in incorrect rendering, but the alternative is to |
416 // hang forever. | 416 // hang forever. |
417 const unsigned cMaxSplitDepth = 200; | 417 const unsigned cMaxSplitDepth = 200; |
(...skipping 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1518 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); | 1518 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); |
1519 } | 1519 } |
1520 | 1520 |
1521 // TODO(lunalu): Not to just dump 0, 0 as the x and y here | 1521 // TODO(lunalu): Not to just dump 0, 0 as the x and y here |
1522 LayoutRect LayoutInline::debugRect() const { | 1522 LayoutRect LayoutInline::debugRect() const { |
1523 IntRect linesBox = enclosingIntRect(linesBoundingBox()); | 1523 IntRect linesBox = enclosingIntRect(linesBoundingBox()); |
1524 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); | 1524 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); |
1525 } | 1525 } |
1526 | 1526 |
1527 } // namespace blink | 1527 } // namespace blink |
OLD | NEW |