mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-07 16:28:38 +09:00
Issue #1705 - Part 3: Rename ScrollbarStyles to ScrollStyles.
ScrollbarStyles contains values of overflow, (over)scroll-behavior, etc. The only one which is marginally related to scroll _bars_ is overflow, which can be used to hide scrollbar (by making an element not scrollable) or enforce the scrollbar to display. It makes more sense to be called ScrollStyles as it's mainly concerning behavior of scrolling, not scrollbars. Also, with the addition of scrollbar width properties, the current name can be confusing.
This commit is contained in:
parent
3765010635
commit
21f707390d
26 changed files with 111 additions and 111 deletions
32
layout/base/ScrollStyles.cpp
Normal file
32
layout/base/ScrollStyles.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "ScrollStyles.h"
|
||||
#include "nsStyleStruct.h" // for nsStyleDisplay and nsStyleBackground::Position
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
ScrollStyles::ScrollStyles(uint8_t aH, uint8_t aV,
|
||||
const nsStyleDisplay* aDisplay)
|
||||
: mHorizontal(aH), mVertical(aV),
|
||||
mScrollBehavior(aDisplay->mScrollBehavior),
|
||||
mScrollSnapTypeX(aDisplay->mScrollSnapTypeX),
|
||||
mScrollSnapTypeY(aDisplay->mScrollSnapTypeY),
|
||||
mScrollSnapPointsX(aDisplay->mScrollSnapPointsX),
|
||||
mScrollSnapPointsY(aDisplay->mScrollSnapPointsY),
|
||||
mScrollSnapDestinationX(aDisplay->mScrollSnapDestination.mXPosition),
|
||||
mScrollSnapDestinationY(aDisplay->mScrollSnapDestination.mYPosition) {}
|
||||
|
||||
ScrollStyles::ScrollStyles(const nsStyleDisplay* aDisplay)
|
||||
: mHorizontal(aDisplay->mOverflowX), mVertical(aDisplay->mOverflowY),
|
||||
mScrollBehavior(aDisplay->mScrollBehavior),
|
||||
mScrollSnapTypeX(aDisplay->mScrollSnapTypeX),
|
||||
mScrollSnapTypeY(aDisplay->mScrollSnapTypeY),
|
||||
mScrollSnapPointsX(aDisplay->mScrollSnapPointsX),
|
||||
mScrollSnapPointsY(aDisplay->mScrollSnapPointsY),
|
||||
mScrollSnapDestinationX(aDisplay->mScrollSnapDestination.mXPosition),
|
||||
mScrollSnapDestinationY(aDisplay->mScrollSnapDestination.mYPosition) {}
|
||||
|
||||
} // namespace mozilla
|
||||
Loading…
Add table
Add a link
Reference in a new issue