mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Land bug 72747 in pieces: remove nsIScrollableFrame::GetScrollPreference. b=72747 r+sr=roc
This commit is contained in:
parent
c7058a9684
commit
77d25b92c6
@ -95,13 +95,6 @@ public:
|
||||
*/
|
||||
virtual nsMargin GetDesiredScrollbarSizes(nsBoxLayoutState* aState) = 0;
|
||||
|
||||
/**
|
||||
* Query whether scroll bars should be displayed all the time, never or
|
||||
* only when necessary.
|
||||
* @return current scrollbar selection
|
||||
*/
|
||||
NS_IMETHOD GetScrollPreference(nsPresContext* aPresContext, nsScrollPref* aScrollPreference) const = 0;
|
||||
|
||||
/**
|
||||
* Get the position of the scrolled view.
|
||||
*/
|
||||
|
@ -130,20 +130,6 @@ nsHTMLScrollFrame::ScrollTo(nsPresContext* aContext, nscoord aX, nscoord aY, PRU
|
||||
return s->ScrollTo(aX, aY, aFlags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether scroll bars should be displayed all the time, never or
|
||||
* only when necessary.
|
||||
* @return current scrollbar selection
|
||||
* XXX roc only 'Auto' is really tested for. This API should be simplified or
|
||||
* eliminated.
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsHTMLScrollFrame::GetScrollPreference(nsPresContext* aPresContext, nsScrollPref* aScrollPreference) const
|
||||
{
|
||||
*aScrollPreference = mInner.GetScrollPreference();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsGfxScrollFrameInner::ScrollbarStyles
|
||||
nsHTMLScrollFrame::GetScrollbarStyles() const {
|
||||
return mInner.GetScrollbarStylesFromFrame();
|
||||
@ -688,20 +674,6 @@ nsXULScrollFrame::ScrollTo(nsPresContext* aContext, nscoord aX, nscoord aY, PRUi
|
||||
return s->ScrollTo(aX, aY, aFlags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether scroll bars should be displayed all the time, never or
|
||||
* only when necessary.
|
||||
* @return current scrollbar selection
|
||||
* XXX roc only 'Auto' is really tested for. This API should be simplified or
|
||||
* eliminated.
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsXULScrollFrame::GetScrollPreference(nsPresContext* aPresContext, nsScrollPref* aScrollPreference) const
|
||||
{
|
||||
*aScrollPreference = mInner.GetScrollPreference();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsGfxScrollFrameInner::ScrollbarStyles
|
||||
nsXULScrollFrame::GetScrollbarStyles() const {
|
||||
return mInner.GetScrollbarStylesFromFrame();
|
||||
@ -1245,28 +1217,6 @@ nsGfxScrollFrameInner::GetScrollbarStylesFromFrame() const
|
||||
}
|
||||
}
|
||||
|
||||
nsIScrollableFrame::nsScrollPref
|
||||
nsGfxScrollFrameInner::GetScrollPreference() const
|
||||
{
|
||||
nsCOMPtr<nsIScrollableFrame> scrollable =
|
||||
do_QueryInterface(NS_STATIC_CAST(nsIFrame*, mOuter));
|
||||
ScrollbarStyles styles = scrollable->GetScrollbarStyles();
|
||||
|
||||
if (styles.mHorizontal == NS_STYLE_OVERFLOW_SCROLL &&
|
||||
styles.mVertical == NS_STYLE_OVERFLOW_SCROLL) {
|
||||
return nsIScrollableFrame::AlwaysScroll;
|
||||
} else if (styles.mHorizontal == NS_STYLE_OVERFLOW_SCROLL) {
|
||||
return nsIScrollableFrame::AlwaysScrollHorizontal;
|
||||
} else if (styles.mVertical == NS_STYLE_OVERFLOW_SCROLL) {
|
||||
return nsIScrollableFrame::AlwaysScrollVertical;
|
||||
} else if (styles.mHorizontal == NS_STYLE_OVERFLOW_AUTO ||
|
||||
styles.mVertical == NS_STYLE_OVERFLOW_AUTO) {
|
||||
return nsIScrollableFrame::Auto;
|
||||
} else {
|
||||
return nsIScrollableFrame::NeverScroll;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsGfxScrollFrameInner::ScrollToRestoredPosition()
|
||||
{
|
||||
|
@ -63,8 +63,6 @@ public:
|
||||
typedef nsIScrollableFrame::ScrollbarStyles ScrollbarStyles;
|
||||
ScrollbarStyles GetScrollbarStylesFromFrame() const;
|
||||
|
||||
nsIScrollableFrame::nsScrollPref GetScrollPreference() const;
|
||||
|
||||
// If a child frame was added or removed on the scrollframe,
|
||||
// reload our child frame list.
|
||||
// We need this if a scrollbar frame is recreated.
|
||||
@ -256,8 +254,6 @@ public:
|
||||
nsIContent* aChild,
|
||||
PRInt32 aModType);
|
||||
|
||||
NS_IMETHOD GetScrollPreference(nsPresContext* aPresContext, nsScrollPref* aScrollPreference) const;
|
||||
|
||||
virtual void ScrollToRestoredPosition() {
|
||||
mInner.ScrollToRestoredPosition();
|
||||
}
|
||||
@ -391,8 +387,6 @@ public:
|
||||
nsIContent* aChild,
|
||||
PRInt32 aModType);
|
||||
|
||||
NS_IMETHOD GetScrollPreference(nsPresContext* aPresContext, nsScrollPref* aScrollPreference) const;
|
||||
|
||||
virtual void ScrollToRestoredPosition() {
|
||||
mInner.ScrollToRestoredPosition();
|
||||
}
|
||||
|
@ -95,13 +95,6 @@ public:
|
||||
*/
|
||||
virtual nsMargin GetDesiredScrollbarSizes(nsBoxLayoutState* aState) = 0;
|
||||
|
||||
/**
|
||||
* Query whether scroll bars should be displayed all the time, never or
|
||||
* only when necessary.
|
||||
* @return current scrollbar selection
|
||||
*/
|
||||
NS_IMETHOD GetScrollPreference(nsPresContext* aPresContext, nsScrollPref* aScrollPreference) const = 0;
|
||||
|
||||
/**
|
||||
* Get the position of the scrolled view.
|
||||
*/
|
||||
|
@ -130,20 +130,6 @@ nsHTMLScrollFrame::ScrollTo(nsPresContext* aContext, nscoord aX, nscoord aY, PRU
|
||||
return s->ScrollTo(aX, aY, aFlags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether scroll bars should be displayed all the time, never or
|
||||
* only when necessary.
|
||||
* @return current scrollbar selection
|
||||
* XXX roc only 'Auto' is really tested for. This API should be simplified or
|
||||
* eliminated.
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsHTMLScrollFrame::GetScrollPreference(nsPresContext* aPresContext, nsScrollPref* aScrollPreference) const
|
||||
{
|
||||
*aScrollPreference = mInner.GetScrollPreference();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsGfxScrollFrameInner::ScrollbarStyles
|
||||
nsHTMLScrollFrame::GetScrollbarStyles() const {
|
||||
return mInner.GetScrollbarStylesFromFrame();
|
||||
@ -688,20 +674,6 @@ nsXULScrollFrame::ScrollTo(nsPresContext* aContext, nscoord aX, nscoord aY, PRUi
|
||||
return s->ScrollTo(aX, aY, aFlags);
|
||||
}
|
||||
|
||||
/**
|
||||
* Query whether scroll bars should be displayed all the time, never or
|
||||
* only when necessary.
|
||||
* @return current scrollbar selection
|
||||
* XXX roc only 'Auto' is really tested for. This API should be simplified or
|
||||
* eliminated.
|
||||
*/
|
||||
NS_IMETHODIMP
|
||||
nsXULScrollFrame::GetScrollPreference(nsPresContext* aPresContext, nsScrollPref* aScrollPreference) const
|
||||
{
|
||||
*aScrollPreference = mInner.GetScrollPreference();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsGfxScrollFrameInner::ScrollbarStyles
|
||||
nsXULScrollFrame::GetScrollbarStyles() const {
|
||||
return mInner.GetScrollbarStylesFromFrame();
|
||||
@ -1245,28 +1217,6 @@ nsGfxScrollFrameInner::GetScrollbarStylesFromFrame() const
|
||||
}
|
||||
}
|
||||
|
||||
nsIScrollableFrame::nsScrollPref
|
||||
nsGfxScrollFrameInner::GetScrollPreference() const
|
||||
{
|
||||
nsCOMPtr<nsIScrollableFrame> scrollable =
|
||||
do_QueryInterface(NS_STATIC_CAST(nsIFrame*, mOuter));
|
||||
ScrollbarStyles styles = scrollable->GetScrollbarStyles();
|
||||
|
||||
if (styles.mHorizontal == NS_STYLE_OVERFLOW_SCROLL &&
|
||||
styles.mVertical == NS_STYLE_OVERFLOW_SCROLL) {
|
||||
return nsIScrollableFrame::AlwaysScroll;
|
||||
} else if (styles.mHorizontal == NS_STYLE_OVERFLOW_SCROLL) {
|
||||
return nsIScrollableFrame::AlwaysScrollHorizontal;
|
||||
} else if (styles.mVertical == NS_STYLE_OVERFLOW_SCROLL) {
|
||||
return nsIScrollableFrame::AlwaysScrollVertical;
|
||||
} else if (styles.mHorizontal == NS_STYLE_OVERFLOW_AUTO ||
|
||||
styles.mVertical == NS_STYLE_OVERFLOW_AUTO) {
|
||||
return nsIScrollableFrame::Auto;
|
||||
} else {
|
||||
return nsIScrollableFrame::NeverScroll;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
nsGfxScrollFrameInner::ScrollToRestoredPosition()
|
||||
{
|
||||
|
@ -63,8 +63,6 @@ public:
|
||||
typedef nsIScrollableFrame::ScrollbarStyles ScrollbarStyles;
|
||||
ScrollbarStyles GetScrollbarStylesFromFrame() const;
|
||||
|
||||
nsIScrollableFrame::nsScrollPref GetScrollPreference() const;
|
||||
|
||||
// If a child frame was added or removed on the scrollframe,
|
||||
// reload our child frame list.
|
||||
// We need this if a scrollbar frame is recreated.
|
||||
@ -256,8 +254,6 @@ public:
|
||||
nsIContent* aChild,
|
||||
PRInt32 aModType);
|
||||
|
||||
NS_IMETHOD GetScrollPreference(nsPresContext* aPresContext, nsScrollPref* aScrollPreference) const;
|
||||
|
||||
virtual void ScrollToRestoredPosition() {
|
||||
mInner.ScrollToRestoredPosition();
|
||||
}
|
||||
@ -391,8 +387,6 @@ public:
|
||||
nsIContent* aChild,
|
||||
PRInt32 aModType);
|
||||
|
||||
NS_IMETHOD GetScrollPreference(nsPresContext* aPresContext, nsScrollPref* aScrollPreference) const;
|
||||
|
||||
virtual void ScrollToRestoredPosition() {
|
||||
mInner.ScrollToRestoredPosition();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user