| 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 1485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1496 ASSERT(orientation == HorizontalScrollbar ? !m_hBarIsAttached : !m_vBarIsAtt
ached); | 1496 ASSERT(orientation == HorizontalScrollbar ? !m_hBarIsAttached : !m_vBarIsAtt
ached); |
| 1497 RefPtrWillBeRawPtr<Scrollbar> scrollbar = nullptr; | 1497 RefPtrWillBeRawPtr<Scrollbar> scrollbar = nullptr; |
| 1498 const LayoutObject& actualLayoutObject = layoutObjectForScrollbar(m_scrollab
leArea->box()); | 1498 const LayoutObject& actualLayoutObject = layoutObjectForScrollbar(m_scrollab
leArea->box()); |
| 1499 bool hasCustomScrollbarStyle = actualLayoutObject.isBox() && actualLayoutObj
ect.styleRef().hasPseudoStyle(SCROLLBAR); | 1499 bool hasCustomScrollbarStyle = actualLayoutObject.isBox() && actualLayoutObj
ect.styleRef().hasPseudoStyle(SCROLLBAR); |
| 1500 if (hasCustomScrollbarStyle) { | 1500 if (hasCustomScrollbarStyle) { |
| 1501 scrollbar = LayoutScrollbar::createCustomScrollbar(m_scrollableArea.get(
), orientation, actualLayoutObject.node()); | 1501 scrollbar = LayoutScrollbar::createCustomScrollbar(m_scrollableArea.get(
), orientation, actualLayoutObject.node()); |
| 1502 } else { | 1502 } else { |
| 1503 ScrollbarControlSize scrollbarSize = RegularScrollbar; | 1503 ScrollbarControlSize scrollbarSize = RegularScrollbar; |
| 1504 if (actualLayoutObject.styleRef().hasAppearance()) | 1504 if (actualLayoutObject.styleRef().hasAppearance()) |
| 1505 scrollbarSize = LayoutTheme::theme().scrollbarControlSizeForPart(act
ualLayoutObject.styleRef().appearance()); | 1505 scrollbarSize = LayoutTheme::theme().scrollbarControlSizeForPart(act
ualLayoutObject.styleRef().appearance()); |
| 1506 scrollbar = Scrollbar::create(m_scrollableArea.get(), orientation, scrol
lbarSize); | 1506 scrollbar = Scrollbar::create(m_scrollableArea.get(), orientation, scrol
lbarSize, &m_scrollableArea->box().frame()->page()->chromeClient()); |
| 1507 if (orientation == HorizontalScrollbar) | 1507 if (orientation == HorizontalScrollbar) |
| 1508 m_scrollableArea->didAddScrollbar(*scrollbar, HorizontalScrollbar); | 1508 m_scrollableArea->didAddScrollbar(*scrollbar, HorizontalScrollbar); |
| 1509 else | 1509 else |
| 1510 m_scrollableArea->didAddScrollbar(*scrollbar, VerticalScrollbar); | 1510 m_scrollableArea->didAddScrollbar(*scrollbar, VerticalScrollbar); |
| 1511 } | 1511 } |
| 1512 m_scrollableArea->box().document().view()->addChild(scrollbar.get()); | 1512 m_scrollableArea->box().document().view()->addChild(scrollbar.get()); |
| 1513 return scrollbar.release(); | 1513 return scrollbar.release(); |
| 1514 } | 1514 } |
| 1515 | 1515 |
| 1516 void PaintLayerScrollableArea::ScrollbarManager::destroyScrollbar(ScrollbarOrien
tation orientation) | 1516 void PaintLayerScrollableArea::ScrollbarManager::destroyScrollbar(ScrollbarOrien
tation orientation) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 1531 } | 1531 } |
| 1532 | 1532 |
| 1533 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) | 1533 DEFINE_TRACE(PaintLayerScrollableArea::ScrollbarManager) |
| 1534 { | 1534 { |
| 1535 visitor->trace(m_scrollableArea); | 1535 visitor->trace(m_scrollableArea); |
| 1536 visitor->trace(m_hBar); | 1536 visitor->trace(m_hBar); |
| 1537 visitor->trace(m_vBar); | 1537 visitor->trace(m_vBar); |
| 1538 } | 1538 } |
| 1539 | 1539 |
| 1540 } // namespace blink | 1540 } // namespace blink |
| OLD | NEW |