mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 1667594 - Avoid including nsLayoutUtils.h in nsIFrame.h. r=emilio
The only thing in nsIFrame.h that was using it was the implementation of a templated method, which could be moved to nsIFrameInlines.h. Depends on D91504 Differential Revision: https://phabricator.services.mozilla.com/D91505
This commit is contained in:
parent
1976364433
commit
4e4819d795
@ -19,6 +19,7 @@
|
||||
#include "nsIInterfaceRequestorUtils.h"
|
||||
#include "nsIDocShell.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "prtime.h"
|
||||
|
||||
namespace mozilla {
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "mozilla/dom/EventTarget.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "nsIFrame.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsView.h"
|
||||
#include "PositionedEventTargeting.h"
|
||||
|
||||
|
@ -58,13 +58,13 @@
|
||||
#include "mozilla/Result.h"
|
||||
#include "mozilla/SmallPointerArray.h"
|
||||
#include "mozilla/PresShell.h"
|
||||
#include "mozilla/ToString.h"
|
||||
#include "mozilla/WritingModes.h"
|
||||
#include "nsDirection.h"
|
||||
#include "nsFrameList.h"
|
||||
#include "nsFrameState.h"
|
||||
#include "mozilla/ReflowInput.h"
|
||||
#include "nsITheme.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
#include "nsQueryFrame.h"
|
||||
#include "mozilla/ComputedStyle.h"
|
||||
#include "nsStyleStruct.h"
|
||||
@ -106,6 +106,7 @@ class nsISelectionController;
|
||||
class nsBoxLayoutState;
|
||||
class nsBoxLayout;
|
||||
class nsILineIterator;
|
||||
class nsDisplayItem;
|
||||
class nsDisplayItemBase;
|
||||
class nsDisplayListBuilder;
|
||||
class nsDisplayListSet;
|
||||
@ -5724,15 +5725,6 @@ template <bool IsLessThanOrEqual(nsIFrame*, nsIFrame*)>
|
||||
return result;
|
||||
}
|
||||
|
||||
template <bool IsLessThanOrEqual(nsIFrame*, nsIFrame*)>
|
||||
/* static */ void nsIFrame::SortFrameList(nsFrameList& aFrameList) {
|
||||
nsIFrame* head = MergeSort<IsLessThanOrEqual>(aFrameList.FirstChild());
|
||||
aFrameList.Clear();
|
||||
aFrameList = nsFrameList(head, nsLayoutUtils::GetLastSibling(head));
|
||||
MOZ_ASSERT(IsFrameListSorted<IsLessThanOrEqual>(aFrameList),
|
||||
"After we sort a frame list, it should be in sorted order...");
|
||||
}
|
||||
|
||||
template <bool IsLessThanOrEqual(nsIFrame*, nsIFrame*)>
|
||||
/* static */ bool nsIFrame::IsFrameListSorted(nsFrameList& aFrameList) {
|
||||
if (aFrameList.IsEmpty()) {
|
||||
|
@ -265,4 +265,13 @@ mozilla::LogicalPoint nsIFrame::GetLogicalNormalPosition(
|
||||
aContainerSize - mRect.Size());
|
||||
}
|
||||
|
||||
template <bool IsLessThanOrEqual(nsIFrame*, nsIFrame*)>
|
||||
/* static */ void nsIFrame::SortFrameList(nsFrameList& aFrameList) {
|
||||
nsIFrame* head = MergeSort<IsLessThanOrEqual>(aFrameList.FirstChild());
|
||||
aFrameList.Clear();
|
||||
aFrameList = nsFrameList(head, nsLayoutUtils::GetLastSibling(head));
|
||||
MOZ_ASSERT(IsFrameListSorted<IsLessThanOrEqual>(aFrameList),
|
||||
"After we sort a frame list, it should be in sorted order...");
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -63,6 +63,7 @@
|
||||
#include "nsGkAtoms.h"
|
||||
#include "nsHTMLParts.h"
|
||||
#include "nsIContent.h"
|
||||
#include "nsIFrameInlines.h"
|
||||
#include "nsIScrollableFrame.h"
|
||||
#include "nsITheme.h"
|
||||
#include "nsLayoutUtils.h"
|
||||
|
@ -12,6 +12,7 @@
|
||||
#include "nsWindow.h"
|
||||
#include "mozilla/AutoRestore.h"
|
||||
#include "mozilla/Likely.h"
|
||||
#include "mozilla/LookAndFeel.h"
|
||||
#include "mozilla/MiscEvents.h"
|
||||
#include "mozilla/Preferences.h"
|
||||
#include "mozilla/Telemetry.h"
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include "nsPrintfCString.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
#include "mozilla/gfx/Tools.h"
|
||||
#include "gfx2DGlue.h"
|
||||
#include "gfxPlatform.h"
|
||||
#include "MozContainer.h"
|
||||
#include "nsTArray.h"
|
||||
|
Loading…
Reference in New Issue
Block a user