Changeset 18491 in webkit
- Timestamp:
- Dec 31, 2006 6:25:57 AM (17 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r18490 r18491 1 2006-12-31 Chris McLay <chris@eeoh.com.au> 2 3 Reviewed by Hyatt. Tweaked by Mitz. 4 5 - test for http://bugs.webkit.org/show_bug.cgi?id=9659 6 Quirksmode: Fixed / Overflow > Positioned objects get hidden when scrolling 7 8 * fast/overflow/clip-rects-fixed-ancestor-expected.checksum: Added. 9 * fast/overflow/clip-rects-fixed-ancestor-expected.png: Added. 10 * fast/overflow/clip-rects-fixed-ancestor-expected.txt: Added. 11 * fast/overflow/clip-rects-fixed-ancestor.html: Added. 12 1 13 2006-12-31 Mitz Pettel <mitz@webkit.org> 2 14 -
trunk/WebCore/ChangeLog
r18490 r18491 1 2006-12-31 Mitz Pettel <mitz@webkit.org> 2 3 Reviewed by Hyatt. 4 5 - fix http://bugs.webkit.org/show_bug.cgi?id=9659 6 Quirksmode: Fixed / Overflow > Positioned objects get hidden when scrolling 7 8 Added a 'fixed' flag to ClipRects, indicating that the cached rects are in 9 viewport coordinates. The flag is set (and scrolling is compensated for) for 10 fixed objects and their descendants. 11 12 * rendering/RenderLayer.cpp: 13 (WebCore::RenderLayer::calculateClipRects): 14 (WebCore::RenderLayer::calculateRects): 15 * rendering/RenderLayer.h: 16 (WebCore::ClipRects::ClipRects): 17 (WebCore::ClipRects::fixed): 18 1 19 2006-12-31 Mitz Pettel <mitz@webkit.org> 2 20 -
trunk/WebCore/rendering/RenderLayer.cpp
r18327 r18491 1616 1616 IntRect overflowClipRect(parent()->clipRects()->overflowClipRect()); 1617 1617 IntRect fixedClipRect(parent()->clipRects()->fixedClipRect()); 1618 bool fixed = parent()->clipRects()->fixed(); 1618 1619 1619 1620 // A fixed object is essentially the root of its containing block hierarchy, so when … … 1622 1623 posClipRect = fixedClipRect; 1623 1624 overflowClipRect = fixedClipRect; 1625 fixed = true; 1624 1626 } 1625 1627 else if (m_object->style()->position() == RelativePosition) … … 1634 1636 int y = 0; 1635 1637 convertToLayerCoords(rootLayer, x, y); 1638 if (fixed) { 1639 x -= renderer()->view()->frameView()->contentsX(); 1640 y -= renderer()->view()->frameView()->contentsY(); 1641 } 1636 1642 1637 1643 if (m_object->hasOverflowClip()) { … … 1651 1657 // If our clip rects match our parent's clip, then we can just share its data structure and 1652 1658 // ref count. 1653 if (posClipRect == parent()->clipRects()->posClipRect() && 1659 if (fixed == parent()->clipRects()->fixed() && 1660 posClipRect == parent()->clipRects()->posClipRect() && 1654 1661 overflowClipRect == parent()->clipRects()->overflowClipRect() && 1655 1662 fixedClipRect == parent()->clipRects()->fixedClipRect()) 1656 1663 m_clipRects = parent()->clipRects(); 1657 1664 else 1658 m_clipRects = new (m_object->renderArena()) ClipRects(overflowClipRect, fixedClipRect, posClipRect );1665 m_clipRects = new (m_object->renderArena()) ClipRects(overflowClipRect, fixedClipRect, posClipRect, fixed); 1659 1666 m_clipRects->ref(); 1660 1667 } … … 1665 1672 if (parent()) { 1666 1673 parent()->calculateClipRects(rootLayer); 1674 1667 1675 backgroundRect = m_object->style()->position() == FixedPosition ? parent()->clipRects()->fixedClipRect() : 1668 1676 (m_object->isPositioned() ? parent()->clipRects()->posClipRect() : 1669 1677 parent()->clipRects()->overflowClipRect()); 1678 if (parent()->clipRects()->fixed()) 1679 backgroundRect.move(renderer()->view()->frameView()->contentsX(), renderer()->view()->frameView()->contentsY()); 1680 1670 1681 backgroundRect.intersect(paintDirtyRect); 1671 1682 } else -
trunk/WebCore/rendering/RenderLayer.h
r17770 r18491 71 71 , m_posClipRect(r) 72 72 , m_refCnt(0) 73 , m_fixed(false) 73 74 { 74 75 } 75 76 76 ClipRects(const IntRect& o , const IntRect& f, const IntRect& p)77 : m_overflowClipRect(o )78 , m_fixedClipRect(f )79 , m_posClipRect(p )77 ClipRects(const IntRect& overflowRect, const IntRect& fixedRect, const IntRect& posRect, bool fixed) 78 : m_overflowClipRect(overflowRect) 79 , m_fixedClipRect(fixedRect) 80 , m_posClipRect(posRect) 80 81 , m_refCnt(0) 82 , m_fixed(fixed) 81 83 { 82 84 } … … 85 87 const IntRect& fixedClipRect() { return m_fixedClipRect; } 86 88 const IntRect& posClipRect() { return m_posClipRect; } 89 bool fixed() const { return m_fixed; } 87 90 88 91 void ref() { m_refCnt++; } … … 105 108 IntRect m_fixedClipRect; 106 109 IntRect m_posClipRect; 107 unsigned m_refCnt; 110 unsigned m_refCnt : 31; 111 bool m_fixed : 1; 108 112 }; 109 113
Note: See TracChangeset
for help on using the changeset viewer.