forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix scrollbar buttons at hidpi when enable-use-zoom-for-dsf is on.
Previously on Windows the scrollbar buttons were always sized at 1x and would leave ugly black space between them at the edge of the window. BUG=612874 TEST=Scrollbar buttons on Windows should look right at 1.5x and 2x device scales with the #enable-use-zoom-for-dsf flag on. Review-Url: https://codereview.chromium.org/1911973002 Cr-Commit-Position: refs/heads/master@{#394893}
- Loading branch information
1 parent
3ad270d
commit 6e7c308
Showing
18 changed files
with
815 additions
and
195 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file modified
BIN
-10 Bytes
(100%)
...sts/platform/win/transforms/3d/point-mapping/3d-point-mapping-deep-expected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
106 changes: 106 additions & 0 deletions
106
third_party/WebKit/Source/platform/scroll/ScrollbarTestSuite.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
// Copyright 2016 The Chromium Authors. All rights reserved. | ||
// Use of this source code is governed by a BSD-style license that can be | ||
// found in the LICENSE file. | ||
|
||
#ifndef ScrollbarTestSuite_h | ||
#define ScrollbarTestSuite_h | ||
|
||
#include "platform/heap/GarbageCollected.h" | ||
#include "platform/scroll/ScrollableArea.h" | ||
#include "platform/scroll/Scrollbar.h" | ||
#include "platform/scroll/ScrollbarThemeMock.h" | ||
#include "platform/testing/TestingPlatformSupport.h" | ||
#include "testing/gmock/include/gmock/gmock.h" | ||
|
||
namespace blink { | ||
|
||
class MockScrollableArea : public GarbageCollectedFinalized<MockScrollableArea>, public ScrollableArea { | ||
USING_GARBAGE_COLLECTED_MIXIN(MockScrollableArea); | ||
|
||
public: | ||
static MockScrollableArea* create() | ||
{ | ||
return new MockScrollableArea(); | ||
} | ||
|
||
static MockScrollableArea* create(const IntPoint& maximumScrollPosition) | ||
{ | ||
MockScrollableArea* mock = create(); | ||
mock->setMaximumScrollPosition(maximumScrollPosition); | ||
return mock; | ||
} | ||
|
||
MOCK_CONST_METHOD0(visualRectForScrollbarParts, LayoutRect()); | ||
MOCK_CONST_METHOD0(isActive, bool()); | ||
MOCK_CONST_METHOD1(scrollSize, int(ScrollbarOrientation)); | ||
MOCK_CONST_METHOD0(isScrollCornerVisible, bool()); | ||
MOCK_CONST_METHOD0(scrollCornerRect, IntRect()); | ||
MOCK_CONST_METHOD0(horizontalScrollbar, Scrollbar*()); | ||
MOCK_CONST_METHOD0(verticalScrollbar, Scrollbar*()); | ||
MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); | ||
MOCK_CONST_METHOD1(visibleContentRect, IntRect(IncludeScrollbarsInRect)); | ||
MOCK_CONST_METHOD0(contentsSize, IntSize()); | ||
MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); | ||
MOCK_CONST_METHOD0(layerForHorizontalScrollbar, GraphicsLayer*()); | ||
MOCK_CONST_METHOD0(layerForVerticalScrollbar, GraphicsLayer*()); | ||
|
||
bool userInputScrollable(ScrollbarOrientation) const override { return true; } | ||
bool scrollbarsCanBeActive() const override { return true; } | ||
bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; } | ||
void setScrollOffset(const DoublePoint& offset, ScrollType) override { m_scrollPosition = flooredIntPoint(offset).shrunkTo(m_maximumScrollPosition); } | ||
IntPoint scrollPosition() const override { return m_scrollPosition; } | ||
IntPoint minimumScrollPosition() const override { return IntPoint(); } | ||
IntPoint maximumScrollPosition() const override { return m_maximumScrollPosition; } | ||
int visibleHeight() const override { return 768; } | ||
int visibleWidth() const override { return 1024; } | ||
bool scrollAnimatorEnabled() const override { return false; } | ||
int pageStep(ScrollbarOrientation) const override { return 0; } | ||
void scrollControlWasSetNeedsPaintInvalidation() {} | ||
|
||
using ScrollableArea::horizontalScrollbarNeedsPaintInvalidation; | ||
using ScrollableArea::verticalScrollbarNeedsPaintInvalidation; | ||
using ScrollableArea::clearNeedsPaintInvalidationForScrollControls; | ||
|
||
DEFINE_INLINE_VIRTUAL_TRACE() | ||
{ | ||
ScrollableArea::trace(visitor); | ||
} | ||
|
||
private: | ||
void setMaximumScrollPosition(const IntPoint& maximumScrollPosition) | ||
{ | ||
m_maximumScrollPosition = maximumScrollPosition; | ||
} | ||
|
||
explicit MockScrollableArea() | ||
: m_maximumScrollPosition(IntPoint(0, 100)) | ||
{ | ||
} | ||
|
||
IntPoint m_scrollPosition; | ||
IntPoint m_maximumScrollPosition; | ||
}; | ||
|
||
class ScrollbarTestSuite : public testing::Test { | ||
public: | ||
ScrollbarTestSuite() {} | ||
|
||
void SetUp() override | ||
{ | ||
TestingPlatformSupport::Config config; | ||
config.compositorSupport = Platform::current()->compositorSupport(); | ||
m_fakePlatform = adoptPtr(new TestingPlatformSupportWithMockScheduler(config)); | ||
} | ||
|
||
void TearDown() override | ||
{ | ||
m_fakePlatform = nullptr; | ||
} | ||
|
||
private: | ||
OwnPtr<TestingPlatformSupportWithMockScheduler> m_fakePlatform; | ||
}; | ||
|
||
} // namespace blink | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.