Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(236)

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintLayerScrollableArea.cpp

Issue 1560403002: Scale scrollbar in use-zoom-for-dsf mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698