Bug 938849 - Build layout/generic in unified mode; r=roc

This commit is contained in:
Ehsan Akhgari 2013-11-15 08:19:02 -05:00
parent 790750e904
commit def7bdd96e
6 changed files with 28 additions and 32 deletions

View File

@ -43,7 +43,7 @@ EXPORTS.mozilla.layout += [
'FrameChildList.h',
]
SOURCES += [
UNIFIED_SOURCES += [
'FrameChildList.cpp',
'nsAbsoluteContainingBlock.cpp',
'nsBlockFrame.cpp',
@ -72,8 +72,6 @@ SOURCES += [
'nsIntervalSet.cpp',
'nsLeafFrame.cpp',
'nsLineBox.cpp',
'nsLineLayout.cpp',
'nsObjectFrame.cpp',
'nsPageContentFrame.cpp',
'nsPageFrame.cpp',
'nsPlaceholderFrame.cpp',
@ -91,8 +89,15 @@ SOURCES += [
'TextOverflow.cpp',
]
# nsLineLayout.cpp needs to be built separately because it uses plarena.h.
# nsObjectFrame.cpp needs to be built separately because of name clashes in the OS X headers.
SOURCES += [
'nsLineLayout.cpp',
'nsObjectFrame.cpp',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
SOURCES += [
UNIFIED_SOURCES += [
'nsPluginUtilsOSX.mm',
]

View File

@ -1727,8 +1727,6 @@ nsBlockFrame::PropagateFloatDamage(nsBlockReflowState& aState,
}
}
static void PlaceFrameView(nsIFrame* aFrame);
static bool LineHasClear(nsLineBox* aLine) {
return aLine->IsBlock()
? (aLine->GetBreakTypeBefore() ||
@ -2143,7 +2141,7 @@ nsBlockFrame::ReflowDirtyLines(nsBlockReflowState& aState)
// Should we really have to do this?
if (repositionViews)
::PlaceFrameView(this);
nsContainerFrame::PlaceFrameView(this);
// We can skip trying to pull up the next line if our height is constrained
// (so we can report being incomplete) and there is no next in flow or we
@ -2558,15 +2556,6 @@ nsBlockFrame::PullFrameFrom(nsLineBox* aLine,
return frame;
}
static void
PlaceFrameView(nsIFrame* aFrame)
{
if (aFrame->HasView())
nsContainerFrame::PositionFrameView(aFrame);
else
nsContainerFrame::PositionChildViews(aFrame);
}
void
nsBlockFrame::SlideLine(nsBlockReflowState& aState,
nsLineBox* aLine, nscoord aDY)
@ -2588,7 +2577,7 @@ nsBlockFrame::SlideLine(nsBlockReflowState& aState,
}
// Make sure the frame's view and any child views are updated
::PlaceFrameView(kid);
nsContainerFrame::PlaceFrameView(kid);
}
else {
// Adjust the Y coordinate of the frames in the line.
@ -2601,7 +2590,7 @@ nsBlockFrame::SlideLine(nsBlockReflowState& aState,
kid->MovePositionBy(nsPoint(0, aDY));
}
// Make sure the frame's view and any child views are updated
::PlaceFrameView(kid);
nsContainerFrame::PlaceFrameView(kid);
kid = kid->GetNextSibling();
}
}
@ -5826,7 +5815,7 @@ nsBlockFrame::ReflowFloat(nsBlockReflowState& aState,
// XXXldb This seems like the wrong place to be doing this -- shouldn't
// we be doing this in nsBlockReflowState::FlowAndPlaceFloat after
// we've positioned the float, and shouldn't we be doing the equivalent
// of |::PlaceFrameView| here?
// of |PlaceFrameView| here?
aFloat->SetSize(nsSize(metrics.width, metrics.height));
if (aFloat->HasView()) {
nsContainerFrame::SyncFrameViewAfterReflow(aState.mPresContext, aFloat,

View File

@ -345,23 +345,13 @@ nsColumnSetFrame::ReflowColumns(nsHTMLReflowMetrics& aDesiredSize,
return feasible;
}
// XXX copied from nsBlockFrame, should this be moved to nsContainerFrame?
static void
PlaceFrameView(nsIFrame* aFrame)
{
if (aFrame->HasView())
nsContainerFrame::PositionFrameView(aFrame);
else
nsContainerFrame::PositionChildViews(aFrame);
}
static void MoveChildTo(nsIFrame* aParent, nsIFrame* aChild, nsPoint aOrigin) {
if (aChild->GetPosition() == aOrigin) {
return;
}
aChild->SetPosition(aOrigin);
PlaceFrameView(aChild);
nsContainerFrame::PlaceFrameView(aChild);
}
nscoord

View File

@ -366,6 +366,14 @@ public:
MOZ_ASSERT(false, "The owning frame should destroy its nsFrameList props");
}
static void PlaceFrameView(nsIFrame* aFrame)
{
if (aFrame->HasView())
nsContainerFrame::PositionFrameView(aFrame);
else
nsContainerFrame::PositionChildViews(aFrame);
}
#define NS_DECLARE_FRAME_PROPERTY_FRAMELIST(prop) \
NS_DECLARE_FRAME_PROPERTY(prop, nsContainerFrame::DestroyFrameList)

View File

@ -25,7 +25,7 @@
#include "nsAccessibilityService.h"
#endif
namespace dom = mozilla::dom;
using namespace mozilla;
class Area {
public:

View File

@ -79,6 +79,10 @@
#undef NOISY_TRIM
#endif
#ifdef DrawText
#undef DrawText
#endif
using namespace mozilla;
using namespace mozilla::dom;