| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights
reserved. |
| 3 * | 3 * |
| 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 5 * | 5 * |
| 6 * Other contributors: | 6 * Other contributors: |
| 7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
| 9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
| 10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 destroyScrollbar(VerticalScrollbar); | 99 destroyScrollbar(VerticalScrollbar); |
| 100 } | 100 } |
| 101 | 101 |
| 102 HostWindow* RenderLayerScrollableArea::hostWindow() const | 102 HostWindow* RenderLayerScrollableArea::hostWindow() const |
| 103 { | 103 { |
| 104 if (Page* page = box().frame()->page()) | 104 if (Page* page = box().frame()->page()) |
| 105 return &page->chrome(); | 105 return &page->chrome(); |
| 106 return nullptr; | 106 return nullptr; |
| 107 } | 107 } |
| 108 | 108 |
| 109 // FIXME(sky): Remove |
| 109 void RenderLayerScrollableArea::invalidateScrollbarRect(Scrollbar* scrollbar, co
nst IntRect& rect) | 110 void RenderLayerScrollableArea::invalidateScrollbarRect(Scrollbar* scrollbar, co
nst IntRect& rect) |
| 110 { | 111 { |
| 111 IntRect scrollRect = rect; | 112 IntRect scrollRect = rect; |
| 112 // If we are not yet inserted into the tree, there is no need to issue paint
invaldiations. | 113 // If we are not yet inserted into the tree, there is no need to issue paint
invaldiations. |
| 113 if (!box().parent()) | 114 if (!box().parent()) |
| 114 return; | 115 return; |
| 115 | 116 |
| 116 if (scrollbar == m_vBar.get()) | 117 if (scrollbar == m_vBar.get()) |
| 117 scrollRect.move(verticalScrollbarStart(0, box().width()), box().borderTo
p()); | 118 scrollRect.move(verticalScrollbarStart(0, box().width()), box().borderTo
p()); |
| 118 else | 119 else |
| 119 scrollRect.move(horizontalScrollbarStart(0), box().height() - box().bord
erBottom() - scrollbar->height()); | 120 scrollRect.move(horizontalScrollbarStart(0), box().height() - box().bord
erBottom() - scrollbar->height()); |
| 120 | 121 |
| 121 if (scrollRect.isEmpty()) | 122 if (scrollRect.isEmpty()) |
| 122 return; | 123 return; |
| 123 | 124 |
| 124 IntRect intRect = pixelSnappedIntRect(scrollRect); | 125 IntRect intRect = pixelSnappedIntRect(scrollRect); |
| 125 | 126 |
| 126 if (box().frameView()->isInPerformLayout()) | 127 if (box().frameView()->isInPerformLayout()) |
| 127 addScrollbarDamage(scrollbar, intRect); | 128 addScrollbarDamage(scrollbar, intRect); |
| 128 else | |
| 129 box().invalidatePaintRectangle(intRect); | |
| 130 } | 129 } |
| 131 | 130 |
| 132 bool RenderLayerScrollableArea::isActive() const | 131 bool RenderLayerScrollableArea::isActive() const |
| 133 { | 132 { |
| 134 Page* page = box().frame()->page(); | 133 Page* page = box().frame()->page(); |
| 135 return page && page->focusController().isActive(); | 134 return page && page->focusController().isActive(); |
| 136 } | 135 } |
| 137 | 136 |
| 138 static int cornerStart(const RenderStyle* style, int minX, int maxX, int thickne
ss) | 137 static int cornerStart(const RenderStyle* style, int minX, int maxX, int thickne
ss) |
| 139 { | 138 { |
| (...skipping 619 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) | 758 void RenderLayerScrollableArea::setTopmostScrollChild(RenderLayer* scrollChild) |
| 760 { | 759 { |
| 761 // We only want to track the topmost scroll child for scrollable areas with | 760 // We only want to track the topmost scroll child for scrollable areas with |
| 762 // overlay scrollbars. | 761 // overlay scrollbars. |
| 763 if (!hasOverlayScrollbars()) | 762 if (!hasOverlayScrollbars()) |
| 764 return; | 763 return; |
| 765 m_nextTopmostScrollChild = scrollChild; | 764 m_nextTopmostScrollChild = scrollChild; |
| 766 } | 765 } |
| 767 | 766 |
| 768 } // namespace blink | 767 } // namespace blink |
| OLD | NEW |