--- a/dom/base/nsFocusManager.cpp
+++ b/dom/base/nsFocusManager.cpp
@@ -1572,17 +1572,17 @@ nsFocusManager::CheckIfFocusable(nsICont
// if this is a child frame content node, check if it is visible and
// call the content node's IsFocusable method instead of the frame's
// IsFocusable method. This skips checking the style system and ensures that
// offscreen browsers can still be focused.
nsIDocument* subdoc = doc->GetSubDocumentFor(aContent);
if (subdoc && IsWindowVisible(subdoc->GetWindow())) {
const nsStyleUserInterface* ui = frame->StyleUserInterface();
int32_t tabIndex = (ui->mUserFocus == StyleUserFocus::Ignore ||
- ui->mUserFocus == StyleUserFocus::None_) ? -1 : 0;
+ ui->mUserFocus == StyleUserFocus::None) ? -1 : 0;
return aContent->IsFocusable(&tabIndex, aFlags & FLAG_BYMOUSE) ? aContent : nullptr;
}
return frame->IsFocusable(nullptr, aFlags & FLAG_BYMOUSE) ? aContent : nullptr;
}
bool
nsFocusManager::Blur(nsPIDOMWindowOuter* aWindowToClear,
--- a/dom/html/nsGenericHTMLElement.cpp
+++ b/dom/html/nsGenericHTMLElement.cpp
@@ -1285,17 +1285,17 @@ nsGenericHTMLElement::MapCommonAttribute
nsRuleData* aData)
{
MapCommonAttributesIntoExceptHidden(aAttributes, aData);
if (aData->mSIDs & NS_STYLE_INHERIT_BIT(Display)) {
nsCSSValue* display = aData->ValueForDisplay();
if (display->GetUnit() == eCSSUnit_Null) {
if (aAttributes->IndexOfAttr(nsGkAtoms::hidden) >= 0) {
- display->SetIntValue(StyleDisplay::None_, eCSSUnit_Enumerated);
+ display->SetIntValue(StyleDisplay::None, eCSSUnit_Enumerated);
}
}
}
}
/* static */ const nsGenericHTMLElement::MappedAttributeEntry
nsGenericHTMLElement::sCommonAttributeMap[] = {
{ &nsGkAtoms::contenteditable },
@@ -3092,17 +3092,17 @@ IsOrHasAncestorWithDisplayNone(Element*
RefPtr<nsStyleContext> sc;
for (int32_t i = elementsToCheck.Length() - 1; i >= 0; --i) {
if (sc) {
sc = styleSet->ResolveStyleFor(elementsToCheck[i], sc);
} else {
sc = nsComputedDOMStyle::GetStyleContextForElementNoFlush(elementsToCheck[i],
nullptr, aPresShell);
}
- if (sc->StyleDisplay()->mDisplay == StyleDisplay::None_) {
+ if (sc->StyleDisplay()->mDisplay == StyleDisplay::None) {
return true;
}
}
return false;
}
void
--- a/dom/plugins/ipc/PluginInstanceChild.cpp
+++ b/dom/plugins/ipc/PluginInstanceChild.cpp
@@ -58,16 +58,17 @@ using namespace std;
#include <windows.h>
#include <windowsx.h>
#include "mozilla/widget/WinMessages.h"
#include "mozilla/widget/WinModifierKeyState.h"
#include "mozilla/widget/WinNativeEventData.h"
#include "nsWindowsDllInterceptor.h"
+#include "X11UndefineNone.h"
typedef BOOL (WINAPI *User32TrackPopupMenu)(HMENU hMenu,
UINT uFlags,
int x,
int y,
int nReserved,
HWND hWnd,
CONST RECT *prcRect);
--- a/editor/libeditor/EditorBase.cpp
+++ b/editor/libeditor/EditorBase.cpp
@@ -3432,17 +3432,17 @@ IsElementVisible(Element* aElement)
// Now it might be that we have no frame because we're in a
// display:none subtree, or it might be that we're just dealing with
// lazy frame construction and it hasn't happened yet. Check which
// one it is.
RefPtr<nsStyleContext> styleContext =
nsComputedDOMStyle::GetStyleContextForElementNoFlush(aElement,
nullptr, nullptr);
if (styleContext) {
- return styleContext->StyleDisplay()->mDisplay != StyleDisplay::None_;
+ return styleContext->StyleDisplay()->mDisplay != StyleDisplay::None;
}
return false;
}
bool
EditorBase::IsEditable(nsIDOMNode* aNode)
{
nsCOMPtr<nsIContent> content = do_QueryInterface(aNode);
--- a/gfx/src/X11UndefineNone.h
+++ b/gfx/src/X11UndefineNone.h
@@ -1,17 +1,14 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-#ifndef MOZILLA_GFX_X11UNDEFINENONE_H_
-#define MOZILLA_GFX_X11UNDEFINENONE_H_
-
// The header <X11/X.h> defines "None" as a macro that expands to "0L".
// This is terrible because many enumerations have an enumerator named "None".
// To work around this, we undefine the macro "None", and define a replacement
// macro named "X11None".
// Include this header after including X11 headers, where necessary.
#ifdef None
# undef None
# define X11None 0L
@@ -19,9 +16,8 @@
// Since we are undefining "None", that stops working. To keep it working,
// we undefine "RevertToNone" and redefine it in terms of "X11None".
# ifdef RevertToNone
# undef RevertToNone
# define RevertToNone (int)X11None
# endif
#endif
-#endif /* MOZILLA_GFX_X11UNDEFINENONE_H_ */
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -1782,32 +1782,32 @@ ElementRestyler::ConditionallyRestyleUnd
void
ElementRestyler::DoConditionallyRestyleUndisplayedDescendants(
nsIContent* aParent,
Element* aRestyleRoot)
{
nsCSSFrameConstructor* fc = mPresContext->FrameConstructor();
UndisplayedNode* nodes = fc->GetAllUndisplayedContentIn(aParent);
ConditionallyRestyleUndisplayedNodes(nodes, aParent,
- StyleDisplay::None_, aRestyleRoot);
+ StyleDisplay::None, aRestyleRoot);
nodes = fc->GetAllDisplayContentsIn(aParent);
ConditionallyRestyleUndisplayedNodes(nodes, aParent,
StyleDisplay::Contents, aRestyleRoot);
}
// The structure of this method parallels RestyleUndisplayedNodes.
// If you update this method, you probably want to update that one too.
void
ElementRestyler::ConditionallyRestyleUndisplayedNodes(
UndisplayedNode* aUndisplayed,
nsIContent* aUndisplayedParent,
const StyleDisplay aDisplay,
Element* aRestyleRoot)
{
- MOZ_ASSERT(aDisplay == StyleDisplay::None_ ||
+ MOZ_ASSERT(aDisplay == StyleDisplay::None ||
aDisplay == StyleDisplay::Contents);
if (!aUndisplayed) {
return;
}
if (aUndisplayedParent &&
aUndisplayedParent->IsElement() &&
aUndisplayedParent->HasFlag(mRestyleTracker.RootBit())) {
@@ -1820,17 +1820,17 @@ ElementRestyler::ConditionallyRestyleUnd
if (!undisplayed->mContent->IsElement()) {
continue;
}
Element* element = undisplayed->mContent->AsElement();
if (!ConditionallyRestyle(element, aRestyleRoot)) {
- if (aDisplay == StyleDisplay::None_) {
+ if (aDisplay == StyleDisplay::None) {
ConditionallyRestyleContentDescendants(element, aRestyleRoot);
} else { // StyleDisplay::Contents
DoConditionallyRestyleUndisplayedDescendants(element, aRestyleRoot);
}
}
}
}
@@ -3420,17 +3420,17 @@ ElementRestyler::RestyleUndisplayedDesce
void
ElementRestyler::DoRestyleUndisplayedDescendants(nsRestyleHint aChildRestyleHint,
nsIContent* aParent,
nsStyleContext* aParentContext)
{
nsCSSFrameConstructor* fc = mPresContext->FrameConstructor();
UndisplayedNode* nodes = fc->GetAllUndisplayedContentIn(aParent);
RestyleUndisplayedNodes(aChildRestyleHint, nodes, aParent,
- aParentContext, StyleDisplay::None_);
+ aParentContext, StyleDisplay::None);
nodes = fc->GetAllDisplayContentsIn(aParent);
RestyleUndisplayedNodes(aChildRestyleHint, nodes, aParent,
aParentContext, StyleDisplay::Contents);
}
// The structure of this method parallels ConditionallyRestyleUndisplayedNodes.
// If you update this method, you probably want to update that one too.
void
--- a/layout/base/ServoRestyleManager.cpp
+++ b/layout/base/ServoRestyleManager.cpp
@@ -99,17 +99,17 @@ ServoRestyleManager::RecreateStyleContex
// generate a ReconstructFrame change hint if the new display value
// (which we can get from the ComputedValues stored on the node) is not
// none.
if (primaryFrame) {
changeHint |= primaryFrame->StyleContext()->ConsumeStoredChangeHint();
} else {
const nsStyleDisplay* currentDisplay =
Servo_GetStyleDisplay(computedValues);
- if (currentDisplay->mDisplay != StyleDisplay::None_) {
+ if (currentDisplay->mDisplay != StyleDisplay::None) {
changeHint |= nsChangeHint_ReconstructFrame;
}
}
// Add the new change hint to the list of elements to process if
// we need to do any work.
if (changeHint) {
aChangeListToProcess.AppendChange(primaryFrame, element, changeHint);
--- a/layout/base/nsCSSFrameConstructor.cpp
+++ b/layout/base/nsCSSFrameConstructor.cpp
@@ -2480,17 +2480,17 @@ nsCSSFrameConstructor::ConstructDocEleme
// --------- IF SCROLLABLE WRAP IN SCROLLFRAME --------
NS_ASSERTION(!display->IsScrollableOverflow() ||
state.mPresContext->IsPaginated() ||
propagatedScrollFrom == aDocElement,
"Scrollbars should have been propagated to the viewport");
- if (MOZ_UNLIKELY(display->mDisplay == StyleDisplay::None_)) {
+ if (MOZ_UNLIKELY(display->mDisplay == StyleDisplay::None)) {
SetUndisplayedContent(aDocElement, styleContext);
return nullptr;
}
TreeMatchContext::AutoAncestorPusher ancestorPusher(state.mTreeMatchContext);
ancestorPusher.PushAncestorAndStyleScope(aDocElement);
// Make sure to start any background image loads for the root element now.
@@ -4736,17 +4736,17 @@ nsCSSFrameConstructor::FindDisplayData(c
static const FrameConstructionData sNonScrollableGridData =
FCDATA_DECL(0, NS_NewGridContainerFrame);
return &sNonScrollableGridData;
}
}
// NOTE: Make sure to keep this up to date with the StyleDisplay definition!
static const FrameConstructionDataByDisplay sDisplayData[] = {
- FCDATA_FOR_DISPLAY(StyleDisplay::None_, UNREACHABLE_FCDATA()),
+ FCDATA_FOR_DISPLAY(StyleDisplay::None, UNREACHABLE_FCDATA()),
FCDATA_FOR_DISPLAY(StyleDisplay::Block, UNREACHABLE_FCDATA()),
// To keep the hash table small don't add inline frames (they're
// typically things like FONT and B), because we can quickly
// find them if we need to.
// XXXbz the "quickly" part is a bald-faced lie!
FCDATA_FOR_DISPLAY(StyleDisplay::Inline,
FULL_CTOR_FCDATA(FCDATA_IS_INLINE | FCDATA_IS_LINE_PARTICIPANT,
&nsCSSFrameConstructor::ConstructInline)),
@@ -5705,17 +5705,17 @@ nsCSSFrameConstructor::AddFrameConstruct
aTag = mDocument->BindingManager()->ResolveTag(aContent, &aNameSpaceID);
}
bool isGeneratedContent = ((aFlags & ITEM_IS_GENERATED_CONTENT) != 0);
// Pre-check for display "none" - if we find that, don't create
// any frame at all
- if (StyleDisplay::None_ == display->mDisplay) {
+ if (StyleDisplay::None == display->mDisplay) {
SetAsUndisplayedContent(aState, aItems, aContent, styleContext, isGeneratedContent);
return;
}
bool isText = !aContent->IsElement();
// never create frames for non-option/optgroup kids of <select> and
// non-option kids of <optgroup> inside a <select>.
@@ -9203,30 +9203,30 @@ DefinitelyEqualURIsAndPrincipal(mozilla:
return aURI1 == aURI2 ||
(aURI1 && aURI2 && aURI1->DefinitelyEqualURIsAndPrincipal(*aURI2));
}
nsStyleContext*
nsCSSFrameConstructor::MaybeRecreateFramesForElement(Element* aElement)
{
RefPtr<nsStyleContext> oldContext = GetUndisplayedContent(aElement);
- StyleDisplay oldDisplay = StyleDisplay::None_;
+ StyleDisplay oldDisplay = StyleDisplay::None;
if (!oldContext) {
oldContext = GetDisplayContentsStyleFor(aElement);
if (!oldContext) {
return nullptr;
}
oldDisplay = StyleDisplay::Contents;
}
// The parent has a frame, so try resolving a new context.
RefPtr<nsStyleContext> newContext = mPresShell->StyleSet()->
ResolveStyleFor(aElement, oldContext->GetParent());
- if (oldDisplay == StyleDisplay::None_) {
+ if (oldDisplay == StyleDisplay::None) {
ChangeUndisplayedContent(aElement, newContext);
} else {
ChangeDisplayContents(aElement, newContext);
}
const nsStyleDisplay* disp = newContext->StyleDisplay();
if (oldDisplay == disp->mDisplay) {
// We can skip trying to recreate frames here, but only if our style
@@ -11656,17 +11656,17 @@ nsCSSFrameConstructor::CreateListBoxCont
RefPtr<nsStyleContext> styleContext;
styleContext = ResolveStyleContext(aParentFrame, aChild, &state);
// Pre-check for display "none" - only if we find that, do we create
// any frame at all
const nsStyleDisplay* display = styleContext->StyleDisplay();
- if (StyleDisplay::None_ == display->mDisplay) {
+ if (StyleDisplay::None == display->mDisplay) {
*aNewFrame = nullptr;
return NS_OK;
}
BeginUpdate();
FrameConstructionItemList items;
AddFrameConstructionItemsInternal(state, aChild, aParentFrame,
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -3064,17 +3064,17 @@ nsLayoutUtils::CombineBreakType(StyleCle
}
break;
case StyleClear::Right:
if (StyleClear::Left == aNewBreakType ||
StyleClear::Both == aNewBreakType) {
breakType = StyleClear::Both;
}
break;
- case StyleClear::None_:
+ case StyleClear::None:
if (StyleClear::Left == aNewBreakType ||
StyleClear::Right == aNewBreakType ||
StyleClear::Both == aNewBreakType) {
breakType = aNewBreakType;
}
break;
default:
break;
--- a/layout/generic/BlockReflowInput.cpp
+++ b/layout/generic/BlockReflowInput.cpp
@@ -39,17 +39,17 @@ BlockReflowInput::BlockReflowInput(const
mPresContext(aPresContext),
mReflowInput(aReflowInput),
mContentArea(aReflowInput.GetWritingMode()),
mPushedFloats(nullptr),
mOverflowTracker(nullptr),
mBorderPadding(mReflowInput.ComputedLogicalBorderPadding()),
mPrevBEndMargin(),
mLineNumber(0),
- mFloatBreakType(StyleClear::None_),
+ mFloatBreakType(StyleClear::None),
mConsumedBSize(aConsumedBSize)
{
if (!sFloatFragmentsInsideColumnPrefCached) {
sFloatFragmentsInsideColumnPrefCached = true;
Preferences::AddBoolVarCache(&sFloatFragmentsInsideColumnEnabled,
"layout.float-fragments-inside-column.enabled");
}
mFlags.mFloatFragmentsInsideColumnEnabled = sFloatFragmentsInsideColumnEnabled;
@@ -727,17 +727,17 @@ BlockReflowInput::FlowAndPlaceFloat(nsIF
// Enforce CSS2 9.5.1 rule [2], i.e., make sure that a float isn't
// ``above'' another float that preceded it in the flow.
mBCoord = std::max(mFloatManager->GetLowestFloatTop(), mBCoord);
// See if the float should clear any preceding floats...
// XXX We need to mark this float somehow so that it gets reflowed
// when floats are inserted before it.
- if (StyleClear::None_ != floatDisplay->mBreakType) {
+ if (StyleClear::None != floatDisplay->mBreakType) {
// XXXldb Does this handle vertical margins correctly?
mBCoord = ClearFloats(mBCoord, floatDisplay->PhysicalBreakType(wm));
}
// Get the band of available space
nsFlowAreaRect floatAvailableSpace = GetFloatAvailableSpace(mBCoord);
LogicalRect adjustedAvailableSpace =
mBlock->AdjustFloatAvailableSpace(*this, floatAvailableSpace.mRect, aFloat);
@@ -1098,17 +1098,17 @@ BlockReflowInput::ClearFloats(nscoord aB
#endif
if (!mFloatManager->HasAnyFloats()) {
return aBCoord;
}
nscoord newBCoord = aBCoord;
- if (aBreakType != StyleClear::None_) {
+ if (aBreakType != StyleClear::None) {
newBCoord = mFloatManager->ClearFloats(newBCoord, aBreakType, aFlags);
}
if (aReplacedBlock) {
for (;;) {
nsFlowAreaRect floatAvailableSpace = GetFloatAvailableSpace(newBCoord);
if (ReplacedBlockFitsInAvailSpace(aReplacedBlock, floatAvailableSpace)) {
break;
--- a/layout/generic/ReflowInput.cpp
+++ b/layout/generic/ReflowInput.cpp
@@ -839,17 +839,17 @@ ReflowInput::InitFrameType(nsIAtom* aFra
case StyleDisplay::TableColumn:
case StyleDisplay::TableColumnGroup:
case StyleDisplay::TableHeaderGroup:
case StyleDisplay::TableFooterGroup:
case StyleDisplay::TableRow:
frameType = NS_CSS_FRAME_TYPE_INTERNAL_TABLE;
break;
- case StyleDisplay::None_:
+ case StyleDisplay::None:
default:
frameType = NS_CSS_FRAME_TYPE_UNKNOWN;
break;
}
}
// See if the frame is replaced
if (mFrame->IsFrameOfType(nsIFrame::eReplacedContainsBlock)) {
@@ -1208,17 +1208,17 @@ static bool AreAllEarlierInFlowFramesEmp
void
ReflowInput::CalculateHypotheticalPosition
(nsPresContext* aPresContext,
nsIFrame* aPlaceholderFrame,
const ReflowInput* cbrs,
nsHypotheticalPosition& aHypotheticalPos,
nsIAtom* aFrameType) const
{
- NS_ASSERTION(mStyleDisplay->mOriginalDisplay != StyleDisplay::None_,
+ NS_ASSERTION(mStyleDisplay->mOriginalDisplay != StyleDisplay::None,
"mOriginalDisplay has not been properly initialized");
// Find the nearest containing block frame to the placeholder frame,
// and its inline-start edge and width.
nscoord blockIStartContentEdge;
// Dummy writing mode for blockContentSize, will be changed as needed by
// GetHypotheticalBoxContainer.
WritingMode cbwm = cbrs->GetWritingMode();
--- a/layout/generic/nsBRFrame.cpp
+++ b/layout/generic/nsBRFrame.cpp
@@ -140,17 +140,17 @@ BRFrame::Reflow(nsPresContext* aPresCont
// Warning: nsTextControlFrame::CalculateSizeStandard depends on
// the following line, see bug 228752.
// The code below in AddInlinePrefISize also adds 1 appunit to width
finalSize.ISize(wm) = 1;
}
// Return our reflow status
StyleClear breakType = aReflowInput.mStyleDisplay->PhysicalBreakType(wm);
- if (StyleClear::None_ == breakType) {
+ if (StyleClear::None == breakType) {
breakType = StyleClear::Line;
}
aStatus = NS_INLINE_BREAK | NS_INLINE_BREAK_AFTER |
NS_INLINE_MAKE_BREAK_TYPE(breakType);
ll->SetLineEndsInBR(true);
}
else {
--- a/layout/generic/nsBackdropFrame.cpp
+++ b/layout/generic/nsBackdropFrame.cpp
@@ -42,17 +42,17 @@ nsBackdropFrame::BuildDisplayList(nsDisp
const nsRect& aDirtyRect,
const nsDisplayListSet& aLists)
{
DO_GLOBAL_REFLOW_COUNT_DSP("nsBackdropFrame");
// We want this frame to always be there even if its display value is
// none or contents so that we can respond to style change on it. To
// support those values, we skip painting ourselves in those cases.
auto display = StyleDisplay()->mDisplay;
- if (display == mozilla::StyleDisplay::None_ ||
+ if (display == mozilla::StyleDisplay::None ||
display == mozilla::StyleDisplay::Contents) {
return;
}
DisplayBorderBackgroundOutline(aBuilder, aLists);
}
/* virtual */ LogicalSize
--- a/layout/generic/nsBlockFrame.cpp
+++ b/layout/generic/nsBlockFrame.cpp
@@ -2025,17 +2025,17 @@ nsBlockFrame::PropagateFloatDamage(Block
aLine->MarkDirty();
}
}
}
}
static bool LineHasClear(nsLineBox* aLine) {
return aLine->IsBlock()
- ? (aLine->GetBreakTypeBefore() != StyleClear::None_ ||
+ ? (aLine->GetBreakTypeBefore() != StyleClear::None ||
(aLine->mFirstChild->GetStateBits() & NS_BLOCK_HAS_CLEAR_CHILDREN) ||
!nsBlockFrame::BlockCanIntersectFloats(aLine->mFirstChild))
: aLine->HasFloatBreakAfter();
}
/**
* Reparent a whole list of floats from aOldParent to this block. The
@@ -2076,17 +2076,17 @@ static void DumpLine(const BlockReflowIn
#endif
}
void
nsBlockFrame::ReflowDirtyLines(BlockReflowInput& aState)
{
bool keepGoing = true;
bool repositionViews = false; // should we really need this?
- bool foundAnyClears = aState.mFloatBreakType != StyleClear::None_;
+ bool foundAnyClears = aState.mFloatBreakType != StyleClear::None;
bool willReflowAgain = false;
#ifdef DEBUG
if (gNoisyReflow) {
IndentBy(stdout, gNoiseIndent);
ListTag(stdout);
printf(": reflowing dirty lines");
printf(" computedISize=%d\n", aState.mReflowInput.ComputedISize());
@@ -2148,22 +2148,22 @@ nsBlockFrame::ReflowDirtyLines(BlockRefl
if (line->IsBlock() &&
!nsBlockFrame::BlockCanIntersectFloats(line->mFirstChild)) {
replacedBlock = line->mFirstChild;
}
// We have to reflow the line if it's a block whose clearance
// might have changed, so detect that.
if (!line->IsDirty() &&
- (line->GetBreakTypeBefore() != StyleClear::None_ ||
+ (line->GetBreakTypeBefore() != StyleClear::None ||
replacedBlock)) {
nscoord curBCoord = aState.mBCoord;
// See where we would be after applying any clearance due to
// BRs.
- if (inlineFloatBreakType != StyleClear::None_) {
+ if (inlineFloatBreakType != StyleClear::None) {
curBCoord = aState.ClearFloats(curBCoord, inlineFloatBreakType);
}
nscoord newBCoord =
aState.ClearFloats(curBCoord, line->GetBreakTypeBefore(), replacedBlock);
if (line->HasClearance()) {
// Reflow the line if it might not have clearance anymore.
@@ -2179,24 +2179,24 @@ nsBlockFrame::ReflowDirtyLines(BlockRefl
// Reflow the line if the line might have clearance now.
if (curBCoord != newBCoord) {
line->MarkDirty();
}
}
}
// We might have to reflow a line that is after a clearing BR.
- if (inlineFloatBreakType != StyleClear::None_) {
+ if (inlineFloatBreakType != StyleClear::None) {
aState.mBCoord = aState.ClearFloats(aState.mBCoord, inlineFloatBreakType);
if (aState.mBCoord != line->BStart() + deltaBCoord) {
// SlideLine is not going to put the line where the clearance
// put it. Reflow the line to be sure.
line->MarkDirty();
}
- inlineFloatBreakType = StyleClear::None_;
+ inlineFloatBreakType = StyleClear::None;
}
bool previousMarginWasDirty = line->IsPreviousMarginDirty();
if (previousMarginWasDirty) {
// If the previous margin is dirty, reflow the current line
line->MarkDirty();
line->ClearPreviousMarginDirty();
} else if (line->BEnd() + deltaBCoord > aState.mBEndEdge) {
@@ -2439,17 +2439,17 @@ nsBlockFrame::ReflowDirtyLines(BlockRefl
// sure whether we really want to mark all lines dirty after an
// interrupt, but until we get better at propagating float damage we
// really do need to do it this way; see comments inside MarkLineDirty.
MarkLineDirtyForInterrupt(line);
}
}
// Handle BR-clearance from the last line of the block
- if (inlineFloatBreakType != StyleClear::None_) {
+ if (inlineFloatBreakType != StyleClear::None) {
aState.mBCoord = aState.ClearFloats(aState.mBCoord, inlineFloatBreakType);
}
if (needToRecoverState) {
// Is this expensive?
aState.ReconstructMarginBefore(line);
// Update aState.mPrevChild as if we had reflowed all of the frames in
@@ -3124,20 +3124,20 @@ nsBlockFrame::ReflowBlockFrame(BlockRefl
return;
}
// Prepare the block reflow engine
nsBlockReflowContext brc(aState.mPresContext, aState.mReflowInput);
StyleClear breakType = frame->StyleDisplay()->
PhysicalBreakType(aState.mReflowInput.GetWritingMode());
- if (StyleClear::None_ != aState.mFloatBreakType) {
+ if (StyleClear::None != aState.mFloatBreakType) {
breakType = nsLayoutUtils::CombineBreakType(breakType,
aState.mFloatBreakType);
- aState.mFloatBreakType = StyleClear::None_;
+ aState.mFloatBreakType = StyleClear::None;
}
// Clear past floats before the block if the clear style is not none
aLine->SetBreakTypeBefore(breakType);
// See if we should apply the block-start margin. If the block frame being
// reflowed is a continuation (non-null prev-in-flow) then we don't
// apply its block-start margin because it's not significant unless it has
@@ -3150,17 +3150,17 @@ nsBlockFrame::ReflowBlockFrame(BlockRefl
// The HasClearance setting is only valid if ShouldApplyBStartMargin
// returned false (in which case the block-start margin-root set our
// clearance flag). Otherwise clear it now. We'll set it later on
// ourselves if necessary.
aLine->ClearHasClearance();
}
bool treatWithClearance = aLine->HasClearance();
- bool mightClearFloats = breakType != StyleClear::None_;
+ bool mightClearFloats = breakType != StyleClear::None;
nsIFrame *replacedBlock = nullptr;
if (!nsBlockFrame::BlockCanIntersectFloats(frame)) {
mightClearFloats = true;
replacedBlock = frame;
}
// If our block-start margin was counted as part of some parent's block-start
// margin collapse, and we are being speculatively reflowed assuming this
@@ -3429,17 +3429,17 @@ nsBlockFrame::ReflowBlockFrame(BlockRefl
floatAvailableSpace)) {
// Advance to the next band.
nscoord newBCoord = aState.mBCoord;
if (aState.AdvanceToNextBand(floatAvailableSpace.mRect, &newBCoord)) {
advanced = true;
}
// ClearFloats might be able to advance us further once we're there.
aState.mBCoord =
- aState.ClearFloats(newBCoord, StyleClear::None_, replacedBlock);
+ aState.ClearFloats(newBCoord, StyleClear::None, replacedBlock);
// Start over with a new available space rect at the new height.
floatAvailableSpace =
aState.GetFloatAvailableSpaceWithState(aState.mBCoord,
&floatManagerState);
}
LogicalRect oldAvailSpace(availSpace);
aState.ComputeBlockAvailSpace(frame, floatAvailableSpace,
@@ -4050,17 +4050,17 @@ nsBlockFrame::DoReflowInlineFrames(Block
}
/**
* Reflow an inline frame. The reflow status is mapped from the frames
* reflow status to the lines reflow status (not to our reflow status).
* The line reflow status is simple: true means keep placing frames
* on the line; false means don't (the line is done). If the line
* has some sort of breaking affect then aLine's break-type will be set
- * to something other than StyleClear::None_.
+ * to something other than StyleClear::None.
*/
void
nsBlockFrame::ReflowInlineFrame(BlockReflowInput& aState,
nsLineLayout& aLineLayout,
line_iterator aLine,
nsIFrame* aFrame,
LineReflowStatus* aLineReflowStatus)
{
@@ -4107,27 +4107,27 @@ nsBlockFrame::ReflowInlineFrame(BlockRef
see bug 22496
*/
// Process the child frames reflow status. There are 5 cases:
// complete, not-complete, break-before, break-after-complete,
// break-after-not-complete. There are two situations: we are a
// block or we are an inline. This makes a total of 10 cases
// (fortunately, there is some overlap).
- aLine->SetBreakTypeAfter(StyleClear::None_);
+ aLine->SetBreakTypeAfter(StyleClear::None);
if (NS_INLINE_IS_BREAK(frameReflowStatus) ||
- StyleClear::None_ != aState.mFloatBreakType) {
+ StyleClear::None != aState.mFloatBreakType) {
// Always abort the line reflow (because a line break is the
// minimal amount of break we do).
*aLineReflowStatus = LINE_REFLOW_STOP;
// XXX what should aLine's break-type be set to in all these cases?
StyleClear breakType = NS_INLINE_GET_BREAK_TYPE(frameReflowStatus);
- MOZ_ASSERT(StyleClear::None_ != breakType ||
- StyleClear::None_ != aState.mFloatBreakType, "bad break type");
+ MOZ_ASSERT(StyleClear::None != breakType ||
+ StyleClear::None != aState.mFloatBreakType, "bad break type");
if (NS_INLINE_IS_BREAK_BEFORE(frameReflowStatus)) {
// Break-before cases.
if (aFrame == aLine->mFirstChild) {
// If we break before the first frame on the line then we must
// be trying to place content where there's no room (e.g. on a
// line with wide floats). Inform the caller to reflow the
// line after skipping past a float.
@@ -4145,25 +4145,25 @@ nsBlockFrame::ReflowInlineFrame(BlockRef
aLine->SetLineWrapped(true);
}
}
}
else {
// If a float split and its prev-in-flow was followed by a <BR>, then combine
// the <BR>'s break type with the inline's break type (the inline will be the very
// next frame after the split float).
- if (StyleClear::None_ != aState.mFloatBreakType) {
+ if (StyleClear::None != aState.mFloatBreakType) {
breakType = nsLayoutUtils::CombineBreakType(breakType,
aState.mFloatBreakType);
- aState.mFloatBreakType = StyleClear::None_;
+ aState.mFloatBreakType = StyleClear::None;
}
// Break-after cases
if (breakType == StyleClear::Line) {
if (!aLineLayout.GetLineEndsInBR()) {
- breakType = StyleClear::None_;
+ breakType = StyleClear::None;
}
}
aLine->SetBreakTypeAfter(breakType);
if (NS_FRAME_IS_COMPLETE(frameReflowStatus)) {
// Split line, but after the frame just reflowed
SplitLine(aState, aLineLayout, aLine, aFrame->GetNextSibling(), aLineReflowStatus);
if (NS_INLINE_IS_BREAK_AFTER(frameReflowStatus) &&
@@ -6233,17 +6233,17 @@ nsBlockFrame::FindTrailingClear()
for (nsIFrame* b = this; b; b = b->GetPrevInFlow()) {
nsBlockFrame* block = static_cast<nsBlockFrame*>(b);
line_iterator endLine = block->end_lines();
if (endLine != block->begin_lines()) {
--endLine;
return endLine->GetBreakTypeAfter();
}
}
- return StyleClear::None_;
+ return StyleClear::None;
}
void
nsBlockFrame::ReflowPushedFloats(BlockReflowInput& aState,
nsOverflowAreas& aOverflowAreas,
nsReflowStatus& aStatus)
{
// Pushed floats live at the start of our float list; see comment
--- a/layout/generic/nsBlockReflowContext.cpp
+++ b/layout/generic/nsBlockReflowContext.cpp
@@ -163,17 +163,17 @@ nsBlockReflowContext::ComputeCollapsedBS
{
LogicalSize availSpace =
outerReflowInput->ComputedSize(kid->GetWritingMode());
ReflowInput innerReflowInput(prescontext,
*outerReflowInput, kid,
availSpace);
// Record that we're being optimistic by assuming the kid
// has no clearance
- if (kid->StyleDisplay()->mBreakType != StyleClear::None_ ||
+ if (kid->StyleDisplay()->mBreakType != StyleClear::None ||
!nsBlockFrame::BlockCanIntersectFloats(kid)) {
*aMayNeedRetry = true;
}
if (ComputeCollapsedBStartMargin(innerReflowInput, aMargin,
aClearanceFrame, aMayNeedRetry,
&isEmpty)) {
line->MarkDirty();
dirtiedLine = true;
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -3221,17 +3221,17 @@ nsFrame::IsSelectable(bool* aSelectable,
// return stuff
if (aSelectStyle) {
*aSelectStyle = selectStyle;
}
if (mState & NS_FRAME_GENERATED_CONTENT) {
*aSelectable = false;
} else {
- *aSelectable = allowSelection && (selectStyle != StyleUserSelect::None_);
+ *aSelectable = allowSelection && (selectStyle != StyleUserSelect::None);
}
return NS_OK;
}
/**
* Handles the Mouse Press Event for the frame
*/
@@ -3937,33 +3937,33 @@ static FrameTarget GetSelectionClosestFr
static bool SelfIsSelectable(nsIFrame* aFrame, uint32_t aFlags)
{
if ((aFlags & nsIFrame::SKIP_HIDDEN) &&
!aFrame->StyleVisibility()->IsVisible()) {
return false;
}
return !aFrame->IsGeneratedContentFrame() &&
- aFrame->StyleUIReset()->mUserSelect != StyleUserSelect::None_;
+ aFrame->StyleUIReset()->mUserSelect != StyleUserSelect::None;
}
static bool SelectionDescendToKids(nsIFrame* aFrame) {
StyleUserSelect style = aFrame->StyleUIReset()->mUserSelect;
nsIFrame* parent = aFrame->GetParent();
// If we are only near (not directly over) then don't traverse
// frames with independent selection (e.g. text and list controls)
// unless we're already inside such a frame (see bug 268497). Note that this
// prevents any of the users of this method from entering form controls.
// XXX We might want some way to allow using the up-arrow to go into a form
// control, but the focus didn't work right anyway; it'd probably be enough
// if the left and right arrows could enter textboxes (which I don't believe
// they can at the moment)
return !aFrame->IsGeneratedContentFrame() &&
style != StyleUserSelect::All &&
- style != StyleUserSelect::None_ &&
+ style != StyleUserSelect::None &&
((parent->GetStateBits() & NS_FRAME_INDEPENDENT_SELECTION) ||
!(aFrame->GetStateBits() & NS_FRAME_INDEPENDENT_SELECTION));
}
static FrameTarget GetSelectionClosestFrameForChild(nsIFrame* aChild,
nsPoint aPoint,
uint32_t aFlags)
{
@@ -8603,17 +8603,17 @@ nsIFrame::IsFocusable(int32_t *aTabIndex
}
bool isFocusable = false;
if (mContent && mContent->IsElement() && IsVisibleConsideringAncestors() &&
StyleContext()->GetPseudo() != nsCSSAnonBoxes::anonymousFlexItem &&
StyleContext()->GetPseudo() != nsCSSAnonBoxes::anonymousGridItem) {
const nsStyleUserInterface* ui = StyleUserInterface();
if (ui->mUserFocus != StyleUserFocus::Ignore &&
- ui->mUserFocus != StyleUserFocus::None_) {
+ ui->mUserFocus != StyleUserFocus::None) {
// Pass in default tabindex of -1 for nonfocusable and 0 for focusable
tabIndex = 0;
}
isFocusable = mContent->IsFocusable(&tabIndex, aWithMouse);
if (!isFocusable && !aWithMouse &&
GetType() == nsGkAtoms::scrollFrame &&
mContent->IsHTMLElement() &&
!mContent->IsRootOfNativeAnonymousSubtree() &&
--- a/layout/generic/nsLineBox.cpp
+++ b/layout/generic/nsLineBox.cpp
@@ -190,17 +190,17 @@ ListFloats(FILE* out, const char* aPrefi
fc = fc->Next();
}
}
const char*
nsLineBox::BreakTypeToString(StyleClear aBreakType) const
{
switch (aBreakType) {
- case StyleClear::None_: return "nobr";
+ case StyleClear::None: return "nobr";
case StyleClear::Left: return "leftbr";
case StyleClear::Right: return "rightbr";
case StyleClear::InlineStart: return "inlinestartbr";
case StyleClear::InlineEnd: return "inlineendbr";
case StyleClear::Both: return "leftbr+rightbr";
case StyleClear::Line: return "linebr";
default:
break;
--- a/layout/generic/nsLineBox.h
+++ b/layout/generic/nsLineBox.h
@@ -390,46 +390,46 @@ public:
}
// mBreakType value
// Break information is applied *before* the line if the line is a block,
// or *after* the line if the line is an inline. Confusing, I know, but
// using different names should help.
using StyleClear = mozilla::StyleClear;
bool HasBreakBefore() const {
- return IsBlock() && StyleClear::None_ != BreakType();
+ return IsBlock() && StyleClear::None != BreakType();
}
void SetBreakTypeBefore(StyleClear aBreakType) {
MOZ_ASSERT(IsBlock(), "Only blocks have break-before");
- MOZ_ASSERT(aBreakType == StyleClear::None_ ||
+ MOZ_ASSERT(aBreakType == StyleClear::None ||
aBreakType == StyleClear::Left ||
aBreakType == StyleClear::Right ||
aBreakType == StyleClear::Both,
"Only float break types are allowed before a line");
mFlags.mBreakType = static_cast<int>(aBreakType);
}
StyleClear GetBreakTypeBefore() const {
- return IsBlock() ? BreakType() : StyleClear::None_;
+ return IsBlock() ? BreakType() : StyleClear::None;
}
bool HasBreakAfter() const {
- return !IsBlock() && StyleClear::None_ != BreakType();
+ return !IsBlock() && StyleClear::None != BreakType();
}
void SetBreakTypeAfter(StyleClear aBreakType) {
MOZ_ASSERT(!IsBlock(), "Only inlines have break-after");
mFlags.mBreakType = static_cast<int>(aBreakType);
}
bool HasFloatBreakAfter() const {
return !IsBlock() &&
(StyleClear::Left == BreakType() ||
StyleClear::Right == BreakType() ||
StyleClear::Both == BreakType());
}
StyleClear GetBreakTypeAfter() const {
- return !IsBlock() ? BreakType() : StyleClear::None_;
+ return !IsBlock() ? BreakType() : StyleClear::None;
}
// mCarriedOutBEndMargin value
nsCollapsingMargin GetCarriedOutBEndMargin() const;
// Returns true if the margin changed
bool SetCarriedOutBEndMargin(nsCollapsingMargin aValue);
// mFloats
--- a/layout/style/ServoStyleSet.cpp
+++ b/layout/style/ServoStyleSet.cpp
@@ -395,17 +395,17 @@ ServoStyleSet::ProbePseudoElementStyle(E
// 'content' property is equivalent to not having the pseudo-element
// at all.
if (computedValues &&
(pseudoTag == nsCSSPseudoElements::before ||
pseudoTag == nsCSSPseudoElements::after)) {
const nsStyleDisplay *display = Servo_GetStyleDisplay(computedValues);
const nsStyleContent *content = Servo_GetStyleContent(computedValues);
// XXXldb What is contentCount for |content: ""|?
- if (display->mDisplay == StyleDisplay::None_ ||
+ if (display->mDisplay == StyleDisplay::None ||
content->ContentCount() == 0) {
return nullptr;
}
}
return GetContext(computedValues.forget(), aParentContext, pseudoTag, aType);
}
--- a/layout/style/StyleAnimationValue.cpp
+++ b/layout/style/StyleAnimationValue.cpp
@@ -4024,17 +4024,17 @@ StyleAnimationValue::ExtractComputedValu
} else if (type == StyleShapeSourceType::Shape) {
RefPtr<nsCSSValue::Array> result = nsCSSValue::Array::Create(2);
if (!StyleClipBasicShapeToCSSArray(clipPath, result)) {
return false;
}
aComputedValue.SetCSSValueArrayValue(result, eUnit_Shape);
} else {
- MOZ_ASSERT(type == StyleShapeSourceType::None_, "unknown type");
+ MOZ_ASSERT(type == StyleShapeSourceType::None, "unknown type");
aComputedValue.SetNoneValue();
}
break;
}
case eCSSProperty_filter: {
const nsStyleEffects* effects =
static_cast<const nsStyleEffects*>(styleStruct);
--- a/layout/style/nsCSSProps.cpp
+++ b/layout/style/nsCSSProps.cpp
@@ -1053,17 +1053,17 @@ const KTableEntry nsCSSProps::kCaptionSi
{ eCSSKeyword_bottom, NS_STYLE_CAPTION_SIDE_BOTTOM },
{ eCSSKeyword_left, NS_STYLE_CAPTION_SIDE_LEFT },
{ eCSSKeyword_top_outside, NS_STYLE_CAPTION_SIDE_TOP_OUTSIDE },
{ eCSSKeyword_bottom_outside, NS_STYLE_CAPTION_SIDE_BOTTOM_OUTSIDE },
{ eCSSKeyword_UNKNOWN, -1 }
};
KTableEntry nsCSSProps::kClearKTable[] = {
- { eCSSKeyword_none, StyleClear::None_ },
+ { eCSSKeyword_none, StyleClear::None },
{ eCSSKeyword_left, StyleClear::Left },
{ eCSSKeyword_right, StyleClear::Right },
{ eCSSKeyword_inline_start, StyleClear::InlineStart },
{ eCSSKeyword_inline_end, StyleClear::InlineEnd },
{ eCSSKeyword_both, StyleClear::Both },
{ eCSSKeyword_UNKNOWN, -1 }
};
@@ -1239,17 +1239,17 @@ const KTableEntry nsCSSProps::kCursorKTa
const KTableEntry nsCSSProps::kDirectionKTable[] = {
{ eCSSKeyword_ltr, NS_STYLE_DIRECTION_LTR },
{ eCSSKeyword_rtl, NS_STYLE_DIRECTION_RTL },
{ eCSSKeyword_UNKNOWN, -1 }
};
KTableEntry nsCSSProps::kDisplayKTable[] = {
- { eCSSKeyword_none, StyleDisplay::None_ },
+ { eCSSKeyword_none, StyleDisplay::None },
{ eCSSKeyword_inline, StyleDisplay::Inline },
{ eCSSKeyword_block, StyleDisplay::Block },
{ eCSSKeyword_inline_block, StyleDisplay::InlineBlock },
{ eCSSKeyword_list_item, StyleDisplay::ListItem },
{ eCSSKeyword_table, StyleDisplay::Table },
{ eCSSKeyword_inline_table, StyleDisplay::InlineTable },
{ eCSSKeyword_table_row_group, StyleDisplay::TableRowGroup },
{ eCSSKeyword_table_header_group, StyleDisplay::TableHeaderGroup },
@@ -1474,17 +1474,17 @@ const KTableEntry nsCSSProps::kFlexWrapK
const KTableEntry nsCSSProps::kHyphensKTable[] = {
{ eCSSKeyword_none, NS_STYLE_HYPHENS_NONE },
{ eCSSKeyword_manual, NS_STYLE_HYPHENS_MANUAL },
{ eCSSKeyword_auto, NS_STYLE_HYPHENS_AUTO },
{ eCSSKeyword_UNKNOWN, -1 }
};
KTableEntry nsCSSProps::kFloatKTable[] = {
- { eCSSKeyword_none, StyleFloat::None_ },
+ { eCSSKeyword_none, StyleFloat::None },
{ eCSSKeyword_left, StyleFloat::Left },
{ eCSSKeyword_right, StyleFloat::Right },
{ eCSSKeyword_inline_start, StyleFloat::InlineStart },
{ eCSSKeyword_inline_end, StyleFloat::InlineEnd },
{ eCSSKeyword_UNKNOWN, -1 }
};
const KTableEntry nsCSSProps::kFloatEdgeKTable[] = {
@@ -2112,17 +2112,17 @@ const KTableEntry nsCSSProps::kUnicodeBi
{ eCSSKeyword_plaintext, NS_STYLE_UNICODE_BIDI_PLAINTEXT },
{ eCSSKeyword__moz_isolate, NS_STYLE_UNICODE_BIDI_ISOLATE },
{ eCSSKeyword__moz_isolate_override, NS_STYLE_UNICODE_BIDI_ISOLATE_OVERRIDE },
{ eCSSKeyword__moz_plaintext, NS_STYLE_UNICODE_BIDI_PLAINTEXT },
{ eCSSKeyword_UNKNOWN, -1 }
};
const KTableEntry nsCSSProps::kUserFocusKTable[] = {
- { eCSSKeyword_none, uint8_t(StyleUserFocus::None_) },
+ { eCSSKeyword_none, uint8_t(StyleUserFocus::None) },
{ eCSSKeyword_normal, uint8_t(StyleUserFocus::Normal) },
{ eCSSKeyword_ignore, uint8_t(StyleUserFocus::Ignore) },
{ eCSSKeyword_select_all, uint8_t(StyleUserFocus::SelectAll) },
{ eCSSKeyword_select_before, uint8_t(StyleUserFocus::SelectBefore) },
{ eCSSKeyword_select_after, uint8_t(StyleUserFocus::SelectAfter) },
{ eCSSKeyword_select_same, uint8_t(StyleUserFocus::SelectSame) },
{ eCSSKeyword_select_menu, uint8_t(StyleUserFocus::SelectMenu) },
{ eCSSKeyword_UNKNOWN, -1 }
@@ -2139,26 +2139,26 @@ const KTableEntry nsCSSProps::kUserInput
const KTableEntry nsCSSProps::kUserModifyKTable[] = {
{ eCSSKeyword_read_only, NS_STYLE_USER_MODIFY_READ_ONLY },
{ eCSSKeyword_read_write, NS_STYLE_USER_MODIFY_READ_WRITE },
{ eCSSKeyword_write_only, NS_STYLE_USER_MODIFY_WRITE_ONLY },
{ eCSSKeyword_UNKNOWN, -1 }
};
const KTableEntry nsCSSProps::kUserSelectKTable[] = {
- { eCSSKeyword_none, StyleUserSelect::None_ },
+ { eCSSKeyword_none, StyleUserSelect::None },
{ eCSSKeyword_auto, StyleUserSelect::Auto },
{ eCSSKeyword_text, StyleUserSelect::Text },
{ eCSSKeyword_element, StyleUserSelect::Element },
{ eCSSKeyword_elements, StyleUserSelect::Elements },
{ eCSSKeyword_all, StyleUserSelect::All },
{ eCSSKeyword_toggle, StyleUserSelect::Toggle },
{ eCSSKeyword_tri_state, StyleUserSelect::TriState },
{ eCSSKeyword__moz_all, StyleUserSelect::MozAll },
- { eCSSKeyword__moz_none, StyleUserSelect::None_ },
+ { eCSSKeyword__moz_none, StyleUserSelect::None },
{ eCSSKeyword__moz_text, StyleUserSelect::MozText },
{ eCSSKeyword_UNKNOWN, -1 }
};
const KTableEntry nsCSSProps::kVerticalAlignKTable[] = {
{ eCSSKeyword_baseline, NS_STYLE_VERTICAL_ALIGN_BASELINE },
{ eCSSKeyword_sub, NS_STYLE_VERTICAL_ALIGN_SUB },
{ eCSSKeyword_super, NS_STYLE_VERTICAL_ALIGN_SUPER },
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -6048,17 +6048,17 @@ nsComputedDOMStyle::GetShapeSource(
return CreatePrimitiveValueForShapeSource(nullptr,
aShapeSource.GetReferenceBox(),
aBoxKeywordTable);
case StyleShapeSourceType::URL: {
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
SetValueToFragmentOrURL(aShapeSource.GetURL(), val);
return val.forget();
}
- case StyleShapeSourceType::None_: {
+ case StyleShapeSourceType::None: {
RefPtr<nsROCSSPrimitiveValue> val = new nsROCSSPrimitiveValue;
val->SetIdent(eCSSKeyword_none);
return val.forget();
}
default:
NS_NOTREACHED("unexpected type");
}
return nullptr;
--- a/layout/style/nsRuleNode.cpp
+++ b/layout/style/nsRuleNode.cpp
@@ -200,17 +200,17 @@ nsRuleNode::EnsureBlockDisplay(StyleDisp
// see if the display value is already a block
switch (display) {
case StyleDisplay::ListItem:
if (aConvertListItem) {
display = StyleDisplay::Block;
break;
} // else, fall through to share the 'break' for non-changing display vals
MOZ_FALLTHROUGH;
- case StyleDisplay::None_:
+ case StyleDisplay::None:
case StyleDisplay::Contents:
// never change display:none or display:contents *ever*
case StyleDisplay::Table:
case StyleDisplay::Block:
case StyleDisplay::Flex:
case StyleDisplay::WebkitBox:
case StyleDisplay::Grid:
// do not muck with these at all - already blocks
@@ -1337,26 +1337,26 @@ struct SetEnumValueHelper
}
DEFINE_ENUM_CLASS_SETTER(StyleBoxAlign, Stretch, End)
DEFINE_ENUM_CLASS_SETTER(StyleBoxDecorationBreak, Slice, Clone)
DEFINE_ENUM_CLASS_SETTER(StyleBoxDirection, Normal, Reverse)
DEFINE_ENUM_CLASS_SETTER(StyleBoxOrient, Horizontal, Vertical)
DEFINE_ENUM_CLASS_SETTER(StyleBoxPack, Start, Justify)
DEFINE_ENUM_CLASS_SETTER(StyleBoxSizing, Content, Border)
- DEFINE_ENUM_CLASS_SETTER(StyleClear, None_, Both)
+ DEFINE_ENUM_CLASS_SETTER(StyleClear, None, Both)
DEFINE_ENUM_CLASS_SETTER(StyleFillRule, Nonzero, Evenodd)
- DEFINE_ENUM_CLASS_SETTER(StyleFloat, None_, InlineEnd)
+ DEFINE_ENUM_CLASS_SETTER(StyleFloat, None, InlineEnd)
DEFINE_ENUM_CLASS_SETTER(StyleFloatEdge, ContentBox, MarginBox)
- DEFINE_ENUM_CLASS_SETTER(StyleUserFocus, None_, SelectMenu)
- DEFINE_ENUM_CLASS_SETTER(StyleUserSelect, None_, MozText)
+ DEFINE_ENUM_CLASS_SETTER(StyleUserFocus, None, SelectMenu)
+ DEFINE_ENUM_CLASS_SETTER(StyleUserSelect, None, MozText)
#ifdef MOZ_XUL
- DEFINE_ENUM_CLASS_SETTER(StyleDisplay, None_, Popup)
+ DEFINE_ENUM_CLASS_SETTER(StyleDisplay, None, Popup)
#else
- DEFINE_ENUM_CLASS_SETTER(StyleDisplay, None_, InlineBox)
+ DEFINE_ENUM_CLASS_SETTER(StyleDisplay, None, InlineBox)
#endif
#undef DEF_SET_ENUMERATED_VALUE
};
template<typename FieldT>
struct SetIntegerValueHelper
{
@@ -5144,17 +5144,17 @@ nsRuleNode::ComputeUserInterfaceData(voi
parentUI->mUserModify,
NS_STYLE_USER_MODIFY_READ_ONLY);
// user-focus: enum, inherit, initial
SetValue(*aRuleData->ValueForUserFocus(),
ui->mUserFocus, conditions,
SETVAL_ENUMERATED | SETVAL_UNSET_INHERIT,
parentUI->mUserFocus,
- StyleUserFocus::None_);
+ StyleUserFocus::None);
// pointer-events: enum, inherit, initial
SetValue(*aRuleData->ValueForPointerEvents(), ui->mPointerEvents,
conditions,
SETVAL_ENUMERATED | SETVAL_UNSET_INHERIT,
parentUI->mPointerEvents,
NS_STYLE_POINTER_EVENTS_AUTO);
@@ -6040,17 +6040,17 @@ nsRuleNode::ComputeDisplayData(void* aSt
// an aStartStruct for some other elements.
conditions.SetUncacheable();
}
// clear: enum, inherit, initial
SetValue(*aRuleData->ValueForClear(), display->mBreakType, conditions,
SETVAL_ENUMERATED | SETVAL_UNSET_INITIAL,
parentDisplay->mBreakType,
- StyleClear::None_);
+ StyleClear::None);
// temp fix for bug 24000
// Map 'auto' and 'avoid' to false, and 'always', 'left', and
// 'right' to true.
// "A conforming user agent may interpret the values 'left' and
// 'right' as 'always'." - CSS2.1, section 13.3.1
const nsCSSValue* breakBeforeValue = aRuleData->ValueForPageBreakBefore();
if (eCSSUnit_Enumerated == breakBeforeValue->GetUnit()) {
@@ -6099,17 +6099,17 @@ nsRuleNode::ComputeDisplayData(void* aSt
/* auto */ NS_STYLE_TOUCH_ACTION_AUTO,
/* none */ NS_STYLE_TOUCH_ACTION_NONE, Unused, Unused);
// float: enum, inherit, initial
SetValue(*aRuleData->ValueForFloat(),
display->mFloat, conditions,
SETVAL_ENUMERATED | SETVAL_UNSET_INITIAL,
parentDisplay->mFloat,
- StyleFloat::None_);
+ StyleFloat::None);
// Save mFloat in mOriginalFloat in case we need it later
display->mOriginalFloat = display->mFloat;
// overflow-x: enum, inherit, initial
SetValue(*aRuleData->ValueForOverflowX(),
display->mOverflowX, conditions,
SETVAL_ENUMERATED | SETVAL_UNSET_INITIAL,
parentDisplay->mOverflowX,
@@ -6170,17 +6170,17 @@ nsRuleNode::ComputeDisplayData(void* aSt
parentDisplay->mOverflowClipBox,
NS_STYLE_OVERFLOW_CLIP_BOX_PADDING_BOX);
SetValue(*aRuleData->ValueForResize(), display->mResize, conditions,
SETVAL_ENUMERATED | SETVAL_UNSET_INITIAL,
parentDisplay->mResize,
NS_STYLE_RESIZE_NONE);
- if (display->mDisplay != StyleDisplay::None_) {
+ if (display->mDisplay != StyleDisplay::None) {
// CSS2 9.7 specifies display type corrections dealing with 'float'
// and 'position'. Since generated content can't be floated or
// positioned, we can deal with it here.
nsIAtom* pseudo = aContext->GetPseudo();
if (pseudo && display->mDisplay == StyleDisplay::Contents) {
// We don't want to create frames for anonymous content using a parent
// frame that is for content above the root of the anon tree.
@@ -6226,25 +6226,25 @@ nsRuleNode::ComputeDisplayData(void* aSt
// property.
conditions.SetUncacheable();
}
if (display->IsAbsolutelyPositionedStyle()) {
// 1) if position is 'absolute' or 'fixed' then display must be
// block-level and float must be 'none'
EnsureBlockDisplay(display->mDisplay);
- display->mFloat = StyleFloat::None_;
+ display->mFloat = StyleFloat::None;
// Note that it's OK to cache this struct in the ruletree
// because it's fine as-is for any style context that points to
// it directly, and any use of it as aStartStruct (e.g. if a
// more specific rule sets "position: static") will use
// mOriginalDisplay and mOriginalFloat, which we have carefully
// not changed.
- } else if (display->mFloat != StyleFloat::None_) {
+ } else if (display->mFloat != StyleFloat::None) {
// 2) if float is not none, and display is not none, then we must
// set a block-level 'display' type per CSS2.1 section 9.7.
EnsureBlockDisplay(display->mDisplay);
// Note that it's OK to cache this struct in the ruletree
// because it's fine as-is for any style context that points to
// it directly, and any use of it as aStartStruct (e.g. if a
// more specific rule sets "float: none") will use
--- a/layout/style/nsStyleConsts.h
+++ b/layout/style/nsStyleConsts.h
@@ -5,16 +5,17 @@
/* constants used in the style struct data provided by nsStyleContext */
#ifndef nsStyleConsts_h___
#define nsStyleConsts_h___
#include "gfxRect.h"
#include "nsFont.h"
+#include "X11UndefineNone.h"
// XXX fold this into nsStyleContext and group by nsStyleXXX struct
namespace mozilla {
namespace css {
typedef mozilla::Side Side;
} // namespace css
@@ -105,17 +106,17 @@ enum class StyleBoxSizing : uint8_t {
// box-shadow
enum class StyleBoxShadowType : uint8_t {
Inset,
};
// clear
enum class StyleClear : uint8_t {
- None_ = 0,
+ None = 0,
Left,
Right,
InlineStart,
InlineEnd,
Both,
// StyleClear::Line can be added to one of the other values in layout
// so it needs to use a bit value that none of the other values can have.
Line = 8,
@@ -138,17 +139,17 @@ enum class StyleClipPathGeometryBox : ui
enum class StyleFillRule : uint8_t {
Nonzero,
Evenodd,
};
// float
// https://developer.mozilla.org/en-US/docs/Web/CSS/float
enum class StyleFloat : uint8_t {
- None_,
+ None,
Left,
Right,
InlineStart,
InlineEnd
};
// float-edge
enum class StyleFloatEdge : uint8_t {
@@ -161,40 +162,38 @@ enum class StyleShapeOutsideShapeBox : u
NoBox,
Content,
Padding,
Border,
Margin
};
// Shape source type
-// X11 has a #define for None causing conflicts, so we use None_ here
enum class StyleShapeSourceType : uint8_t {
- None_,
+ None,
URL,
Shape,
Box,
};
// user-focus
-// X11 has a #define for None causing conflicts, so we use None_ here
enum class StyleUserFocus : uint8_t {
- None_,
+ None,
Ignore,
Normal,
SelectAll,
SelectBefore,
SelectAfter,
SelectSame,
SelectMenu,
};
// user-select
enum class StyleUserSelect : uint8_t {
- None_,
+ None,
Text,
Element,
Elements,
All,
Toggle,
TriState,
Auto, // internal value - please use nsFrame::IsSelectable()
MozAll, // force selection of all children, unless an ancestor has NONE set - bug 48096
@@ -487,17 +486,17 @@ enum class FillMode : uint32_t;
NS_STYLE_WRITING_MODE_SIDEWAYS_MASK)
// See nsStyleDisplay
//
// NOTE: Order is important! If you change it, make sure to take a look at
// the FrameConstructorDataByDisplay stuff (both the XUL and non-XUL version),
// and ensure it's still correct!
enum class StyleDisplay : uint8_t {
- None_ = 0,
+ None = 0,
Block,
Inline,
InlineBlock,
ListItem,
Table,
InlineTable,
TableRowGroup,
TableColumn,
--- a/layout/style/nsStyleContext.cpp
+++ b/layout/style/nsStyleContext.cpp
@@ -691,17 +691,17 @@ nsStyleContext::SetStyleBits()
if ((mParent && mParent->HasPseudoElementData()) || IsPseudoElement()) {
mBits |= NS_STYLE_HAS_PSEUDO_ELEMENT_DATA;
}
// Set the NS_STYLE_IN_DISPLAY_NONE_SUBTREE bit
const nsStyleDisplay* disp = StyleDisplay();
if ((mParent && mParent->IsInDisplayNoneSubtree()) ||
- disp->mDisplay == mozilla::StyleDisplay::None_) {
+ disp->mDisplay == mozilla::StyleDisplay::None) {
mBits |= NS_STYLE_IN_DISPLAY_NONE_SUBTREE;
}
}
void
nsStyleContext::ApplyStyleFixups(bool aSkipParentDisplayBasedStyleFixup)
{
MOZ_ASSERT(!mSource.IsServoComputedValues(),
--- a/layout/style/nsStyleSet.cpp
+++ b/layout/style/nsStyleSet.cpp
@@ -1947,17 +1947,17 @@ nsStyleSet::ProbePseudoElementStyle(Elem
// 'content' property is equivalent to not having the pseudo-element
// at all.
if (result &&
(pseudoTag == nsCSSPseudoElements::before ||
pseudoTag == nsCSSPseudoElements::after)) {
const nsStyleDisplay *display = result->StyleDisplay();
const nsStyleContent *content = result->StyleContent();
// XXXldb What is contentCount for |content: ""|?
- if (display->mDisplay == StyleDisplay::None_ ||
+ if (display->mDisplay == StyleDisplay::None ||
content->ContentCount() == 0) {
result = nullptr;
}
}
return result.forget();
}
--- a/layout/style/nsStyleStruct.cpp
+++ b/layout/style/nsStyleStruct.cpp
@@ -2981,19 +2981,19 @@ StyleAnimation::operator==(const StyleAn
// nsStyleDisplay
//
nsStyleDisplay::nsStyleDisplay(StyleStructContext aContext)
: mDisplay(StyleDisplay::Inline)
, mOriginalDisplay(StyleDisplay::Inline)
, mContain(NS_STYLE_CONTAIN_NONE)
, mAppearance(NS_THEME_NONE)
, mPosition(NS_STYLE_POSITION_STATIC)
- , mFloat(StyleFloat::None_)
- , mOriginalFloat(StyleFloat::None_)
- , mBreakType(StyleClear::None_)
+ , mFloat(StyleFloat::None)
+ , mOriginalFloat(StyleFloat::None)
+ , mBreakType(StyleClear::None)
, mBreakInside(NS_STYLE_PAGE_BREAK_AUTO)
, mBreakBefore(false)
, mBreakAfter(false)
, mOverflowX(NS_STYLE_OVERFLOW_VISIBLE)
, mOverflowY(NS_STYLE_OVERFLOW_VISIBLE)
, mOverflowClipBox(NS_STYLE_OVERFLOW_CLIP_BOX_PADDING_BOX)
, mResize(NS_STYLE_RESIZE_NONE)
, mOrient(NS_STYLE_ORIENT_INLINE)
@@ -3107,17 +3107,17 @@ nsChangeHint
nsStyleDisplay::CalcDifference(const nsStyleDisplay& aNewData) const
{
nsChangeHint hint = nsChangeHint(0);
if (!DefinitelyEqualURIsAndPrincipal(mBinding, aNewData.mBinding)
|| mPosition != aNewData.mPosition
|| mDisplay != aNewData.mDisplay
|| mContain != aNewData.mContain
- || (mFloat == StyleFloat::None_) != (aNewData.mFloat == StyleFloat::None_)
+ || (mFloat == StyleFloat::None) != (aNewData.mFloat == StyleFloat::None)
|| mOverflowX != aNewData.mOverflowX
|| mOverflowY != aNewData.mOverflowY
|| mScrollBehavior != aNewData.mScrollBehavior
|| mScrollSnapTypeX != aNewData.mScrollSnapTypeX
|| mScrollSnapTypeY != aNewData.mScrollSnapTypeY
|| mScrollSnapPointsX != aNewData.mScrollSnapPointsX
|| mScrollSnapPointsY != aNewData.mScrollSnapPointsY
|| mScrollSnapDestination != aNewData.mScrollSnapDestination
@@ -3892,17 +3892,17 @@ nsCursorImage::operator=(const nsCursorI
}
return *this;
}
nsStyleUserInterface::nsStyleUserInterface(StyleStructContext aContext)
: mUserInput(NS_STYLE_USER_INPUT_AUTO)
, mUserModify(NS_STYLE_USER_MODIFY_READ_ONLY)
- , mUserFocus(StyleUserFocus::None_)
+ , mUserFocus(StyleUserFocus::None)
, mPointerEvents(NS_STYLE_POINTER_EVENTS_AUTO)
, mCursor(NS_STYLE_CURSOR_AUTO)
, mCursorArrayLength(0)
, mCursorArray(nullptr)
{
MOZ_COUNT_CTOR(nsStyleUserInterface);
}
--- a/layout/style/nsStyleStruct.h
+++ b/layout/style/nsStyleStruct.h
@@ -32,16 +32,17 @@
#include "nsCOMArray.h"
#include "nsTArray.h"
#include "nsCSSValue.h"
#include "imgRequestProxy.h"
#include "Orientation.h"
#include "CounterStyleManager.h"
#include <cstddef> // offsetof()
#include <utility>
+#include "X11UndefineNone.h"
class nsIFrame;
class nsIURI;
class nsStyleContext;
class nsTextFrame;
class imgIContainer;
struct nsStyleVisibility;
@@ -2657,17 +2658,17 @@ struct StyleShapeSource
CopyURL(aOther);
} else if (aOther.mType == StyleShapeSourceType::Shape) {
SetBasicShape(aOther.mBasicShape, aOther.mReferenceBox);
} else if (aOther.mType == StyleShapeSourceType::Box) {
SetReferenceBox(aOther.mReferenceBox);
} else {
ReleaseRef();
mReferenceBox = ReferenceBox::NoBox;
- mType = StyleShapeSourceType::None_;
+ mType = StyleShapeSourceType::None;
}
return *this;
}
bool operator==(const StyleShapeSource& aOther) const
{
if (mType != aOther.mType) {
return false;
@@ -2771,17 +2772,17 @@ private:
}
void* operator new(size_t) = delete;
union {
StyleBasicShape* mBasicShape;
FragmentOrURL* mURL;
};
- StyleShapeSourceType mType = StyleShapeSourceType::None_;
+ StyleShapeSourceType mType = StyleShapeSourceType::None;
ReferenceBox mReferenceBox = ReferenceBox::NoBox;
};
using StyleClipPath = StyleShapeSource<StyleClipPathGeometryBox>;
using StyleShapeOutside = StyleShapeSource<StyleShapeOutsideShapeBox>;
} // namespace mozilla
@@ -2958,17 +2959,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
mozilla::StyleDisplay::TableRowGroup == mDisplay ||
mozilla::StyleDisplay::TableHeaderGroup == mDisplay ||
mozilla::StyleDisplay::TableFooterGroup == mDisplay ||
mozilla::StyleDisplay::TableColumn == mDisplay ||
mozilla::StyleDisplay::TableColumnGroup == mDisplay;
}
bool IsFloatingStyle() const {
- return mozilla::StyleFloat::None_ != mFloat;
+ return mozilla::StyleFloat::None != mFloat;
}
bool IsAbsolutelyPositionedStyle() const {
return NS_STYLE_POSITION_ABSOLUTE == mPosition ||
NS_STYLE_POSITION_FIXED == mPosition;
}
bool IsRelativelyPositionedStyle() const {
@@ -3789,17 +3790,17 @@ struct MOZ_NEEDS_MEMMOVABLE_MEMBERS nsSt
// CalcDifference never returns the reflow hints that are sometimes
// handled for descendants as hints not handled for descendants.
return nsChangeHint_NeedReflow |
nsChangeHint_ReflowChangesSizeOrPosition |
nsChangeHint_ClearAncestorIntrinsics;
}
bool HasClipPath() const {
- return mClipPath.GetType() != mozilla::StyleShapeSourceType::None_;
+ return mClipPath.GetType() != mozilla::StyleShapeSourceType::None;
}
bool HasNonScalingStroke() const {
return mVectorEffect == NS_STYLE_VECTOR_EFFECT_NON_SCALING_STROKE;
}
nsStyleImageLayers mMask;
mozilla::StyleClipPath mClipPath; // [reset]
--- a/layout/style/nsStyleStructInlines.h
+++ b/layout/style/nsStyleStructInlines.h
@@ -113,17 +113,17 @@ nsStyleDisplay::IsOriginalDisplayInlineO
}
return IsOriginalDisplayInlineOutsideStyle();
}
mozilla::StyleDisplay
nsStyleDisplay::GetDisplay(const nsIFrame* aContextFrame) const
{
NS_ASSERTION(aContextFrame->StyleDisplay() == this, "unexpected aContextFrame");
- if (aContextFrame->IsSVGText() && mDisplay != mozilla::StyleDisplay::None_) {
+ if (aContextFrame->IsSVGText() && mDisplay != mozilla::StyleDisplay::None) {
return aContextFrame->GetType() == nsGkAtoms::blockFrame ?
mozilla::StyleDisplay::Block : mozilla::StyleDisplay::Inline;
}
return mDisplay;
}
bool
nsStyleDisplay::IsFloating(const nsIFrame* aContextFrame) const
--- a/layout/svg/nsCSSClipPathInstance.cpp
+++ b/layout/svg/nsCSSClipPathInstance.cpp
@@ -19,17 +19,17 @@ using namespace mozilla;
using namespace mozilla::gfx;
/* static*/ void
nsCSSClipPathInstance::ApplyBasicShapeClip(gfxContext& aContext,
nsIFrame* aFrame)
{
auto& clipPathStyle = aFrame->StyleSVGReset()->mClipPath;
StyleShapeSourceType type = clipPathStyle.GetType();
- MOZ_ASSERT(type != StyleShapeSourceType::None_, "unexpected none value");
+ MOZ_ASSERT(type != StyleShapeSourceType::None, "unexpected none value");
// In the future nsCSSClipPathInstance may handle <clipPath> references as
// well. For the time being return early.
if (type == StyleShapeSourceType::URL) {
return;
}
nsCSSClipPathInstance instance(aFrame, clipPathStyle);
@@ -40,17 +40,17 @@ nsCSSClipPathInstance::ApplyBasicShapeCl
}
/* static*/ bool
nsCSSClipPathInstance::HitTestBasicShapeClip(nsIFrame* aFrame,
const gfxPoint& aPoint)
{
auto& clipPathStyle = aFrame->StyleSVGReset()->mClipPath;
StyleShapeSourceType type = clipPathStyle.GetType();
- MOZ_ASSERT(type != StyleShapeSourceType::None_, "unexpected none value");
+ MOZ_ASSERT(type != StyleShapeSourceType::None, "unexpected none value");
// In the future nsCSSClipPathInstance may handle <clipPath> references as
// well. For the time being return early.
if (type == StyleShapeSourceType::URL) {
return false;
}
nsCSSClipPathInstance instance(aFrame, clipPathStyle);
--- a/widget/nsBaseWidget.cpp
+++ b/widget/nsBaseWidget.cpp
@@ -32,16 +32,17 @@
#include "mozilla/layers/Compositor.h"
#include "nsIXULRuntime.h"
#include "nsIXULWindow.h"
#include "nsIBaseWindow.h"
#include "nsXULPopupManager.h"
#include "nsIWidgetListener.h"
#include "nsIGfxInfo.h"
#include "npapi.h"
+#include "X11UndefineNone.h"
#include "base/thread.h"
#include "prdtoa.h"
#include "prenv.h"
#include "mozilla/Attributes.h"
#include "mozilla/Unused.h"
#include "nsContentUtils.h"
#include "gfxPrefs.h"
#include "mozilla/gfx/2D.h"