WebKit Bugzilla
Attachment 359157 Details for
Bug 193442
: Remove unused fields from Scrollbar
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
scrollbar-alphalocked-remove-5.patch (text/plain), 7.10 KB, created by
Antti Koivisto
on 2019-01-15 06:16:39 PST
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Antti Koivisto
Created:
2019-01-15 06:16:39 PST
Size:
7.10 KB
patch
obsolete
>Index: Source/WebCore/ChangeLog >=================================================================== >--- Source/WebCore/ChangeLog (revision 239982) >+++ Source/WebCore/ChangeLog (working copy) >@@ -1,3 +1,25 @@ >+2019-01-15 Antti Koivisto <antti@apple.com> >+ >+ Remove unused fields from Scrollbar >+ https://bugs.webkit.org/show_bug.cgi?id=193442 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * platform/Scrollbar.cpp: >+ (WebCore::Scrollbar::Scrollbar): >+ * platform/Scrollbar.h: >+ (WebCore::Scrollbar::isCustomScrollbar const): >+ >+ Make virtual so it doesn't need a bit. >+ >+ (WebCore::Scrollbar::isAlphaLocked const): Deleted. >+ (WebCore::Scrollbar::setIsAlphaLocked): Deleted. >+ * platform/mac/ScrollAnimatorMac.mm: >+ (WebCore::ScrollAnimatorMac::shouldScrollbarParticipateInHitTesting): >+ * rendering/RenderScrollbar.cpp: >+ (WebCore::RenderScrollbar::RenderScrollbar): >+ * rendering/RenderScrollbar.h: >+ > 2019-01-11 Antoine Quint <graouts@apple.com> > > Support parsing of additional values for the touch-action property >Index: Source/WebCore/platform/Scrollbar.cpp >=================================================================== >--- Source/WebCore/platform/Scrollbar.cpp (revision 239980) >+++ Source/WebCore/platform/Scrollbar.cpp (working copy) >@@ -54,29 +54,12 @@ int Scrollbar::maxOverlapBetweenPages() > return maxOverlapBetweenPages; > } > >-Scrollbar::Scrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize, ScrollbarTheme* customTheme, bool isCustomScrollbar) >+Scrollbar::Scrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, ScrollbarControlSize controlSize, ScrollbarTheme* customTheme) > : m_scrollableArea(scrollableArea) > , m_orientation(orientation) > , m_controlSize(controlSize) > , m_theme(customTheme ? *customTheme : ScrollbarTheme::theme()) >- , m_visibleSize(0) >- , m_totalSize(0) >- , m_currentPos(0) >- , m_dragOrigin(0) >- , m_lineStep(0) >- , m_pageStep(0) >- , m_pixelStep(1) >- , m_hoveredPart(NoPart) >- , m_pressedPart(NoPart) >- , m_pressedPos(0) >- , m_scrollPos(0) >- , m_draggingDocument(false) >- , m_documentDragPos(0) >- , m_enabled(true) > , m_scrollTimer(*this, &Scrollbar::autoscrollTimerFired) >- , m_suppressInvalidation(false) >- , m_isAlphaLocked(false) >- , m_isCustomScrollbar(isCustomScrollbar) > { > theme().registerScrollbar(*this); > >Index: Source/WebCore/platform/Scrollbar.h >=================================================================== >--- Source/WebCore/platform/Scrollbar.h (revision 239980) >+++ Source/WebCore/platform/Scrollbar.h (working copy) >@@ -56,7 +56,7 @@ public: > > ScrollableArea& scrollableArea() const { return m_scrollableArea; } > >- bool isCustomScrollbar() const { return m_isCustomScrollbar; } >+ virtual bool isCustomScrollbar() const { return false; } > ScrollbarOrientation orientation() const { return m_orientation; } > > int value() const { return lroundf(m_currentPos); } >@@ -124,16 +124,15 @@ public: > > void moveThumb(int pos, bool draggingDocument = false); > >- bool isAlphaLocked() const { return m_isAlphaLocked; } >- void setIsAlphaLocked(bool flag) { m_isAlphaLocked = flag; } >- >+#if !PLATFORM(COCOA) > float opacity() const { return m_opacity; } > void setOpacity(float opacity) { m_opacity = opacity; } >+#endif > > bool supportsUpdateOnSecondaryThread() const; > > protected: >- Scrollbar(ScrollableArea&, ScrollbarOrientation, ScrollbarControlSize, ScrollbarTheme* = 0, bool isCustomScrollbar = false); >+ Scrollbar(ScrollableArea&, ScrollbarOrientation, ScrollbarControlSize, ScrollbarTheme* = nullptr); > > void updateThumb(); > virtual void updateThumbPosition(); >@@ -151,32 +150,29 @@ protected: > ScrollbarControlSize m_controlSize; > ScrollbarTheme& m_theme; > >- int m_visibleSize; >- int m_totalSize; >- float m_currentPos; >- float m_dragOrigin; >- int m_lineStep; >- int m_pageStep; >- float m_pixelStep; >- >- ScrollbarPart m_hoveredPart; >- ScrollbarPart m_pressedPart; >- int m_pressedPos; >- float m_scrollPos; >- bool m_draggingDocument; >- int m_documentDragPos; >+ int m_visibleSize { 0 }; >+ int m_totalSize { 0 }; >+ float m_currentPos { 0 }; >+ float m_dragOrigin { 0 }; >+ int m_lineStep { 0 }; >+ int m_pageStep { 0 }; >+ float m_pixelStep { 1 }; >+ >+ ScrollbarPart m_hoveredPart { NoPart }; >+ ScrollbarPart m_pressedPart { NoPart }; >+ int m_pressedPos { 0 }; >+ bool m_draggingDocument { false }; >+ int m_documentDragPos { 0 }; > >- bool m_enabled; >+ bool m_enabled { true }; > > Timer m_scrollTimer; > >- bool m_suppressInvalidation; >- >- bool m_isAlphaLocked; >- >- bool m_isCustomScrollbar; >+ bool m_suppressInvalidation { false }; > >+#if !PLATFORM(COCOA) > float m_opacity { 1 }; >+#endif > > private: > bool isScrollbar() const override { return true; } >Index: Source/WebCore/platform/mac/ScrollAnimatorMac.mm >=================================================================== >--- Source/WebCore/platform/mac/ScrollAnimatorMac.mm (revision 239980) >+++ Source/WebCore/platform/mac/ScrollAnimatorMac.mm (working copy) >@@ -1125,9 +1125,6 @@ bool ScrollAnimatorMac::shouldScrollbarP > if (ScrollerStyle::recommendedScrollerStyle() != NSScrollerStyleOverlay) > return true; > >- if (scrollbar->isAlphaLocked()) >- return true; >- > // Overlay scrollbars should participate in hit testing whenever they are at all visible. > NSScrollerImp *painter = scrollerImpForScrollbar(*scrollbar); > if (!painter) >Index: Source/WebCore/rendering/RenderScrollbar.cpp >=================================================================== >--- Source/WebCore/rendering/RenderScrollbar.cpp (revision 239980) >+++ Source/WebCore/rendering/RenderScrollbar.cpp (working copy) >@@ -42,7 +42,7 @@ Ref<Scrollbar> RenderScrollbar::createCu > } > > RenderScrollbar::RenderScrollbar(ScrollableArea& scrollableArea, ScrollbarOrientation orientation, Element* ownerElement, Frame* owningFrame) >- : Scrollbar(scrollableArea, orientation, RegularScrollbar, RenderScrollbarTheme::renderScrollbarTheme(), true) >+ : Scrollbar(scrollableArea, orientation, RegularScrollbar, RenderScrollbarTheme::renderScrollbarTheme()) > , m_ownerElement(ownerElement) > , m_owningFrame(owningFrame) > { >Index: Source/WebCore/rendering/RenderScrollbar.h >=================================================================== >--- Source/WebCore/rendering/RenderScrollbar.h (revision 239980) >+++ Source/WebCore/rendering/RenderScrollbar.h (working copy) >@@ -54,8 +54,6 @@ public: > > int minimumThumbLength(); > >- bool isOverlayScrollbar() const override { return false; } >- > float opacity(); > > std::unique_ptr<RenderStyle> getScrollbarPseudoStyle(ScrollbarPart, PseudoId); >@@ -63,6 +61,9 @@ public: > private: > RenderScrollbar(ScrollableArea&, ScrollbarOrientation, Element*, Frame*); > >+ bool isCustomScrollbar() const override { return true; } >+ bool isOverlayScrollbar() const override { return false; } >+ > void setParent(ScrollView*) override; > void setEnabled(bool) override; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193442
:
359155
| 359157