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

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

Issue 134473008: Remove CSS regions support, keeping a bare minimum to support "region-based" multicol. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase master Created 6 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 * 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
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
253 void RenderDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren) 253 void RenderDeprecatedFlexibleBox::layoutBlock(bool relayoutChildren)
254 { 254 {
255 ASSERT(needsLayout()); 255 ASSERT(needsLayout());
256 256
257 if (!relayoutChildren && simplifiedLayout()) 257 if (!relayoutChildren && simplifiedLayout())
258 return; 258 return;
259 259
260 LayoutRepainter repainter(*this, checkForRepaintDuringLayout()); 260 LayoutRepainter repainter(*this, checkForRepaintDuringLayout());
261 LayoutStateMaintainer statePusher(view(), this, locationOffset(), hasTransfo rm() || hasReflection() || style()->isFlippedBlocksWritingMode()); 261 LayoutStateMaintainer statePusher(view(), this, locationOffset(), hasTransfo rm() || hasReflection() || style()->isFlippedBlocksWritingMode());
262 262
263 // Regions changing widths can force us to relayout our children.
264 RenderFlowThread* flowThread = flowThreadContainingBlock(); 263 RenderFlowThread* flowThread = flowThreadContainingBlock();
265 if (logicalWidthChangedInRegions(flowThread))
266 relayoutChildren = true;
267 if (updateRegionsAndShapesLogicalSize(flowThread)) 264 if (updateRegionsAndShapesLogicalSize(flowThread))
268 relayoutChildren = true; 265 relayoutChildren = true;
269 266
270 LayoutSize previousSize = size(); 267 LayoutSize previousSize = size();
271 268
272 updateLogicalWidth(); 269 updateLogicalWidth();
273 updateLogicalHeight(); 270 updateLogicalHeight();
274 271
275 if (previousSize != size() 272 if (previousSize != size()
276 || (parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOrient( ) == HORIZONTAL 273 || (parent()->isDeprecatedFlexibleBox() && parent()->style()->boxOrient( ) == HORIZONTAL
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 relayoutChildren = false; 416 relayoutChildren = false;
420 if (oldHeight != height()) 417 if (oldHeight != height())
421 heightSpecified = true; 418 heightSpecified = true;
422 419
423 // Now that our height is actually known, we can place our boxes. 420 // Now that our height is actually known, we can place our boxes.
424 m_stretchingChildren = (style()->boxAlign() == BSTRETCH); 421 m_stretchingChildren = (style()->boxAlign() == BSTRETCH);
425 for (RenderBox* child = iterator.first(); child; child = iterator.next() ) { 422 for (RenderBox* child = iterator.first(); child; child = iterator.next() ) {
426 if (child->isOutOfFlowPositioned()) { 423 if (child->isOutOfFlowPositioned()) {
427 child->containingBlock()->insertPositionedObject(child); 424 child->containingBlock()->insertPositionedObject(child);
428 RenderLayer* childLayer = child->layer(); 425 RenderLayer* childLayer = child->layer();
429 childLayer->setStaticInlinePosition(xPos); // FIXME: Not right f or regions. 426 childLayer->setStaticInlinePosition(xPos);
430 if (childLayer->staticBlockPosition() != yPos) { 427 if (childLayer->staticBlockPosition() != yPos) {
431 childLayer->setStaticBlockPosition(yPos); 428 childLayer->setStaticBlockPosition(yPos);
432 if (child->style()->hasStaticBlockPosition(style()->isHorizo ntalWritingMode())) 429 if (child->style()->hasStaticBlockPosition(style()->isHorizo ntalWritingMode()))
433 child->setChildNeedsLayout(MarkOnlyThis); 430 child->setChildNeedsLayout(MarkOnlyThis);
434 } 431 }
435 continue; 432 continue;
436 } 433 }
437 434
438 if (child->style()->visibility() == COLLAPSE) { 435 if (child->style()->visibility() == COLLAPSE) {
439 // visibility: collapsed children do not participate in our posi tioning. 436 // visibility: collapsed children do not participate in our posi tioning.
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 // Our first pass is done without flexing. We simply lay the children 654 // Our first pass is done without flexing. We simply lay the children
658 // out within the box. 655 // out within the box.
659 do { 656 do {
660 setHeight(borderTop() + paddingTop()); 657 setHeight(borderTop() + paddingTop());
661 LayoutUnit minHeight = height() + toAdd; 658 LayoutUnit minHeight = height() + toAdd;
662 659
663 for (RenderBox* child = iterator.first(); child; child = iterator.next() ) { 660 for (RenderBox* child = iterator.first(); child; child = iterator.next() ) {
664 if (child->isOutOfFlowPositioned()) { 661 if (child->isOutOfFlowPositioned()) {
665 child->containingBlock()->insertPositionedObject(child); 662 child->containingBlock()->insertPositionedObject(child);
666 RenderLayer* childLayer = child->layer(); 663 RenderLayer* childLayer = child->layer();
667 childLayer->setStaticInlinePosition(borderStart() + paddingStart ()); // FIXME: Not right for regions. 664 childLayer->setStaticInlinePosition(borderStart() + paddingStart ());
668 if (childLayer->staticBlockPosition() != height()) { 665 if (childLayer->staticBlockPosition() != height()) {
669 childLayer->setStaticBlockPosition(height()); 666 childLayer->setStaticBlockPosition(height());
670 if (child->style()->hasStaticBlockPosition(style()->isHorizo ntalWritingMode())) 667 if (child->style()->hasStaticBlockPosition(style()->isHorizo ntalWritingMode()))
671 child->setChildNeedsLayout(MarkOnlyThis); 668 child->setChildNeedsLayout(MarkOnlyThis);
672 } 669 }
673 continue; 670 continue;
674 } 671 }
675 672
676 SubtreeLayoutScope layoutScope(child); 673 SubtreeLayoutScope layoutScope(child);
677 if (!haveLineClamp && (relayoutChildren || (child->isReplaced() && ( child->style()->width().isPercent() || child->style()->height().isPercent())))) 674 if (!haveLineClamp && (relayoutChildren || (child->isReplaced() && ( child->style()->width().isPercent() || child->style()->height().isPercent()))))
(...skipping 403 matching lines...) Expand 10 before | Expand all | Expand 10 after
1081 if (isPseudoElement()) 1078 if (isPseudoElement())
1082 return "RenderDeprecatedFlexibleBox (generated)"; 1079 return "RenderDeprecatedFlexibleBox (generated)";
1083 if (isAnonymous()) 1080 if (isAnonymous())
1084 return "RenderDeprecatedFlexibleBox (generated)"; 1081 return "RenderDeprecatedFlexibleBox (generated)";
1085 if (isRelPositioned()) 1082 if (isRelPositioned())
1086 return "RenderDeprecatedFlexibleBox (relative positioned)"; 1083 return "RenderDeprecatedFlexibleBox (relative positioned)";
1087 return "RenderDeprecatedFlexibleBox"; 1084 return "RenderDeprecatedFlexibleBox";
1088 } 1085 }
1089 1086
1090 } // namespace WebCore 1087 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBoxRegionInfo.h ('k') | Source/core/rendering/RenderFlexibleBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698