summaryrefslogtreecommitdiff
path: root/layout/xul/tree
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2021-05-03 12:26:37 +0000
committerMoonchild <moonchild@palemoon.org>2021-05-03 12:26:37 +0000
commitfc7a34ce36d66eb030094a0eb447c9ed61924e0e (patch)
tree70066c56efbbfe430472baac892e32a3bab4f04f /layout/xul/tree
parent1fef83db8258c812026d6e995d74fd2b565d7597 (diff)
downloadaura-central-fc7a34ce36d66eb030094a0eb447c9ed61924e0e.tar.gz
Issue mcp-graveyard/UXP%1751 -- Remove XP_MACOSX conditionals from /layout
Diffstat (limited to 'layout/xul/tree')
-rw-r--r--layout/xul/tree/nsTreeBodyFrame.cpp53
1 files changed, 0 insertions, 53 deletions
diff --git a/layout/xul/tree/nsTreeBodyFrame.cpp b/layout/xul/tree/nsTreeBodyFrame.cpp
index ec054a234..262884c9a 100644
--- a/layout/xul/tree/nsTreeBodyFrame.cpp
+++ b/layout/xul/tree/nsTreeBodyFrame.cpp
@@ -2613,9 +2613,7 @@ nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext,
// Save last values, we will need them.
int32_t lastDropRow = mSlots->mDropRow;
int16_t lastDropOrient = mSlots->mDropOrient;
-#ifndef XP_MACOSX
int16_t lastScrollLines = mSlots->mScrollLines;
-#endif
// Find out the current drag action
uint32_t lastDragAction = mSlots->mDragAction;
@@ -2633,9 +2631,6 @@ nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext,
mSlots->mDropAllowed = false;
InvalidateDropFeedback(lastDropRow, lastDropOrient);
}
-#ifdef XP_MACOSX
- ScrollByLines(mSlots->mScrollLines);
-#else
if (!lastScrollLines) {
// Cancel any previously initialized timer.
if (mSlots->mTimer) {
@@ -2648,7 +2643,6 @@ nsTreeBodyFrame::HandleEvent(nsPresContext* aPresContext,
LazyScrollCallback, nsITimer::TYPE_ONE_SHOT,
getter_AddRefs(mSlots->mTimer));
}
-#endif
// Bail out to prevent spring loaded timer and feedback line settings.
return NS_OK;
}
@@ -2842,53 +2836,6 @@ nsTreeBodyFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
if (!mView || !GetContent ()->GetComposedDoc()->GetWindow())
return;
-#ifdef XP_MACOSX
- nsIContent* baseElement = GetBaseElement();
- nsIFrame* treeFrame =
- baseElement ? baseElement->GetPrimaryFrame() : nullptr;
- nsCOMPtr<nsITreeSelection> selection;
- mView->GetSelection(getter_AddRefs(selection));
- nsITheme* theme = PresContext()->GetTheme();
- // On Mac, we support native theming of selected rows. On 10.10 and higher,
- // this means applying vibrancy which require us to register the theme
- // geometrics for the row. In order to make the vibrancy effect to work
- // properly, we also need the tree to be themed as a source list.
- if (selection && treeFrame && theme &&
- treeFrame->StyleDisplay()->mAppearance == NS_THEME_MAC_SOURCE_LIST) {
- // Loop through our onscreen rows. If the row is selected and a
- // -moz-appearance is provided, RegisterThemeGeometry might be necessary.
- const auto end = std::min(mRowCount, LastVisibleRow() + 1);
- for (auto i = FirstVisibleRow(); i < end; i++) {
- bool isSelected;
- selection->IsSelected(i, &isSelected);
- if (isSelected) {
- PrefillPropertyArray(i, nullptr);
- nsAutoString properties;
- mView->GetRowProperties(i, properties);
- nsTreeUtils::TokenizeProperties(properties, mScratchArray);
- nsStyleContext* rowContext =
- GetPseudoStyleContext(nsCSSAnonBoxes::moztreerow);
- auto appearance = rowContext->StyleDisplay()->mAppearance;
- if (appearance) {
- if (theme->ThemeSupportsWidget(PresContext(), this, appearance)) {
- nsITheme::ThemeGeometryType type =
- theme->ThemeGeometryTypeForWidget(this, appearance);
- if (type != nsITheme::eThemeGeometryTypeUnknown) {
- nsRect rowRect(mInnerBox.x, mInnerBox.y + mRowHeight *
- (i - FirstVisibleRow()), mInnerBox.width,
- mRowHeight);
- aBuilder->RegisterThemeGeometry(type,
- LayoutDeviceIntRect::FromUnknownRect(
- (rowRect + aBuilder->ToReferenceFrame(this)).ToNearestPixels(
- PresContext()->AppUnitsPerDevPixel())));
- }
- }
- }
- }
- }
- }
-#endif
-
aLists.Content()->AppendNewToTop(new (aBuilder)
nsDisplayTreeBody(aBuilder, this));
}