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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBlock.h

Issue 2513953002: [css-grid] Avoid double loop in positioned objects layout (Closed)
Patch Set: Created 4 years, 1 month 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 Apple Inc. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
6 * All rights reserved. 6 * 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 void dirtyForLayoutFromPercentageHeightDescendants(SubtreeLayoutScope&); 351 void dirtyForLayoutFromPercentageHeightDescendants(SubtreeLayoutScope&);
352 352
353 void layout() override; 353 void layout() override;
354 354
355 enum PositionedLayoutBehavior { 355 enum PositionedLayoutBehavior {
356 DefaultLayout, 356 DefaultLayout,
357 LayoutOnlyFixedPositionedObjects, 357 LayoutOnlyFixedPositionedObjects,
358 ForcedLayoutAfterContainingBlockMoved 358 ForcedLayoutAfterContainingBlockMoved
359 }; 359 };
360 360
361 virtual void layoutPositionedObjects( 361 void layoutPositionedObjects(bool relayoutChildren,
362 bool relayoutChildren, 362 PositionedLayoutBehavior = DefaultLayout);
363 PositionedLayoutBehavior = DefaultLayout); 363 virtual void layoutPositionedObject(LayoutBox*,
jfernandez 2016/11/18 16:18:22 I think it'd be better to keep layoutPositionedObj
Manuel Rego 2016/11/18 16:39:28 Good point, I'll keep the previous approach.
364 bool relayoutChildren,
365 PositionedLayoutBehavior info);
364 void markFixedPositionObjectForLayoutIfNeeded(LayoutObject* child, 366 void markFixedPositionObjectForLayoutIfNeeded(LayoutObject* child,
365 SubtreeLayoutScope&); 367 SubtreeLayoutScope&);
366 368
367 LayoutUnit marginIntrinsicLogicalWidthForChild(const LayoutBox& child) const; 369 LayoutUnit marginIntrinsicLogicalWidthForChild(const LayoutBox& child) const;
368 370
369 int beforeMarginInLineDirection(LineDirectionMode) const; 371 int beforeMarginInLineDirection(LineDirectionMode) const;
370 372
371 void paint(const PaintInfo&, const LayoutPoint&) const override; 373 void paint(const PaintInfo&, const LayoutPoint&) const override;
372 374
373 public: 375 public:
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 // TODO(lunalu): Temporary in order to ensure compatibility with existing 568 // TODO(lunalu): Temporary in order to ensure compatibility with existing
567 // layout test results. 569 // layout test results.
568 virtual void adjustChildDebugRect(LayoutRect&) const {} 570 virtual void adjustChildDebugRect(LayoutRect&) const {}
569 }; 571 };
570 572
571 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock()); 573 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutBlock, isLayoutBlock());
572 574
573 } // namespace blink 575 } // namespace blink
574 576
575 #endif // LayoutBlock_h 577 #endif // LayoutBlock_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698