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

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

Issue 2786463004: Paint backgrounds of a table section/row in one display item (Closed)
Patch Set: - Created 3 years, 8 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. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc.
6 * All rights reserved. 6 * All rights reserved.
7 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 7 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 519
520 // If the child contains inline with outline and continuation, its 520 // If the child contains inline with outline and continuation, its
521 // visual overflow computed during its layout might be inaccurate because 521 // visual overflow computed during its layout might be inaccurate because
522 // the layout of continuations might not be up-to-date at that time. 522 // the layout of continuations might not be up-to-date at that time.
523 // Re-add overflow from inline children to ensure its overflow covers 523 // Re-add overflow from inline children to ensure its overflow covers
524 // the outline which may enclose continuations. 524 // the outline which may enclose continuations.
525 if (child->isLayoutBlockFlow() && 525 if (child->isLayoutBlockFlow() &&
526 toLayoutBlockFlow(child)->containsInlineWithOutlineAndContinuation()) 526 toLayoutBlockFlow(child)->containsInlineWithOutlineAndContinuation())
527 toLayoutBlockFlow(child)->addOverflowFromInlineChildren(); 527 toLayoutBlockFlow(child)->addOverflowFromInlineChildren();
528 528
529 addOverflowFromChild(child); 529 addOverflowFromChild(*child);
530 } 530 }
531 } 531 }
532 532
533 void LayoutBlock::addOverflowFromPositionedObjects() { 533 void LayoutBlock::addOverflowFromPositionedObjects() {
534 TrackedLayoutBoxListHashSet* positionedDescendants = positionedObjects(); 534 TrackedLayoutBoxListHashSet* positionedDescendants = positionedObjects();
535 if (!positionedDescendants) 535 if (!positionedDescendants)
536 return; 536 return;
537 537
538 for (auto* positionedObject : *positionedDescendants) { 538 for (auto* positionedObject : *positionedDescendants) {
539 // Fixed positioned elements don't contribute to layout overflow, since they 539 // Fixed positioned elements don't contribute to layout overflow, since they
540 // don't scroll with the content. 540 // don't scroll with the content.
541 if (positionedObject->style()->position() != EPosition::kFixed) 541 if (positionedObject->style()->position() != EPosition::kFixed)
542 addOverflowFromChild(positionedObject, 542 addOverflowFromChild(*positionedObject,
543 toLayoutSize(positionedObject->location())); 543 toLayoutSize(positionedObject->location()));
544 } 544 }
545 } 545 }
546 546
547 void LayoutBlock::addVisualOverflowFromTheme() { 547 void LayoutBlock::addVisualOverflowFromTheme() {
548 if (!style()->hasAppearance()) 548 if (!style()->hasAppearance())
549 return; 549 return;
550 550
551 IntRect inflatedRect = pixelSnappedBorderBoxRect(); 551 IntRect inflatedRect = pixelSnappedBorderBoxRect();
552 LayoutTheme::theme().addVisualOverflow(*this, inflatedRect); 552 LayoutTheme::theme().addVisualOverflow(*this, inflatedRect);
(...skipping 1621 matching lines...) Expand 10 before | Expand all | Expand 10 after
2174 } 2174 }
2175 2175
2176 return availableHeight; 2176 return availableHeight;
2177 } 2177 }
2178 2178
2179 bool LayoutBlock::hasDefiniteLogicalHeight() const { 2179 bool LayoutBlock::hasDefiniteLogicalHeight() const {
2180 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1); 2180 return availableLogicalHeightForPercentageComputation() != LayoutUnit(-1);
2181 } 2181 }
2182 2182
2183 } // namespace blink 2183 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/BUILD.gn ('k') | third_party/WebKit/Source/core/layout/LayoutBlockFlow.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698