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

Side by Side Diff: Source/core/rendering/RenderDeprecatedFlexibleBox.cpp

Issue 898783003: Move rendering/RenderLayer* to layout/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * This file is part of the render object implementation for KHTML. 2 * This file is part of the render object implementation for KHTML.
3 * 3 *
4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 4 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
5 * (C) 1999 Antti Koivisto (koivisto@kde.org) 5 * (C) 1999 Antti Koivisto (koivisto@kde.org)
6 * Copyright (C) 2003 Apple Computer, Inc. 6 * Copyright (C) 2003 Apple Computer, Inc.
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
11 * version 2 of the License, or (at your option) any later version. 11 * version 2 of the License, or (at your option) any later version.
12 * 12 *
13 * This library is distributed in the hope that it will be useful, 13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details. 16 * Library General Public License for more details.
17 * 17 *
18 * You should have received a copy of the GNU Library General Public License 18 * You should have received a copy of the GNU Library General Public License
19 * along with this library; see the file COPYING.LIB. If not, write to 19 * along with this library; see the file COPYING.LIB. If not, write to
20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 20 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21 * Boston, MA 02110-1301, USA. 21 * Boston, MA 02110-1301, USA.
22 * 22 *
23 */ 23 */
24 24
25 #include "config.h" 25 #include "config.h"
26 #include "core/rendering/RenderDeprecatedFlexibleBox.h" 26 #include "core/rendering/RenderDeprecatedFlexibleBox.h"
27 27
28 #include "core/frame/UseCounter.h" 28 #include "core/frame/UseCounter.h"
29 #include "core/rendering/RenderLayer.h" 29 #include "core/layout/Layer.h"
30 #include "core/rendering/RenderView.h" 30 #include "core/rendering/RenderView.h"
31 #include "core/rendering/TextAutosizer.h" 31 #include "core/rendering/TextAutosizer.h"
32 #include "core/rendering/TextRunConstructor.h" 32 #include "core/rendering/TextRunConstructor.h"
33 #include "platform/fonts/Font.h" 33 #include "platform/fonts/Font.h"
34 #include "wtf/StdLibExtras.h" 34 #include "wtf/StdLibExtras.h"
35 #include "wtf/unicode/CharacterNames.h" 35 #include "wtf/unicode/CharacterNames.h"
36 36
37 namespace blink { 37 namespace blink {
38 38
39 class FlexBoxIterator { 39 class FlexBoxIterator {
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 373
374 relayoutChildren = false; 374 relayoutChildren = false;
375 if (oldHeight != size().height()) 375 if (oldHeight != size().height())
376 heightSpecified = true; 376 heightSpecified = true;
377 377
378 // Now that our height is actually known, we can place our boxes. 378 // Now that our height is actually known, we can place our boxes.
379 m_stretchingChildren = (style()->boxAlign() == BSTRETCH); 379 m_stretchingChildren = (style()->boxAlign() == BSTRETCH);
380 for (RenderBox* child = iterator.first(); child; child = iterator.next() ) { 380 for (RenderBox* child = iterator.first(); child; child = iterator.next() ) {
381 if (child->isOutOfFlowPositioned()) { 381 if (child->isOutOfFlowPositioned()) {
382 child->containingBlock()->insertPositionedObject(child); 382 child->containingBlock()->insertPositionedObject(child);
383 RenderLayer* childLayer = child->layer(); 383 Layer* childLayer = child->layer();
384 childLayer->setStaticInlinePosition(xPos); 384 childLayer->setStaticInlinePosition(xPos);
385 if (childLayer->staticBlockPosition() != yPos) { 385 if (childLayer->staticBlockPosition() != yPos) {
386 childLayer->setStaticBlockPosition(yPos); 386 childLayer->setStaticBlockPosition(yPos);
387 if (child->style()->hasStaticBlockPosition(style()->isHorizo ntalWritingMode())) 387 if (child->style()->hasStaticBlockPosition(style()->isHorizo ntalWritingMode()))
388 child->setChildNeedsLayout(MarkOnlyThis); 388 child->setChildNeedsLayout(MarkOnlyThis);
389 } 389 }
390 continue; 390 continue;
391 } 391 }
392 392
393 if (child->style()->visibility() == COLLAPSE) { 393 if (child->style()->visibility() == COLLAPSE) {
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
611 // their preferred widths. The second pass handles flexing the children. 611 // their preferred widths. The second pass handles flexing the children.
612 // Our first pass is done without flexing. We simply lay the children 612 // Our first pass is done without flexing. We simply lay the children
613 // out within the box. 613 // out within the box.
614 do { 614 do {
615 setHeight(borderTop() + paddingTop()); 615 setHeight(borderTop() + paddingTop());
616 LayoutUnit minHeight = size().height() + toAdd; 616 LayoutUnit minHeight = size().height() + toAdd;
617 617
618 for (RenderBox* child = iterator.first(); child; child = iterator.next() ) { 618 for (RenderBox* child = iterator.first(); child; child = iterator.next() ) {
619 if (child->isOutOfFlowPositioned()) { 619 if (child->isOutOfFlowPositioned()) {
620 child->containingBlock()->insertPositionedObject(child); 620 child->containingBlock()->insertPositionedObject(child);
621 RenderLayer* childLayer = child->layer(); 621 Layer* childLayer = child->layer();
622 childLayer->setStaticInlinePosition(borderStart() + paddingStart ()); 622 childLayer->setStaticInlinePosition(borderStart() + paddingStart ());
623 if (childLayer->staticBlockPosition() != size().height()) { 623 if (childLayer->staticBlockPosition() != size().height()) {
624 childLayer->setStaticBlockPosition(size().height()); 624 childLayer->setStaticBlockPosition(size().height());
625 if (child->style()->hasStaticBlockPosition(style()->isHorizo ntalWritingMode())) 625 if (child->style()->hasStaticBlockPosition(style()->isHorizo ntalWritingMode()))
626 child->setChildNeedsLayout(MarkOnlyThis); 626 child->setChildNeedsLayout(MarkOnlyThis);
627 } 627 }
628 continue; 628 continue;
629 } 629 }
630 630
631 SubtreeLayoutScope layoutScope(*child); 631 SubtreeLayoutScope layoutScope(*child);
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after
1028 if (isOutOfFlowPositioned()) 1028 if (isOutOfFlowPositioned())
1029 return "RenderDeprecatedFlexibleBox (positioned)"; 1029 return "RenderDeprecatedFlexibleBox (positioned)";
1030 if (isAnonymous()) 1030 if (isAnonymous())
1031 return "RenderDeprecatedFlexibleBox (generated)"; 1031 return "RenderDeprecatedFlexibleBox (generated)";
1032 if (isRelPositioned()) 1032 if (isRelPositioned())
1033 return "RenderDeprecatedFlexibleBox (relative positioned)"; 1033 return "RenderDeprecatedFlexibleBox (relative positioned)";
1034 return "RenderDeprecatedFlexibleBox"; 1034 return "RenderDeprecatedFlexibleBox";
1035 } 1035 }
1036 1036
1037 } // namespace blink 1037 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBoxModelObject.cpp ('k') | Source/core/rendering/RenderEmbeddedObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698