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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
8 * | 8 * |
9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
(...skipping 1905 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1916 bool LayoutBox::hasForcedBreakBefore() const | 1916 bool LayoutBox::hasForcedBreakBefore() const |
1917 { | 1917 { |
1918 return isForcedFragmentainerBreakValue(breakBefore()); | 1918 return isForcedFragmentainerBreakValue(breakBefore()); |
1919 } | 1919 } |
1920 | 1920 |
1921 bool LayoutBox::hasForcedBreakAfter() const | 1921 bool LayoutBox::hasForcedBreakAfter() const |
1922 { | 1922 { |
1923 return isForcedFragmentainerBreakValue(breakAfter()); | 1923 return isForcedFragmentainerBreakValue(breakAfter()); |
1924 } | 1924 } |
1925 | 1925 |
1926 LayoutRect LayoutBox::clippedOverflowRectForPaintInvalidation(const LayoutBoxMod
elObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalid
ationState) const | 1926 LayoutRect LayoutBox::localOverflowRectForPaintInvalidation() const |
1927 { | 1927 { |
1928 if (style()->visibility() != VISIBLE) { | 1928 if (style()->visibility() != VISIBLE) { |
1929 PaintLayer* layer = enclosingLayer(); | 1929 PaintLayer* layer = enclosingLayer(); |
1930 layer->updateDescendantDependentFlags(); | 1930 layer->updateDescendantDependentFlags(); |
1931 if (layer->subtreeIsInvisible()) | 1931 if (layer->subtreeIsInvisible()) |
1932 return LayoutRect(); | 1932 return LayoutRect(); |
1933 } | 1933 } |
1934 | 1934 |
1935 LayoutRect r = visualOverflowRect(); | 1935 return visualOverflowRect(); |
1936 mapToVisibleRectInAncestorSpace(paintInvalidationContainer, r, paintInvalida
tionState); | |
1937 return r; | |
1938 } | 1936 } |
1939 | 1937 |
1940 bool LayoutBox::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ance
stor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState, Vi
sibleRectFlags visibleRectFlags) const | 1938 bool LayoutBox::mapToVisibleRectInAncestorSpace(const LayoutBoxModelObject* ance
stor, LayoutRect& rect, const PaintInvalidationState* paintInvalidationState, Vi
sibleRectFlags visibleRectFlags) const |
1941 { | 1939 { |
1942 // The rect we compute at each step is shifted by our x/y offset in the pare
nt container's coordinate space. | 1940 // The rect we compute at each step is shifted by our x/y offset in the pare
nt container's coordinate space. |
1943 // Only when we cross a writing mode boundary will we have to possibly flipF
orWritingMode (to convert into a more appropriate | 1941 // Only when we cross a writing mode boundary will we have to possibly flipF
orWritingMode (to convert into a more appropriate |
1944 // offset corner for the enclosing container). This allows for a fully RL or
BT document to issue paint invalidations | 1942 // offset corner for the enclosing container). This allows for a fully RL or
BT document to issue paint invalidations |
1945 // properly even during layout, since the rect remains flipped all the way u
ntil the end. | 1943 // properly even during layout, since the rect remains flipped all the way u
ntil the end. |
1946 // | 1944 // |
1947 // LayoutView::computeRectForPaintInvalidation then converts the rect to phy
sical coordinates. We also convert to | 1945 // LayoutView::computeRectForPaintInvalidation then converts the rect to phy
sical coordinates. We also convert to |
(...skipping 2495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4443 LayoutBox* boxToSplit = toLayoutBox(beforeChild->parent()); | 4441 LayoutBox* boxToSplit = toLayoutBox(beforeChild->parent()); |
4444 if (boxToSplit->slowFirstChild() != beforeChild && boxToSplit->isAnonymo
us()) { | 4442 if (boxToSplit->slowFirstChild() != beforeChild && boxToSplit->isAnonymo
us()) { |
4445 | 4443 |
4446 // We have to split the parent box into two boxes and move children | 4444 // We have to split the parent box into two boxes and move children |
4447 // from |beforeChild| to end into the new post box. | 4445 // from |beforeChild| to end into the new post box. |
4448 LayoutBox* postBox = boxToSplit->createAnonymousBoxWithSameTypeAs(th
is); | 4446 LayoutBox* postBox = boxToSplit->createAnonymousBoxWithSameTypeAs(th
is); |
4449 postBox->setChildrenInline(boxToSplit->childrenInline()); | 4447 postBox->setChildrenInline(boxToSplit->childrenInline()); |
4450 LayoutBox* parentBox = toLayoutBox(boxToSplit->parent()); | 4448 LayoutBox* parentBox = toLayoutBox(boxToSplit->parent()); |
4451 // We need to invalidate the |parentBox| before inserting the new no
de | 4449 // We need to invalidate the |parentBox| before inserting the new no
de |
4452 // so that the table paint invalidation logic knows the structure is
dirty. | 4450 // so that the table paint invalidation logic knows the structure is
dirty. |
4453 // See for example LayoutTableCell:clippedOverflowRectForPaintInvali
dation. | 4451 // See for example LayoutTableCell:localOverflowRectForPaintInvalida
tion. |
4454 markBoxForRelayoutAfterSplit(parentBox); | 4452 markBoxForRelayoutAfterSplit(parentBox); |
4455 parentBox->virtualChildren()->insertChildNode(parentBox, postBox, bo
xToSplit->nextSibling()); | 4453 parentBox->virtualChildren()->insertChildNode(parentBox, postBox, bo
xToSplit->nextSibling()); |
4456 boxToSplit->moveChildrenTo(postBox, beforeChild, 0, true); | 4454 boxToSplit->moveChildrenTo(postBox, beforeChild, 0, true); |
4457 | 4455 |
4458 LayoutObject* child = postBox->slowFirstChild(); | 4456 LayoutObject* child = postBox->slowFirstChild(); |
4459 ASSERT(child); | 4457 ASSERT(child); |
4460 if (child && !child->nextSibling()) | 4458 if (child && !child->nextSibling()) |
4461 collapseLoneAnonymousBlockChild(child); | 4459 collapseLoneAnonymousBlockChild(child); |
4462 child = boxToSplit->slowFirstChild(); | 4460 child = boxToSplit->slowFirstChild(); |
4463 ASSERT(child); | 4461 ASSERT(child); |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4709 | 4707 |
4710 void LayoutBox::clearPercentHeightDescendants() | 4708 void LayoutBox::clearPercentHeightDescendants() |
4711 { | 4709 { |
4712 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
r(this)) { | 4710 for (LayoutObject* curr = slowFirstChild(); curr; curr = curr->nextInPreOrde
r(this)) { |
4713 if (curr->isBox()) | 4711 if (curr->isBox()) |
4714 toLayoutBox(curr)->removeFromPercentHeightContainer(); | 4712 toLayoutBox(curr)->removeFromPercentHeightContainer(); |
4715 } | 4713 } |
4716 } | 4714 } |
4717 | 4715 |
4718 } // namespace blink | 4716 } // namespace blink |
OLD | NEW |