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

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

Issue 2701993002: DO NOT COMMIT: Results of running new (proposed) clang-format on Blink (Closed)
Patch Set: Created 3 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 * 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 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 LayoutBox* currBox = toLayoutBox(curr); 655 LayoutBox* currBox = toLayoutBox(curr);
656 if (currBox->inlineBoxWrapper()) { 656 if (currBox->inlineBoxWrapper()) {
657 RootInlineBox& rootBox = currBox->inlineBoxWrapper()->root(); 657 RootInlineBox& rootBox = currBox->inlineBoxWrapper()->root();
658 computeItemTopHeight(container, rootBox, &logicalTop, &logicalHeight); 658 computeItemTopHeight(container, rootBox, &logicalTop, &logicalHeight);
659 if (isHorizontal) { 659 if (isHorizontal) {
660 yield(LayoutRect( 660 yield(LayoutRect(
661 currBox->inlineBoxWrapper()->x() - currBox->marginLeft(), 661 currBox->inlineBoxWrapper()->x() - currBox->marginLeft(),
662 logicalTop, currBox->size().width() + currBox->marginWidth(), 662 logicalTop, currBox->size().width() + currBox->marginWidth(),
663 logicalHeight)); 663 logicalHeight));
664 } else { 664 } else {
665 yield(LayoutRect(logicalTop, currBox->inlineBoxWrapper()->y() - 665 yield(LayoutRect(
666 currBox->marginTop(), 666 logicalTop,
667 logicalHeight, 667 currBox->inlineBoxWrapper()->y() - currBox->marginTop(),
668 currBox->size().height() + currBox->marginHeight())); 668 logicalHeight,
669 currBox->size().height() + currBox->marginHeight()));
669 } 670 }
670 } 671 }
671 } else if (curr->isLayoutInline()) { 672 } else if (curr->isLayoutInline()) {
672 // If the child doesn't need line boxes either, then we can recur. 673 // If the child doesn't need line boxes either, then we can recur.
673 LayoutInline* currInline = toLayoutInline(curr); 674 LayoutInline* currInline = toLayoutInline(curr);
674 if (!currInline->alwaysCreateLineBoxes()) { 675 if (!currInline->alwaysCreateLineBoxes()) {
675 currInline->generateCulledLineBoxRects(yield, container); 676 currInline->generateCulledLineBoxRects(yield, container);
676 } else { 677 } else {
677 for (InlineFlowBox* childLine = currInline->firstLineBox(); childLine; 678 for (InlineFlowBox* childLine = currInline->firstLineBox(); childLine;
678 childLine = childLine->nextLineBox()) { 679 childLine = childLine->nextLineBox()) {
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after
1455 } 1456 }
1456 1457
1457 void LayoutInline::addOutlineRectsForContinuations( 1458 void LayoutInline::addOutlineRectsForContinuations(
1458 Vector<LayoutRect>& rects, 1459 Vector<LayoutRect>& rects,
1459 const LayoutPoint& additionalOffset, 1460 const LayoutPoint& additionalOffset,
1460 IncludeBlockVisualOverflowOrNot includeBlockOverflows) const { 1461 IncludeBlockVisualOverflowOrNot includeBlockOverflows) const {
1461 if (LayoutBoxModelObject* continuation = this->continuation()) { 1462 if (LayoutBoxModelObject* continuation = this->continuation()) {
1462 if (continuation->isInline()) 1463 if (continuation->isInline())
1463 continuation->addOutlineRects( 1464 continuation->addOutlineRects(
1464 rects, 1465 rects,
1465 additionalOffset + (continuation->containingBlock()->location() - 1466 additionalOffset +
1466 containingBlock()->location()), 1467 (continuation->containingBlock()->location() -
1468 containingBlock()->location()),
1467 includeBlockOverflows); 1469 includeBlockOverflows);
1468 else 1470 else
1469 continuation->addOutlineRects( 1471 continuation->addOutlineRects(rects,
1470 rects, additionalOffset + (toLayoutBox(continuation)->location() - 1472 additionalOffset +
1471 containingBlock()->location()), 1473 (toLayoutBox(continuation)->location() -
1472 includeBlockOverflows); 1474 containingBlock()->location()),
1475 includeBlockOverflows);
1473 } 1476 }
1474 } 1477 }
1475 1478
1476 FloatRect LayoutInline::localBoundingBoxRectForAccessibility() const { 1479 FloatRect LayoutInline::localBoundingBoxRectForAccessibility() const {
1477 Vector<LayoutRect> rects; 1480 Vector<LayoutRect> rects;
1478 addOutlineRects(rects, LayoutPoint(), IncludeBlockVisualOverflow); 1481 addOutlineRects(rects, LayoutPoint(), IncludeBlockVisualOverflow);
1479 return FloatRect(unionRect(rects)); 1482 return FloatRect(unionRect(rects));
1480 } 1483 }
1481 1484
1482 void LayoutInline::computeSelfHitTestRects( 1485 void LayoutInline::computeSelfHitTestRects(
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1518 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason); 1521 paintInvalidator.invalidateDisplayItemClient(*box, invalidationReason);
1519 } 1522 }
1520 1523
1521 // TODO(lunalu): Not to just dump 0, 0 as the x and y here 1524 // TODO(lunalu): Not to just dump 0, 0 as the x and y here
1522 LayoutRect LayoutInline::debugRect() const { 1525 LayoutRect LayoutInline::debugRect() const {
1523 IntRect linesBox = enclosingIntRect(linesBoundingBox()); 1526 IntRect linesBox = enclosingIntRect(linesBoundingBox());
1524 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height())); 1527 return LayoutRect(IntRect(0, 0, linesBox.width(), linesBox.height()));
1525 } 1528 }
1526 1529
1527 } // namespace blink 1530 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698