mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 13:21:05 +00:00
Bug 1361051: rename mozilla::FrameType to mozilla::LayoutFrameType. r=xidorn
This avoids conflicts with mozilla::dom::FrameType. MozReview-Commit-ID: 7aEMbHRaTFk --HG-- extra : rebase_source : 2d01321f5ce0ec8c0e3f70984674f82678034b3c
This commit is contained in:
parent
b9cc424085
commit
23bce99ae1
@ -1142,8 +1142,9 @@ nsAccessibilityService::CreateAccessible(nsINode* aNode,
|
||||
// accessible for it.
|
||||
if (!newAcc && aContext->IsXULTabpanels() &&
|
||||
content->GetParent() == aContext->GetContent()) {
|
||||
FrameType frameType = frame->Type();
|
||||
if (frameType == FrameType::Box || frameType == FrameType::Scroll) {
|
||||
LayoutFrameType frameType = frame->Type();
|
||||
if (frameType == LayoutFrameType::Box ||
|
||||
frameType == LayoutFrameType::Scroll) {
|
||||
newAcc = new XULTabpanelAccessible(content, document);
|
||||
}
|
||||
}
|
||||
|
@ -637,7 +637,7 @@ Accessible::RelativeBounds(nsIFrame** aBoundingFrame) const
|
||||
nsIFrame* canvasFrame = frame->GetParent();
|
||||
if (canvasFrame) {
|
||||
canvasFrame = nsLayoutUtils::GetClosestFrameOfType(
|
||||
canvasFrame, FrameType::HTMLCanvas);
|
||||
canvasFrame, LayoutFrameType::HTMLCanvas);
|
||||
}
|
||||
|
||||
// make the canvas the bounding frame
|
||||
|
@ -648,8 +648,9 @@ Element::GetScrollFrame(nsIFrame **aStyledFrame, bool aFlushLayout)
|
||||
|
||||
// menu frames implement GetScrollTargetFrame but we don't want
|
||||
// to use it here. Similar for comboboxes.
|
||||
FrameType type = frame->Type();
|
||||
if (type != FrameType::Menu && type != FrameType::ComboboxControl) {
|
||||
LayoutFrameType type = frame->Type();
|
||||
if (type != LayoutFrameType::Menu &&
|
||||
type != LayoutFrameType::ComboboxControl) {
|
||||
nsIScrollableFrame *scrollFrame = frame->GetScrollTargetFrame();
|
||||
if (scrollFrame)
|
||||
return scrollFrame;
|
||||
|
@ -2717,7 +2717,7 @@ nsFocusManager::DetermineElementToMoveFocus(nsPIDOMWindowOuter* aWindow,
|
||||
// remain outside the popup when it is opened.
|
||||
if (frame) {
|
||||
popupFrame =
|
||||
nsLayoutUtils::GetClosestFrameOfType(frame, FrameType::MenuPopup);
|
||||
nsLayoutUtils::GetClosestFrameOfType(frame, LayoutFrameType::MenuPopup);
|
||||
}
|
||||
|
||||
if (popupFrame && !forDocumentNavigation) {
|
||||
@ -2943,8 +2943,8 @@ nsFocusManager::DetermineElementToMoveFocus(nsPIDOMWindowOuter* aWindow,
|
||||
// navigation would move outside the popup when tabbing outside the
|
||||
// iframe.
|
||||
if (!forDocumentNavigation) {
|
||||
popupFrame =
|
||||
nsLayoutUtils::GetClosestFrameOfType(frame, FrameType::MenuPopup);
|
||||
popupFrame = nsLayoutUtils::GetClosestFrameOfType(
|
||||
frame, LayoutFrameType::MenuPopup);
|
||||
if (popupFrame) {
|
||||
rootContent = popupFrame->GetContent();
|
||||
NS_ASSERTION(rootContent, "Popup frame doesn't have a content node");
|
||||
|
@ -3513,8 +3513,9 @@ GetRequiredInnerTextLineBreakCount(nsIFrame* aFrame)
|
||||
static bool
|
||||
IsLastCellOfRow(nsIFrame* aFrame)
|
||||
{
|
||||
FrameType type = aFrame->Type();
|
||||
if (type != FrameType::TableCell && type != FrameType::BCTableCell) {
|
||||
LayoutFrameType type = aFrame->Type();
|
||||
if (type != LayoutFrameType::TableCell &&
|
||||
type != LayoutFrameType::BCTableCell) {
|
||||
return true;
|
||||
}
|
||||
for (nsIFrame* c = aFrame; c; c = c->GetNextContinuation()) {
|
||||
|
@ -2739,10 +2739,10 @@ EventStateManager::DecideGestureEvent(WidgetGestureNotifyEvent* aEvent,
|
||||
break;
|
||||
}
|
||||
|
||||
FrameType currentFrameType = current->Type();
|
||||
LayoutFrameType currentFrameType = current->Type();
|
||||
|
||||
// Scrollbars should always be draggable
|
||||
if (currentFrameType == FrameType::Scrollbar) {
|
||||
if (currentFrameType == LayoutFrameType::Scrollbar) {
|
||||
panDirection = WidgetGestureNotifyEvent::ePanNone;
|
||||
break;
|
||||
}
|
||||
|
@ -239,18 +239,18 @@ nsGenericHTMLElement::GetAccessKeyLabel(nsString& aLabel)
|
||||
}
|
||||
|
||||
static bool
|
||||
IS_TABLE_CELL(FrameType frameType)
|
||||
IS_TABLE_CELL(LayoutFrameType frameType)
|
||||
{
|
||||
return FrameType::TableCell == frameType ||
|
||||
FrameType::BCTableCell == frameType;
|
||||
return LayoutFrameType::TableCell == frameType ||
|
||||
LayoutFrameType::BCTableCell == frameType;
|
||||
}
|
||||
|
||||
static bool
|
||||
IsOffsetParent(nsIFrame* aFrame)
|
||||
{
|
||||
FrameType frameType = aFrame->Type();
|
||||
LayoutFrameType frameType = aFrame->Type();
|
||||
|
||||
if (IS_TABLE_CELL(frameType) || frameType == FrameType::Table) {
|
||||
if (IS_TABLE_CELL(frameType) || frameType == LayoutFrameType::Table) {
|
||||
// Per the IDL for Element, only td, th, and table are acceptable offsetParents
|
||||
// apart from body or positioned elements; we need to check the content type as
|
||||
// well as the frame type so we ignore anonymous tables created by an element
|
||||
|
@ -38,7 +38,7 @@ SVGTextContentElement::GetSVGTextFrame()
|
||||
{
|
||||
nsIFrame* frame = GetPrimaryFrame(FlushType::Layout);
|
||||
nsIFrame* textFrame =
|
||||
nsLayoutUtils::GetClosestFrameOfType(frame, FrameType::SVGText);
|
||||
nsLayoutUtils::GetClosestFrameOfType(frame, LayoutFrameType::SVGText);
|
||||
return static_cast<SVGTextFrame*>(textFrame);
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ SVGTextContentElement::GetSVGTextFrameForNonLayoutDependentQuery()
|
||||
{
|
||||
nsIFrame* frame = GetPrimaryFrame(FlushType::Frames);
|
||||
nsIFrame* textFrame =
|
||||
nsLayoutUtils::GetClosestFrameOfType(frame, FrameType::SVGText);
|
||||
nsLayoutUtils::GetClosestFrameOfType(frame, LayoutFrameType::SVGText);
|
||||
return static_cast<SVGTextFrame*>(textFrame);
|
||||
}
|
||||
|
||||
|
@ -1265,7 +1265,7 @@ AccessibleCaretManager::DragCaretInternal(const nsPoint& aPoint)
|
||||
selection->GetPrimaryFrameForAnchorNode(&anchorFrame);
|
||||
|
||||
nsIFrame* scrollable =
|
||||
nsLayoutUtils::GetClosestFrameOfType(anchorFrame, FrameType::Scroll);
|
||||
nsLayoutUtils::GetClosestFrameOfType(anchorFrame, LayoutFrameType::Scroll);
|
||||
AutoWeakFrame weakScrollable = scrollable;
|
||||
fs->HandleClick(offsets.content, offsets.StartOffset(), offsets.EndOffset(),
|
||||
GetCaretMode() == CaretMode::Selection, false,
|
||||
|
@ -861,8 +861,8 @@ GetPrevContinuationWithSameStyle(nsIFrame* aFrame)
|
||||
nsresult
|
||||
GeckoRestyleManager::ReparentStyleContext(nsIFrame* aFrame)
|
||||
{
|
||||
FrameType frameType = aFrame->Type();
|
||||
if (frameType == FrameType::Placeholder) {
|
||||
LayoutFrameType frameType = aFrame->Type();
|
||||
if (frameType == LayoutFrameType::Placeholder) {
|
||||
// Also reparent the out-of-flow and all its continuations.
|
||||
nsIFrame* outOfFlow =
|
||||
nsPlaceholderFrame::GetRealFrameForPlaceholder(aFrame);
|
||||
@ -870,7 +870,7 @@ GeckoRestyleManager::ReparentStyleContext(nsIFrame* aFrame)
|
||||
do {
|
||||
ReparentStyleContext(outOfFlow);
|
||||
} while ((outOfFlow = outOfFlow->GetNextContinuation()));
|
||||
} else if (frameType == FrameType::Backdrop) {
|
||||
} else if (frameType == LayoutFrameType::Backdrop) {
|
||||
// Style context of backdrop frame has no parent style context, and
|
||||
// thus we do not need to reparent it.
|
||||
return NS_OK;
|
||||
@ -1660,8 +1660,8 @@ ElementRestyler::MoveStyleContextsForContentChildren(
|
||||
if (sc->GetParent() != aOldContext) {
|
||||
return false;
|
||||
}
|
||||
FrameType type = child->Type();
|
||||
if (type == FrameType::Letter || type == FrameType::Line) {
|
||||
LayoutFrameType type = child->Type();
|
||||
if (type == LayoutFrameType::Letter || type == LayoutFrameType::Line) {
|
||||
return false;
|
||||
}
|
||||
if (sc->HasChildThatUsesGrandancestorStyle()) {
|
||||
@ -2068,16 +2068,16 @@ ElementRestyler::ComputeRestyleResultFromFrame(nsIFrame* aSelf,
|
||||
// content). Continue restyling to the children of the nsLetterFrame so
|
||||
// that they get the correct style context parent. Similarly for
|
||||
// nsLineFrames.
|
||||
FrameType type = aSelf->Type();
|
||||
LayoutFrameType type = aSelf->Type();
|
||||
|
||||
if (type == FrameType::Letter) {
|
||||
if (type == LayoutFrameType::Letter) {
|
||||
LOG_RESTYLE_CONTINUE("frame is a letter frame");
|
||||
aRestyleResult = RestyleResult::eContinue;
|
||||
aCanStopWithStyleChange = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (type == FrameType::Line) {
|
||||
if (type == LayoutFrameType::Line) {
|
||||
LOG_RESTYLE_CONTINUE("frame is a line frame");
|
||||
aRestyleResult = RestyleResult::eContinue;
|
||||
aCanStopWithStyleChange = false;
|
||||
|
@ -3538,8 +3538,8 @@ PresShell::DoScrollContentIntoView()
|
||||
|
||||
// Make sure we skip 'frame' ... if it's scrollable, we should use its
|
||||
// scrollable ancestor as the container.
|
||||
nsIFrame* container =
|
||||
nsLayoutUtils::GetClosestFrameOfType(frame->GetParent(), FrameType::Scroll);
|
||||
nsIFrame* container = nsLayoutUtils::GetClosestFrameOfType(
|
||||
frame->GetParent(), LayoutFrameType::Scroll);
|
||||
if (!container) {
|
||||
// nothing can be scrolled
|
||||
return;
|
||||
|
@ -1078,8 +1078,8 @@ DoApplyRenderingChangeToTree(nsIFrame* aFrame,
|
||||
// Invalidate and reflow the entire SVGTextFrame:
|
||||
NS_ASSERTION(aFrame->GetContent()->IsSVGElement(nsGkAtoms::textPath),
|
||||
"expected frame for a <textPath> element");
|
||||
nsIFrame* text =
|
||||
nsLayoutUtils::GetClosestFrameOfType(aFrame, FrameType::SVGText);
|
||||
nsIFrame* text = nsLayoutUtils::GetClosestFrameOfType(
|
||||
aFrame, LayoutFrameType::SVGText);
|
||||
NS_ASSERTION(text, "expected to find an ancestor SVGTextFrame");
|
||||
static_cast<SVGTextFrame*>(text)->NotifyGlyphMetricsChange();
|
||||
} else {
|
||||
|
@ -505,10 +505,10 @@ static bool
|
||||
IsBidiSplittable(nsIFrame* aFrame)
|
||||
{
|
||||
// Bidi inline containers should be split, unless they're line frames.
|
||||
FrameType frameType = aFrame->Type();
|
||||
LayoutFrameType frameType = aFrame->Type();
|
||||
return (aFrame->IsFrameOfType(nsIFrame::eBidiInlineContainer) &&
|
||||
frameType != FrameType::Line) ||
|
||||
frameType == FrameType::Text;
|
||||
frameType != LayoutFrameType::Line) ||
|
||||
frameType == LayoutFrameType::Text;
|
||||
}
|
||||
|
||||
// Should this frame be treated as a leaf (e.g. when building mLogicalFrames)?
|
||||
@ -1125,8 +1125,8 @@ nsBidiPresUtils::TraverseFrames(nsBlockInFlowLineIterator* aLineIter,
|
||||
aBpd->AppendFrame(frame, aLineIter, content);
|
||||
|
||||
// Append the content of the frame to the paragraph buffer
|
||||
FrameType frameType = frame->Type();
|
||||
if (FrameType::Text == frameType) {
|
||||
LayoutFrameType frameType = frame->Type();
|
||||
if (LayoutFrameType::Text == frameType) {
|
||||
if (content != aBpd->mPrevContent) {
|
||||
aBpd->mPrevContent = content;
|
||||
if (!frame->StyleText()->NewlineIsSignificant(
|
||||
@ -1241,7 +1241,7 @@ nsBidiPresUtils::TraverseFrames(nsBlockInFlowLineIterator* aLineIter,
|
||||
} while (next);
|
||||
}
|
||||
}
|
||||
} else if (FrameType::Br == frameType) {
|
||||
} else if (LayoutFrameType::Br == frameType) {
|
||||
// break frame -- append line separator
|
||||
aBpd->AppendUnichar(kLineSeparator);
|
||||
ResolveParagraphWithinBlock(aBpd);
|
||||
@ -1564,14 +1564,14 @@ nsBidiPresUtils::RepositionRubyFrame(
|
||||
const WritingMode aContainerWM,
|
||||
const LogicalMargin& aBorderPadding)
|
||||
{
|
||||
FrameType frameType = aFrame->Type();
|
||||
LayoutFrameType frameType = aFrame->Type();
|
||||
MOZ_ASSERT(RubyUtils::IsRubyBox(frameType));
|
||||
|
||||
nscoord icoord = 0;
|
||||
WritingMode frameWM = aFrame->GetWritingMode();
|
||||
bool isLTR = frameWM.IsBidiLTR();
|
||||
nsSize frameSize = aFrame->GetSize();
|
||||
if (frameType == FrameType::Ruby) {
|
||||
if (frameType == LayoutFrameType::Ruby) {
|
||||
icoord += aBorderPadding.IStart(frameWM);
|
||||
// Reposition ruby segments in a ruby container
|
||||
for (RubySegmentEnumerator e(static_cast<nsRubyFrame*>(aFrame));
|
||||
@ -1590,7 +1590,7 @@ nsBidiPresUtils::RepositionRubyFrame(
|
||||
icoord += segmentISize;
|
||||
}
|
||||
icoord += aBorderPadding.IEnd(frameWM);
|
||||
} else if (frameType == FrameType::RubyBaseContainer) {
|
||||
} else if (frameType == LayoutFrameType::RubyBaseContainer) {
|
||||
// Reposition ruby columns in a ruby segment
|
||||
auto rbc = static_cast<nsRubyBaseContainerFrame*>(aFrame);
|
||||
AutoRubyTextContainerArray textContainers(rbc);
|
||||
@ -1610,7 +1610,8 @@ nsBidiPresUtils::RepositionRubyFrame(
|
||||
icoord += columnISize;
|
||||
}
|
||||
} else {
|
||||
if (frameType == FrameType::RubyBase || frameType == FrameType::RubyText) {
|
||||
if (frameType == LayoutFrameType::RubyBase ||
|
||||
frameType == LayoutFrameType::RubyText) {
|
||||
RepositionRubyContentFrame(aFrame, frameWM, aBorderPadding);
|
||||
}
|
||||
// Note that, ruby text container is not present in all conditions
|
||||
|
@ -343,8 +343,9 @@ IsAnonymousFlexOrGridItem(const nsIFrame* aFrame)
|
||||
static inline bool
|
||||
IsFlexOrGridContainer(const nsIFrame* aFrame)
|
||||
{
|
||||
const FrameType t = aFrame->Type();
|
||||
return t == FrameType::FlexContainer || t == FrameType::GridContainer;
|
||||
const LayoutFrameType t = aFrame->Type();
|
||||
return t == LayoutFrameType::FlexContainer ||
|
||||
t == LayoutFrameType::GridContainer;
|
||||
}
|
||||
|
||||
// Returns true IFF the given nsIFrame is a nsFlexContainerFrame and
|
||||
@ -1971,27 +1972,27 @@ IsTableOrRubyPseudo(nsIFrame* aFrame)
|
||||
|
||||
/* static */
|
||||
nsCSSFrameConstructor::ParentType
|
||||
nsCSSFrameConstructor::GetParentType(FrameType aFrameType)
|
||||
nsCSSFrameConstructor::GetParentType(LayoutFrameType aFrameType)
|
||||
{
|
||||
if (aFrameType == FrameType::Table) {
|
||||
if (aFrameType == LayoutFrameType::Table) {
|
||||
return eTypeTable;
|
||||
}
|
||||
if (aFrameType == FrameType::TableRowGroup) {
|
||||
if (aFrameType == LayoutFrameType::TableRowGroup) {
|
||||
return eTypeRowGroup;
|
||||
}
|
||||
if (aFrameType == FrameType::TableRow) {
|
||||
if (aFrameType == LayoutFrameType::TableRow) {
|
||||
return eTypeRow;
|
||||
}
|
||||
if (aFrameType == FrameType::TableColGroup) {
|
||||
if (aFrameType == LayoutFrameType::TableColGroup) {
|
||||
return eTypeColGroup;
|
||||
}
|
||||
if (aFrameType == FrameType::RubyBaseContainer) {
|
||||
if (aFrameType == LayoutFrameType::RubyBaseContainer) {
|
||||
return eTypeRubyBaseContainer;
|
||||
}
|
||||
if (aFrameType == FrameType::RubyTextContainer) {
|
||||
if (aFrameType == LayoutFrameType::RubyTextContainer) {
|
||||
return eTypeRubyTextContainer;
|
||||
}
|
||||
if (aFrameType == FrameType::Ruby) {
|
||||
if (aFrameType == LayoutFrameType::Ruby) {
|
||||
return eTypeRuby;
|
||||
}
|
||||
|
||||
@ -4235,8 +4236,8 @@ nsCSSFrameConstructor::GetAnonymousContent(nsIContent* aParent,
|
||||
|
||||
ConnectAnonymousTreeDescendants(content, aContent[i].mChildren);
|
||||
|
||||
FrameType parentFrameType = aParentFrame->Type();
|
||||
if (parentFrameType == FrameType::SVGUse) {
|
||||
LayoutFrameType parentFrameType = aParentFrame->Type();
|
||||
if (parentFrameType == LayoutFrameType::SVGUse) {
|
||||
// least-surprise CSS binding until we do the SVG specified
|
||||
// cascading rules for <svg:use> - bug 265894
|
||||
content->SetFlags(NODE_IS_ANONYMOUS_ROOT);
|
||||
@ -4252,7 +4253,7 @@ nsCSSFrameConstructor::GetAnonymousContent(nsIContent* aParent,
|
||||
// break if it becomes NAC (since each element starts inheriting
|
||||
// styles from its closest non-NAC ancestor, rather than from its
|
||||
// parent).
|
||||
if (!(parentFrameType == FrameType::Canvas &&
|
||||
if (!(parentFrameType == LayoutFrameType::Canvas &&
|
||||
content == static_cast<nsCanvasFrame*>(aParentFrame)
|
||||
->GetCustomContentContainer())) {
|
||||
SetNativeAnonymousBitOnDescendants(content);
|
||||
@ -6292,8 +6293,8 @@ nsCSSFrameConstructor::GetAbsoluteContainingBlock(nsIFrame* aFrame,
|
||||
|
||||
// Look for the ICB.
|
||||
if (aType == FIXED_POS) {
|
||||
FrameType t = frame->Type();
|
||||
if (t == FrameType::Viewport || t == FrameType::PageContent) {
|
||||
LayoutFrameType t = frame->Type();
|
||||
if (t == LayoutFrameType::Viewport || t == LayoutFrameType::PageContent) {
|
||||
return static_cast<nsContainerFrame*>(frame);
|
||||
}
|
||||
}
|
||||
@ -6312,15 +6313,15 @@ nsCSSFrameConstructor::GetAbsoluteContainingBlock(nsIFrame* aFrame,
|
||||
continue;
|
||||
}
|
||||
nsIFrame* absPosCBCandidate = frame;
|
||||
FrameType type = absPosCBCandidate->Type();
|
||||
if (type == FrameType::FieldSet) {
|
||||
LayoutFrameType type = absPosCBCandidate->Type();
|
||||
if (type == LayoutFrameType::FieldSet) {
|
||||
absPosCBCandidate = static_cast<nsFieldSetFrame*>(absPosCBCandidate)->GetInner();
|
||||
if (!absPosCBCandidate) {
|
||||
continue;
|
||||
}
|
||||
type = absPosCBCandidate->Type();
|
||||
}
|
||||
if (type == FrameType::Scroll) {
|
||||
if (type == LayoutFrameType::Scroll) {
|
||||
nsIScrollableFrame* scrollFrame = do_QueryFrame(absPosCBCandidate);
|
||||
absPosCBCandidate = scrollFrame->GetScrolledFrame();
|
||||
if (!absPosCBCandidate) {
|
||||
@ -6336,7 +6337,7 @@ nsCSSFrameConstructor::GetAbsoluteContainingBlock(nsIFrame* aFrame,
|
||||
}
|
||||
|
||||
// For tables, skip the inner frame and consider the table wrapper frame.
|
||||
if (type == FrameType::Table) {
|
||||
if (type == LayoutFrameType::Table) {
|
||||
continue;
|
||||
}
|
||||
// For table wrapper frames, we can just return absPosCBCandidate.
|
||||
@ -6627,7 +6628,7 @@ nsCSSFrameConstructor::IsValidSibling(nsIFrame* aSibling,
|
||||
StyleDisplay& aDisplay)
|
||||
{
|
||||
nsIFrame* parentFrame = aSibling->GetParent();
|
||||
FrameType parentType = parentFrame->Type();
|
||||
LayoutFrameType parentType = parentFrame->Type();
|
||||
|
||||
StyleDisplay siblingDisplay = aSibling->GetDisplay();
|
||||
if (StyleDisplay::TableColumnGroup == siblingDisplay ||
|
||||
@ -6636,7 +6637,7 @@ nsCSSFrameConstructor::IsValidSibling(nsIFrame* aSibling,
|
||||
StyleDisplay::TableHeaderGroup == siblingDisplay ||
|
||||
StyleDisplay::TableRowGroup == siblingDisplay ||
|
||||
StyleDisplay::TableFooterGroup == siblingDisplay ||
|
||||
FrameType::Menu == parentType) {
|
||||
LayoutFrameType::Menu == parentType) {
|
||||
// if we haven't already, construct a style context to find the display type of aContent
|
||||
if (UNSET_DISPLAY == aDisplay) {
|
||||
nsIFrame* styleParent;
|
||||
@ -6661,7 +6662,7 @@ nsCSSFrameConstructor::IsValidSibling(nsIFrame* aSibling,
|
||||
const nsStyleDisplay* display = styleContext->StyleDisplay();
|
||||
aDisplay = display->mDisplay;
|
||||
}
|
||||
if (FrameType::Menu == parentType) {
|
||||
if (LayoutFrameType::Menu == parentType) {
|
||||
return
|
||||
(StyleDisplay::MozPopup == aDisplay) ==
|
||||
(StyleDisplay::MozPopup == siblingDisplay);
|
||||
@ -6702,11 +6703,11 @@ nsCSSFrameConstructor::IsValidSibling(nsIFrame* aSibling,
|
||||
if (nsContainerFrame* cif = aSibling->GetContentInsertionFrame()) {
|
||||
aSibling = cif;
|
||||
}
|
||||
FrameType sibType = aSibling->Type();
|
||||
LayoutFrameType sibType = aSibling->Type();
|
||||
bool legendContent = aContent->IsHTMLElement(nsGkAtoms::legend);
|
||||
|
||||
if ((legendContent && (FrameType::Legend != sibType)) ||
|
||||
(!legendContent && (FrameType::Legend == sibType)))
|
||||
if ((legendContent && (LayoutFrameType::Legend != sibType)) ||
|
||||
(!legendContent && (LayoutFrameType::Legend == sibType)))
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -7647,7 +7648,7 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
|
||||
RemoveLetterFrames(state.mPresShell, containingBlock);
|
||||
}
|
||||
|
||||
FrameType frameType = parentFrame->Type();
|
||||
LayoutFrameType frameType = parentFrame->Type();
|
||||
|
||||
FlattenedChildIterator iter(aContainer);
|
||||
bool haveNoXBLChildren = (!iter.XBLInvolved() || !iter.GetNextChild());
|
||||
@ -7722,7 +7723,7 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
|
||||
// If the container is a table and a caption was appended, it needs to be put
|
||||
// in the table wrapper frame's additional child list.
|
||||
nsFrameItems captionItems;
|
||||
if (FrameType::Table == frameType) {
|
||||
if (LayoutFrameType::Table == frameType) {
|
||||
// Pull out the captions. Note that we don't want to do that as we go,
|
||||
// because processing a single caption can add a whole bunch of things to
|
||||
// the frame items due to pseudoframe processing. So we'd have to pull
|
||||
@ -7743,7 +7744,7 @@ nsCSSFrameConstructor::ContentAppended(nsIContent* aContainer,
|
||||
// Append the flowed frames to the principal child list; captions
|
||||
// need special treatment
|
||||
if (captionItems.NotEmpty()) { // append the caption to the table wrapper
|
||||
NS_ASSERTION(FrameType::Table == frameType, "how did that happen?");
|
||||
NS_ASSERTION(LayoutFrameType::Table == frameType, "how did that happen?");
|
||||
nsContainerFrame* outerTable = parentFrame->GetParent();
|
||||
AppendFrames(outerTable, nsIFrame::kCaptionList, captionItems);
|
||||
}
|
||||
@ -8070,7 +8071,7 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
||||
|
||||
nsIContent* container = insertion.mParentFrame->GetContent();
|
||||
|
||||
FrameType frameType = insertion.mParentFrame->Type();
|
||||
LayoutFrameType frameType = insertion.mParentFrame->Type();
|
||||
LAYOUT_PHASE_TEMP_EXIT();
|
||||
if (MaybeRecreateForFrameset(insertion.mParentFrame, aStartChild, aEndChild)) {
|
||||
LAYOUT_PHASE_TEMP_REENTER();
|
||||
@ -8080,7 +8081,7 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
||||
|
||||
// We should only get here with fieldsets when doing a single insert, because
|
||||
// fieldsets have multiple insertion points.
|
||||
NS_ASSERTION(isSingleInsert || frameType != FrameType::FieldSet,
|
||||
NS_ASSERTION(isSingleInsert || frameType != LayoutFrameType::FieldSet,
|
||||
"Unexpected parent");
|
||||
if (IsFrameForFieldSet(insertion.mParentFrame) &&
|
||||
aStartChild->NodeInfo()->NameAtom() == nsGkAtoms::legend) {
|
||||
@ -8099,8 +8100,8 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
||||
|
||||
// We should only get here with details when doing a single insertion because
|
||||
// we treat details frame as if it has multiple insertion points.
|
||||
MOZ_ASSERT(isSingleInsert || frameType != FrameType::Details);
|
||||
if (frameType == FrameType::Details) {
|
||||
MOZ_ASSERT(isSingleInsert || frameType != LayoutFrameType::Details);
|
||||
if (frameType == LayoutFrameType::Details) {
|
||||
// When inserting an element into <details>, just reframe the details frame
|
||||
// and let it figure out where the element should be laid out. It might seem
|
||||
// expensive to recreate the entire details frame, but it's the simplest way
|
||||
@ -8291,7 +8292,8 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
||||
InvalidateCanvasIfNeeded(mPresShell, child);
|
||||
}
|
||||
|
||||
if (FrameType::Table == frameType || FrameType::TableWrapper == frameType) {
|
||||
if (LayoutFrameType::Table == frameType ||
|
||||
LayoutFrameType::TableWrapper == frameType) {
|
||||
PullOutCaptionFrames(frameItems, captionItems);
|
||||
}
|
||||
}
|
||||
@ -8360,8 +8362,8 @@ nsCSSFrameConstructor::ContentRangeInserted(nsIContent* aContainer,
|
||||
// We might have captions; put them into the caption list of the
|
||||
// table wrapper frame.
|
||||
if (captionItems.NotEmpty()) {
|
||||
NS_ASSERTION(FrameType::Table == frameType ||
|
||||
FrameType::TableWrapper == frameType,
|
||||
NS_ASSERTION(LayoutFrameType::Table == frameType ||
|
||||
LayoutFrameType::TableWrapper == frameType,
|
||||
"parent for caption is not table?");
|
||||
// We need to determine where to put the caption items; start with the
|
||||
// the parent frame that has already been determined and get the insertion
|
||||
@ -8625,9 +8627,10 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer,
|
||||
|
||||
// Get the childFrame's parent frame
|
||||
nsIFrame* parentFrame = childFrame->GetParent();
|
||||
FrameType parentType = parentFrame->Type();
|
||||
LayoutFrameType parentType = parentFrame->Type();
|
||||
|
||||
if (parentType == FrameType::FrameSet && IsSpecialFramesetChild(aChild)) {
|
||||
if (parentType == LayoutFrameType::FrameSet &&
|
||||
IsSpecialFramesetChild(aChild)) {
|
||||
// Just reframe the parent, since framesets are weird like that.
|
||||
*aDidReconstruct = true;
|
||||
LAYOUT_PHASE_TEMP_EXIT();
|
||||
@ -8640,8 +8643,9 @@ nsCSSFrameConstructor::ContentRemoved(nsIContent* aContainer,
|
||||
// If we're a child of MathML, then we should reframe the MathML content.
|
||||
// If we're non-MathML, then we would be wrapped in a block so we need to
|
||||
// check our grandparent in that case.
|
||||
nsIFrame* possibleMathMLAncestor =
|
||||
parentType == FrameType::Block ? parentFrame->GetParent() : parentFrame;
|
||||
nsIFrame* possibleMathMLAncestor = parentType == LayoutFrameType::Block
|
||||
? parentFrame->GetParent()
|
||||
: parentFrame;
|
||||
if (possibleMathMLAncestor->IsFrameOfType(nsIFrame::eMathML)) {
|
||||
*aDidReconstruct = true;
|
||||
LAYOUT_PHASE_TEMP_EXIT();
|
||||
@ -9137,53 +9141,53 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
|
||||
nsIFrame* nextInFlow = aFrame->GetNextInFlow();
|
||||
|
||||
// Use the frame type to determine what type of frame to create
|
||||
FrameType frameType = aFrame->Type();
|
||||
LayoutFrameType frameType = aFrame->Type();
|
||||
nsIContent* content = aFrame->GetContent();
|
||||
|
||||
NS_ASSERTION(aFrame->GetSplittableType() != NS_FRAME_NOT_SPLITTABLE,
|
||||
"why CreateContinuingFrame for a non-splittable frame?");
|
||||
|
||||
if (FrameType::Text == frameType) {
|
||||
if (LayoutFrameType::Text == frameType) {
|
||||
newFrame = NS_NewContinuingTextFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else if (FrameType::Inline == frameType) {
|
||||
} else if (LayoutFrameType::Inline == frameType) {
|
||||
newFrame = NS_NewInlineFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else if (FrameType::Block == frameType) {
|
||||
} else if (LayoutFrameType::Block == frameType) {
|
||||
MOZ_ASSERT(!aFrame->IsTableCaption(),
|
||||
"no support for fragmenting table captions yet");
|
||||
newFrame = NS_NewBlockFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
#ifdef MOZ_XUL
|
||||
} else if (FrameType::XULLabel == frameType) {
|
||||
} else if (LayoutFrameType::XULLabel == frameType) {
|
||||
newFrame = NS_NewXULLabelFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
#endif
|
||||
} else if (FrameType::ColumnSet == frameType) {
|
||||
} else if (LayoutFrameType::ColumnSet == frameType) {
|
||||
MOZ_ASSERT(!aFrame->IsTableCaption(),
|
||||
"no support for fragmenting table captions yet");
|
||||
newFrame = NS_NewColumnSetFrame(shell, styleContext, nsFrameState(0));
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else if (FrameType::Page == frameType) {
|
||||
} else if (LayoutFrameType::Page == frameType) {
|
||||
nsContainerFrame* canvasFrame;
|
||||
newFrame = ConstructPageFrame(shell, aParentFrame, aFrame, canvasFrame);
|
||||
} else if (FrameType::TableWrapper == frameType) {
|
||||
} else if (LayoutFrameType::TableWrapper == frameType) {
|
||||
newFrame =
|
||||
CreateContinuingOuterTableFrame(shell, aPresContext, aFrame, aParentFrame,
|
||||
content, styleContext);
|
||||
|
||||
} else if (FrameType::Table == frameType) {
|
||||
} else if (LayoutFrameType::Table == frameType) {
|
||||
newFrame =
|
||||
CreateContinuingTableFrame(shell, aFrame, aParentFrame,
|
||||
content, styleContext);
|
||||
|
||||
} else if (FrameType::TableRowGroup == frameType) {
|
||||
} else if (LayoutFrameType::TableRowGroup == frameType) {
|
||||
newFrame = NS_NewTableRowGroupFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
if (newFrame->GetStateBits() & NS_FRAME_CAN_HAVE_ABSPOS_CHILDREN) {
|
||||
nsTableFrame::RegisterPositionedTablePart(newFrame);
|
||||
}
|
||||
} else if (FrameType::TableRow == frameType) {
|
||||
} else if (LayoutFrameType::TableRow == frameType) {
|
||||
nsTableRowFrame* rowFrame = NS_NewTableRowFrame(shell, styleContext);
|
||||
|
||||
rowFrame->Init(content, aParentFrame, aFrame);
|
||||
@ -9229,19 +9233,19 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
|
||||
|
||||
SetInitialSingleChild(cellFrame, continuingBlockFrame);
|
||||
newFrame = cellFrame;
|
||||
} else if (FrameType::Line == frameType) {
|
||||
} else if (LayoutFrameType::Line == frameType) {
|
||||
newFrame = NS_NewFirstLineFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else if (FrameType::Letter == frameType) {
|
||||
} else if (LayoutFrameType::Letter == frameType) {
|
||||
newFrame = NS_NewFirstLetterFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else if (FrameType::Image == frameType) {
|
||||
} else if (LayoutFrameType::Image == frameType) {
|
||||
newFrame = NS_NewImageFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else if (FrameType::ImageControl == frameType) {
|
||||
} else if (LayoutFrameType::ImageControl == frameType) {
|
||||
newFrame = NS_NewImageControlFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else if (FrameType::Placeholder == frameType) {
|
||||
} else if (LayoutFrameType::Placeholder == frameType) {
|
||||
// create a continuing out of flow frame
|
||||
nsIFrame* oofFrame = nsPlaceholderFrame::GetRealFrameForPlaceholder(aFrame);
|
||||
nsIFrame* oofContFrame =
|
||||
@ -9250,7 +9254,7 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
|
||||
CreatePlaceholderFrameFor(shell, content, oofContFrame,
|
||||
aParentFrame, aFrame,
|
||||
aFrame->GetStateBits() & PLACEHOLDER_TYPE_MASK);
|
||||
} else if (FrameType::FieldSet == frameType) {
|
||||
} else if (LayoutFrameType::FieldSet == frameType) {
|
||||
nsContainerFrame* fieldset = NS_NewFieldSetFrame(shell, styleContext);
|
||||
|
||||
fieldset->Init(content, aParentFrame, aFrame);
|
||||
@ -9268,25 +9272,25 @@ nsCSSFrameConstructor::CreateContinuingFrame(nsPresContext* aPresContext,
|
||||
"FieldSet block may only be null for overflow containers");
|
||||
}
|
||||
newFrame = fieldset;
|
||||
} else if (FrameType::Legend == frameType) {
|
||||
} else if (LayoutFrameType::Legend == frameType) {
|
||||
newFrame = NS_NewLegendFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else if (FrameType::FlexContainer == frameType) {
|
||||
} else if (LayoutFrameType::FlexContainer == frameType) {
|
||||
newFrame = NS_NewFlexContainerFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else if (FrameType::GridContainer == frameType) {
|
||||
} else if (LayoutFrameType::GridContainer == frameType) {
|
||||
newFrame = NS_NewGridContainerFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else if (FrameType::Ruby == frameType) {
|
||||
} else if (LayoutFrameType::Ruby == frameType) {
|
||||
newFrame = NS_NewRubyFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else if (FrameType::RubyBaseContainer == frameType) {
|
||||
} else if (LayoutFrameType::RubyBaseContainer == frameType) {
|
||||
newFrame = NS_NewRubyBaseContainerFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else if (FrameType::RubyTextContainer == frameType) {
|
||||
} else if (LayoutFrameType::RubyTextContainer == frameType) {
|
||||
newFrame = NS_NewRubyTextContainerFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else if (FrameType::Details == frameType) {
|
||||
} else if (LayoutFrameType::Details == frameType) {
|
||||
newFrame = NS_NewDetailsFrame(shell, styleContext);
|
||||
newFrame->Init(content, aParentFrame, aFrame);
|
||||
} else {
|
||||
@ -9702,8 +9706,8 @@ nsCSSFrameConstructor::MaybeRecreateContainerForFrameRemoval(nsIFrame* aFrame,
|
||||
}
|
||||
|
||||
// Check ruby containers
|
||||
FrameType parentType = parent->Type();
|
||||
if (parentType == FrameType::Ruby ||
|
||||
LayoutFrameType parentType = parent->Type();
|
||||
if (parentType == LayoutFrameType::Ruby ||
|
||||
RubyUtils::IsRubyContainerBox(parentType)) {
|
||||
// In ruby containers, pseudo frames may be created from
|
||||
// whitespaces or even nothing. There are two cases we actually
|
||||
@ -10129,9 +10133,9 @@ nsCSSFrameConstructor::CreateNeededAnonFlexOrGridItems(
|
||||
if (aItems.IsEmpty()) {
|
||||
return;
|
||||
}
|
||||
const FrameType parentType = aParentFrame->Type();
|
||||
if (parentType != FrameType::FlexContainer &&
|
||||
parentType != FrameType::GridContainer) {
|
||||
const LayoutFrameType parentType = aParentFrame->Type();
|
||||
if (parentType != LayoutFrameType::FlexContainer &&
|
||||
parentType != LayoutFrameType::GridContainer) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -10805,9 +10809,9 @@ static bool
|
||||
FrameWantsToBeInAnonymousItem(const nsIFrame* aContainerFrame,
|
||||
const nsIFrame* aFrame)
|
||||
{
|
||||
FrameType containerType = aContainerFrame->Type();
|
||||
MOZ_ASSERT(containerType == FrameType::FlexContainer ||
|
||||
containerType == FrameType::GridContainer);
|
||||
LayoutFrameType containerType = aContainerFrame->Type();
|
||||
MOZ_ASSERT(containerType == LayoutFrameType::FlexContainer ||
|
||||
containerType == LayoutFrameType::GridContainer);
|
||||
|
||||
// Any line-participant frames (e.g. text) definitely want to be wrapped in
|
||||
// an anonymous flex/grid item.
|
||||
@ -10817,7 +10821,7 @@ FrameWantsToBeInAnonymousItem(const nsIFrame* aContainerFrame,
|
||||
|
||||
// If the container is a -webkit-box/-webkit-inline-box, then placeholders
|
||||
// also need to be wrapped, for compatibility.
|
||||
if (containerType == FrameType::FlexContainer &&
|
||||
if (containerType == LayoutFrameType::FlexContainer &&
|
||||
aContainerFrame->HasAnyStateBits(NS_STATE_FLEX_IS_LEGACY_WEBKIT_BOX) &&
|
||||
aFrame->IsPlaceholderFrame()) {
|
||||
return true;
|
||||
@ -10833,8 +10837,8 @@ VerifyGridFlexContainerChildren(nsIFrame* aParentFrame,
|
||||
{
|
||||
#ifdef DEBUG
|
||||
auto parentType = aParentFrame->Type();
|
||||
if (parentType != FrameType::FlexContainer &&
|
||||
parentType != FrameType::GridContainer) {
|
||||
if (parentType != LayoutFrameType::FlexContainer &&
|
||||
parentType != LayoutFrameType::GridContainer) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -11758,8 +11762,8 @@ nsCSSFrameConstructor::WrapFramesInFirstLetterFrame(
|
||||
while (frame) {
|
||||
nsIFrame* nextFrame = frame->GetNextSibling();
|
||||
|
||||
FrameType frameType = frame->Type();
|
||||
if (FrameType::Text == frameType) {
|
||||
LayoutFrameType frameType = frame->Type();
|
||||
if (LayoutFrameType::Text == frameType) {
|
||||
// Wrap up first-letter content in a letter frame
|
||||
nsIContent* textContent = frame->GetContent();
|
||||
if (IsFirstLetterContent(textContent)) {
|
||||
@ -11774,7 +11778,7 @@ nsCSSFrameConstructor::WrapFramesInFirstLetterFrame(
|
||||
*aStopLooking = true;
|
||||
return;
|
||||
}
|
||||
} else if (IsInlineFrame(frame) && frameType != FrameType::Br) {
|
||||
} else if (IsInlineFrame(frame) && frameType != LayoutFrameType::Br) {
|
||||
nsIFrame* kids = frame->PrincipalChildList().FirstChild();
|
||||
WrapFramesInFirstLetterFrame(aBlockFrame, aBlockContinuation,
|
||||
static_cast<nsContainerFrame*>(frame),
|
||||
@ -12532,9 +12536,9 @@ nsCSSFrameConstructor::WipeContainingBlock(nsFrameConstructorState& aState,
|
||||
// Situation #2 is a flex or grid container frame into which we're inserting
|
||||
// new inline non-replaced children, adjacent to an existing anonymous
|
||||
// flex or grid item.
|
||||
FrameType frameType = aFrame->Type();
|
||||
if (frameType == FrameType::FlexContainer ||
|
||||
frameType == FrameType::GridContainer) {
|
||||
LayoutFrameType frameType = aFrame->Type();
|
||||
if (frameType == LayoutFrameType::FlexContainer ||
|
||||
frameType == LayoutFrameType::GridContainer) {
|
||||
FCItemIterator iter(aItems);
|
||||
|
||||
// Check if we're adding to-be-wrapped content right *after* an existing
|
||||
@ -12603,7 +12607,7 @@ nsCSSFrameConstructor::WipeContainingBlock(nsFrameConstructorState& aState,
|
||||
// their sibling changes.
|
||||
// 2) The first effective child of a ruby frame must always be a ruby
|
||||
// base container. It should be created or destroyed accordingly.
|
||||
if (IsRubyPseudo(aFrame) || frameType == FrameType::Ruby ||
|
||||
if (IsRubyPseudo(aFrame) || frameType == LayoutFrameType::Ruby ||
|
||||
RubyUtils::IsRubyContainerBox(frameType)) {
|
||||
// We want to optimize it better, and avoid reframing as much as
|
||||
// possible. But given the cases above, and the fact that a ruby
|
||||
|
@ -614,8 +614,8 @@ private:
|
||||
return GetParentType(aParentFrame->Type());
|
||||
}
|
||||
|
||||
/* Get the parent type for the given FrameType */
|
||||
static ParentType GetParentType(mozilla::FrameType aFrameType);
|
||||
/* Get the parent type for the given LayoutFrameType */
|
||||
static ParentType GetParentType(mozilla::LayoutFrameType aFrameType);
|
||||
|
||||
static bool IsRubyParentType(ParentType aParentType) {
|
||||
return (aParentType == eTypeRuby ||
|
||||
|
@ -375,7 +375,7 @@ nsCaret::GetGeometryForFrame(nsIFrame* aFrame,
|
||||
// Clamp the inline-position to be within our scroll frame. If we don't, then
|
||||
// it clips us, and we don't appear at all. See bug 335560.
|
||||
nsIFrame* scrollFrame =
|
||||
nsLayoutUtils::GetClosestFrameOfType(aFrame, FrameType::Scroll);
|
||||
nsLayoutUtils::GetClosestFrameOfType(aFrame, LayoutFrameType::Scroll);
|
||||
if (scrollFrame) {
|
||||
// First, use the scrollFrame to get at the scrollable view that we're in.
|
||||
nsIScrollableFrame *sf = do_QueryFrame(scrollFrame);
|
||||
|
@ -2580,7 +2580,7 @@ nsDocumentViewer::FindContainerView()
|
||||
// cases. Treat that as display:none, the document is not
|
||||
// displayed.
|
||||
if (!subdocFrame->IsSubDocumentFrame()) {
|
||||
NS_WARNING_ASSERTION(subdocFrame->Type() == FrameType::None,
|
||||
NS_WARNING_ASSERTION(subdocFrame->Type() == LayoutFrameType::None,
|
||||
"Subdocument container has non-subdocument frame");
|
||||
return nullptr;
|
||||
}
|
||||
|
@ -1532,8 +1532,8 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame)
|
||||
}
|
||||
|
||||
} else {
|
||||
FrameType childType = aChildFrame->Type();
|
||||
if (FrameType::MenuPopup == childType) {
|
||||
LayoutFrameType childType = aChildFrame->Type();
|
||||
if (LayoutFrameType::MenuPopup == childType) {
|
||||
nsIFrame* parent = aChildFrame->GetParent();
|
||||
MOZ_ASSERT(parent, "nsMenuPopupFrame can't be the root frame");
|
||||
if (parent) {
|
||||
@ -1550,7 +1550,7 @@ nsLayoutUtils::GetChildListNameFor(nsIFrame* aChildFrame)
|
||||
} else {
|
||||
id = nsIFrame::kPrincipalList;
|
||||
}
|
||||
} else if (FrameType::TableColGroup == childType) {
|
||||
} else if (LayoutFrameType::TableColGroup == childType) {
|
||||
id = nsIFrame::kColGroupList;
|
||||
} else if (aChildFrame->IsTableCaption()) {
|
||||
id = nsIFrame::kCaptionList;
|
||||
@ -1622,7 +1622,7 @@ nsLayoutUtils::GetAfterFrame(const nsIContent* aContent)
|
||||
// static
|
||||
nsIFrame*
|
||||
nsLayoutUtils::GetClosestFrameOfType(nsIFrame* aFrame,
|
||||
FrameType aFrameType,
|
||||
LayoutFrameType aFrameType,
|
||||
nsIFrame* aStopAt)
|
||||
{
|
||||
for (nsIFrame* frame = aFrame; frame; frame = frame->GetParent()) {
|
||||
@ -1639,7 +1639,7 @@ nsLayoutUtils::GetClosestFrameOfType(nsIFrame* aFrame,
|
||||
/* static */ nsIFrame*
|
||||
nsLayoutUtils::GetPageFrame(nsIFrame* aFrame)
|
||||
{
|
||||
return GetClosestFrameOfType(aFrame, FrameType::Page);
|
||||
return GetClosestFrameOfType(aFrame, LayoutFrameType::Page);
|
||||
}
|
||||
|
||||
// static
|
||||
@ -2897,7 +2897,7 @@ nsRect
|
||||
nsLayoutUtils::ClampRectToScrollFrames(nsIFrame* aFrame, const nsRect& aRect)
|
||||
{
|
||||
nsIFrame* closestScrollFrame =
|
||||
nsLayoutUtils::GetClosestFrameOfType(aFrame, FrameType::Scroll);
|
||||
nsLayoutUtils::GetClosestFrameOfType(aFrame, LayoutFrameType::Scroll);
|
||||
|
||||
nsRect resultRect = aRect;
|
||||
|
||||
@ -2915,9 +2915,8 @@ nsLayoutUtils::ClampRectToScrollFrames(nsIFrame* aFrame, const nsRect& aRect)
|
||||
}
|
||||
|
||||
// Get next ancestor scroll frame.
|
||||
closestScrollFrame =
|
||||
nsLayoutUtils::GetClosestFrameOfType(closestScrollFrame->GetParent(),
|
||||
FrameType::Scroll);
|
||||
closestScrollFrame = nsLayoutUtils::GetClosestFrameOfType(
|
||||
closestScrollFrame->GetParent(), LayoutFrameType::Scroll);
|
||||
}
|
||||
|
||||
return resultRect;
|
||||
@ -3013,9 +3012,8 @@ GetContainingSVGTextFrame(nsIFrame* aFrame)
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return static_cast<SVGTextFrame*>
|
||||
(nsLayoutUtils::GetClosestFrameOfType(aFrame->GetParent(),
|
||||
FrameType::SVGText));
|
||||
return static_cast<SVGTextFrame*>(nsLayoutUtils::GetClosestFrameOfType(
|
||||
aFrame->GetParent(), LayoutFrameType::SVGText));
|
||||
}
|
||||
|
||||
nsPoint
|
||||
@ -3596,18 +3594,18 @@ nsLayoutUtils::PaintFrame(nsRenderingContext* aRenderingContext, nsIFrame* aFram
|
||||
aFrame->BuildDisplayListForStackingContext(&builder, dirtyRect, &list);
|
||||
}
|
||||
|
||||
FrameType frameType = aFrame->Type();
|
||||
LayoutFrameType frameType = aFrame->Type();
|
||||
|
||||
// For the viewport frame in print preview/page layout we want to paint
|
||||
// the grey background behind the page, not the canvas color.
|
||||
if (frameType == FrameType::Viewport &&
|
||||
if (frameType == LayoutFrameType::Viewport &&
|
||||
nsLayoutUtils::NeedsPrintPreviewBackground(presContext)) {
|
||||
nsRect bounds = nsRect(builder.ToReferenceFrame(aFrame),
|
||||
aFrame->GetSize());
|
||||
nsDisplayListBuilder::AutoBuildingDisplayList
|
||||
buildingDisplayList(&builder, aFrame, bounds, false);
|
||||
presShell->AddPrintPreviewBackgroundItem(builder, list, aFrame, bounds);
|
||||
} else if (frameType != FrameType::Page) {
|
||||
} else if (frameType != LayoutFrameType::Page) {
|
||||
// For printing, this function is first called on an nsPageFrame, which
|
||||
// creates a display list with a PageContent item. The PageContent item's
|
||||
// paint function calls this function on the nsPageFrame's child which is
|
||||
@ -4657,9 +4655,10 @@ GetPercentBSize(const nsStyleCoord& aStyle,
|
||||
NS_ASSERTION(bSizeCoord.GetUnit() == eStyleUnit_Auto ||
|
||||
bSizeCoord.HasPercent(),
|
||||
"unknown block-size unit");
|
||||
FrameType fType = f->Type();
|
||||
if (fType != FrameType::Viewport && fType != FrameType::Canvas &&
|
||||
fType != FrameType::PageContent) {
|
||||
LayoutFrameType fType = f->Type();
|
||||
if (fType != LayoutFrameType::Viewport &&
|
||||
fType != LayoutFrameType::Canvas &&
|
||||
fType != LayoutFrameType::PageContent) {
|
||||
// There's no basis for the percentage height, so it acts like auto.
|
||||
// Should we consider a max-height < min-height pair a basis for
|
||||
// percentage heights? The spec is somewhat unclear, and not doing
|
||||
@ -4835,8 +4834,8 @@ FormControlShrinksForPercentISize(nsIFrame* aFrame)
|
||||
return false;
|
||||
}
|
||||
|
||||
FrameType fType = aFrame->Type();
|
||||
if (fType == FrameType::Meter || fType == FrameType::Progress) {
|
||||
LayoutFrameType fType = aFrame->Type();
|
||||
if (fType == LayoutFrameType::Meter || fType == LayoutFrameType::Progress) {
|
||||
// progress and meter do have this shrinking behavior
|
||||
// FIXME: Maybe these should be nsIFormControlFrame?
|
||||
return true;
|
||||
@ -4848,8 +4847,8 @@ FormControlShrinksForPercentISize(nsIFrame* aFrame)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fType == FrameType::GfxButtonControl ||
|
||||
fType == FrameType::HTMLButtonControl) {
|
||||
if (fType == LayoutFrameType::GfxButtonControl ||
|
||||
fType == LayoutFrameType::HTMLButtonControl) {
|
||||
// Buttons don't have this shrinking behavior. (Note that color
|
||||
// inputs do, even though they inherit from button, so we can't use
|
||||
// do_QueryFrame here.)
|
||||
@ -5967,15 +5966,15 @@ nsLayoutUtils::GetFirstLinePosition(WritingMode aWM,
|
||||
if (!block) {
|
||||
// For the first-line baseline we also have to check for a table, and if
|
||||
// so, use the baseline of its first row.
|
||||
FrameType fType = aFrame->Type();
|
||||
if (fType == FrameType::TableWrapper ||
|
||||
fType == FrameType::FlexContainer ||
|
||||
fType == FrameType::GridContainer) {
|
||||
if ((fType == FrameType::GridContainer &&
|
||||
LayoutFrameType fType = aFrame->Type();
|
||||
if (fType == LayoutFrameType::TableWrapper ||
|
||||
fType == LayoutFrameType::FlexContainer ||
|
||||
fType == LayoutFrameType::GridContainer) {
|
||||
if ((fType == LayoutFrameType::GridContainer &&
|
||||
aFrame->HasAnyStateBits(NS_STATE_GRID_SYNTHESIZE_BASELINE)) ||
|
||||
(fType == FrameType::FlexContainer &&
|
||||
(fType == LayoutFrameType::FlexContainer &&
|
||||
aFrame->HasAnyStateBits(NS_STATE_FLEX_SYNTHESIZE_BASELINE)) ||
|
||||
(fType == FrameType::TableWrapper &&
|
||||
(fType == LayoutFrameType::TableWrapper &&
|
||||
static_cast<const nsTableWrapperFrame*>(aFrame)->GetRowCount() == 0)) {
|
||||
// empty grid/flex/table container
|
||||
aResult->mBStart = 0;
|
||||
@ -5993,7 +5992,7 @@ nsLayoutUtils::GetFirstLinePosition(WritingMode aWM,
|
||||
}
|
||||
|
||||
// For first-line baselines, we have to consider scroll frames.
|
||||
if (fType == FrameType::Scroll) {
|
||||
if (fType == LayoutFrameType::Scroll) {
|
||||
nsIScrollableFrame *sFrame = do_QueryFrame(const_cast<nsIFrame*>(aFrame));
|
||||
if (!sFrame) {
|
||||
NS_NOTREACHED("not scroll frame");
|
||||
@ -6011,7 +6010,7 @@ nsLayoutUtils::GetFirstLinePosition(WritingMode aWM,
|
||||
return false;
|
||||
}
|
||||
|
||||
if (fType == FrameType::FieldSet) {
|
||||
if (fType == LayoutFrameType::FieldSet) {
|
||||
LinePosition kidPosition;
|
||||
nsIFrame* kid = aFrame->PrincipalChildList().FirstChild();
|
||||
// kid might be a legend frame here, but that's ok.
|
||||
@ -6942,14 +6941,14 @@ nsLayoutUtils::GetFrameTransparency(nsIFrame* aBackgroundFrame,
|
||||
static bool IsPopupFrame(nsIFrame* aFrame)
|
||||
{
|
||||
// aFrame is a popup it's the list control frame dropdown for a combobox.
|
||||
FrameType frameType = aFrame->Type();
|
||||
if (frameType == FrameType::ListControl) {
|
||||
LayoutFrameType frameType = aFrame->Type();
|
||||
if (frameType == LayoutFrameType::ListControl) {
|
||||
nsListControlFrame* lcf = static_cast<nsListControlFrame*>(aFrame);
|
||||
return lcf->IsInDropDownMode();
|
||||
}
|
||||
|
||||
// ... or if it's a XUL menupopup frame.
|
||||
return frameType == FrameType::MenuPopup;
|
||||
return frameType == LayoutFrameType::MenuPopup;
|
||||
}
|
||||
|
||||
/* static */ bool
|
||||
@ -7126,9 +7125,9 @@ nsLayoutUtils::IsReallyFixedPos(nsIFrame* aFrame)
|
||||
NS_STYLE_POSITION_FIXED,
|
||||
"IsReallyFixedPos called on non-'position:fixed' frame");
|
||||
|
||||
FrameType parentType = aFrame->GetParent()->Type();
|
||||
return parentType == FrameType::Viewport ||
|
||||
parentType == FrameType::PageContent;
|
||||
LayoutFrameType parentType = aFrame->GetParent()->Type();
|
||||
return parentType == LayoutFrameType::Viewport ||
|
||||
parentType == LayoutFrameType::PageContent;
|
||||
}
|
||||
|
||||
nsLayoutUtils::SurfaceFromElementResult
|
||||
@ -7937,19 +7936,19 @@ nsLayoutUtils::FontSizeInflationInner(const nsIFrame *aFrame,
|
||||
f && !f->IsContainerForFontSizeInflation();
|
||||
f = f->GetParent()) {
|
||||
nsIContent* content = f->GetContent();
|
||||
FrameType fType = f->Type();
|
||||
LayoutFrameType fType = f->Type();
|
||||
nsIFrame* parent = f->GetParent();
|
||||
// Also, if there is more than one frame corresponding to a single
|
||||
// content node, we want the outermost one.
|
||||
if (!(parent && parent->GetContent() == content) &&
|
||||
// ignore width/height on inlines since they don't apply
|
||||
fType != FrameType::Inline &&
|
||||
fType != LayoutFrameType::Inline &&
|
||||
// ignore width on radios and checkboxes since we enlarge them and
|
||||
// they have width/height in ua.css
|
||||
fType != FrameType::FormControl) {
|
||||
fType != LayoutFrameType::FormControl) {
|
||||
// ruby annotations should have the same inflation as its
|
||||
// grandparent, which is the ruby frame contains the annotation.
|
||||
if (fType == FrameType::RubyText) {
|
||||
if (fType == LayoutFrameType::RubyText) {
|
||||
MOZ_ASSERT(parent && parent->IsRubyTextContainerFrame());
|
||||
nsIFrame* grandparent = parent->GetParent();
|
||||
MOZ_ASSERT(grandparent && grandparent->IsRubyFrame());
|
||||
|
@ -66,7 +66,7 @@ struct nsOverflowAreas;
|
||||
namespace mozilla {
|
||||
enum class CSSPseudoElementType : uint8_t;
|
||||
class EventListenerManager;
|
||||
enum class FrameType : uint8_t;
|
||||
enum class LayoutFrameType : uint8_t;
|
||||
struct IntrinsicSize;
|
||||
struct ContainerLayerParameters;
|
||||
class WritingMode;
|
||||
@ -319,7 +319,7 @@ public:
|
||||
* such ancestor exists
|
||||
*/
|
||||
static nsIFrame* GetClosestFrameOfType(nsIFrame* aFrame,
|
||||
mozilla::FrameType aFrameType,
|
||||
mozilla::LayoutFrameType aFrameType,
|
||||
nsIFrame* aStopAt = nullptr);
|
||||
|
||||
/**
|
||||
@ -327,7 +327,7 @@ public:
|
||||
* ancestor that (or the frame itself) is a "Page" frame, if any.
|
||||
*
|
||||
* @param aFrame the frame to start at
|
||||
* @return a frame of type mozilla::FrameType::Page or nullptr if no
|
||||
* @return a frame of type mozilla::LayoutFrameType::Page or nullptr if no
|
||||
* such ancestor exists
|
||||
*/
|
||||
static nsIFrame* GetPageFrame(nsIFrame* aFrame);
|
||||
|
@ -23,7 +23,7 @@ using mozilla::dom::HTMLInputElement;
|
||||
using mozilla::dom::CallerType;
|
||||
|
||||
nsColorControlFrame::nsColorControlFrame(nsStyleContext* aContext)
|
||||
: nsHTMLButtonControlFrame(aContext, FrameType::ColorControl)
|
||||
: nsHTMLButtonControlFrame(aContext, LayoutFrameType::ColorControl)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -223,7 +223,7 @@ static int32_t gReflowInx = -1;
|
||||
//------------------------------------------------------
|
||||
|
||||
nsComboboxControlFrame::nsComboboxControlFrame(nsStyleContext* aContext)
|
||||
: nsBlockFrame(aContext, FrameType::ComboboxControl)
|
||||
: nsBlockFrame(aContext, LayoutFrameType::ComboboxControl)
|
||||
, mDisplayFrame(nullptr)
|
||||
, mButtonFrame(nullptr)
|
||||
, mDropdownFrame(nullptr)
|
||||
@ -1278,7 +1278,7 @@ public:
|
||||
|
||||
nsComboboxDisplayFrame(nsStyleContext* aContext,
|
||||
nsComboboxControlFrame* aComboBox)
|
||||
: nsBlockFrame(aContext, FrameType::ComboboxDisplay)
|
||||
: nsBlockFrame(aContext, LayoutFrameType::ComboboxDisplay)
|
||||
, mComboBox(aComboBox)
|
||||
{}
|
||||
|
||||
|
@ -43,7 +43,7 @@ NS_QUERYFRAME_HEAD(nsDateTimeControlFrame)
|
||||
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
|
||||
|
||||
nsDateTimeControlFrame::nsDateTimeControlFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, FrameType::DateTimeControl)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::DateTimeControl)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ NS_NewFieldSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsFieldSetFrame)
|
||||
|
||||
nsFieldSetFrame::nsFieldSetFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, FrameType::FieldSet)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::FieldSet)
|
||||
, mLegendRect(GetWritingMode())
|
||||
{
|
||||
mLegendSpace = 0;
|
||||
|
@ -18,7 +18,7 @@ using namespace mozilla;
|
||||
//#define FCF_NOISY
|
||||
|
||||
nsFormControlFrame::nsFormControlFrame(nsStyleContext* aContext)
|
||||
: nsAtomicContainerFrame(aContext, FrameType::FormControl)
|
||||
: nsAtomicContainerFrame(aContext, LayoutFrameType::FormControl)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@
|
||||
using namespace mozilla;
|
||||
|
||||
nsGfxButtonControlFrame::nsGfxButtonControlFrame(nsStyleContext* aContext)
|
||||
: nsHTMLButtonControlFrame(aContext, FrameType::GfxButtonControl)
|
||||
: nsHTMLButtonControlFrame(aContext, LayoutFrameType::GfxButtonControl)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -27,7 +27,7 @@ NS_NewHTMLButtonControlFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsHTMLButtonControlFrame)
|
||||
|
||||
nsHTMLButtonControlFrame::nsHTMLButtonControlFrame(nsStyleContext* aContext,
|
||||
FrameType aType)
|
||||
LayoutFrameType aType)
|
||||
: nsContainerFrame(aContext, aType)
|
||||
{
|
||||
}
|
||||
|
@ -19,7 +19,8 @@ class nsHTMLButtonControlFrame : public nsContainerFrame,
|
||||
{
|
||||
public:
|
||||
explicit nsHTMLButtonControlFrame(nsStyleContext* aContext)
|
||||
: nsHTMLButtonControlFrame(aContext, mozilla::FrameType::HTMLButtonControl)
|
||||
: nsHTMLButtonControlFrame(aContext,
|
||||
mozilla::LayoutFrameType::HTMLButtonControl)
|
||||
{}
|
||||
|
||||
~nsHTMLButtonControlFrame();
|
||||
@ -105,7 +106,8 @@ public:
|
||||
nsStyleChangeList& aChangeList,
|
||||
nsChangeHint aHintForThisFrame) override;
|
||||
protected:
|
||||
nsHTMLButtonControlFrame(nsStyleContext* aContext, mozilla::FrameType aType);
|
||||
nsHTMLButtonControlFrame(nsStyleContext* aContext,
|
||||
mozilla::LayoutFrameType aType);
|
||||
|
||||
virtual bool IsInput() { return false; }
|
||||
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
};
|
||||
|
||||
nsImageControlFrame::nsImageControlFrame(nsStyleContext* aContext)
|
||||
: nsImageFrame(aContext, FrameType::ImageControl)
|
||||
: nsImageFrame(aContext, LayoutFrameType::ImageControl)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -17,7 +17,7 @@ public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
explicit nsLegendFrame(nsStyleContext* aContext)
|
||||
: nsBlockFrame(aContext, mozilla::FrameType::Legend)
|
||||
: nsBlockFrame(aContext, mozilla::LayoutFrameType::Legend)
|
||||
{}
|
||||
|
||||
virtual void Reflow(nsPresContext* aPresContext,
|
||||
|
@ -92,7 +92,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsListControlFrame)
|
||||
|
||||
//---------------------------------------------------------
|
||||
nsListControlFrame::nsListControlFrame(nsStyleContext* aContext)
|
||||
: nsHTMLScrollFrame(aContext, FrameType::ListControl, false)
|
||||
: nsHTMLScrollFrame(aContext, LayoutFrameType::ListControl, false)
|
||||
, mView(nullptr)
|
||||
, mMightNeedSecondPass(false)
|
||||
, mHasPendingInterruptAtStartOfReflow(false)
|
||||
|
@ -39,7 +39,7 @@ NS_NewMeterFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsMeterFrame)
|
||||
|
||||
nsMeterFrame::nsMeterFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, FrameType::Meter)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::Meter)
|
||||
, mBarDiv(nullptr)
|
||||
{
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ NS_QUERYFRAME_HEAD(nsNumberControlFrame)
|
||||
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
|
||||
|
||||
nsNumberControlFrame::nsNumberControlFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, FrameType::NumberControl)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::NumberControl)
|
||||
, mHandlingInputEvent(false)
|
||||
{
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ NS_NewProgressFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsProgressFrame)
|
||||
|
||||
nsProgressFrame::nsProgressFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, FrameType::Progress)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::Progress)
|
||||
, mBarDiv(nullptr)
|
||||
{
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ NS_NewRangeFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
}
|
||||
|
||||
nsRangeFrame::nsRangeFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, FrameType::Range)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::Range)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -104,7 +104,7 @@ private:
|
||||
#endif
|
||||
|
||||
nsTextControlFrame::nsTextControlFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, FrameType::TextInput)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::TextInput)
|
||||
, mFirstBaseline(NS_INTRINSIC_WIDTH_UNKNOWN)
|
||||
, mEditorHasBeenInitialized(false)
|
||||
, mIsProcessing(false)
|
||||
|
@ -64,7 +64,7 @@ public:
|
||||
|
||||
protected:
|
||||
explicit BRFrame(nsStyleContext* aContext)
|
||||
: nsFrame(aContext, FrameType::Br)
|
||||
: nsFrame(aContext, LayoutFrameType::Br)
|
||||
{}
|
||||
|
||||
virtual ~BRFrame();
|
||||
|
@ -31,7 +31,7 @@ NS_NewDetailsFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
namespace mozilla {
|
||||
|
||||
DetailsFrame::DetailsFrame(nsStyleContext* aContext)
|
||||
: nsBlockFrame(aContext, FrameType::Details)
|
||||
: nsBlockFrame(aContext, LayoutFrameType::Details)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -327,8 +327,8 @@ ReflowInput::SetComputedWidth(nscoord aComputedWidth)
|
||||
NS_PRECONDITION(aComputedWidth >= 0, "Invalid computed width");
|
||||
if (ComputedWidth() != aComputedWidth) {
|
||||
ComputedWidth() = aComputedWidth;
|
||||
FrameType frameType = mFrame->Type();
|
||||
if (frameType != FrameType::Viewport || // Or check GetParent()?
|
||||
LayoutFrameType frameType = mFrame->Type();
|
||||
if (frameType != LayoutFrameType::Viewport || // Or check GetParent()?
|
||||
mWritingMode.IsVertical()) {
|
||||
InitResizeFlags(mFrame->PresContext(), frameType);
|
||||
}
|
||||
@ -351,8 +351,8 @@ ReflowInput::SetComputedHeight(nscoord aComputedHeight)
|
||||
NS_PRECONDITION(aComputedHeight >= 0, "Invalid computed height");
|
||||
if (ComputedHeight() != aComputedHeight) {
|
||||
ComputedHeight() = aComputedHeight;
|
||||
FrameType frameType = mFrame->Type();
|
||||
if (frameType != FrameType::Viewport || !mWritingMode.IsVertical()) {
|
||||
LayoutFrameType frameType = mFrame->Type();
|
||||
if (frameType != LayoutFrameType::Viewport || !mWritingMode.IsVertical()) {
|
||||
InitResizeFlags(mFrame->PresContext(), frameType);
|
||||
}
|
||||
}
|
||||
@ -390,7 +390,7 @@ ReflowInput::Init(nsPresContext* aPresContext,
|
||||
mStylePadding = mFrame->StylePadding();
|
||||
mStyleText = mFrame->StyleText();
|
||||
|
||||
FrameType type = mFrame->Type();
|
||||
LayoutFrameType type = mFrame->Type();
|
||||
|
||||
InitFrameType(type);
|
||||
InitCBReflowInput();
|
||||
@ -410,7 +410,7 @@ ReflowInput::Init(nsPresContext* aPresContext,
|
||||
!(parent->IsScrollFrame() &&
|
||||
parent->StyleDisplay()->mOverflowY != NS_STYLE_OVERFLOW_HIDDEN)) {
|
||||
mFrame->AddStateBits(NS_FRAME_IN_CONSTRAINED_BSIZE);
|
||||
} else if (type == FrameType::SVGForeignObject) {
|
||||
} else if (type == LayoutFrameType::SVGForeignObject) {
|
||||
// An SVG foreignObject frame is inherently constrained block-size.
|
||||
mFrame->AddStateBits(NS_FRAME_IN_CONSTRAINED_BSIZE);
|
||||
} else {
|
||||
@ -466,7 +466,7 @@ ReflowInput::Init(nsPresContext* aPresContext,
|
||||
// boundary. Normally this is the block-size, but for column sets
|
||||
// with auto-height it's the inline-size, so that they can add
|
||||
// columns in the container's block direction
|
||||
if (type == FrameType::ColumnSet &&
|
||||
if (type == LayoutFrameType::ColumnSet &&
|
||||
eStyleUnit_Auto == mStylePosition->ISize(mWritingMode).GetUnit()) {
|
||||
ComputedISize() = NS_UNCONSTRAINEDSIZE;
|
||||
} else {
|
||||
@ -476,7 +476,7 @@ ReflowInput::Init(nsPresContext* aPresContext,
|
||||
|
||||
LAYOUT_WARN_IF_FALSE((mFrameType == NS_CSS_FRAME_TYPE_INLINE &&
|
||||
!mFrame->IsFrameOfType(nsIFrame::eReplaced)) ||
|
||||
type == FrameType::Text ||
|
||||
type == LayoutFrameType::Text ||
|
||||
ComputedISize() != NS_UNCONSTRAINEDSIZE,
|
||||
"have unconstrained inline-size; this should only "
|
||||
"result from very large sizes, not attempts at "
|
||||
@ -516,13 +516,13 @@ void ReflowInput::InitCBReflowInput()
|
||||
* this function as well
|
||||
*/
|
||||
static bool
|
||||
IsQuirkContainingBlockHeight(const ReflowInput* rs, FrameType aFrameType)
|
||||
IsQuirkContainingBlockHeight(const ReflowInput* rs, LayoutFrameType aFrameType)
|
||||
{
|
||||
if (FrameType::Block == aFrameType ||
|
||||
if (LayoutFrameType::Block == aFrameType ||
|
||||
#ifdef MOZ_XUL
|
||||
FrameType::XULLabel == aFrameType ||
|
||||
LayoutFrameType::XULLabel == aFrameType ||
|
||||
#endif
|
||||
FrameType::Scroll == aFrameType) {
|
||||
LayoutFrameType::Scroll == aFrameType) {
|
||||
// Note: This next condition could change due to a style change,
|
||||
// but that would cause a style reflow anyway, which means we're ok.
|
||||
if (NS_AUTOHEIGHT == rs->ComputedHeight()) {
|
||||
@ -535,7 +535,8 @@ IsQuirkContainingBlockHeight(const ReflowInput* rs, FrameType aFrameType)
|
||||
}
|
||||
|
||||
void
|
||||
ReflowInput::InitResizeFlags(nsPresContext* aPresContext, FrameType aFrameType)
|
||||
ReflowInput::InitResizeFlags(nsPresContext* aPresContext,
|
||||
LayoutFrameType aFrameType)
|
||||
{
|
||||
SetBResize(false);
|
||||
SetIResize(false);
|
||||
@ -809,7 +810,7 @@ ReflowInput::GetContainingBlockContentISize(WritingMode aWritingMode) const
|
||||
}
|
||||
|
||||
void
|
||||
ReflowInput::InitFrameType(FrameType aFrameType)
|
||||
ReflowInput::InitFrameType(LayoutFrameType aFrameType)
|
||||
{
|
||||
const nsStyleDisplay *disp = mStyleDisplay;
|
||||
nsCSSFrameType frameType;
|
||||
@ -823,7 +824,7 @@ ReflowInput::InitFrameType(FrameType aFrameType)
|
||||
|
||||
DISPLAY_INIT_TYPE(mFrame, this);
|
||||
|
||||
if (aFrameType == FrameType::Table) {
|
||||
if (aFrameType == LayoutFrameType::Table) {
|
||||
mFrameType = NS_CSS_FRAME_TYPE_BLOCK;
|
||||
return;
|
||||
}
|
||||
@ -1121,7 +1122,7 @@ struct nsHypotheticalPosition {
|
||||
static bool
|
||||
GetIntrinsicSizeFor(nsIFrame* aFrame,
|
||||
nsSize& aIntrinsicSize,
|
||||
FrameType aFrameType)
|
||||
LayoutFrameType aFrameType)
|
||||
{
|
||||
// See if it is an image frame
|
||||
bool success = false;
|
||||
@ -1130,7 +1131,7 @@ GetIntrinsicSizeFor(nsIFrame* aFrame,
|
||||
// size for is an image frame
|
||||
// XXX We should add back the GetReflowOutput() function and one of the
|
||||
// things should be the intrinsic size...
|
||||
if (aFrameType == FrameType::Image) {
|
||||
if (aFrameType == LayoutFrameType::Image) {
|
||||
nsImageFrame* imageFrame = (nsImageFrame*)aFrame;
|
||||
|
||||
if (NS_SUCCEEDED(imageFrame->GetIntrinsicImageSize(aIntrinsicSize))) {
|
||||
@ -1258,7 +1259,7 @@ ReflowInput::CalculateHypotheticalPosition(
|
||||
nsIFrame* aPlaceholderFrame,
|
||||
const ReflowInput* cbrs,
|
||||
nsHypotheticalPosition& aHypotheticalPos,
|
||||
FrameType aFrameType) const
|
||||
LayoutFrameType aFrameType) const
|
||||
{
|
||||
NS_ASSERTION(mStyleDisplay->mOriginalDisplay != StyleDisplay::None,
|
||||
"mOriginalDisplay has not been properly initialized");
|
||||
@ -1557,14 +1558,14 @@ void
|
||||
ReflowInput::InitAbsoluteConstraints(nsPresContext* aPresContext,
|
||||
const ReflowInput* cbrs,
|
||||
const LogicalSize& aCBSize,
|
||||
FrameType aFrameType)
|
||||
LayoutFrameType aFrameType)
|
||||
{
|
||||
WritingMode wm = GetWritingMode();
|
||||
WritingMode cbwm = cbrs->GetWritingMode();
|
||||
NS_PRECONDITION(aCBSize.BSize(cbwm) != NS_AUTOHEIGHT,
|
||||
"containing block bsize must be constrained");
|
||||
|
||||
NS_ASSERTION(aFrameType != FrameType::Table,
|
||||
NS_ASSERTION(aFrameType != LayoutFrameType::Table,
|
||||
"InitAbsoluteConstraints should not be called on table frames");
|
||||
NS_ASSERTION(mFrame->GetStateBits() & NS_FRAME_OUT_OF_FLOW,
|
||||
"Why are we here?");
|
||||
@ -1962,14 +1963,14 @@ CalcQuirkContainingBlockHeight(const ReflowInput* aCBReflowInput)
|
||||
|
||||
const ReflowInput* rs = aCBReflowInput;
|
||||
for (; rs; rs = rs->mParentReflowInput) {
|
||||
FrameType frameType = rs->mFrame->Type();
|
||||
LayoutFrameType frameType = rs->mFrame->Type();
|
||||
// if the ancestor is auto height then skip it and continue up if it
|
||||
// is the first block frame and possibly the body/html
|
||||
if (FrameType::Block == frameType ||
|
||||
if (LayoutFrameType::Block == frameType ||
|
||||
#ifdef MOZ_XUL
|
||||
FrameType::XULLabel == frameType ||
|
||||
LayoutFrameType::XULLabel == frameType ||
|
||||
#endif
|
||||
FrameType::Scroll == frameType) {
|
||||
LayoutFrameType::Scroll == frameType) {
|
||||
|
||||
secondAncestorRI = firstAncestorRI;
|
||||
firstAncestorRI = rs;
|
||||
@ -1985,9 +1986,9 @@ CalcQuirkContainingBlockHeight(const ReflowInput* aCBReflowInput)
|
||||
continue;
|
||||
}
|
||||
}
|
||||
} else if (FrameType::Canvas == frameType) {
|
||||
} else if (LayoutFrameType::Canvas == frameType) {
|
||||
// Always continue on to the height calculation
|
||||
} else if (FrameType::PageContent == frameType) {
|
||||
} else if (LayoutFrameType::PageContent == frameType) {
|
||||
nsIFrame* prevInFlow = rs->mFrame->GetPrevInFlow();
|
||||
// only use the page content frame for a height basis if it is the first in flow
|
||||
if (prevInFlow)
|
||||
@ -1999,15 +2000,15 @@ CalcQuirkContainingBlockHeight(const ReflowInput* aCBReflowInput)
|
||||
|
||||
// if the ancestor is the page content frame then the percent base is
|
||||
// the avail height, otherwise it is the computed height
|
||||
result = (FrameType::PageContent == frameType) ? rs->AvailableHeight()
|
||||
: rs->ComputedHeight();
|
||||
result = (LayoutFrameType::PageContent == frameType) ? rs->AvailableHeight()
|
||||
: rs->ComputedHeight();
|
||||
// if unconstrained - don't sutract borders - would result in huge height
|
||||
if (NS_AUTOHEIGHT == result) return result;
|
||||
|
||||
// if we got to the canvas or page content frame, then subtract out
|
||||
// margin/border/padding for the BODY and HTML elements
|
||||
if ((FrameType::Canvas == frameType) ||
|
||||
(FrameType::PageContent == frameType)) {
|
||||
if ((LayoutFrameType::Canvas == frameType) ||
|
||||
(LayoutFrameType::PageContent == frameType)) {
|
||||
|
||||
result -= GetBlockMarginBorderPadding(firstAncestorRI);
|
||||
result -= GetBlockMarginBorderPadding(secondAncestorRI);
|
||||
@ -2032,7 +2033,7 @@ CalcQuirkContainingBlockHeight(const ReflowInput* aCBReflowInput)
|
||||
|
||||
}
|
||||
// if we got to the html frame (a block child of the canvas) ...
|
||||
else if (FrameType::Block == frameType && rs->mParentReflowInput &&
|
||||
else if (LayoutFrameType::Block == frameType && rs->mParentReflowInput &&
|
||||
rs->mParentReflowInput->mFrame->IsCanvasFrame()) {
|
||||
// ... then subtract out margin/border/padding for the BODY element
|
||||
result -= GetBlockMarginBorderPadding(secondAncestorRI);
|
||||
@ -2161,7 +2162,7 @@ ReflowInput::InitConstraints(nsPresContext* aPresContext,
|
||||
const LogicalSize& aContainingBlockSize,
|
||||
const nsMargin* aBorder,
|
||||
const nsMargin* aPadding,
|
||||
FrameType aFrameType)
|
||||
LayoutFrameType aFrameType)
|
||||
{
|
||||
WritingMode wm = GetWritingMode();
|
||||
DISPLAY_INIT_CONSTRAINTS(mFrame, this,
|
||||
@ -2210,7 +2211,7 @@ ReflowInput::InitConstraints(nsPresContext* aPresContext,
|
||||
|
||||
// See if the containing block height is based on the size of its
|
||||
// content
|
||||
FrameType fType;
|
||||
LayoutFrameType fType;
|
||||
if (NS_AUTOHEIGHT == cbSize.BSize(wm)) {
|
||||
// See if the containing block is a cell frame which needs
|
||||
// to use the mComputedHeight of the cell instead of what the cell block passed in.
|
||||
@ -2422,9 +2423,9 @@ ReflowInput::InitConstraints(nsPresContext* aPresContext,
|
||||
// shrink-wrap.
|
||||
// Also shrink-wrap blocks that are orthogonal to their container.
|
||||
if (isBlock &&
|
||||
((aFrameType == FrameType::Legend &&
|
||||
((aFrameType == LayoutFrameType::Legend &&
|
||||
mFrame->StyleContext()->GetPseudo() != nsCSSAnonBoxes::scrolledContent) ||
|
||||
(aFrameType == FrameType::Scroll &&
|
||||
(aFrameType == LayoutFrameType::Scroll &&
|
||||
mFrame->GetContentInsertionFrame()->IsLegendFrame()) ||
|
||||
(mCBReflowInput &&
|
||||
mCBReflowInput->GetWritingMode().IsOrthogonalTo(mWritingMode)))) {
|
||||
@ -2502,7 +2503,7 @@ UpdateProp(FrameProperties& aProps,
|
||||
void
|
||||
SizeComputationInput::InitOffsets(WritingMode aWM,
|
||||
const LogicalSize& aPercentBasis,
|
||||
FrameType aFrameType,
|
||||
LayoutFrameType aFrameType,
|
||||
ReflowInputFlags aFlags,
|
||||
const nsMargin* aBorder,
|
||||
const nsMargin* aPadding)
|
||||
@ -2607,7 +2608,7 @@ SizeComputationInput::InitOffsets(WritingMode aWM,
|
||||
}
|
||||
ComputedPhysicalBorderPadding() += ComputedPhysicalPadding();
|
||||
|
||||
if (aFrameType == FrameType::Table) {
|
||||
if (aFrameType == LayoutFrameType::Table) {
|
||||
nsTableFrame *tableFrame = static_cast<nsTableFrame*>(mFrame);
|
||||
|
||||
if (tableFrame->IsBorderCollapse()) {
|
||||
@ -2623,7 +2624,7 @@ SizeComputationInput::InitOffsets(WritingMode aWM,
|
||||
// The margin is inherited to the table wrapper frame via
|
||||
// the ::-moz-table-wrapper rule in ua.css.
|
||||
ComputedPhysicalMargin().SizeTo(0, 0, 0, 0);
|
||||
} else if (aFrameType == FrameType::Scrollbar) {
|
||||
} else if (aFrameType == LayoutFrameType::Scrollbar) {
|
||||
// scrollbars may have had their width or height smashed to zero
|
||||
// by the associated scrollframe, in which case we must not report
|
||||
// any padding or border.
|
||||
@ -2645,7 +2646,7 @@ SizeComputationInput::InitOffsets(WritingMode aWM,
|
||||
//
|
||||
// Note: the width unit is not auto when this is called
|
||||
void
|
||||
ReflowInput::CalculateBlockSideMargins(FrameType aFrameType)
|
||||
ReflowInput::CalculateBlockSideMargins(LayoutFrameType aFrameType)
|
||||
{
|
||||
// Calculations here are done in the containing block's writing mode,
|
||||
// which is where margins will eventually be applied: we're calculating
|
||||
@ -2708,7 +2709,7 @@ ReflowInput::CalculateBlockSideMargins(FrameType aFrameType)
|
||||
// ignore
|
||||
// First check if there is an HTML alignment that we should honor
|
||||
const ReflowInput* prs = mParentReflowInput;
|
||||
if (aFrameType == FrameType::Table) {
|
||||
if (aFrameType == LayoutFrameType::Table) {
|
||||
NS_ASSERTION(prs->mFrame->IsTableWrapperFrame(),
|
||||
"table not inside table wrapper");
|
||||
// Center the table within the table wrapper based on the alignment
|
||||
@ -2921,17 +2922,17 @@ SizeComputationInput::ComputeMargin(WritingMode aWM,
|
||||
bool
|
||||
SizeComputationInput::ComputePadding(WritingMode aWM,
|
||||
const LogicalSize& aPercentBasis,
|
||||
FrameType aFrameType)
|
||||
LayoutFrameType aFrameType)
|
||||
{
|
||||
// If style can provide us the padding directly, then use it.
|
||||
const nsStylePadding *stylePadding = mFrame->StylePadding();
|
||||
bool isCBDependent = !stylePadding->GetPadding(ComputedPhysicalPadding());
|
||||
// a table row/col group, row/col doesn't have padding
|
||||
// XXXldb Neither do border-collapse tables.
|
||||
if (FrameType::TableRowGroup == aFrameType ||
|
||||
FrameType::TableColGroup == aFrameType ||
|
||||
FrameType::TableRow == aFrameType ||
|
||||
FrameType::TableCol == aFrameType) {
|
||||
if (LayoutFrameType::TableRowGroup == aFrameType ||
|
||||
LayoutFrameType::TableColGroup == aFrameType ||
|
||||
LayoutFrameType::TableRow == aFrameType ||
|
||||
LayoutFrameType::TableCol == aFrameType) {
|
||||
ComputedPhysicalPadding().SizeTo(0,0,0,0);
|
||||
}
|
||||
else if (isCBDependent) {
|
||||
|
@ -293,12 +293,12 @@ private:
|
||||
*/
|
||||
bool ComputePadding(mozilla::WritingMode aWM,
|
||||
const mozilla::LogicalSize& aPercentBasis,
|
||||
mozilla::FrameType aFrameType);
|
||||
mozilla::LayoutFrameType aFrameType);
|
||||
|
||||
protected:
|
||||
void InitOffsets(mozilla::WritingMode aWM,
|
||||
const mozilla::LogicalSize& aPercentBasis,
|
||||
mozilla::FrameType aFrameType,
|
||||
mozilla::LayoutFrameType aFrameType,
|
||||
ReflowInputFlags aFlags,
|
||||
const nsMargin* aBorder = nullptr,
|
||||
const nsMargin* aPadding = nullptr);
|
||||
@ -965,16 +965,16 @@ public:
|
||||
#endif
|
||||
|
||||
protected:
|
||||
void InitFrameType(FrameType aFrameType);
|
||||
void InitFrameType(LayoutFrameType aFrameType);
|
||||
void InitCBReflowInput();
|
||||
void InitResizeFlags(nsPresContext* aPresContext,
|
||||
mozilla::FrameType aFrameType);
|
||||
mozilla::LayoutFrameType aFrameType);
|
||||
|
||||
void InitConstraints(nsPresContext* aPresContext,
|
||||
const mozilla::LogicalSize& aContainingBlockSize,
|
||||
const nsMargin* aBorder,
|
||||
const nsMargin* aPadding,
|
||||
mozilla::FrameType aFrameType);
|
||||
mozilla::LayoutFrameType aFrameType);
|
||||
|
||||
// Returns the nearest containing block or block frame (whether or not
|
||||
// it is a containing block) for the specified frame. Also returns
|
||||
@ -994,12 +994,12 @@ protected:
|
||||
nsIFrame* aPlaceholderFrame,
|
||||
const ReflowInput* cbrs,
|
||||
nsHypotheticalPosition& aHypotheticalPos,
|
||||
mozilla::FrameType aFrameType) const;
|
||||
mozilla::LayoutFrameType aFrameType) const;
|
||||
|
||||
void InitAbsoluteConstraints(nsPresContext* aPresContext,
|
||||
const ReflowInput* cbrs,
|
||||
const mozilla::LogicalSize& aContainingBlockSize,
|
||||
mozilla::FrameType aFrameType);
|
||||
mozilla::LayoutFrameType aFrameType);
|
||||
|
||||
// Calculates the computed values for the 'min-Width', 'max-Width',
|
||||
// 'min-Height', and 'max-Height' properties, and stores them in the assorted
|
||||
@ -1014,7 +1014,7 @@ protected:
|
||||
nscoord* aInsideBoxSizing,
|
||||
nscoord* aOutsideBoxSizing) const;
|
||||
|
||||
void CalculateBlockSideMargins(FrameType aFrameType);
|
||||
void CalculateBlockSideMargins(LayoutFrameType aFrameType);
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -55,27 +55,27 @@ namespace mozilla {
|
||||
class RubyUtils
|
||||
{
|
||||
public:
|
||||
static inline bool IsRubyContentBox(FrameType aFrameType)
|
||||
static inline bool IsRubyContentBox(LayoutFrameType aFrameType)
|
||||
{
|
||||
return aFrameType == mozilla::FrameType::RubyBase ||
|
||||
aFrameType == mozilla::FrameType::RubyText;
|
||||
return aFrameType == mozilla::LayoutFrameType::RubyBase ||
|
||||
aFrameType == mozilla::LayoutFrameType::RubyText;
|
||||
}
|
||||
|
||||
static inline bool IsRubyContainerBox(FrameType aFrameType)
|
||||
static inline bool IsRubyContainerBox(LayoutFrameType aFrameType)
|
||||
{
|
||||
return aFrameType == mozilla::FrameType::RubyBaseContainer ||
|
||||
aFrameType == mozilla::FrameType::RubyTextContainer;
|
||||
return aFrameType == mozilla::LayoutFrameType::RubyBaseContainer ||
|
||||
aFrameType == mozilla::LayoutFrameType::RubyTextContainer;
|
||||
}
|
||||
|
||||
static inline bool IsRubyBox(FrameType aFrameType)
|
||||
static inline bool IsRubyBox(LayoutFrameType aFrameType)
|
||||
{
|
||||
return aFrameType == mozilla::FrameType::Ruby ||
|
||||
return aFrameType == mozilla::LayoutFrameType::Ruby ||
|
||||
IsRubyContentBox(aFrameType) || IsRubyContainerBox(aFrameType);
|
||||
}
|
||||
|
||||
static inline bool IsExpandableRubyBox(nsIFrame* aFrame)
|
||||
{
|
||||
mozilla::FrameType type = aFrame->Type();
|
||||
mozilla::LayoutFrameType type = aFrame->Type();
|
||||
return IsRubyContentBox(type) || IsRubyContainerBox(type);
|
||||
}
|
||||
|
||||
|
@ -69,12 +69,12 @@ GetSelfOrNearestBlock(nsIFrame* aFrame)
|
||||
// It's not supposed to be called for block frames since we never
|
||||
// process block descendants for text-overflow.
|
||||
static bool
|
||||
IsAtomicElement(nsIFrame* aFrame, FrameType aFrameType)
|
||||
IsAtomicElement(nsIFrame* aFrame, LayoutFrameType aFrameType)
|
||||
{
|
||||
NS_PRECONDITION(!nsLayoutUtils::GetAsBlock(aFrame) ||
|
||||
!aFrame->IsBlockOutside(),
|
||||
"unexpected block frame");
|
||||
NS_PRECONDITION(aFrameType != FrameType::Placeholder,
|
||||
NS_PRECONDITION(aFrameType != LayoutFrameType::Placeholder,
|
||||
"unexpected placeholder frame");
|
||||
return !aFrame->IsFrameOfType(nsIFrame::eLineParticipant);
|
||||
}
|
||||
@ -347,8 +347,9 @@ TextOverflow::ExamineFrameSubtree(nsIFrame* aFrame,
|
||||
bool* aFoundVisibleTextOrAtomic,
|
||||
InnerClipEdges* aClippedMarkerEdges)
|
||||
{
|
||||
const FrameType frameType = aFrame->Type();
|
||||
if (frameType == FrameType::Br || frameType == FrameType::Placeholder) {
|
||||
const LayoutFrameType frameType = aFrame->Type();
|
||||
if (frameType == LayoutFrameType::Br ||
|
||||
frameType == LayoutFrameType::Placeholder) {
|
||||
return;
|
||||
}
|
||||
const bool isAtomic = IsAtomicElement(aFrame, frameType);
|
||||
@ -368,7 +369,7 @@ TextOverflow::ExamineFrameSubtree(nsIFrame* aFrame,
|
||||
if (isAtomic && ((mIStart.mActive && overflowIStart) ||
|
||||
(mIEnd.mActive && overflowIEnd))) {
|
||||
aFramesToHide->PutEntry(aFrame);
|
||||
} else if (isAtomic || frameType == FrameType::Text) {
|
||||
} else if (isAtomic || frameType == LayoutFrameType::Text) {
|
||||
AnalyzeMarkerEdges(aFrame, frameType, aInsideMarkersArea,
|
||||
aFramesToHide, aAlignmentEdges,
|
||||
aFoundVisibleTextOrAtomic,
|
||||
@ -389,7 +390,7 @@ TextOverflow::ExamineFrameSubtree(nsIFrame* aFrame,
|
||||
|
||||
void
|
||||
TextOverflow::AnalyzeMarkerEdges(nsIFrame* aFrame,
|
||||
FrameType aFrameType,
|
||||
LayoutFrameType aFrameType,
|
||||
const LogicalRect& aInsideMarkersArea,
|
||||
FrameHashtable* aFramesToHide,
|
||||
AlignmentEdges* aAlignmentEdges,
|
||||
@ -424,7 +425,7 @@ TextOverflow::AnalyzeMarkerEdges(nsIFrame* aFrame,
|
||||
|
||||
if ((istartOverlap > 0 && insideIStartEdge) ||
|
||||
(iendOverlap > 0 && insideIEndEdge)) {
|
||||
if (aFrameType == FrameType::Text) {
|
||||
if (aFrameType == LayoutFrameType::Text) {
|
||||
if (aInsideMarkersArea.IStart(mBlockWM) <
|
||||
aInsideMarkersArea.IEnd(mBlockWM)) {
|
||||
// a clipped text frame and there is some room between the markers
|
||||
|
@ -175,7 +175,7 @@ class TextOverflow {
|
||||
* inline-level frames that are clipped by the current marker width
|
||||
*/
|
||||
void AnalyzeMarkerEdges(nsIFrame* aFrame,
|
||||
mozilla::FrameType aFrameType,
|
||||
mozilla::LayoutFrameType aFrameType,
|
||||
const LogicalRect& aInsideMarkersArea,
|
||||
FrameHashtable* aFramesToHide,
|
||||
AlignmentEdges* aAlignmentEdges,
|
||||
|
@ -30,7 +30,7 @@ public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
explicit ViewportFrame(nsStyleContext* aContext)
|
||||
: ViewportFrame(aContext, mozilla::FrameType::Viewport)
|
||||
: ViewportFrame(aContext, mozilla::LayoutFrameType::Viewport)
|
||||
{}
|
||||
|
||||
virtual ~ViewportFrame() { } // useful for debugging
|
||||
@ -78,7 +78,7 @@ public:
|
||||
#endif
|
||||
|
||||
protected:
|
||||
ViewportFrame(nsStyleContext* aContext, mozilla::FrameType aType)
|
||||
ViewportFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType)
|
||||
: nsContainerFrame(aContext, aType)
|
||||
, mView(nullptr)
|
||||
{}
|
||||
|
@ -425,15 +425,15 @@ OffsetToAlignedStaticPos(const ReflowInput& aKidReflowInput,
|
||||
? GetOrthogonalAxis(aAbsPosCBAxis)
|
||||
: aAbsPosCBAxis);
|
||||
|
||||
FrameType parentType = aPlaceholderContainer->Type();
|
||||
LayoutFrameType parentType = aPlaceholderContainer->Type();
|
||||
LogicalSize alignAreaSize(pcWM);
|
||||
if (parentType == FrameType::FlexContainer) {
|
||||
if (parentType == LayoutFrameType::FlexContainer) {
|
||||
// The alignment container is the flex container's content box:
|
||||
alignAreaSize = aPlaceholderContainer->GetLogicalSize(pcWM);
|
||||
LogicalMargin pcBorderPadding =
|
||||
aPlaceholderContainer->GetLogicalUsedBorderAndPadding(pcWM);
|
||||
alignAreaSize -= pcBorderPadding.Size(pcWM);
|
||||
} else if (parentType == FrameType::GridContainer) {
|
||||
} else if (parentType == LayoutFrameType::GridContainer) {
|
||||
// This abspos elem's parent is a grid container. Per CSS Grid 10.1 & 10.2:
|
||||
// - If the grid container *also* generates the abspos containing block (a
|
||||
// grid area) for this abspos child, we use that abspos containing block as
|
||||
|
@ -40,7 +40,8 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
nsAtomicContainerFrame(nsStyleContext* aContext, mozilla::FrameType aType)
|
||||
nsAtomicContainerFrame(nsStyleContext* aContext,
|
||||
mozilla::LayoutFrameType aType)
|
||||
: nsContainerFrame(aContext, aType)
|
||||
{}
|
||||
};
|
||||
|
@ -17,7 +17,7 @@ public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
explicit nsBackdropFrame(nsStyleContext* aContext)
|
||||
: nsFrame(aContext, mozilla::FrameType::Backdrop)
|
||||
: nsFrame(aContext, mozilla::LayoutFrameType::Backdrop)
|
||||
{}
|
||||
|
||||
#ifdef DEBUG_FRAME_DUMP
|
||||
|
@ -3081,9 +3081,9 @@ nsBlockFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
nsContainerFrame* ancestor = GetParent();
|
||||
for (; ancestor; ancestor = ancestor->GetParent()) {
|
||||
auto frameType = ancestor->Type();
|
||||
if (frameType == FrameType::Block ||
|
||||
frameType == FrameType::FlexContainer ||
|
||||
frameType == FrameType::GridContainer) {
|
||||
if (frameType == LayoutFrameType::Block ||
|
||||
frameType == LayoutFrameType::FlexContainer ||
|
||||
frameType == LayoutFrameType::GridContainer) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -5353,12 +5353,12 @@ nsBlockFrame::RemoveFrame(ChildListID aListID,
|
||||
static bool
|
||||
ShouldPutNextSiblingOnNewLine(nsIFrame* aLastFrame)
|
||||
{
|
||||
FrameType type = aLastFrame->Type();
|
||||
if (type == FrameType::Br) {
|
||||
LayoutFrameType type = aLastFrame->Type();
|
||||
if (type == LayoutFrameType::Br) {
|
||||
return true;
|
||||
}
|
||||
// XXX the TEXT_OFFSETS_NEED_FIXING check is a wallpaper for bug 822910.
|
||||
if (type == FrameType::Text &&
|
||||
if (type == LayoutFrameType::Text &&
|
||||
!(aLastFrame->GetStateBits() & TEXT_OFFSETS_NEED_FIXING)) {
|
||||
return aLastFrame->HasSignificantTerminalNewline();
|
||||
}
|
||||
@ -6231,7 +6231,7 @@ nsBlockFrame::AdjustFloatAvailableSpace(BlockReflowInput& aState,
|
||||
|
||||
if (availBSize != NS_UNCONSTRAINEDSIZE &&
|
||||
!aState.mFlags.mFloatFragmentsInsideColumnEnabled &&
|
||||
nsLayoutUtils::GetClosestFrameOfType(this, FrameType::ColumnSet)) {
|
||||
nsLayoutUtils::GetClosestFrameOfType(this, LayoutFrameType::ColumnSet)) {
|
||||
// Tell the float it has unrestricted block-size, so it won't break.
|
||||
// If the float doesn't actually fit in the column it will fail to be
|
||||
// placed, and either move to the block-start of the next column or just
|
||||
|
@ -397,7 +397,7 @@ public:
|
||||
};
|
||||
|
||||
protected:
|
||||
nsBlockFrame(nsStyleContext* aContext, mozilla::FrameType aType)
|
||||
nsBlockFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType)
|
||||
: nsContainerFrame(aContext, aType)
|
||||
, mMinWidth(NS_INTRINSIC_WIDTH_UNKNOWN)
|
||||
, mPrefWidth(NS_INTRINSIC_WIDTH_UNKNOWN)
|
||||
@ -408,7 +408,7 @@ protected:
|
||||
}
|
||||
|
||||
explicit nsBlockFrame(nsStyleContext* aContext)
|
||||
: nsBlockFrame(aContext, mozilla::FrameType::Block)
|
||||
: nsBlockFrame(aContext, mozilla::LayoutFrameType::Block)
|
||||
{}
|
||||
|
||||
virtual ~nsBlockFrame();
|
||||
|
@ -38,8 +38,8 @@ nsBlockReflowContext::nsBlockReflowContext(nsPresContext* aPresContext,
|
||||
|
||||
static nsIFrame* DescendIntoBlockLevelFrame(nsIFrame* aFrame)
|
||||
{
|
||||
FrameType type = aFrame->Type();
|
||||
if (type == FrameType::ColumnSet) {
|
||||
LayoutFrameType type = aFrame->Type();
|
||||
if (type == LayoutFrameType::ColumnSet) {
|
||||
static_cast<nsColumnSetFrame*>(aFrame)->DrainOverflowColumns();
|
||||
nsIFrame* child = aFrame->PrincipalChildList().FirstChild();
|
||||
if (child) {
|
||||
|
@ -54,7 +54,7 @@ public:
|
||||
#endif
|
||||
|
||||
explicit nsBulletFrame(nsStyleContext* aContext)
|
||||
: nsFrame(aContext, mozilla::FrameType::Bullet)
|
||||
: nsFrame(aContext, mozilla::LayoutFrameType::Bullet)
|
||||
, mPadding(GetWritingMode())
|
||||
, mIntrinsicSize(GetWritingMode())
|
||||
, mOrdinal(0)
|
||||
|
@ -34,7 +34,7 @@ class nsCanvasFrame final : public nsContainerFrame,
|
||||
{
|
||||
public:
|
||||
explicit nsCanvasFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, mozilla::FrameType::Canvas)
|
||||
: nsContainerFrame(aContext, mozilla::LayoutFrameType::Canvas)
|
||||
, mDoPaintFocus(false)
|
||||
, mAddedScrollPositionListener(false)
|
||||
{}
|
||||
|
@ -129,7 +129,7 @@ NS_NewColumnSetFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, nsFrame
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsColumnSetFrame)
|
||||
|
||||
nsColumnSetFrame::nsColumnSetFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, FrameType::ColumnSet)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::ColumnSet)
|
||||
, mLastBalanceBSize(NS_INTRINSICSIZE)
|
||||
{
|
||||
}
|
||||
|
@ -534,7 +534,7 @@ public:
|
||||
#endif
|
||||
|
||||
protected:
|
||||
nsContainerFrame(nsStyleContext* aContext, mozilla::FrameType aType)
|
||||
nsContainerFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType)
|
||||
: nsSplittableFrame(aContext, aType)
|
||||
{}
|
||||
|
||||
|
@ -18,7 +18,7 @@ public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
explicit nsFirstLetterFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, mozilla::FrameType::Letter)
|
||||
: nsContainerFrame(aContext, mozilla::LayoutFrameType::Letter)
|
||||
{}
|
||||
|
||||
virtual void BuildDisplayList(nsDisplayListBuilder* aBuilder,
|
||||
|
@ -3899,7 +3899,8 @@ nsFlexContainerFrame::SizeItemInCrossAxis(
|
||||
// an instance of nsFrame (i.e. it should return null from GetType()).
|
||||
// XXXdholbert Once we've fixed bug 765861, we should upgrade this to an
|
||||
// assertion that trivially passes if bug 765861's flag has been flipped.
|
||||
NS_WARNING_ASSERTION(aItem.Frame()->Type() == FrameType::None,
|
||||
NS_WARNING_ASSERTION(
|
||||
aItem.Frame()->Type() == LayoutFrameType::None,
|
||||
"Child should at least request space for border/padding");
|
||||
aItem.SetCrossSize(0);
|
||||
} else {
|
||||
|
@ -133,7 +133,7 @@ public:
|
||||
protected:
|
||||
// Protected constructor & destructor
|
||||
explicit nsFlexContainerFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, mozilla::FrameType::FlexContainer)
|
||||
: nsContainerFrame(aContext, mozilla::LayoutFrameType::FlexContainer)
|
||||
, mBaselineFromLastReflow(NS_INTRINSIC_WIDTH_UNKNOWN)
|
||||
, mLastBaselineFromLastReflow(NS_INTRINSIC_WIDTH_UNKNOWN)
|
||||
{}
|
||||
|
@ -333,8 +333,8 @@ nsFontInflationData::ScanTextIn(nsIFrame *aFrame)
|
||||
continue;
|
||||
}
|
||||
|
||||
FrameType fType = kid->Type();
|
||||
if (fType == FrameType::Text) {
|
||||
LayoutFrameType fType = kid->Type();
|
||||
if (fType == LayoutFrameType::Text) {
|
||||
nsIContent *content = kid->GetContent();
|
||||
if (content && kid == content->GetPrimaryFrame()) {
|
||||
uint32_t len = nsTextFrameUtils::
|
||||
@ -347,13 +347,13 @@ nsFontInflationData::ScanTextIn(nsIFrame *aFrame)
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (fType == FrameType::TextInput) {
|
||||
} else if (fType == LayoutFrameType::TextInput) {
|
||||
// We don't want changes to the amount of text in a text input
|
||||
// to change what we count towards inflation.
|
||||
nscoord fontSize = kid->StyleFont()->mFont.size;
|
||||
int32_t charCount = static_cast<nsTextControlFrame*>(kid)->GetCols();
|
||||
mTextAmount += charCount * fontSize;
|
||||
} else if (fType == FrameType::ComboboxControl) {
|
||||
} else if (fType == LayoutFrameType::ComboboxControl) {
|
||||
// See textInputFrame above (with s/amount of text/selected option/).
|
||||
// Don't just recurse down to the list control inside, since we
|
||||
// need to exclude the display frame.
|
||||
@ -361,7 +361,7 @@ nsFontInflationData::ScanTextIn(nsIFrame *aFrame)
|
||||
int32_t charCount = CharCountOfLargestOption(
|
||||
static_cast<nsComboboxControlFrame*>(kid)->GetDropDown());
|
||||
mTextAmount += charCount * fontSize;
|
||||
} else if (fType == FrameType::ListControl) {
|
||||
} else if (fType == LayoutFrameType::ListControl) {
|
||||
// See textInputFrame above (with s/amount of text/selected option/).
|
||||
nscoord fontSize = kid->StyleFont()->mFont.size;
|
||||
int32_t charCount = CharCountOfLargestOption(kid);
|
||||
|
@ -449,10 +449,10 @@ WeakFrame::Init(nsIFrame* aFrame)
|
||||
nsIFrame*
|
||||
NS_NewEmptyFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
{
|
||||
return new (aPresShell) nsFrame(aContext, FrameType::None);
|
||||
return new (aPresShell) nsFrame(aContext, LayoutFrameType::None);
|
||||
}
|
||||
|
||||
nsFrame::nsFrame(nsStyleContext* aContext, FrameType aType)
|
||||
nsFrame::nsFrame(nsStyleContext* aContext, LayoutFrameType aType)
|
||||
: nsBox(aType)
|
||||
{
|
||||
MOZ_COUNT_CTOR(nsFrame);
|
||||
@ -540,11 +540,11 @@ IsFontSizeInflationContainer(nsIFrame* aFrame,
|
||||
}
|
||||
|
||||
nsIContent *content = aFrame->GetContent();
|
||||
FrameType frameType = aFrame->Type();
|
||||
LayoutFrameType frameType = aFrame->Type();
|
||||
bool isInline = (aFrame->GetDisplay() == StyleDisplay::Inline ||
|
||||
RubyUtils::IsRubyBox(frameType) ||
|
||||
(aFrame->IsFloating() &&
|
||||
frameType == FrameType::Letter) ||
|
||||
frameType == LayoutFrameType::Letter) ||
|
||||
// Given multiple frames for the same node, only the
|
||||
// outer one should be considered a container.
|
||||
// (Important, e.g., for nsSelectsAreaFrame.)
|
||||
@ -876,7 +876,7 @@ nsFrame::DidSetStyleContext(nsStyleContext* aOldStyleContext)
|
||||
{
|
||||
if (nsSVGUtils::IsInSVGTextSubtree(this)) {
|
||||
SVGTextFrame* svgTextFrame = static_cast<SVGTextFrame*>(
|
||||
nsLayoutUtils::GetClosestFrameOfType(this, FrameType::SVGText));
|
||||
nsLayoutUtils::GetClosestFrameOfType(this, LayoutFrameType::SVGText));
|
||||
nsIFrame* anonBlock = svgTextFrame->PrincipalChildList().FirstChild();
|
||||
// Just as in SVGTextFrame::DidSetStyleContext, we need to ensure that
|
||||
// any non-display SVGTextFrames get reflowed when a child text frame
|
||||
@ -3860,7 +3860,7 @@ NS_IMETHODIMP nsFrame::HandleDrag(nsPresContext* aPresContext,
|
||||
}
|
||||
|
||||
nsIFrame* scrollbar =
|
||||
nsLayoutUtils::GetClosestFrameOfType(this, FrameType::Scrollbar);
|
||||
nsLayoutUtils::GetClosestFrameOfType(this, LayoutFrameType::Scrollbar);
|
||||
if (!scrollbar) {
|
||||
// XXX Do we really need to exclude non-selectable content here?
|
||||
// GetContentOffsetsFromPoint can handle it just fine, although some
|
||||
@ -4092,13 +4092,13 @@ static FrameContentRange GetRangeForFrame(nsIFrame* aFrame) {
|
||||
NS_WARNING("Frame has no content");
|
||||
return FrameContentRange(nullptr, -1, -1);
|
||||
}
|
||||
FrameType type = aFrame->Type();
|
||||
if (type == FrameType::Text) {
|
||||
LayoutFrameType type = aFrame->Type();
|
||||
if (type == LayoutFrameType::Text) {
|
||||
int32_t offset, offsetEnd;
|
||||
aFrame->GetOffsets(offset, offsetEnd);
|
||||
return FrameContentRange(content, offset, offsetEnd);
|
||||
}
|
||||
if (type == FrameType::Br) {
|
||||
if (type == LayoutFrameType::Br) {
|
||||
parent = content->GetParent();
|
||||
int32_t beginOffset = parent->IndexOf(content);
|
||||
return FrameContentRange(parent, beginOffset, beginOffset);
|
||||
@ -5965,12 +5965,12 @@ nsIFrame::SetView(nsView* aView)
|
||||
aView->SetFrame(this);
|
||||
|
||||
#ifdef DEBUG
|
||||
FrameType frameType = Type();
|
||||
NS_ASSERTION(frameType == FrameType::SubDocument ||
|
||||
frameType == FrameType::ListControl ||
|
||||
frameType == FrameType::Object ||
|
||||
frameType == FrameType::Viewport ||
|
||||
frameType == FrameType::MenuPopup,
|
||||
LayoutFrameType frameType = Type();
|
||||
NS_ASSERTION(frameType == LayoutFrameType::SubDocument ||
|
||||
frameType == LayoutFrameType::ListControl ||
|
||||
frameType == LayoutFrameType::Object ||
|
||||
frameType == LayoutFrameType::Viewport ||
|
||||
frameType == LayoutFrameType::MenuPopup,
|
||||
"Only specific frame types can have an nsView");
|
||||
#endif
|
||||
|
||||
@ -8725,11 +8725,11 @@ UnionBorderBoxes(nsIFrame* aFrame, bool aApplyTransform,
|
||||
}
|
||||
}
|
||||
const nsStyleDisplay* disp = aFrame->StyleDisplay();
|
||||
FrameType fType = aFrame->Type();
|
||||
LayoutFrameType fType = aFrame->Type();
|
||||
if (nsFrame::ShouldApplyOverflowClipping(aFrame, disp) ||
|
||||
fType == FrameType::Scroll ||
|
||||
fType == FrameType::ListControl ||
|
||||
fType == FrameType::SVGOuterSVG) {
|
||||
fType == LayoutFrameType::Scroll ||
|
||||
fType == LayoutFrameType::ListControl ||
|
||||
fType == LayoutFrameType::SVGOuterSVG) {
|
||||
return u;
|
||||
}
|
||||
|
||||
@ -10698,10 +10698,10 @@ struct DR_State
|
||||
DR_State();
|
||||
~DR_State();
|
||||
void Init();
|
||||
void AddFrameTypeInfo(FrameType aFrameType,
|
||||
void AddFrameTypeInfo(LayoutFrameType aFrameType,
|
||||
const char* aFrameNameAbbrev,
|
||||
const char* aFrameName);
|
||||
DR_FrameTypeInfo* GetFrameTypeInfo(FrameType aFrameType);
|
||||
DR_FrameTypeInfo* GetFrameTypeInfo(LayoutFrameType aFrameType);
|
||||
DR_FrameTypeInfo* GetFrameTypeInfo(char* aFrameName);
|
||||
void InitFrameTypeTable();
|
||||
DR_FrameTreeNode* CreateTreeNode(nsIFrame* aFrame,
|
||||
@ -10744,14 +10744,14 @@ static DR_State *DR_state; // the one and only DR_State
|
||||
|
||||
struct DR_RulePart
|
||||
{
|
||||
explicit DR_RulePart(FrameType aFrameType)
|
||||
explicit DR_RulePart(LayoutFrameType aFrameType)
|
||||
: mFrameType(aFrameType)
|
||||
, mNext(0)
|
||||
{}
|
||||
|
||||
void Destroy();
|
||||
|
||||
FrameType mFrameType;
|
||||
LayoutFrameType mFrameType;
|
||||
DR_RulePart* mNext;
|
||||
};
|
||||
|
||||
@ -10772,7 +10772,7 @@ struct DR_Rule
|
||||
if (mTarget) mTarget->Destroy();
|
||||
MOZ_COUNT_DTOR(DR_Rule);
|
||||
}
|
||||
void AddPart(FrameType aFrameType);
|
||||
void AddPart(LayoutFrameType aFrameType);
|
||||
|
||||
uint32_t mLength;
|
||||
DR_RulePart* mTarget;
|
||||
@ -10780,7 +10780,7 @@ struct DR_Rule
|
||||
};
|
||||
|
||||
void
|
||||
DR_Rule::AddPart(FrameType aFrameType)
|
||||
DR_Rule::AddPart(LayoutFrameType aFrameType)
|
||||
{
|
||||
DR_RulePart* newPart = new DR_RulePart(aFrameType);
|
||||
newPart->mNext = mTarget;
|
||||
@ -10790,7 +10790,7 @@ DR_Rule::AddPart(FrameType aFrameType)
|
||||
|
||||
struct DR_FrameTypeInfo
|
||||
{
|
||||
DR_FrameTypeInfo(FrameType aFrameType,
|
||||
DR_FrameTypeInfo(LayoutFrameType aFrameType,
|
||||
const char* aFrameNameAbbrev,
|
||||
const char* aFrameName);
|
||||
~DR_FrameTypeInfo() {
|
||||
@ -10801,7 +10801,7 @@ struct DR_FrameTypeInfo
|
||||
}
|
||||
}
|
||||
|
||||
FrameType mType;
|
||||
LayoutFrameType mType;
|
||||
char mNameAbbrev[16];
|
||||
char mName[32];
|
||||
nsTArray<DR_Rule*> mRules;
|
||||
@ -10809,7 +10809,7 @@ private:
|
||||
DR_FrameTypeInfo& operator=(const DR_FrameTypeInfo&) = delete;
|
||||
};
|
||||
|
||||
DR_FrameTypeInfo::DR_FrameTypeInfo(FrameType aFrameType,
|
||||
DR_FrameTypeInfo::DR_FrameTypeInfo(LayoutFrameType aFrameType,
|
||||
const char* aFrameNameAbbrev,
|
||||
const char* aFrameName)
|
||||
{
|
||||
@ -10968,7 +10968,7 @@ DR_Rule* DR_State::ParseRule(FILE* aFile)
|
||||
rule = new DR_Rule;
|
||||
}
|
||||
if (strcmp(buf, "*") == 0) {
|
||||
rule->AddPart(FrameType::None);
|
||||
rule->AddPart(LayoutFrameType::None);
|
||||
}
|
||||
else {
|
||||
DR_FrameTypeInfo* info = GetFrameTypeInfo(buf);
|
||||
@ -11007,7 +11007,7 @@ void DR_State::ParseRulesFile()
|
||||
if (inFile) {
|
||||
for (DR_Rule* rule = ParseRule(inFile); rule; rule = ParseRule(inFile)) {
|
||||
if (rule->mTarget) {
|
||||
FrameType fType = rule->mTarget->mFrameType;
|
||||
LayoutFrameType fType = rule->mTarget->mFrameType;
|
||||
DR_FrameTypeInfo* info = GetFrameTypeInfo(fType);
|
||||
if (info) {
|
||||
AddRule(info->mRules, *rule);
|
||||
@ -11025,7 +11025,7 @@ void DR_State::ParseRulesFile()
|
||||
}
|
||||
|
||||
void
|
||||
DR_State::AddFrameTypeInfo(FrameType aFrameType,
|
||||
DR_State::AddFrameTypeInfo(LayoutFrameType aFrameType,
|
||||
const char* aFrameNameAbbrev,
|
||||
const char* aFrameName)
|
||||
{
|
||||
@ -11033,7 +11033,7 @@ DR_State::AddFrameTypeInfo(FrameType aFrameType,
|
||||
}
|
||||
|
||||
DR_FrameTypeInfo*
|
||||
DR_State::GetFrameTypeInfo(FrameType aFrameType)
|
||||
DR_State::GetFrameTypeInfo(LayoutFrameType aFrameType)
|
||||
{
|
||||
int32_t numEntries = mFrameTypeTable.Length();
|
||||
NS_ASSERTION(numEntries != 0, "empty FrameTypeTable");
|
||||
@ -11061,43 +11061,43 @@ DR_FrameTypeInfo* DR_State::GetFrameTypeInfo(char* aFrameName)
|
||||
|
||||
void DR_State::InitFrameTypeTable()
|
||||
{
|
||||
AddFrameTypeInfo(FrameType::Block, "block", "block");
|
||||
AddFrameTypeInfo(FrameType::Br, "br", "br");
|
||||
AddFrameTypeInfo(FrameType::Bullet, "bullet", "bullet");
|
||||
AddFrameTypeInfo(FrameType::ColorControl, "color", "colorControl");
|
||||
AddFrameTypeInfo(FrameType::GfxButtonControl, "button", "gfxButtonControl");
|
||||
AddFrameTypeInfo(FrameType::HTMLButtonControl, "HTMLbutton", "HTMLButtonControl");
|
||||
AddFrameTypeInfo(FrameType::HTMLCanvas, "HTMLCanvas","HTMLCanvas");
|
||||
AddFrameTypeInfo(FrameType::SubDocument, "subdoc", "subDocument");
|
||||
AddFrameTypeInfo(FrameType::Image, "img", "image");
|
||||
AddFrameTypeInfo(FrameType::Inline, "inline", "inline");
|
||||
AddFrameTypeInfo(FrameType::Letter, "letter", "letter");
|
||||
AddFrameTypeInfo(FrameType::Line, "line", "line");
|
||||
AddFrameTypeInfo(FrameType::ListControl, "select", "select");
|
||||
AddFrameTypeInfo(FrameType::Object, "obj", "object");
|
||||
AddFrameTypeInfo(FrameType::Page, "page", "page");
|
||||
AddFrameTypeInfo(FrameType::Placeholder, "place", "placeholder");
|
||||
AddFrameTypeInfo(FrameType::Canvas, "canvas", "canvas");
|
||||
AddFrameTypeInfo(FrameType::Root, "root", "root");
|
||||
AddFrameTypeInfo(FrameType::Scroll, "scroll", "scroll");
|
||||
AddFrameTypeInfo(FrameType::TableCell, "cell", "tableCell");
|
||||
AddFrameTypeInfo(FrameType::BCTableCell, "bcCell", "bcTableCell");
|
||||
AddFrameTypeInfo(FrameType::TableCol, "col", "tableCol");
|
||||
AddFrameTypeInfo(FrameType::TableColGroup, "colG", "tableColGroup");
|
||||
AddFrameTypeInfo(FrameType::Table, "tbl", "table");
|
||||
AddFrameTypeInfo(FrameType::TableWrapper, "tblW", "tableWrapper");
|
||||
AddFrameTypeInfo(FrameType::TableRowGroup, "rowG", "tableRowGroup");
|
||||
AddFrameTypeInfo(FrameType::TableRow, "row", "tableRow");
|
||||
AddFrameTypeInfo(FrameType::TextInput, "textCtl", "textInput");
|
||||
AddFrameTypeInfo(FrameType::Text, "text", "text");
|
||||
AddFrameTypeInfo(FrameType::Viewport, "VP", "viewport");
|
||||
AddFrameTypeInfo(LayoutFrameType::Block, "block", "block");
|
||||
AddFrameTypeInfo(LayoutFrameType::Br, "br", "br");
|
||||
AddFrameTypeInfo(LayoutFrameType::Bullet, "bullet", "bullet");
|
||||
AddFrameTypeInfo(LayoutFrameType::ColorControl, "color", "colorControl");
|
||||
AddFrameTypeInfo(LayoutFrameType::GfxButtonControl, "button", "gfxButtonControl");
|
||||
AddFrameTypeInfo(LayoutFrameType::HTMLButtonControl, "HTMLbutton", "HTMLButtonControl");
|
||||
AddFrameTypeInfo(LayoutFrameType::HTMLCanvas, "HTMLCanvas","HTMLCanvas");
|
||||
AddFrameTypeInfo(LayoutFrameType::SubDocument, "subdoc", "subDocument");
|
||||
AddFrameTypeInfo(LayoutFrameType::Image, "img", "image");
|
||||
AddFrameTypeInfo(LayoutFrameType::Inline, "inline", "inline");
|
||||
AddFrameTypeInfo(LayoutFrameType::Letter, "letter", "letter");
|
||||
AddFrameTypeInfo(LayoutFrameType::Line, "line", "line");
|
||||
AddFrameTypeInfo(LayoutFrameType::ListControl, "select", "select");
|
||||
AddFrameTypeInfo(LayoutFrameType::Object, "obj", "object");
|
||||
AddFrameTypeInfo(LayoutFrameType::Page, "page", "page");
|
||||
AddFrameTypeInfo(LayoutFrameType::Placeholder, "place", "placeholder");
|
||||
AddFrameTypeInfo(LayoutFrameType::Canvas, "canvas", "canvas");
|
||||
AddFrameTypeInfo(LayoutFrameType::Root, "root", "root");
|
||||
AddFrameTypeInfo(LayoutFrameType::Scroll, "scroll", "scroll");
|
||||
AddFrameTypeInfo(LayoutFrameType::TableCell, "cell", "tableCell");
|
||||
AddFrameTypeInfo(LayoutFrameType::BCTableCell, "bcCell", "bcTableCell");
|
||||
AddFrameTypeInfo(LayoutFrameType::TableCol, "col", "tableCol");
|
||||
AddFrameTypeInfo(LayoutFrameType::TableColGroup, "colG", "tableColGroup");
|
||||
AddFrameTypeInfo(LayoutFrameType::Table, "tbl", "table");
|
||||
AddFrameTypeInfo(LayoutFrameType::TableWrapper, "tblW", "tableWrapper");
|
||||
AddFrameTypeInfo(LayoutFrameType::TableRowGroup, "rowG", "tableRowGroup");
|
||||
AddFrameTypeInfo(LayoutFrameType::TableRow, "row", "tableRow");
|
||||
AddFrameTypeInfo(LayoutFrameType::TextInput, "textCtl", "textInput");
|
||||
AddFrameTypeInfo(LayoutFrameType::Text, "text", "text");
|
||||
AddFrameTypeInfo(LayoutFrameType::Viewport, "VP", "viewport");
|
||||
#ifdef MOZ_XUL
|
||||
AddFrameTypeInfo(FrameType::XULLabel, "XULLabel", "XULLabel");
|
||||
AddFrameTypeInfo(FrameType::Box, "Box", "Box");
|
||||
AddFrameTypeInfo(FrameType::Slider, "Slider", "Slider");
|
||||
AddFrameTypeInfo(FrameType::PopupSet, "PopupSet", "PopupSet");
|
||||
AddFrameTypeInfo(LayoutFrameType::XULLabel, "XULLabel", "XULLabel");
|
||||
AddFrameTypeInfo(LayoutFrameType::Box, "Box", "Box");
|
||||
AddFrameTypeInfo(LayoutFrameType::Slider, "Slider", "Slider");
|
||||
AddFrameTypeInfo(LayoutFrameType::PopupSet, "PopupSet", "PopupSet");
|
||||
#endif
|
||||
AddFrameTypeInfo(FrameType::None, "unknown", "unknown");
|
||||
AddFrameTypeInfo(LayoutFrameType::None, "unknown", "unknown");
|
||||
}
|
||||
|
||||
|
||||
@ -11135,7 +11135,7 @@ DR_State::RuleMatches(DR_Rule& aRule, DR_FrameTreeNode& aNode)
|
||||
for (rulePart = aRule.mTarget->mNext, parentNode = aNode.mParent;
|
||||
rulePart && parentNode;
|
||||
rulePart = rulePart->mNext, parentNode = parentNode->mParent) {
|
||||
if (rulePart->mFrameType != FrameType::None) {
|
||||
if (rulePart->mFrameType != LayoutFrameType::None) {
|
||||
if (parentNode->mFrame) {
|
||||
if (rulePart->mFrameType != parentNode->mFrame->Type()) {
|
||||
return false;
|
||||
|
@ -579,7 +579,7 @@ public:
|
||||
|
||||
protected:
|
||||
// Protected constructor and destructor
|
||||
explicit nsFrame(nsStyleContext* aContext, mozilla::FrameType aType);
|
||||
explicit nsFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType);
|
||||
virtual ~nsFrame();
|
||||
|
||||
/**
|
||||
@ -633,17 +633,17 @@ public:
|
||||
if (aDisp->mOverflowX == NS_STYLE_OVERFLOW_HIDDEN &&
|
||||
aDisp->mOverflowY == NS_STYLE_OVERFLOW_HIDDEN) {
|
||||
// REVIEW: these are the frame types that set up clipping.
|
||||
mozilla::FrameType type = aFrame->Type();
|
||||
if (type == mozilla::FrameType::Table ||
|
||||
type == mozilla::FrameType::TableCell ||
|
||||
type == mozilla::FrameType::BCTableCell ||
|
||||
type == mozilla::FrameType::SVGOuterSVG ||
|
||||
type == mozilla::FrameType::SVGInnerSVG ||
|
||||
type == mozilla::FrameType::SVGForeignObject) {
|
||||
mozilla::LayoutFrameType type = aFrame->Type();
|
||||
if (type == mozilla::LayoutFrameType::Table ||
|
||||
type == mozilla::LayoutFrameType::TableCell ||
|
||||
type == mozilla::LayoutFrameType::BCTableCell ||
|
||||
type == mozilla::LayoutFrameType::SVGOuterSVG ||
|
||||
type == mozilla::LayoutFrameType::SVGInnerSVG ||
|
||||
type == mozilla::LayoutFrameType::SVGForeignObject) {
|
||||
return true;
|
||||
}
|
||||
if (aFrame->IsFrameOfType(nsIFrame::eReplacedContainsBlock)) {
|
||||
if (type == mozilla::FrameType::TextInput) {
|
||||
if (type == mozilla::LayoutFrameType::TextInput) {
|
||||
// It always has an anonymous scroll frame that handles any overflow.
|
||||
return false;
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ public:
|
||||
|
||||
protected:
|
||||
explicit nsHTMLFramesetBlankFrame(nsStyleContext* aContext)
|
||||
: nsLeafFrame(aContext, FrameType::None)
|
||||
: nsLeafFrame(aContext, LayoutFrameType::None)
|
||||
{}
|
||||
|
||||
virtual ~nsHTMLFramesetBlankFrame();
|
||||
@ -177,7 +177,7 @@ bool nsHTMLFramesetFrame::gDragInProgress = false;
|
||||
#define DEFAULT_BORDER_WIDTH_PX 6
|
||||
|
||||
nsHTMLFramesetFrame::nsHTMLFramesetFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, FrameType::FrameSet)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::FrameSet)
|
||||
{
|
||||
mNumRows = 0;
|
||||
mNumCols = 0;
|
||||
@ -1337,7 +1337,7 @@ nsHTMLFramesetBorderFrame::nsHTMLFramesetBorderFrame(nsStyleContext* aContext,
|
||||
int32_t aWidth,
|
||||
bool aVertical,
|
||||
bool aVisibility)
|
||||
: nsLeafFrame(aContext, FrameType::None)
|
||||
: nsLeafFrame(aContext, LayoutFrameType::None)
|
||||
, mWidth(aWidth)
|
||||
, mVertical(aVertical)
|
||||
, mVisibility(aVisibility)
|
||||
|
@ -110,7 +110,7 @@ NS_NewHTMLScrollFrame(nsIPresShell* aPresShell, nsStyleContext* aContext, bool a
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsHTMLScrollFrame)
|
||||
|
||||
nsHTMLScrollFrame::nsHTMLScrollFrame(nsStyleContext* aContext,
|
||||
FrameType aType,
|
||||
LayoutFrameType aType,
|
||||
bool aIsRoot)
|
||||
: nsContainerFrame(aContext, aType)
|
||||
, mHelper(ALLOW_THIS_IN_INITIALIZER_LIST(this), aIsRoot)
|
||||
@ -1161,7 +1161,7 @@ NS_IMPL_FRAMEARENA_HELPERS(nsXULScrollFrame)
|
||||
nsXULScrollFrame::nsXULScrollFrame(nsStyleContext* aContext,
|
||||
bool aIsRoot,
|
||||
bool aClipAllDescendants)
|
||||
: nsBoxFrame(aContext, FrameType::Scroll, aIsRoot)
|
||||
: nsBoxFrame(aContext, LayoutFrameType::Scroll, aIsRoot)
|
||||
, mHelper(ALLOW_THIS_IN_INITIALIZER_LIST(this), aIsRoot)
|
||||
{
|
||||
SetXULLayoutManager(nullptr);
|
||||
|
@ -1060,11 +1060,11 @@ public:
|
||||
|
||||
protected:
|
||||
nsHTMLScrollFrame(nsStyleContext* aContext, bool aIsRoot)
|
||||
: nsHTMLScrollFrame(aContext, mozilla::FrameType::Scroll, aIsRoot)
|
||||
: nsHTMLScrollFrame(aContext, mozilla::LayoutFrameType::Scroll, aIsRoot)
|
||||
{}
|
||||
|
||||
nsHTMLScrollFrame(nsStyleContext* aContext,
|
||||
mozilla::FrameType aType,
|
||||
mozilla::LayoutFrameType aType,
|
||||
bool aIsRoot);
|
||||
void SetSuppressScrollbarUpdate(bool aSuppress) {
|
||||
mHelper.mSupppressScrollbarUpdate = aSuppress;
|
||||
|
@ -4871,9 +4871,10 @@ nsGridContainerFrame::GetNearestFragmentainer(const GridReflowInput& aState) con
|
||||
if (wm.IsOrthogonalTo(cbRI->GetWritingMode())) {
|
||||
break;
|
||||
}
|
||||
FrameType frameType = cbRI->mFrame->Type();
|
||||
if ((frameType == FrameType::Canvas && PresContext()->IsPaginated()) ||
|
||||
frameType == FrameType::ColumnSet) {
|
||||
LayoutFrameType frameType = cbRI->mFrame->Type();
|
||||
if ((frameType == LayoutFrameType::Canvas &&
|
||||
PresContext()->IsPaginated()) ||
|
||||
frameType == LayoutFrameType::ColumnSet) {
|
||||
data.emplace();
|
||||
data->mIsTopOfPage = gridRI->mFlags.mIsTopOfPage;
|
||||
data->mToFragmentainerEnd = aState.mFragBStart +
|
||||
|
@ -258,7 +258,7 @@ protected:
|
||||
friend nsContainerFrame* NS_NewGridContainerFrame(nsIPresShell* aPresShell,
|
||||
nsStyleContext* aContext);
|
||||
explicit nsGridContainerFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, mozilla::FrameType::GridContainer)
|
||||
: nsContainerFrame(aContext, mozilla::LayoutFrameType::GridContainer)
|
||||
, mCachedMinISize(NS_INTRINSIC_WIDTH_UNKNOWN)
|
||||
, mCachedPrefISize(NS_INTRINSIC_WIDTH_UNKNOWN)
|
||||
{
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
explicit nsHTMLCanvasFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, mozilla::FrameType::HTMLCanvas)
|
||||
: nsContainerFrame(aContext, mozilla::LayoutFrameType::HTMLCanvas)
|
||||
, mBorderPadding(GetWritingMode())
|
||||
{}
|
||||
|
||||
|
@ -167,7 +167,7 @@ typedef uint32_t nsSplittableType;
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
enum class FrameType : uint8_t {
|
||||
enum class LayoutFrameType : uint8_t {
|
||||
#define FRAME_TYPE(ty_) ty_,
|
||||
#include "mozilla/FrameTypeList.h"
|
||||
#undef FRAME_TYPE
|
||||
@ -602,7 +602,7 @@ public:
|
||||
|
||||
NS_DECL_QUERYFRAME_TARGET(nsIFrame)
|
||||
|
||||
explicit nsIFrame(mozilla::FrameType aType)
|
||||
explicit nsIFrame(mozilla::LayoutFrameType aType)
|
||||
: mRect()
|
||||
, mContent(nullptr)
|
||||
, mStyleContext(nullptr)
|
||||
@ -2636,12 +2636,15 @@ public:
|
||||
/**
|
||||
* Get the "type" of the frame.
|
||||
*
|
||||
* @see mozilla::FrameType
|
||||
* @see mozilla::LayoutFrameType
|
||||
*/
|
||||
mozilla::FrameType Type() const { return mType; }
|
||||
mozilla::LayoutFrameType Type() const { return mType; }
|
||||
|
||||
#define FRAME_TYPE(name_) \
|
||||
bool Is##name_##Frame() const { return mType == mozilla::FrameType::name_; }
|
||||
bool Is##name_##Frame() const \
|
||||
{ \
|
||||
return mType == mozilla::LayoutFrameType::name_; \
|
||||
}
|
||||
#include "mozilla/FrameTypeList.h"
|
||||
#undef FRAME_TYPE
|
||||
|
||||
@ -3805,7 +3808,7 @@ protected:
|
||||
mozilla::WritingMode mWritingMode;
|
||||
|
||||
/** The type of the frame. */
|
||||
mozilla::FrameType mType;
|
||||
mozilla::LayoutFrameType mType;
|
||||
|
||||
// Helpers
|
||||
/**
|
||||
|
@ -135,7 +135,7 @@ NS_NewImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsImageFrame)
|
||||
|
||||
nsImageFrame::nsImageFrame(nsStyleContext* aContext, FrameType aType)
|
||||
nsImageFrame::nsImageFrame(nsStyleContext* aContext, LayoutFrameType aType)
|
||||
: nsAtomicContainerFrame(aContext, aType)
|
||||
, mComputedSize(0, 0)
|
||||
, mIntrinsicRatio(0, 0)
|
||||
|
@ -72,7 +72,7 @@ public:
|
||||
NS_DECL_FRAMEARENA_HELPERS
|
||||
|
||||
explicit nsImageFrame(nsStyleContext* aContext)
|
||||
: nsImageFrame(aContext, mozilla::FrameType::Image)
|
||||
: nsImageFrame(aContext, mozilla::LayoutFrameType::Image)
|
||||
{}
|
||||
|
||||
NS_DECL_QUERYFRAME_TARGET(nsImageFrame)
|
||||
@ -183,7 +183,7 @@ public:
|
||||
virtual void ReflowCallbackCanceled() override;
|
||||
|
||||
protected:
|
||||
nsImageFrame(nsStyleContext* aContext, mozilla::FrameType aType);
|
||||
nsImageFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType);
|
||||
|
||||
virtual ~nsImageFrame();
|
||||
|
||||
|
@ -60,8 +60,8 @@ void
|
||||
nsInlineFrame::InvalidateFrame(uint32_t aDisplayItemKey)
|
||||
{
|
||||
if (nsSVGUtils::IsInSVGTextSubtree(this)) {
|
||||
nsIFrame* svgTextFrame =
|
||||
nsLayoutUtils::GetClosestFrameOfType(GetParent(), FrameType::SVGText);
|
||||
nsIFrame* svgTextFrame = nsLayoutUtils::GetClosestFrameOfType(
|
||||
GetParent(), LayoutFrameType::SVGText);
|
||||
svgTextFrame->InvalidateFrame();
|
||||
return;
|
||||
}
|
||||
@ -72,8 +72,8 @@ void
|
||||
nsInlineFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey)
|
||||
{
|
||||
if (nsSVGUtils::IsInSVGTextSubtree(this)) {
|
||||
nsIFrame* svgTextFrame =
|
||||
nsLayoutUtils::GetClosestFrameOfType(GetParent(), FrameType::SVGText);
|
||||
nsIFrame* svgTextFrame = nsLayoutUtils::GetClosestFrameOfType(
|
||||
GetParent(), LayoutFrameType::SVGText);
|
||||
svgTextFrame->InvalidateFrame();
|
||||
return;
|
||||
}
|
||||
@ -481,7 +481,7 @@ nsInlineFrame::AttributeChanged(int32_t aNameSpaceID,
|
||||
|
||||
if (nsSVGUtils::IsInSVGTextSubtree(this)) {
|
||||
SVGTextFrame* f = static_cast<SVGTextFrame*>(
|
||||
nsLayoutUtils::GetClosestFrameOfType(this, FrameType::SVGText));
|
||||
nsLayoutUtils::GetClosestFrameOfType(this, LayoutFrameType::SVGText));
|
||||
f->HandleAttributeChangeInDescendant(mContent->AsElement(),
|
||||
aNameSpaceID, aAttribute);
|
||||
}
|
||||
|
@ -141,12 +141,12 @@ protected:
|
||||
}
|
||||
};
|
||||
|
||||
nsInlineFrame(nsStyleContext* aContext, mozilla::FrameType aType)
|
||||
nsInlineFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType)
|
||||
: nsContainerFrame(aContext, aType)
|
||||
{}
|
||||
|
||||
explicit nsInlineFrame(nsStyleContext* aContext)
|
||||
: nsInlineFrame(aContext, mozilla::FrameType::Inline)
|
||||
: nsInlineFrame(aContext, mozilla::LayoutFrameType::Inline)
|
||||
{}
|
||||
|
||||
virtual LogicalSides GetLogicalSkipSides(const ReflowInput* aReflowInput = nullptr) const override;
|
||||
@ -232,7 +232,7 @@ public:
|
||||
|
||||
protected:
|
||||
explicit nsFirstLineFrame(nsStyleContext* aContext)
|
||||
: nsInlineFrame(aContext, mozilla::FrameType::Line)
|
||||
: nsInlineFrame(aContext, mozilla::LayoutFrameType::Line)
|
||||
{}
|
||||
|
||||
virtual nsIFrame* PullOneFrame(nsPresContext* aPresContext,
|
||||
|
@ -77,7 +77,7 @@ public:
|
||||
}
|
||||
|
||||
protected:
|
||||
nsLeafFrame(nsStyleContext* aContext, mozilla::FrameType aType)
|
||||
nsLeafFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType)
|
||||
: nsFrame(aContext, aType)
|
||||
{}
|
||||
|
||||
|
@ -466,12 +466,12 @@ nsLineLayout::AttachFrameToBaseLineLayout(PerFrameData* aFrame)
|
||||
MOZ_ASSERT(!aFrame->mIsLinkedToBase,
|
||||
"The frame must not have been linked with the base");
|
||||
#ifdef DEBUG
|
||||
FrameType baseType = baseFrame->mFrame->Type();
|
||||
FrameType annotationType = aFrame->mFrame->Type();
|
||||
MOZ_ASSERT((baseType == FrameType::RubyBaseContainer &&
|
||||
annotationType == FrameType::RubyTextContainer) ||
|
||||
(baseType == FrameType::RubyBase &&
|
||||
annotationType == FrameType::RubyText));
|
||||
LayoutFrameType baseType = baseFrame->mFrame->Type();
|
||||
LayoutFrameType annotationType = aFrame->mFrame->Type();
|
||||
MOZ_ASSERT((baseType == LayoutFrameType::RubyBaseContainer &&
|
||||
annotationType == LayoutFrameType::RubyTextContainer) ||
|
||||
(baseType == LayoutFrameType::RubyBase &&
|
||||
annotationType == LayoutFrameType::RubyText));
|
||||
#endif
|
||||
|
||||
aFrame->mNextAnnotation = baseFrame->mNextAnnotation;
|
||||
@ -711,14 +711,14 @@ IsPercentageAware(const nsIFrame* aFrame)
|
||||
{
|
||||
NS_ASSERTION(aFrame, "null frame is not allowed");
|
||||
|
||||
FrameType fType = aFrame->Type();
|
||||
if (fType == FrameType::Text) {
|
||||
LayoutFrameType fType = aFrame->Type();
|
||||
if (fType == LayoutFrameType::Text) {
|
||||
// None of these things can ever be true for text frames.
|
||||
return false;
|
||||
}
|
||||
|
||||
// Some of these things don't apply to non-replaced inline frames
|
||||
// (that is, fType == FrameType::Inline), but we won't bother making
|
||||
// (that is, fType == LayoutFrameType::Inline), but we won't bother making
|
||||
// things unnecessarily complicated, since they'll probably be set
|
||||
// quite rarely.
|
||||
|
||||
@ -751,10 +751,10 @@ IsPercentageAware(const nsIFrame* aFrame)
|
||||
const nsStyleDisplay* disp = aFrame->StyleDisplay();
|
||||
if (disp->mDisplay == StyleDisplay::InlineBlock ||
|
||||
disp->mDisplay == StyleDisplay::InlineTable ||
|
||||
fType == FrameType::HTMLButtonControl ||
|
||||
fType == FrameType::GfxButtonControl ||
|
||||
fType == FrameType::FieldSet ||
|
||||
fType == FrameType::ComboboxDisplay) {
|
||||
fType == LayoutFrameType::HTMLButtonControl ||
|
||||
fType == LayoutFrameType::GfxButtonControl ||
|
||||
fType == LayoutFrameType::FieldSet ||
|
||||
fType == LayoutFrameType::ComboboxDisplay) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -838,8 +838,8 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
||||
bool notSafeToBreak = LineIsEmpty() && !mImpactedByFloats;
|
||||
|
||||
// Figure out whether we're talking about a textframe here
|
||||
FrameType frameType = aFrame->Type();
|
||||
bool isText = frameType == FrameType::Text;
|
||||
LayoutFrameType frameType = aFrame->Type();
|
||||
bool isText = frameType == LayoutFrameType::Text;
|
||||
|
||||
// Inline-ish and text-ish things don't compute their width;
|
||||
// everything else does. We need to give them an available width that
|
||||
@ -934,10 +934,10 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
||||
// content.
|
||||
bool placedFloat = false;
|
||||
bool isEmpty;
|
||||
if (frameType == FrameType::None) {
|
||||
if (frameType == LayoutFrameType::None) {
|
||||
isEmpty = pfd->mFrame->IsEmpty();
|
||||
} else {
|
||||
if (FrameType::Placeholder == frameType) {
|
||||
if (LayoutFrameType::Placeholder == frameType) {
|
||||
isEmpty = true;
|
||||
pfd->mSkipWhenTrimmingWhitespace = true;
|
||||
nsIFrame* outOfFlowFrame = nsLayoutUtils::GetFloatFromPlaceholder(aFrame);
|
||||
@ -979,11 +979,11 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
||||
pfd->mIsNonWhitespaceTextFrame = !content->TextIsOnlyWhitespace();
|
||||
}
|
||||
}
|
||||
} else if (FrameType::Br == frameType) {
|
||||
} else if (LayoutFrameType::Br == frameType) {
|
||||
pfd->mSkipWhenTrimmingWhitespace = true;
|
||||
isEmpty = false;
|
||||
} else {
|
||||
if (FrameType::Letter == frameType) {
|
||||
if (LayoutFrameType::Letter == frameType) {
|
||||
pfd->mIsLetterFrame = true;
|
||||
}
|
||||
if (pfd->mSpan) {
|
||||
@ -1090,7 +1090,7 @@ nsLineLayout::ReflowFrame(nsIFrame* aFrame,
|
||||
// nonempty leaf content has been placed
|
||||
mLineAtStart = false;
|
||||
}
|
||||
if (FrameType::Ruby == frameType) {
|
||||
if (LayoutFrameType::Ruby == frameType) {
|
||||
mHasRuby = true;
|
||||
SyncAnnotationBounds(pfd);
|
||||
}
|
||||
@ -1723,7 +1723,7 @@ GetInflationForBlockDirAlignment(nsIFrame* aFrame,
|
||||
{
|
||||
if (nsSVGUtils::IsInSVGTextSubtree(aFrame)) {
|
||||
const nsIFrame* container =
|
||||
nsLayoutUtils::GetClosestFrameOfType(aFrame, FrameType::SVGText);
|
||||
nsLayoutUtils::GetClosestFrameOfType(aFrame, LayoutFrameType::SVGText);
|
||||
NS_ASSERTION(container, "expected to find an ancestor SVGTextFrame");
|
||||
return
|
||||
static_cast<const SVGTextFrame*>(container)->GetFontSizeScaleFactor();
|
||||
@ -2810,9 +2810,9 @@ nsLineLayout::AdvanceAnnotationInlineBounds(PerFrameData* aPFD,
|
||||
nscoord aDeltaISize)
|
||||
{
|
||||
nsIFrame* frame = aPFD->mFrame;
|
||||
FrameType frameType = frame->Type();
|
||||
MOZ_ASSERT(frameType == FrameType::RubyText ||
|
||||
frameType == FrameType::RubyTextContainer);
|
||||
LayoutFrameType frameType = frame->Type();
|
||||
MOZ_ASSERT(frameType == LayoutFrameType::RubyText ||
|
||||
frameType == LayoutFrameType::RubyTextContainer);
|
||||
MOZ_ASSERT(aPFD->mSpan, "rt and rtc should have span.");
|
||||
|
||||
PerSpanData* psd = aPFD->mSpan;
|
||||
@ -2827,13 +2827,13 @@ nsLineLayout::AdvanceAnnotationInlineBounds(PerFrameData* aPFD,
|
||||
// container does not have children linked to the base:
|
||||
// 1. it is a container for span; 2. its children are collapsed.
|
||||
// See bug 1055674 for the second case.
|
||||
if (frameType == FrameType::RubyText ||
|
||||
if (frameType == LayoutFrameType::RubyText ||
|
||||
// This ruby text container is a span.
|
||||
(psd->mFirstFrame == psd->mLastFrame && psd->mFirstFrame &&
|
||||
!psd->mFirstFrame->mIsLinkedToBase)) {
|
||||
// For ruby text frames, only increase frames
|
||||
// which are not auto-hidden.
|
||||
if (frameType != FrameType::RubyText ||
|
||||
if (frameType != LayoutFrameType::RubyText ||
|
||||
!static_cast<nsRubyTextFrame*>(frame)->IsAutoHidden()) {
|
||||
nscoord reservedISize = RubyUtils::GetReservedISize(frame);
|
||||
RubyUtils::SetReservedISize(frame, reservedISize + aDeltaISize);
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
|
||||
protected:
|
||||
explicit nsPageContentFrame(nsStyleContext* aContext)
|
||||
: ViewportFrame(aContext, mozilla::FrameType::PageContent)
|
||||
: ViewportFrame(aContext, mozilla::LayoutFrameType::PageContent)
|
||||
{}
|
||||
|
||||
nsSharedPageData* mPD;
|
||||
|
@ -41,7 +41,7 @@ NS_QUERYFRAME_HEAD(nsPageFrame)
|
||||
NS_QUERYFRAME_TAIL_INHERITING(nsContainerFrame)
|
||||
|
||||
nsPageFrame::nsPageFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, FrameType::Page)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::Page)
|
||||
{
|
||||
}
|
||||
|
||||
@ -682,7 +682,7 @@ NS_NewPageBreakFrame(nsIPresShell* aPresShell, nsStyleContext* aContext)
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsPageBreakFrame)
|
||||
|
||||
nsPageBreakFrame::nsPageBreakFrame(nsStyleContext* aContext)
|
||||
: nsLeafFrame(aContext, FrameType::PageBreak)
|
||||
: nsLeafFrame(aContext, LayoutFrameType::PageBreak)
|
||||
, mHaveReflowed(false)
|
||||
{
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ public:
|
||||
nsStyleContext* aContext,
|
||||
nsFrameState aTypeBit);
|
||||
nsPlaceholderFrame(nsStyleContext* aContext, nsFrameState aTypeBit)
|
||||
: nsFrame(aContext, mozilla::FrameType::Placeholder)
|
||||
: nsFrame(aContext, mozilla::LayoutFrameType::Placeholder)
|
||||
{
|
||||
NS_PRECONDITION(aTypeBit == PLACEHOLDER_FOR_FLOAT ||
|
||||
aTypeBit == PLACEHOLDER_FOR_ABSPOS ||
|
||||
|
@ -145,7 +145,7 @@ protected:
|
||||
};
|
||||
|
||||
nsPluginFrame::nsPluginFrame(nsStyleContext* aContext)
|
||||
: nsFrame(aContext, FrameType::Object)
|
||||
: nsFrame(aContext, LayoutFrameType::Object)
|
||||
, mInstanceOwner(nullptr)
|
||||
, mOuterView(nullptr)
|
||||
, mInnerView(nullptr)
|
||||
|
@ -67,7 +67,7 @@ protected:
|
||||
nsStyleContext* aContext);
|
||||
|
||||
explicit nsRubyBaseContainerFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, mozilla::FrameType::RubyBaseContainer)
|
||||
: nsContainerFrame(aContext, mozilla::LayoutFrameType::RubyBaseContainer)
|
||||
{}
|
||||
|
||||
struct RubyReflowInput;
|
||||
|
@ -33,7 +33,7 @@ protected:
|
||||
friend nsContainerFrame* NS_NewRubyBaseFrame(nsIPresShell* aPresShell,
|
||||
nsStyleContext* aContext);
|
||||
explicit nsRubyBaseFrame(nsStyleContext* aContext)
|
||||
: nsRubyContentFrame(aContext, mozilla::FrameType::RubyBase)
|
||||
: nsRubyContentFrame(aContext, mozilla::LayoutFrameType::RubyBase)
|
||||
{}
|
||||
};
|
||||
|
||||
|
@ -28,7 +28,7 @@ public:
|
||||
|
||||
protected:
|
||||
explicit nsRubyContentFrame(nsStyleContext* aContext,
|
||||
mozilla::FrameType aType)
|
||||
mozilla::LayoutFrameType aType)
|
||||
: nsInlineFrame(aContext, aType)
|
||||
{}
|
||||
};
|
||||
|
@ -49,7 +49,7 @@ protected:
|
||||
friend nsContainerFrame* NS_NewRubyFrame(nsIPresShell* aPresShell,
|
||||
nsStyleContext* aContext);
|
||||
explicit nsRubyFrame(nsStyleContext* aContext)
|
||||
: nsInlineFrame(aContext, mozilla::FrameType::Ruby)
|
||||
: nsInlineFrame(aContext, mozilla::LayoutFrameType::Ruby)
|
||||
{}
|
||||
|
||||
void ReflowSegment(nsPresContext* aPresContext,
|
||||
|
@ -57,7 +57,7 @@ protected:
|
||||
nsStyleContext* aContext);
|
||||
|
||||
explicit nsRubyTextContainerFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, mozilla::FrameType::RubyTextContainer)
|
||||
: nsContainerFrame(aContext, mozilla::LayoutFrameType::RubyTextContainer)
|
||||
, mISize(0)
|
||||
{}
|
||||
|
||||
|
@ -50,7 +50,7 @@ protected:
|
||||
friend nsContainerFrame* NS_NewRubyTextFrame(nsIPresShell* aPresShell,
|
||||
nsStyleContext* aContext);
|
||||
explicit nsRubyTextFrame(nsStyleContext* aContext)
|
||||
: nsRubyContentFrame(aContext, mozilla::FrameType::RubyText)
|
||||
: nsRubyContentFrame(aContext, mozilla::LayoutFrameType::RubyText)
|
||||
{}
|
||||
};
|
||||
|
||||
|
@ -45,7 +45,7 @@ NS_NewSimplePageSequenceFrame(nsIPresShell* aPresShell, nsStyleContext* aContext
|
||||
NS_IMPL_FRAMEARENA_HELPERS(nsSimplePageSequenceFrame)
|
||||
|
||||
nsSimplePageSequenceFrame::nsSimplePageSequenceFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, FrameType::Sequence)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::Sequence)
|
||||
, mTotalPages(-1)
|
||||
, mSelectionHeight(-1)
|
||||
, mYSelOffset(0)
|
||||
|
@ -74,7 +74,8 @@ public:
|
||||
static void RemoveFromFlow(nsIFrame* aFrame);
|
||||
|
||||
protected:
|
||||
explicit nsSplittableFrame(nsStyleContext* aContext, mozilla::FrameType aType)
|
||||
explicit nsSplittableFrame(nsStyleContext* aContext,
|
||||
mozilla::LayoutFrameType aType)
|
||||
: nsFrame(aContext, aType)
|
||||
, mPrevContinuation(nullptr)
|
||||
, mNextContinuation(nullptr)
|
||||
|
@ -59,7 +59,7 @@ GetDocumentFromView(nsView* aView)
|
||||
}
|
||||
|
||||
nsSubDocumentFrame::nsSubDocumentFrame(nsStyleContext* aContext)
|
||||
: nsAtomicContainerFrame(aContext, FrameType::SubDocument)
|
||||
: nsAtomicContainerFrame(aContext, LayoutFrameType::SubDocument)
|
||||
, mOuterView(nullptr)
|
||||
, mInnerView(nullptr)
|
||||
, mIsInline(false)
|
||||
|
@ -686,7 +686,7 @@ InvalidateFrameDueToGlyphsChanged(nsIFrame* aFrame)
|
||||
if (nsSVGUtils::IsInSVGTextSubtree(f) &&
|
||||
f->GetStateBits() & NS_FRAME_IS_NONDISPLAY) {
|
||||
auto svgTextFrame = static_cast<SVGTextFrame*>(
|
||||
nsLayoutUtils::GetClosestFrameOfType(f, FrameType::SVGText));
|
||||
nsLayoutUtils::GetClosestFrameOfType(f, LayoutFrameType::SVGText));
|
||||
svgTextFrame->ScheduleReflowSVGNonDisplayText(nsIPresShell::eResize);
|
||||
} else {
|
||||
// Theoretically we could just update overflow areas, perhaps using
|
||||
@ -1287,15 +1287,16 @@ CanTextCrossFrameBoundary(nsIFrame* aFrame)
|
||||
BuildTextRunsScanner::FindBoundaryResult
|
||||
BuildTextRunsScanner::FindBoundaries(nsIFrame* aFrame, FindBoundaryState* aState)
|
||||
{
|
||||
FrameType frameType = aFrame->Type();
|
||||
if (frameType == FrameType::RubyTextContainer) {
|
||||
LayoutFrameType frameType = aFrame->Type();
|
||||
if (frameType == LayoutFrameType::RubyTextContainer) {
|
||||
// Don't stop a text run for ruby text container. We want ruby text
|
||||
// containers to be skipped, but continue the text run across them.
|
||||
return FB_CONTINUE;
|
||||
}
|
||||
|
||||
nsTextFrame* textFrame =
|
||||
frameType == FrameType::Text ? static_cast<nsTextFrame*>(aFrame) : nullptr;
|
||||
nsTextFrame* textFrame = frameType == LayoutFrameType::Text
|
||||
? static_cast<nsTextFrame*>(aFrame)
|
||||
: nullptr;
|
||||
if (textFrame) {
|
||||
if (aState->mLastTextFrame &&
|
||||
textFrame != aState->mLastTextFrame->GetNextInFlow() &&
|
||||
@ -1839,8 +1840,8 @@ BuildTextRunsScanner::ContinueTextRunAcrossFrames(nsTextFrame* aFrame1, nsTextFr
|
||||
|
||||
void BuildTextRunsScanner::ScanFrame(nsIFrame* aFrame)
|
||||
{
|
||||
FrameType frameType = aFrame->Type();
|
||||
if (frameType == FrameType::RubyTextContainer) {
|
||||
LayoutFrameType frameType = aFrame->Type();
|
||||
if (frameType == LayoutFrameType::RubyTextContainer) {
|
||||
// Don't include any ruby text container into the text run.
|
||||
return;
|
||||
}
|
||||
@ -1850,7 +1851,7 @@ void BuildTextRunsScanner::ScanFrame(nsIFrame* aFrame)
|
||||
MappedFlow* mappedFlow = &mMappedFlows[mMappedFlows.Length() - 1];
|
||||
if (mappedFlow->mEndFrame == aFrame &&
|
||||
(aFrame->GetStateBits() & NS_FRAME_IS_FLUID_CONTINUATION)) {
|
||||
NS_ASSERTION(frameType == FrameType::Text,
|
||||
NS_ASSERTION(frameType == LayoutFrameType::Text,
|
||||
"Flow-sibling of a text frame is not a text frame?");
|
||||
|
||||
// Don't do this optimization if mLastFrame has a terminal newline...
|
||||
@ -1865,7 +1866,7 @@ void BuildTextRunsScanner::ScanFrame(nsIFrame* aFrame)
|
||||
}
|
||||
|
||||
// Now see if we can add a new set of frames to the current textrun
|
||||
if (frameType == FrameType::Text) {
|
||||
if (frameType == LayoutFrameType::Text) {
|
||||
nsTextFrame* frame = static_cast<nsTextFrame*>(aFrame);
|
||||
|
||||
if (mLastFrame) {
|
||||
@ -1895,7 +1896,7 @@ void BuildTextRunsScanner::ScanFrame(nsIFrame* aFrame)
|
||||
}
|
||||
|
||||
FrameTextTraversal traversal = CanTextCrossFrameBoundary(aFrame);
|
||||
bool isBR = frameType == FrameType::Br;
|
||||
bool isBR = frameType == LayoutFrameType::Br;
|
||||
if (!traversal.mLineBreakerCanCrossFrameBoundary) {
|
||||
// BR frames are special. We do not need or want to record a break opportunity
|
||||
// before a BR frame.
|
||||
@ -4603,8 +4604,8 @@ void
|
||||
nsTextFrame::InvalidateFrame(uint32_t aDisplayItemKey)
|
||||
{
|
||||
if (nsSVGUtils::IsInSVGTextSubtree(this)) {
|
||||
nsIFrame* svgTextFrame =
|
||||
nsLayoutUtils::GetClosestFrameOfType(GetParent(), FrameType::SVGText);
|
||||
nsIFrame* svgTextFrame = nsLayoutUtils::GetClosestFrameOfType(
|
||||
GetParent(), LayoutFrameType::SVGText);
|
||||
svgTextFrame->InvalidateFrame();
|
||||
return;
|
||||
}
|
||||
@ -4615,8 +4616,8 @@ void
|
||||
nsTextFrame::InvalidateFrameWithRect(const nsRect& aRect, uint32_t aDisplayItemKey)
|
||||
{
|
||||
if (nsSVGUtils::IsInSVGTextSubtree(this)) {
|
||||
nsIFrame* svgTextFrame =
|
||||
nsLayoutUtils::GetClosestFrameOfType(GetParent(), FrameType::SVGText);
|
||||
nsIFrame* svgTextFrame = nsLayoutUtils::GetClosestFrameOfType(
|
||||
GetParent(), LayoutFrameType::SVGText);
|
||||
svgTextFrame->InvalidateFrame();
|
||||
return;
|
||||
}
|
||||
|
@ -50,7 +50,7 @@ class nsTextFrame : public nsFrame
|
||||
|
||||
public:
|
||||
explicit nsTextFrame(nsStyleContext* aContext)
|
||||
: nsTextFrame(aContext, mozilla::FrameType::Text)
|
||||
: nsTextFrame(aContext, mozilla::LayoutFrameType::Text)
|
||||
{}
|
||||
|
||||
NS_DECL_QUERYFRAME_TARGET(nsTextFrame)
|
||||
@ -648,7 +648,7 @@ public:
|
||||
uint32_t CountGraphemeClusters() const;
|
||||
|
||||
protected:
|
||||
nsTextFrame(nsStyleContext* aContext, mozilla::FrameType aType)
|
||||
nsTextFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType)
|
||||
: nsFrame(aContext, aType)
|
||||
, mNextContinuation(nullptr)
|
||||
, mContentOffset(0)
|
||||
|
@ -75,7 +75,7 @@ SwapScaleWidthHeightForRotation(IntSize& aSize, VideoInfo::Rotation aDegrees)
|
||||
}
|
||||
|
||||
nsVideoFrame::nsVideoFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, FrameType::HTMLVideo)
|
||||
: nsContainerFrame(aContext, LayoutFrameType::HTMLVideo)
|
||||
{
|
||||
EnableVisibilityTracking();
|
||||
}
|
||||
|
@ -32,7 +32,7 @@ class nsMathMLContainerFrame : public nsContainerFrame,
|
||||
friend class nsMathMLmfencedFrame;
|
||||
public:
|
||||
nsMathMLContainerFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, mozilla::FrameType::None)
|
||||
: nsContainerFrame(aContext, mozilla::LayoutFrameType::None)
|
||||
, mIntrinsicWidth(NS_INTRINSIC_WIDTH_UNKNOWN)
|
||||
, mBlockStartAscent(0)
|
||||
{}
|
||||
|
@ -1235,11 +1235,11 @@ nsCSSRendering::FindNonTransparentBackgroundFrame(nsIFrame* aFrame,
|
||||
bool
|
||||
nsCSSRendering::IsCanvasFrame(nsIFrame* aFrame)
|
||||
{
|
||||
FrameType frameType = aFrame->Type();
|
||||
return frameType == FrameType::Canvas ||
|
||||
frameType == FrameType::Root ||
|
||||
frameType == FrameType::PageContent ||
|
||||
frameType == FrameType::Viewport;
|
||||
LayoutFrameType frameType = aFrame->Type();
|
||||
return frameType == LayoutFrameType::Canvas ||
|
||||
frameType == LayoutFrameType::Root ||
|
||||
frameType == LayoutFrameType::PageContent ||
|
||||
frameType == LayoutFrameType::Viewport;
|
||||
}
|
||||
|
||||
nsIFrame*
|
||||
@ -2809,9 +2809,9 @@ nsCSSRendering::ComputeImageLayerPositioningArea(nsPresContext* aPresContext,
|
||||
MOZ_ASSERT(!aForFrame->IsFrameOfType(nsIFrame::eSVG) ||
|
||||
aForFrame->IsSVGOuterSVGFrame());
|
||||
|
||||
FrameType frameType = aForFrame->Type();
|
||||
LayoutFrameType frameType = aForFrame->Type();
|
||||
nsIFrame* geometryFrame = aForFrame;
|
||||
if (MOZ_UNLIKELY(frameType == FrameType::Scroll &&
|
||||
if (MOZ_UNLIKELY(frameType == LayoutFrameType::Scroll &&
|
||||
NS_STYLE_IMAGELAYER_ATTACHMENT_LOCAL == aLayer.mAttachment)) {
|
||||
nsIScrollableFrame* scrollableFrame = do_QueryFrame(aForFrame);
|
||||
positionArea = nsRect(
|
||||
@ -2838,7 +2838,7 @@ nsCSSRendering::ComputeImageLayerPositioningArea(nsPresContext* aPresContext,
|
||||
return positionArea;
|
||||
}
|
||||
|
||||
if (MOZ_UNLIKELY(frameType == FrameType::Canvas)) {
|
||||
if (MOZ_UNLIKELY(frameType == LayoutFrameType::Canvas)) {
|
||||
geometryFrame = aForFrame->PrincipalChildList().FirstChild();
|
||||
// geometryFrame might be null if this canvas is a page created
|
||||
// as an overflow container (e.g. the in-flow content has already
|
||||
@ -2881,8 +2881,8 @@ nsCSSRendering::ComputeImageLayerPositioningArea(nsPresContext* aPresContext,
|
||||
NS_ASSERTION(attachedToFrame, "no root frame");
|
||||
nsIFrame* pageContentFrame = nullptr;
|
||||
if (aPresContext->IsPaginated()) {
|
||||
pageContentFrame =
|
||||
nsLayoutUtils::GetClosestFrameOfType(aForFrame, FrameType::PageContent);
|
||||
pageContentFrame = nsLayoutUtils::GetClosestFrameOfType(
|
||||
aForFrame, LayoutFrameType::PageContent);
|
||||
if (pageContentFrame) {
|
||||
attachedToFrame = pageContentFrame;
|
||||
}
|
||||
|
@ -1022,8 +1022,8 @@ nsDisplayListBuilder::FindAnimatedGeometryRootFor(nsDisplayItem* aItem)
|
||||
// the enclosing viewport, since it shouldn't be scrolled by scrolled
|
||||
// frames in its document. InvalidateFixedBackgroundFramesFromList in
|
||||
// nsGfxScrollFrame will not repaint this item when scrolling occurs.
|
||||
nsIFrame* viewportFrame =
|
||||
nsLayoutUtils::GetClosestFrameOfType(aItem->Frame(), FrameType::Viewport, RootReferenceFrame());
|
||||
nsIFrame* viewportFrame = nsLayoutUtils::GetClosestFrameOfType(
|
||||
aItem->Frame(), LayoutFrameType::Viewport, RootReferenceFrame());
|
||||
if (viewportFrame) {
|
||||
return FindAnimatedGeometryRootFor(viewportFrame);
|
||||
}
|
||||
@ -1503,10 +1503,10 @@ nsDisplayListBuilder::IsAnimatedGeometryRoot(nsIFrame* aFrame, nsIFrame** aParen
|
||||
if (!parent)
|
||||
return true;
|
||||
|
||||
FrameType parentType = parent->Type();
|
||||
LayoutFrameType parentType = parent->Type();
|
||||
// Treat the slider thumb as being as an active scrolled root when it wants
|
||||
// its own layer so that it can move without repainting.
|
||||
if (parentType == FrameType::Slider &&
|
||||
if (parentType == LayoutFrameType::Slider &&
|
||||
nsLayoutUtils::IsScrollbarThumbLayerized(aFrame)) {
|
||||
return true;
|
||||
}
|
||||
@ -1517,7 +1517,8 @@ nsDisplayListBuilder::IsAnimatedGeometryRoot(nsIFrame* aFrame, nsIFrame** aParen
|
||||
return true;
|
||||
}
|
||||
|
||||
if (parentType == FrameType::Scroll || parentType == FrameType::ListControl) {
|
||||
if (parentType == LayoutFrameType::Scroll ||
|
||||
parentType == LayoutFrameType::ListControl) {
|
||||
nsIScrollableFrame* sf = do_QueryFrame(parent);
|
||||
if (sf->IsScrollingActive(this) && sf->GetScrolledFrame() == aFrame) {
|
||||
return true;
|
||||
|
@ -809,8 +809,8 @@ nsComputedDOMStyle::UpdateCurrentStyleSources(bool aNeedsLayoutFlush)
|
||||
|
||||
mInnerFrame = mOuterFrame;
|
||||
if (mOuterFrame) {
|
||||
FrameType type = mOuterFrame->Type();
|
||||
if (type == FrameType::TableWrapper) {
|
||||
LayoutFrameType type = mOuterFrame->Type();
|
||||
if (type == LayoutFrameType::TableWrapper) {
|
||||
// If the frame is a table wrapper frame then we should get the style
|
||||
// from the inner table frame.
|
||||
mInnerFrame = mOuterFrame->PrincipalChildList().FirstChild();
|
||||
|
@ -21,7 +21,7 @@ class SVGFEContainerFrame : public nsContainerFrame
|
||||
NS_NewSVGFEContainerFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||
protected:
|
||||
explicit SVGFEContainerFrame(nsStyleContext* aContext)
|
||||
: nsContainerFrame(aContext, mozilla::FrameType::SVGFEContainer)
|
||||
: nsContainerFrame(aContext, mozilla::LayoutFrameType::SVGFEContainer)
|
||||
{
|
||||
AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY);
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ class SVGFEImageFrame final : public nsFrame
|
||||
NS_NewSVGFEImageFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||
protected:
|
||||
explicit SVGFEImageFrame(nsStyleContext* aContext)
|
||||
: nsFrame(aContext, FrameType::SVGFEImage)
|
||||
: nsFrame(aContext, LayoutFrameType::SVGFEImage)
|
||||
{
|
||||
AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY);
|
||||
|
||||
|
@ -20,7 +20,7 @@ class SVGFELeafFrame final : public nsFrame
|
||||
NS_NewSVGFELeafFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||
protected:
|
||||
explicit SVGFELeafFrame(nsStyleContext* aContext)
|
||||
: nsFrame(aContext, FrameType::SVGFELeaf)
|
||||
: nsFrame(aContext, LayoutFrameType::SVGFELeaf)
|
||||
{
|
||||
AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ class SVGFEUnstyledLeafFrame : public nsFrame
|
||||
NS_NewSVGFEUnstyledLeafFrame(nsIPresShell* aPresShell, nsStyleContext* aContext);
|
||||
protected:
|
||||
explicit SVGFEUnstyledLeafFrame(nsStyleContext* aContext)
|
||||
: nsFrame(aContext, FrameType::SVGFEUnstyledLeaf)
|
||||
: nsFrame(aContext, LayoutFrameType::SVGFEUnstyledLeaf)
|
||||
{
|
||||
AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_IS_NONDISPLAY);
|
||||
}
|
||||
|
@ -731,7 +731,7 @@ SVGGeometryFrame::MarkerProperties::GetMarkerStartFrame()
|
||||
if (!mMarkerStart)
|
||||
return nullptr;
|
||||
return static_cast<nsSVGMarkerFrame*>(
|
||||
mMarkerStart->GetReferencedFrame(FrameType::SVGMarker, nullptr));
|
||||
mMarkerStart->GetReferencedFrame(LayoutFrameType::SVGMarker, nullptr));
|
||||
}
|
||||
|
||||
nsSVGMarkerFrame *
|
||||
@ -740,7 +740,7 @@ SVGGeometryFrame::MarkerProperties::GetMarkerMidFrame()
|
||||
if (!mMarkerMid)
|
||||
return nullptr;
|
||||
return static_cast<nsSVGMarkerFrame*>(
|
||||
mMarkerMid->GetReferencedFrame(FrameType::SVGMarker, nullptr));
|
||||
mMarkerMid->GetReferencedFrame(LayoutFrameType::SVGMarker, nullptr));
|
||||
}
|
||||
|
||||
nsSVGMarkerFrame *
|
||||
@ -749,7 +749,7 @@ SVGGeometryFrame::MarkerProperties::GetMarkerEndFrame()
|
||||
if (!mMarkerEnd)
|
||||
return nullptr;
|
||||
return static_cast<nsSVGMarkerFrame*>(
|
||||
mMarkerEnd->GetReferencedFrame(FrameType::SVGMarker, nullptr));
|
||||
mMarkerEnd->GetReferencedFrame(LayoutFrameType::SVGMarker, nullptr));
|
||||
}
|
||||
|
||||
DrawResult
|
||||
|
@ -49,14 +49,14 @@ class SVGGeometryFrame : public nsFrame
|
||||
friend class ::nsDisplaySVGGeometry;
|
||||
|
||||
protected:
|
||||
SVGGeometryFrame(nsStyleContext* aContext, mozilla::FrameType aType)
|
||||
SVGGeometryFrame(nsStyleContext* aContext, mozilla::LayoutFrameType aType)
|
||||
: nsFrame(aContext, aType)
|
||||
{
|
||||
AddStateBits(NS_FRAME_SVG_LAYOUT | NS_FRAME_MAY_BE_TRANSFORMED);
|
||||
}
|
||||
|
||||
explicit SVGGeometryFrame(nsStyleContext* aContext)
|
||||
: SVGGeometryFrame(aContext, mozilla::FrameType::SVGGeometry)
|
||||
: SVGGeometryFrame(aContext, mozilla::LayoutFrameType::SVGGeometry)
|
||||
{}
|
||||
|
||||
public:
|
||||
|
@ -2769,7 +2769,7 @@ private:
|
||||
|
||||
bool IsClipPathChild() const {
|
||||
return nsLayoutUtils::GetClosestFrameOfType
|
||||
(mFrame->GetParent(), FrameType::SVGText)->GetStateBits() &
|
||||
(mFrame->GetParent(), LayoutFrameType::SVGText)->GetStateBits() &
|
||||
NS_STATE_SVG_CLIPPATH_CHILD;
|
||||
}
|
||||
|
||||
@ -5446,7 +5446,7 @@ SVGTextFrame::TransformFramePointToTextChild(const Point& aPoint,
|
||||
{
|
||||
NS_ASSERTION(aChildFrame &&
|
||||
nsLayoutUtils::GetClosestFrameOfType
|
||||
(aChildFrame->GetParent(), FrameType::SVGText) == this,
|
||||
(aChildFrame->GetParent(), LayoutFrameType::SVGText) == this,
|
||||
"aChildFrame must be a descendant of this frame");
|
||||
|
||||
UpdateGlyphPositioning();
|
||||
@ -5525,7 +5525,7 @@ SVGTextFrame::TransformFrameRectToTextChild(const gfxRect& aRect,
|
||||
{
|
||||
NS_ASSERTION(aChildFrame &&
|
||||
nsLayoutUtils::GetClosestFrameOfType
|
||||
(aChildFrame->GetParent(), FrameType::SVGText) == this,
|
||||
(aChildFrame->GetParent(), LayoutFrameType::SVGText) == this,
|
||||
"aChildFrame must be a descendant of this frame");
|
||||
|
||||
UpdateGlyphPositioning();
|
||||
@ -5606,7 +5606,7 @@ SVGTextFrame::TransformFrameRectFromTextChild(const nsRect& aRect,
|
||||
{
|
||||
NS_ASSERTION(aChildFrame &&
|
||||
nsLayoutUtils::GetClosestFrameOfType
|
||||
(aChildFrame->GetParent(), FrameType::SVGText) == this,
|
||||
(aChildFrame->GetParent(), LayoutFrameType::SVGText) == this,
|
||||
"aChildFrame must be a descendant of this frame");
|
||||
|
||||
UpdateGlyphPositioning();
|
||||
|
@ -194,7 +194,7 @@ class SVGTextFrame final : public nsSVGDisplayContainerFrame
|
||||
|
||||
protected:
|
||||
explicit SVGTextFrame(nsStyleContext* aContext)
|
||||
: nsSVGDisplayContainerFrame(aContext, mozilla::FrameType::SVGText)
|
||||
: nsSVGDisplayContainerFrame(aContext, mozilla::LayoutFrameType::SVGText)
|
||||
, mTrailingUndisplayedCharacters(0)
|
||||
, mFontSizeScaleFactor(1.0f)
|
||||
, mLastContextScale(1.0f)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user