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

Unified Diff: third_party/WebKit/Source/core/frame/FrameView.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/frame/FrameView.cpp
diff --git a/third_party/WebKit/Source/core/frame/FrameView.cpp b/third_party/WebKit/Source/core/frame/FrameView.cpp
index 8e3966173f04510d92f6e7aa796d111483da55b4..65e7c353b3bca26d0161e65d692e8844554cd8d1 100644
--- a/third_party/WebKit/Source/core/frame/FrameView.cpp
+++ b/third_party/WebKit/Source/core/frame/FrameView.cpp
@@ -96,6 +96,7 @@
#include "platform/graphics/paint/PaintController.h"
#include "platform/scheduler/CancellableTaskFactory.h"
#include "platform/scroll/ScrollAnimatorBase.h"
+#include "platform/scroll/ScrollbarTheme.h"
#include "platform/text/TextStream.h"
#include "public/platform/WebDisplayItemList.h"
#include "public/platform/WebFrameScheduler.h"
@@ -509,7 +510,7 @@ PassRefPtrWillBeRawPtr<Scrollbar> FrameView::createScrollbar(ScrollbarOrientatio
return LayoutScrollbar::createCustomScrollbar(this, orientation, customScrollbarElement, customScrollbarFrame);
// Nobody set a custom style, so we just use a native scrollbar.
- return Scrollbar::create(this, orientation, RegularScrollbar);
+ return Scrollbar::create(this, orientation, RegularScrollbar, &frame().page()->chromeClient());
}
void FrameView::setContentsSize(const IntSize& size)
@@ -3233,12 +3234,13 @@ void FrameView::computeScrollbarExistence(bool& newHasHorizontalScrollbar, bool&
void FrameView::updateScrollbarGeometry()
{
if (m_horizontalScrollbar) {
+ int thickness = m_horizontalScrollbar->scrollbarThickness();
int clientWidth = visibleWidth();
IntRect oldRect(m_horizontalScrollbar->frameRect());
IntRect hBarRect((shouldPlaceVerticalScrollbarOnLeft() && m_verticalScrollbar) ? m_verticalScrollbar->width() : 0,
- height() - m_horizontalScrollbar->height(),
+ height() - thickness,
width() - (m_verticalScrollbar ? m_verticalScrollbar->width() : 0),
- m_horizontalScrollbar->height());
+ thickness);
m_horizontalScrollbar->setFrameRect(adjustScrollbarRectForResizer(hBarRect, *m_horizontalScrollbar));
if (oldRect != m_horizontalScrollbar->frameRect())
setScrollbarNeedsPaintInvalidation(HorizontalScrollbar);
@@ -3249,11 +3251,12 @@ void FrameView::updateScrollbarGeometry()
}
if (m_verticalScrollbar) {
+ int thickness = m_verticalScrollbar->scrollbarThickness();
int clientHeight = visibleHeight();
IntRect oldRect(m_verticalScrollbar->frameRect());
- IntRect vBarRect(shouldPlaceVerticalScrollbarOnLeft() ? 0 : (width() - m_verticalScrollbar->width()),
+ IntRect vBarRect(shouldPlaceVerticalScrollbarOnLeft() ? 0 : (width() - thickness),
0,
- m_verticalScrollbar->width(),
+ thickness,
height() - (m_horizontalScrollbar ? m_horizontalScrollbar->height() : 0));
m_verticalScrollbar->setFrameRect(adjustScrollbarRectForResizer(vBarRect, *m_verticalScrollbar));
if (oldRect != m_verticalScrollbar->frameRect())

Powered by Google App Engine
This is Rietveld 408576698