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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutBox.cpp

Issue 2471283004: [css-grid] Fix simplified layout of positioned grid items (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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
397 return; 397 return;
398 398
399 if (oldStyle->gridColumnStart() == style()->gridColumnStart() && 399 if (oldStyle->gridColumnStart() == style()->gridColumnStart() &&
400 oldStyle->gridColumnEnd() == style()->gridColumnEnd() && 400 oldStyle->gridColumnEnd() == style()->gridColumnEnd() &&
401 oldStyle->gridRowStart() == style()->gridRowStart() && 401 oldStyle->gridRowStart() == style()->gridRowStart() &&
402 oldStyle->gridRowEnd() == style()->gridRowEnd() && 402 oldStyle->gridRowEnd() == style()->gridRowEnd() &&
403 oldStyle->order() == style()->order() && 403 oldStyle->order() == style()->order() &&
404 oldStyle->hasOutOfFlowPosition() == style()->hasOutOfFlowPosition()) 404 oldStyle->hasOutOfFlowPosition() == style()->hasOutOfFlowPosition())
405 return; 405 return;
406 406
407 // Positioned items don't participate on the layout of the grid,
408 // so we don't need to mark the grid as dirty if they change positions.
409 if (oldStyle->hasOutOfFlowPosition() == style()->hasOutOfFlowPosition() &&
mstensho (USE GERRIT) 2016/11/04 08:49:12 I.e. oldStyle->hasOutOfFlowPosition() && style()->
Manuel Rego 2016/11/04 09:29:17 Acknowledged.
410 style()->hasOutOfFlowPosition())
411 return;
412
407 // It should be possible to not dirty the grid in some cases (like moving an 413 // It should be possible to not dirty the grid in some cases (like moving an
408 // explicitly placed grid item). 414 // explicitly placed grid item).
409 // For now, it's more simple to just always recompute the grid. 415 // For now, it's more simple to just always recompute the grid.
410 toLayoutGrid(parent())->dirtyGrid(); 416 toLayoutGrid(parent())->dirtyGrid();
411 } 417 }
412 418
413 void LayoutBox::updateScrollSnapMappingAfterStyleChange( 419 void LayoutBox::updateScrollSnapMappingAfterStyleChange(
414 const ComputedStyle* newStyle, 420 const ComputedStyle* newStyle,
415 const ComputedStyle* oldStyle) { 421 const ComputedStyle* oldStyle) {
416 SnapCoordinator* snapCoordinator = document().snapCoordinator(); 422 SnapCoordinator* snapCoordinator = document().snapCoordinator();
(...skipping 5221 matching lines...) Expand 10 before | Expand all | Expand 10 after
5638 LayoutRect rect = frameRect(); 5644 LayoutRect rect = frameRect();
5639 5645
5640 LayoutBlock* block = containingBlock(); 5646 LayoutBlock* block = containingBlock();
5641 if (block) 5647 if (block)
5642 block->adjustChildDebugRect(rect); 5648 block->adjustChildDebugRect(rect);
5643 5649
5644 return rect; 5650 return rect;
5645 } 5651 }
5646 5652
5647 } // namespace blink 5653 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698