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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutListItem.cpp

Issue 1405693002: LayoutListItem: shorten refs, use nullptr. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | « third_party/WebKit/Source/core/layout/LayoutListItem.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/layout/LayoutListItem.cpp
diff --git a/third_party/WebKit/Source/core/layout/LayoutListItem.cpp b/third_party/WebKit/Source/core/layout/LayoutListItem.cpp
index bcf21d089a3ceef02eafba879f55619e5675c56e..fc73d5a54cd898bcc8eb27d31b33ca5800f9e5fa 100644
--- a/third_party/WebKit/Source/core/layout/LayoutListItem.cpp
+++ b/third_party/WebKit/Source/core/layout/LayoutListItem.cpp
@@ -54,8 +54,9 @@ void LayoutListItem::styleDidChange(StyleDifference diff, const ComputedStyle* o
{
LayoutBlockFlow::styleDidChange(diff, oldStyle);
+ StyleImage* currentImage = style()->listStyleImage();
eae 2015/10/14 10:52:18 const?
if (style()->listStyleType() != NoneListStyle
- || (style()->listStyleImage() && !style()->listStyleImage()->errorOccurred())) {
+ || (currentImage && !currentImage->errorOccurred())) {
if (!m_marker)
m_marker = LayoutListMarker::createAnonymous(this);
m_marker->listItemStyleDidChange();
@@ -66,11 +67,11 @@ void LayoutListItem::styleDidChange(StyleDifference diff, const ComputedStyle* o
}
StyleImage* oldImage = oldStyle ? oldStyle->listStyleImage() : nullptr;
- if (oldImage != style()->listStyleImage()) {
+ if (oldImage != currentImage) {
if (oldImage)
oldImage->removeClient(this);
- if (style()->listStyleImage())
- style()->listStyleImage()->addClient(this);
+ if (currentImage)
+ currentImage->addClient(this);
}
}
@@ -219,7 +220,7 @@ inline int LayoutListItem::calcValue() const
return m_explicitValue;
Node* list = enclosingList(this);
- HTMLOListElement* oListElement = isHTMLOListElement(list) ? toHTMLOListElement(list) : 0;
+ HTMLOListElement* oListElement = isHTMLOListElement(list) ? toHTMLOListElement(list) : nullptr;
int valueStep = 1;
if (oListElement && oListElement->isReversed())
valueStep = -1;
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutListItem.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698