| 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 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1575 if (!shouldCheckForInvalidationAfterLayout()) | 1575 if (!shouldCheckForInvalidationAfterLayout()) |
| 1576 return; | 1576 return; |
| 1577 | 1577 |
| 1578 bool establishesNewRepaintContainer = isRepaintContainer(); | 1578 bool establishesNewRepaintContainer = isRepaintContainer(); |
| 1579 const RenderLayerModelObject& newRepaintContainer = *adjustCompositedContain
erForSpecialAncestors(establishesNewRepaintContainer ? this : &repaintContainer)
; | 1579 const RenderLayerModelObject& newRepaintContainer = *adjustCompositedContain
erForSpecialAncestors(establishesNewRepaintContainer ? this : &repaintContainer)
; |
| 1580 // FIXME: This assert should be re-enabled when we move repaint to after com
positing update. crbug.com/360286 | 1580 // FIXME: This assert should be re-enabled when we move repaint to after com
positing update. crbug.com/360286 |
| 1581 // ASSERT(&newRepaintContainer == containerForRepaint()); | 1581 // ASSERT(&newRepaintContainer == containerForRepaint()); |
| 1582 | 1582 |
| 1583 const LayoutRect oldRepaintRect = previousRepaintRect(); | 1583 const LayoutRect oldRepaintRect = previousRepaintRect(); |
| 1584 const LayoutPoint oldPositionFromRepaintContainer = previousPositionFromRepa
intContainer(); | 1584 const LayoutPoint oldPositionFromRepaintContainer = previousPositionFromRepa
intContainer(); |
| 1585 setPreviousRepaintRect(clippedOverflowRectForRepaint(&newRepaintContainer)); | 1585 setPreviousRepaintRect(boundsRectForRepaint(&newRepaintContainer)); |
| 1586 setPreviousPositionFromRepaintContainer(positionFromRepaintContainer(&newRep
aintContainer)); | 1586 setPreviousPositionFromRepaintContainer(positionFromRepaintContainer(&newRep
aintContainer)); |
| 1587 | 1587 |
| 1588 // If we are set to do a full repaint that means the RenderView will be | 1588 // If we are set to do a full repaint that means the RenderView will be |
| 1589 // invalidated. We can then skip issuing of invalidations for the child | 1589 // invalidated. We can then skip issuing of invalidations for the child |
| 1590 // renderers as they'll be covered by the RenderView. | 1590 // renderers as they'll be covered by the RenderView. |
| 1591 if (view()->doingFullRepaint() && this != view()) { | 1591 if (view()->doingFullRepaint() && this != view()) { |
| 1592 LayoutStateMaintainer statePusher(*this, isTableRow() ? LayoutSize() : l
ocationOffset()); | 1592 LayoutStateMaintainer statePusher(*this, isTableRow() ? LayoutSize() : l
ocationOffset()); |
| 1593 RenderObject::repaintTreeAfterLayout(newRepaintContainer); | 1593 RenderObject::repaintTreeAfterLayout(newRepaintContainer); |
| 1594 return; | 1594 return; |
| 1595 } | 1595 } |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2004 | 2004 |
| 2005 LayoutRect r = visualOverflowRect(); | 2005 LayoutRect r = visualOverflowRect(); |
| 2006 | 2006 |
| 2007 RenderView* v = view(); | 2007 RenderView* v = view(); |
| 2008 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && v) { | 2008 if (!RuntimeEnabledFeatures::repaintAfterLayoutEnabled() && v) { |
| 2009 // FIXME: layoutDelta needs to be applied in parts before/after transfor
ms and | 2009 // FIXME: layoutDelta needs to be applied in parts before/after transfor
ms and |
| 2010 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 | 2010 // repaint containers. https://bugs.webkit.org/show_bug.cgi?id=23308 |
| 2011 r.move(v->layoutDelta()); | 2011 r.move(v->layoutDelta()); |
| 2012 } | 2012 } |
| 2013 | 2013 |
| 2014 computeRectForRepaint(repaintContainer, r); | 2014 mapRectToRepaintBacking(repaintContainer, r); |
| 2015 return r; | 2015 return r; |
| 2016 } | 2016 } |
| 2017 | 2017 |
| 2018 void RenderBox::computeRectForRepaint(const RenderLayerModelObject* repaintConta
iner, LayoutRect& rect, bool fixed) const | 2018 void RenderBox::mapRectToRepaintBacking(const RenderLayerModelObject* repaintCon
tainer, LayoutRect& rect, bool fixed) const |
| 2019 { | 2019 { |
| 2020 // The rect we compute at each step is shifted by our x/y offset in the pare
nt container's coordinate space. | 2020 // The rect we compute at each step is shifted by our x/y offset in the pare
nt container's coordinate space. |
| 2021 // Only when we cross a writing mode boundary will we have to possibly flipF
orWritingMode (to convert into a more appropriate | 2021 // Only when we cross a writing mode boundary will we have to possibly flipF
orWritingMode (to convert into a more appropriate |
| 2022 // offset corner for the enclosing container). This allows for a fully RL o
r BT document to repaint | 2022 // offset corner for the enclosing container). This allows for a fully RL o
r BT document to repaint |
| 2023 // properly even during layout, since the rect remains flipped all the way u
ntil the end. | 2023 // properly even during layout, since the rect remains flipped all the way u
ntil the end. |
| 2024 // | 2024 // |
| 2025 // RenderView::computeRectForRepaint then converts the rect to physical coor
dinates. We also convert to | 2025 // RenderView::computeRectForRepaint then converts the rect to physical coor
dinates. We also convert to |
| 2026 // physical when we hit a repaintContainer boundary. Therefore the final re
ct returned is always in the | 2026 // physical when we hit a repaintContainer boundary. Therefore the final re
ct returned is always in the |
| 2027 // physical coordinate space of the repaintContainer. | 2027 // physical coordinate space of the repaintContainer. |
| 2028 RenderStyle* styleToUse = style(); | 2028 RenderStyle* styleToUse = style(); |
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2105 return; | 2105 return; |
| 2106 } | 2106 } |
| 2107 | 2107 |
| 2108 if (containerSkipped) { | 2108 if (containerSkipped) { |
| 2109 // If the repaintContainer is below o, then we need to map the rect into
repaintContainer's coordinates. | 2109 // If the repaintContainer is below o, then we need to map the rect into
repaintContainer's coordinates. |
| 2110 LayoutSize containerOffset = repaintContainer->offsetFromAncestorContain
er(o); | 2110 LayoutSize containerOffset = repaintContainer->offsetFromAncestorContain
er(o); |
| 2111 rect.move(-containerOffset); | 2111 rect.move(-containerOffset); |
| 2112 return; | 2112 return; |
| 2113 } | 2113 } |
| 2114 | 2114 |
| 2115 o->computeRectForRepaint(repaintContainer, rect, fixed); | 2115 o->mapRectToRepaintBacking(repaintContainer, rect, fixed); |
| 2116 } | 2116 } |
| 2117 | 2117 |
| 2118 void RenderBox::repaintDuringLayoutIfMoved(const LayoutRect& oldRect) | 2118 void RenderBox::repaintDuringLayoutIfMoved(const LayoutRect& oldRect) |
| 2119 { | 2119 { |
| 2120 if (oldRect.location() != m_frameRect.location()) { | 2120 if (oldRect.location() != m_frameRect.location()) { |
| 2121 LayoutRect newRect = m_frameRect; | 2121 LayoutRect newRect = m_frameRect; |
| 2122 // The child moved. Invalidate the object's old and new positions. We
have to do this | 2122 // The child moved. Invalidate the object's old and new positions. We
have to do this |
| 2123 // since the object may not have gotten a layout. | 2123 // since the object may not have gotten a layout. |
| 2124 m_frameRect = oldRect; | 2124 m_frameRect = oldRect; |
| 2125 repaint(); | 2125 repaint(); |
| (...skipping 2562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4688 return 0; | 4688 return 0; |
| 4689 | 4689 |
| 4690 if (!layoutState && !flowThreadContainingBlock()) | 4690 if (!layoutState && !flowThreadContainingBlock()) |
| 4691 return 0; | 4691 return 0; |
| 4692 | 4692 |
| 4693 RenderBlock* containerBlock = containingBlock(); | 4693 RenderBlock* containerBlock = containingBlock(); |
| 4694 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); | 4694 return containerBlock->offsetFromLogicalTopOfFirstPage() + logicalTop(); |
| 4695 } | 4695 } |
| 4696 | 4696 |
| 4697 } // namespace WebCore | 4697 } // namespace WebCore |
| OLD | NEW |