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

Unified Diff: Source/core/layout/LayoutObject.cpp

Issue 1182133002: Remove unneeded loop from LayoutObject::containingBlock. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/layout/LayoutObject.cpp
diff --git a/Source/core/layout/LayoutObject.cpp b/Source/core/layout/LayoutObject.cpp
index e83bcaf727985ddf3cefa21f3da22497820ad565..99a1ff8474018c1f0731944c65446331572df358 100644
--- a/Source/core/layout/LayoutObject.cpp
+++ b/Source/core/layout/LayoutObject.cpp
@@ -878,22 +878,12 @@ LayoutBlock* LayoutObject::containingBlock() const
return containerForFixedPosition();
if (!isTextOrSVGChild() && m_style->position() == AbsolutePosition) {
while (o) {
- // For relpositioned inlines, we return the nearest non-anonymous enclosing block. We don't try
- // to return the inline itself. This allows us to avoid having a positioned objects
- // list in all LayoutInlines and lets us return a strongly-typed LayoutBlock* result
- // from this method. The container() method can actually be used to obtain the
- // inline directly.
if (o->style()->position() != StaticPosition && (!o->isInline() || o->isReplaced()))
break;
if (o->canContainFixedPositionObjects())
break;
- if (o->style()->hasInFlowPosition() && o->isInline() && !o->isReplaced()) {
- o = o->containingBlock();
- break;
- }
-
o = o->parent();
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698