Backed out 2 changesets (bug 1899345) for causing android build bustages in ScrollContainerFrame.cpp. CLOSED TREE

Backed out changeset ccb2ccbef46e (bug 1899345)
Backed out changeset 6f66d112b450 (bug 1899345)
This commit is contained in:
Stanca Serban
2024-05-29 03:49:38 +03:00
parent 114165a306
commit 60109eeb45
9 changed files with 74 additions and 60 deletions

View File

@@ -5343,18 +5343,19 @@ ScrollContainerFrame::LoadingState ScrollContainerFrame::GetPageLoadingState() {
: LoadingState::Loading;
}
PhysicalAxes ScrollContainerFrame::GetOverflowAxes() const {
ScrollContainerFrame::OverflowState ScrollContainerFrame::GetOverflowState()
const {
nsSize scrollportSize = mScrollPort.Size();
nsSize childSize = GetScrolledRect().Size();
PhysicalAxes result;
OverflowState result = OverflowState::None;
if (childSize.height > scrollportSize.height) {
result += PhysicalAxis::Vertical;
result |= OverflowState::Vertical;
}
if (childSize.width > scrollportSize.width) {
result += PhysicalAxis::Horizontal;
result |= OverflowState::Horizontal;
}
return result;
@@ -5369,12 +5370,12 @@ nsresult ScrollContainerFrame::FireScrollPortEvent() {
//
// Should we remove this?
PhysicalAxes overflowAxes = GetOverflowAxes();
OverflowState overflowState = GetOverflowState();
bool newVerticalOverflow = overflowAxes.contains(PhysicalAxis::Vertical);
bool newVerticalOverflow = !!(overflowState & OverflowState::Vertical);
bool vertChanged = mVerticalOverflow != newVerticalOverflow;
bool newHorizontalOverflow = overflowAxes.contains(PhysicalAxis::Horizontal);
bool newHorizontalOverflow = !!(overflowState & OverflowState::Horizontal);
bool horizChanged = mHorizontalOverflow != newHorizontalOverflow;
if (!vertChanged && !horizChanged) {
@@ -5981,12 +5982,12 @@ void ScrollContainerFrame::PostOverflowEvent() {
return;
}
PhysicalAxes overflowAxes = GetOverflowAxes();
OverflowState overflowState = GetOverflowState();
bool newVerticalOverflow = overflowAxes.contains(PhysicalAxis::Vertical);
bool newVerticalOverflow = !!(overflowState & OverflowState::Vertical);
bool vertChanged = mVerticalOverflow != newVerticalOverflow;
bool newHorizontalOverflow = overflowAxes.contains(PhysicalAxis::Horizontal);
bool newHorizontalOverflow = !!(overflowState & OverflowState::Horizontal);
bool horizChanged = mHorizontalOverflow != newHorizontalOverflow;
if (!vertChanged && !horizChanged) {