Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1141)

Unified Diff: Source/core/layout/line/RootInlineBox.cpp

Issue 1162383003: C++11: Replace 0 with nullptr where applicable in layout code. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add one more file. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/layout/line/LineLayoutState.h ('k') | Source/core/layout/line/TrailingObjects.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/line/RootInlineBox.cpp
diff --git a/Source/core/layout/line/RootInlineBox.cpp b/Source/core/layout/line/RootInlineBox.cpp
index b95f33544afff0f63b532427234e61eae0362c07..af48a045b1db19a697b53fdddd8f383332cc9e0e 100644
--- a/Source/core/layout/line/RootInlineBox.cpp
+++ b/Source/core/layout/line/RootInlineBox.cpp
@@ -45,12 +45,12 @@ struct SameSizeAsRootInlineBox : public InlineFlowBox {
static_assert(sizeof(RootInlineBox) == sizeof(SameSizeAsRootInlineBox), "RootInlineBox should stay small");
typedef WTF::HashMap<const RootInlineBox*, EllipsisBox*> EllipsisBoxMap;
-static EllipsisBoxMap* gEllipsisBoxMap = 0;
+static EllipsisBoxMap* gEllipsisBoxMap = nullptr;
RootInlineBox::RootInlineBox(LayoutBlockFlow& block)
: InlineFlowBox(block)
, m_lineBreakPos(0)
- , m_lineBreakObj(0)
+ , m_lineBreakObj(nullptr)
, m_lineTop(0)
, m_lineBottom(0)
, m_lineTopWithLeading(0)
@@ -72,7 +72,7 @@ void RootInlineBox::detachEllipsisBox()
{
if (hasEllipsisBox()) {
EllipsisBox* box = gEllipsisBoxMap->take(this);
- box->setParent(0);
+ box->setParent(nullptr);
box->destroy();
setHasEllipsisBox(false);
}
@@ -361,7 +361,7 @@ InlineBox* RootInlineBox::firstSelectedBox() const
return box;
}
- return 0;
+ return nullptr;
}
InlineBox* RootInlineBox::lastSelectedBox() const
@@ -371,7 +371,7 @@ InlineBox* RootInlineBox::lastSelectedBox() const
return box;
}
- return 0;
+ return nullptr;
}
LayoutUnit RootInlineBox::selectionTop() const
@@ -499,7 +499,7 @@ InlineBox* RootInlineBox::closestLeafChildForLogicalLeftPosition(LayoutUnit left
return lastLeaf;
}
- InlineBox* closestLeaf = 0;
+ InlineBox* closestLeaf = nullptr;
for (InlineBox* leaf = firstLeaf; leaf; leaf = leaf->nextLeafChildIgnoringLineBreak()) {
if (!leaf->layoutObject().isListMarker() && (!onlyEditableLeaves || isEditableLeaf(leaf))) {
closestLeaf = leaf;
@@ -539,7 +539,7 @@ void RootInlineBox::setLineBreakInfo(LayoutObject* obj, unsigned breakPos, const
EllipsisBox* RootInlineBox::ellipsisBox() const
{
if (!hasEllipsisBox())
- return 0;
+ return nullptr;
return gEllipsisBoxMap->get(this);
}
@@ -609,8 +609,8 @@ void RootInlineBox::ascentAndDescentForBox(InlineBox* box, GlyphOverflowAndFallb
return;
}
- Vector<const SimpleFontData*>* usedFonts = 0;
- GlyphOverflow* glyphOverflow = 0;
+ Vector<const SimpleFontData*>* usedFonts = nullptr;
+ GlyphOverflow* glyphOverflow = nullptr;
if (box->isText()) {
GlyphOverflowAndFallbackFontsMap::iterator it = textBoxDataMap.find(toInlineTextBox(box));
usedFonts = it == textBoxDataMap.end() ? 0 : &it->value.first;
@@ -830,8 +830,8 @@ Node* RootInlineBox::getLogicalStartBoxWithNode(InlineBox*& startBox) const
return startBox->layoutObject().nonPseudoNode();
}
}
- startBox = 0;
- return 0;
+ startBox = nullptr;
+ return nullptr;
}
Node* RootInlineBox::getLogicalEndBoxWithNode(InlineBox*& endBox) const
@@ -844,8 +844,8 @@ Node* RootInlineBox::getLogicalEndBoxWithNode(InlineBox*& endBox) const
return endBox->layoutObject().nonPseudoNode();
}
}
- endBox = 0;
- return 0;
+ endBox = nullptr;
+ return nullptr;
}
const char* RootInlineBox::boxName() const
« no previous file with comments | « Source/core/layout/line/LineLayoutState.h ('k') | Source/core/layout/line/TrailingObjects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698