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

Unified Diff: Source/core/dom/ContainerNode.cpp

Issue 977113003: Rename renderer() to layoutObject(). (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 9 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/dom/CharacterData.cpp ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/dom/ContainerNode.cpp
diff --git a/Source/core/dom/ContainerNode.cpp b/Source/core/dom/ContainerNode.cpp
index 65dab7d851fe85b6d9bdead50ec33e392b2124f5..f053e6554e29a31f6429a0fb269680f4efc54d34 100644
--- a/Source/core/dom/ContainerNode.cpp
+++ b/Source/core/dom/ContainerNode.cpp
@@ -867,11 +867,11 @@ void ContainerNode::cloneChildNodes(ContainerNode *clone)
bool ContainerNode::getUpperLeftCorner(FloatPoint& point) const
{
- if (!renderer())
+ if (!layoutObject())
return false;
// FIXME: What is this code really trying to do?
- LayoutObject* o = renderer();
+ LayoutObject* o = layoutObject();
if (!o->isInline() || o->isReplaced()) {
point = o->localToAbsolute(FloatPoint(), UseTransforms);
return true;
@@ -947,10 +947,10 @@ static inline LayoutObject* endOfContinuations(LayoutObject* renderer)
bool ContainerNode::getLowerRightCorner(FloatPoint& point) const
{
- if (!renderer())
+ if (!layoutObject())
return false;
- LayoutObject* o = renderer();
+ LayoutObject* o = layoutObject();
if (!o->isInline() || o->isReplaced()) {
LayoutBox* box = toLayoutBox(o);
point = o->localToAbsolute(FloatPoint(box->size()), UseTransforms);
@@ -962,7 +962,7 @@ bool ContainerNode::getLowerRightCorner(FloatPoint& point) const
while (o) {
if (LayoutObject* oLastChild = o->slowLastChild()) {
o = oLastChild;
- } else if (o != renderer() && o->previousSibling()) {
+ } else if (o != layoutObject() && o->previousSibling()) {
o = o->previousSibling();
} else {
LayoutObject* prev = nullptr;
@@ -980,7 +980,7 @@ bool ContainerNode::getLowerRightCorner(FloatPoint& point) const
}
}
// Prevent to overrun out of own render tree
- if (o == renderer()) {
+ if (o == layoutObject()) {
return false;
}
o = o->parent();
@@ -1038,7 +1038,7 @@ void ContainerNode::focusStateChanged()
{
// If we're just changing the window's active state and the focused node has no
// renderer we can just ignore the state change.
- if (!renderer())
+ if (!layoutObject())
return;
if (styleChangeType() < SubtreeStyleChange) {
@@ -1050,8 +1050,8 @@ void ContainerNode::focusStateChanged()
setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::createWithExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Focus));
}
- if (renderer() && renderer()->style()->hasAppearance())
- LayoutTheme::theme().stateChanged(renderer(), FocusControlState);
+ if (layoutObject() && layoutObject()->style()->hasAppearance())
+ LayoutTheme::theme().stateChanged(layoutObject(), FocusControlState);
}
void ContainerNode::setFocus(bool received)
@@ -1063,7 +1063,7 @@ void ContainerNode::setFocus(bool received)
focusStateChanged();
- if (renderer() || received)
+ if (layoutObject() || received)
return;
// If :focus sets display: none, we lose focus but still need to recalc our style.
@@ -1081,7 +1081,7 @@ void ContainerNode::setActive(bool down)
Node::setActive(down);
// FIXME: Why does this not need to handle the display: none transition like :hover does?
- if (renderer()) {
+ if (layoutObject()) {
if (styleChangeType() < SubtreeStyleChange) {
if (layoutStyle()->affectedByActive() && layoutStyle()->hasPseudoStyle(FIRST_LETTER))
setNeedsStyleRecalc(SubtreeStyleChange, StyleChangeReasonForTracing::createWithExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Active));
@@ -1092,7 +1092,7 @@ void ContainerNode::setActive(bool down)
}
if (layoutStyle()->hasAppearance())
- LayoutTheme::theme().stateChanged(renderer(), PressedControlState);
+ LayoutTheme::theme().stateChanged(layoutObject(), PressedControlState);
}
}
@@ -1104,7 +1104,7 @@ void ContainerNode::setHovered(bool over)
Node::setHovered(over);
// If :hover sets display: none we lose our hover but still need to recalc our style.
- if (!renderer()) {
+ if (!layoutObject()) {
if (over)
return;
if (isElementNode() && toElement(this)->childrenOrSiblingsAffectedByHover() && styleChangeType() < SubtreeStyleChange)
@@ -1123,8 +1123,8 @@ void ContainerNode::setHovered(bool over)
setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTracing::createWithExtraData(StyleChangeReason::PseudoClass, StyleChangeExtraData::Hover));
}
- if (renderer()->style()->hasAppearance())
- LayoutTheme::theme().stateChanged(renderer(), HoverControlState);
+ if (layoutObject()->style()->hasAppearance())
+ LayoutTheme::theme().stateChanged(layoutObject(), HoverControlState);
}
PassRefPtrWillBeRawPtr<HTMLCollection> ContainerNode::children()
@@ -1271,7 +1271,7 @@ void ContainerNode::recalcChildStyle(StyleRecalcChange change)
element->recalcStyle(change, lastTextNode);
else if (element->supportsStyleSharing())
styleResolver.addToStyleSharingList(*element);
- if (element->renderer())
+ if (element->layoutObject())
lastTextNode = nullptr;
}
}
« no previous file with comments | « Source/core/dom/CharacterData.cpp ('k') | Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698