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

Side by Side Diff: sky/engine/core/rendering/RenderBlock.cpp

Issue 944073006: Remove the concept of staticly positioned absolutes. (Closed) Base URL: git@github.com:domokit/mojo.git@position
Patch Set: Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 { 395 {
396 TrackedRendererListHashSet* positionedDescendants = positionedObjects(); 396 TrackedRendererListHashSet* positionedDescendants = positionedObjects();
397 if (!positionedDescendants) 397 if (!positionedDescendants)
398 return; 398 return;
399 399
400 RenderBox* r; 400 RenderBox* r;
401 TrackedRendererListHashSet::iterator end = positionedDescendants->end(); 401 TrackedRendererListHashSet::iterator end = positionedDescendants->end();
402 for (TrackedRendererListHashSet::iterator it = positionedDescendants->begin( ); it != end; ++it) { 402 for (TrackedRendererListHashSet::iterator it = positionedDescendants->begin( ); it != end; ++it) {
403 r = *it; 403 r = *it;
404 404
405 SubtreeLayoutScope layoutScope(*r);
406
407 // When a non-positioned block element moves, it may have positioned chi ldren that are implicitly positioned relative to the
408 // non-positioned block. Rather than trying to detect all of these move ment cases, we just always lay out positioned
409 // objects that are positioned implicitly like this. Such objects are r are, and so in typical DHTML menu usage (where everything is
410 // positioned explicitly) this should not incur a performance penalty.
411 if (relayoutChildren || (r->style()->hasStaticBlockPosition() && r->pare nt() != this))
412 layoutScope.setChildNeedsLayout(r);
413
414 // If relayoutChildren is set and the child has percentage padding or an embedded content box, we also need to invalidate the childs pref widths. 405 // If relayoutChildren is set and the child has percentage padding or an embedded content box, we also need to invalidate the childs pref widths.
415 if (relayoutChildren && r->needsPreferredWidthsRecalculation()) 406 if (relayoutChildren && r->needsPreferredWidthsRecalculation())
416 r->setPreferredLogicalWidthsDirty(MarkOnlyThis); 407 r->setPreferredLogicalWidthsDirty(MarkOnlyThis);
417 408
418 if (info == ForcedLayoutAfterContainingBlockMoved) 409 if (info == ForcedLayoutAfterContainingBlockMoved)
419 r->setNeedsPositionedMovementLayout(); 410 r->setNeedsPositionedMovementLayout();
420 411
421 r->layoutIfNeeded(); 412 r->layoutIfNeeded();
422 } 413 }
423 } 414 }
(...skipping 1308 matching lines...) Expand 10 before | Expand all | Expand 10 after
1732 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 1723 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
1733 { 1724 {
1734 showRenderObject(); 1725 showRenderObject();
1735 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 1726 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
1736 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 1727 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
1737 } 1728 }
1738 1729
1739 #endif 1730 #endif
1740 1731
1741 } // namespace blink 1732 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderBlockFlow.h » ('j') | sky/engine/core/rendering/line/LineBreaker.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698