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

Unified Diff: third_party/WebKit/Source/core/layout/LayoutBlock.h

Issue 2391893004: Reformat comments in core/layout up until LayoutBox (Closed)
Patch Set: Rebase w/HEAD (again) Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/layout/LayoutBlock.h
diff --git a/third_party/WebKit/Source/core/layout/LayoutBlock.h b/third_party/WebKit/Source/core/layout/LayoutBlock.h
index 77f861d4c419764c7adf414c6193792d8a1f1d53..804954fe785c3c19de25958bdde63af399a34810 100644
--- a/third_party/WebKit/Source/core/layout/LayoutBlock.h
+++ b/third_party/WebKit/Source/core/layout/LayoutBlock.h
@@ -2,7 +2,8 @@
* Copyright (C) 1999 Lars Knoll (knoll@kde.org)
* (C) 1999 Antti Koivisto (koivisto@kde.org)
* (C) 2007 David Smith (catfish.man@gmail.com)
- * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved.
+ * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
+ * All rights reserved.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
@@ -88,7 +89,8 @@ enum ContainingBlockState { NewContainingBlock, SameContainingBlock };
//
// Sample code of how to handle positioned objects in LayoutBlock:
//
-// for (LayoutObject* child = firstChild(); child; child = child->nextSibling()) {
+// for (LayoutObject* child = firstChild(); child; child = child->nextSibling())
+// {
// if (child->isOutOfFlowPositioned())
// continue;
//
@@ -140,10 +142,11 @@ class CORE_EXPORT LayoutBlock : public LayoutBox {
const char* name() const override;
protected:
- // Insert a child correctly into the tree when |beforeDescendant| isn't a direct child of
- // |this|. This happens e.g. when there's an anonymous block child of |this| and
- // |beforeDescendant| has been reparented into that one. Such things are invisible to the DOM,
- // and addChild() is typically called with the DOM tree (and not the layout tree) in mind.
+ // Insert a child correctly into the tree when |beforeDescendant| isn't a
+ // direct child of |this|. This happens e.g. when there's an anonymous block
+ // child of |this| and |beforeDescendant| has been reparented into that one.
+ // Such things are invisible to the DOM, and addChild() is typically called
+ // with the DOM tree (and not the layout tree) in mind.
void addChildBeforeDescendant(LayoutObject* newChild,
LayoutObject* beforeDescendant);
@@ -228,7 +231,8 @@ class CORE_EXPORT LayoutBlock : public LayoutBox {
int columnGap() const;
- // Accessors for logical width/height and margins in the containing block's block-flow direction.
+ // Accessors for logical width/height and margins in the containing block's
+ // block-flow direction.
LayoutUnit logicalWidthForChild(const LayoutBox& child) const {
return logicalWidthForChildSize(child.size());
}
@@ -334,9 +338,11 @@ class CORE_EXPORT LayoutBlock : public LayoutBox {
// </div>
// </div>
- // Returns the nearest enclosing block (including this block) that contributes a first-line style to our first line.
+ // Returns the nearest enclosing block (including this block) that contributes
+ // a first-line style to our first line.
const LayoutBlock* enclosingFirstLineStyleBlock() const;
- // Returns this block or the nearest inner block containing the actual first line.
+ // Returns this block or the nearest inner block containing the actual first
+ // line.
LayoutBlockFlow* nearestInnerBlockWithFirstLine();
protected:
@@ -408,8 +414,9 @@ class CORE_EXPORT LayoutBlock : public LayoutBox {
void styleDidChange(StyleDifference, const ComputedStyle* oldStyle) override;
void updateFromStyle() override;
- // Returns true if non-visible overflow should be respected. Otherwise hasOverflowClip() will be
- // false and we won't create scrollable area for this object even if overflow is non-visible.
+ // Returns true if non-visible overflow should be respected. Otherwise
+ // hasOverflowClip() will be false and we won't create scrollable area for
+ // this object even if overflow is non-visible.
virtual bool allowsOverflowClip() const;
virtual bool hasLineIfEmpty() const;
@@ -432,9 +439,10 @@ class CORE_EXPORT LayoutBlock : public LayoutBox {
void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, LayoutBox&);
- // TODO(jchaffraix): We should rename this function as inline-flex and inline-grid as also covered.
- // Alternatively it should be removed as we clarify the meaning of isAtomicInlineLevel to imply
- // isInline.
+ // TODO(jchaffraix): We should rename this function as inline-flex and
+ // inline-grid as also covered.
+ // Alternatively it should be removed as we clarify the meaning of
+ // isAtomicInlineLevel to imply isInline.
bool isInlineBlockOrInlineTable() const final {
return isInline() && isAtomicInlineLevel();
}
@@ -504,8 +512,8 @@ class CORE_EXPORT LayoutBlock : public LayoutBox {
LayoutUnit nextPageLogicalTop(LayoutUnit logicalOffset) const;
// Paginated content inside this block was laid out.
- // |logicalBottomOffsetAfterPagination| is the logical bottom offset of the child content after
- // applying any forced or unforced breaks as needed.
+ // |logicalBottomOffsetAfterPagination| is the logical bottom offset of the
+ // child content after applying any forced or unforced breaks as needed.
void paginatedContentWasLaidOut(
LayoutUnit logicalBottomOffsetAfterPagination);
@@ -522,15 +530,16 @@ class CORE_EXPORT LayoutBlock : public LayoutBox {
LayoutObjectChildList m_children;
- unsigned
- m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put in LayoutBlockRareData since they are set too frequently.
+ unsigned m_hasMarginBeforeQuirk : 1; // Note these quirk values can't be put
+ // in LayoutBlockRareData since they are
+ // set too frequently.
unsigned m_hasMarginAfterQuirk : 1;
unsigned m_beingDestroyed : 1;
unsigned m_hasMarkupTruncation : 1;
unsigned m_widthAvailableToChildrenChanged : 1;
unsigned m_heightAvailableToChildrenChanged : 1;
- unsigned
- m_isSelfCollapsing : 1; // True if margin-before and margin-after are adjoining.
+ unsigned m_isSelfCollapsing : 1; // True if margin-before and margin-after
+ // are adjoining.
unsigned m_descendantsWithFloatsMarkedForLayout : 1;
unsigned m_hasPositionedObjects : 1;
@@ -545,8 +554,8 @@ class CORE_EXPORT LayoutBlock : public LayoutBox {
friend class NGBox;
public:
- // TODO(lunalu): Temporary in order to ensure compatibility with existing layout test
- // results.
+ // TODO(lunalu): Temporary in order to ensure compatibility with existing
+ // layout test results.
virtual void adjustChildDebugRect(LayoutRect&) const {}
};
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBR.h ('k') | third_party/WebKit/Source/core/layout/LayoutBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698