mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
4bfe3c39fd
Backed out changeset e2ab653f688a (bug 1008917) Backed out changeset b52154d8d900 (bug 1008917) Backed out changeset 2ab5b01da4de (bug 1008917) Backed out changeset f7a38df1d44f (bug 1008917) Backed out changeset 80304bb9a572 (bug 1008917) Backed out changeset 10ed89a302e9 (bug 1008917) Backed out changeset 161c41991d46 (bug 1008917) Backed out changeset 25b2475d2368 (bug 1008917) Backed out changeset b8000b31277c (bug 1008917) Backed out changeset 9afa5e7715e1 (bug 1008917) Backed out changeset 5c380c21351f (bug 1008917)
91 lines
3.1 KiB
C++
91 lines
3.1 KiB
C++
/* -*- 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/. */
|
|
|
|
//
|
|
// nsScrollbarFrame
|
|
//
|
|
|
|
#ifndef nsScrollbarFrame_h__
|
|
#define nsScrollbarFrame_h__
|
|
|
|
#include "mozilla/Attributes.h"
|
|
#include "nsBoxFrame.h"
|
|
|
|
class nsIScrollbarMediator;
|
|
|
|
nsIFrame* NS_NewScrollbarFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
|
|
|
class nsScrollbarFrame : public nsBoxFrame
|
|
{
|
|
public:
|
|
nsScrollbarFrame(nsIPresShell* aShell, nsStyleContext* aContext):
|
|
nsBoxFrame(aShell, aContext), mScrollbarMediator(nullptr) {}
|
|
|
|
NS_DECL_QUERYFRAME_TARGET(nsScrollbarFrame)
|
|
|
|
#ifdef DEBUG_FRAME_DUMP
|
|
virtual nsresult GetFrameName(nsAString& aResult) const MOZ_OVERRIDE {
|
|
return MakeFrameName(NS_LITERAL_STRING("ScrollbarFrame"), aResult);
|
|
}
|
|
#endif
|
|
|
|
// nsIFrame overrides
|
|
virtual nsresult AttributeChanged(int32_t aNameSpaceID,
|
|
nsIAtom* aAttribute,
|
|
int32_t aModType) MOZ_OVERRIDE;
|
|
|
|
NS_DECL_QUERYFRAME
|
|
NS_DECL_FRAMEARENA_HELPERS
|
|
|
|
NS_IMETHOD HandlePress(nsPresContext* aPresContext,
|
|
mozilla::WidgetGUIEvent* aEvent,
|
|
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
|
|
|
|
NS_IMETHOD HandleMultiplePress(nsPresContext* aPresContext,
|
|
mozilla::WidgetGUIEvent* aEvent,
|
|
nsEventStatus* aEventStatus,
|
|
bool aControlHeld) MOZ_OVERRIDE;
|
|
|
|
NS_IMETHOD HandleDrag(nsPresContext* aPresContext,
|
|
mozilla::WidgetGUIEvent* aEvent,
|
|
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
|
|
|
|
NS_IMETHOD HandleRelease(nsPresContext* aPresContext,
|
|
mozilla::WidgetGUIEvent* aEvent,
|
|
nsEventStatus* aEventStatus) MOZ_OVERRIDE;
|
|
|
|
virtual void Init(nsIContent* aContent,
|
|
nsIFrame* aParent,
|
|
nsIFrame* aPrevInFlow) MOZ_OVERRIDE;
|
|
|
|
virtual nsresult Reflow(nsPresContext* aPresContext,
|
|
nsHTMLReflowMetrics& aDesiredSize,
|
|
const nsHTMLReflowState& aReflowState,
|
|
nsReflowStatus& aStatus) MOZ_OVERRIDE;
|
|
|
|
virtual nsIAtom* GetType() const MOZ_OVERRIDE;
|
|
|
|
void SetScrollbarMediatorContent(nsIContent* aMediator);
|
|
nsIScrollbarMediator* GetScrollbarMediator();
|
|
|
|
// nsBox methods
|
|
|
|
/**
|
|
* Treat scrollbars as clipping their children; overflowing children
|
|
* will not be allowed to set an overflow rect on this
|
|
* frame. This means that when the scroll code decides to hide a
|
|
* scrollframe by setting its height or width to zero, that will
|
|
* hide the children too.
|
|
*/
|
|
virtual bool DoesClipChildren() MOZ_OVERRIDE { return true; }
|
|
|
|
virtual nsresult GetMargin(nsMargin& aMargin) MOZ_OVERRIDE;
|
|
|
|
private:
|
|
nsCOMPtr<nsIContent> mScrollbarMediator;
|
|
}; // class nsScrollbarFrame
|
|
|
|
#endif
|