Bug 985303. Part 2: Add aSkipChildLists parameter to nsLayoutUtils::UnionChildOverflow. r=dbaron

--HG--
extra : rebase_source : 4ce840181d43b62d4488e6d4a3169ac1315e1dc7
This commit is contained in:
Robert O'Callahan 2014-04-03 04:25:03 -04:00
parent 8b33bb1a79
commit 97f4fe5c8f
2 changed files with 11 additions and 6 deletions

View File

@ -577,11 +577,12 @@ nsLayoutUtils::IsTextAlignTrueValueEnabled()
void
nsLayoutUtils::UnionChildOverflow(nsIFrame* aFrame,
nsOverflowAreas& aOverflowAreas)
nsOverflowAreas& aOverflowAreas,
FrameChildListIDs aSkipChildLists)
{
// Iterate over all children except pop-ups.
const nsIFrame::ChildListIDs skip(nsIFrame::kPopupList |
nsIFrame::kSelectPopupList);
FrameChildListIDs skip = aSkipChildLists |
nsIFrame::kSelectPopupList | nsIFrame::kPopupList;
for (nsIFrame::ChildListIterator childLists(aFrame);
!childLists.IsDone(); childLists.Next()) {
if (skip.Contains(childLists.CurrentID())) {

View File

@ -10,6 +10,7 @@
#include "nsChangeHint.h"
#include "nsAutoPtr.h"
#include "nsFrameList.h"
#include "mozilla/layout/FrameChildList.h"
#include "nsThreadUtils.h"
#include "nsIPrincipal.h"
#include "GraphicsFilter.h"
@ -1899,11 +1900,14 @@ public:
}
/**
* Unions the overflow areas of all non-popup children of aFrame with
* aOverflowAreas.
* Unions the overflow areas of the children of aFrame with aOverflowAreas.
* aSkipChildLists specifies any child lists that should be skipped.
* kSelectPopupList and kPopupList are always skipped.
*/
static void UnionChildOverflow(nsIFrame* aFrame,
nsOverflowAreas& aOverflowAreas);
nsOverflowAreas& aOverflowAreas,
mozilla::layout::FrameChildListIDs aSkipChildLists =
mozilla::layout::FrameChildListIDs());
/**
* Return the font size inflation *ratio* for a given frame. This is