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

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

Issue 2394263004: Reformat comments in core/layout up until LayoutMultiColumnFlowThread (Closed)
Patch Set: Rebase w/HEAD 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 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. All rights reserved. 4 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Apple Inc.
5 * All rights reserved.
5 * 6 *
6 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 8 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
9 * 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.
10 * 11 *
11 * This library is distributed in the hope that it will be useful, 12 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details. 15 * Library General Public License for more details.
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 LayoutBoxModelObject* virtualContinuation() const final { 176 LayoutBoxModelObject* virtualContinuation() const final {
176 return continuation(); 177 return continuation();
177 } 178 }
178 LayoutInline* inlineElementContinuation() const; 179 LayoutInline* inlineElementContinuation() const;
179 180
180 LayoutSize offsetForInFlowPositionedInline(const LayoutBox& child) const; 181 LayoutSize offsetForInFlowPositionedInline(const LayoutBox& child) const;
181 182
182 void addOutlineRects(Vector<LayoutRect>&, 183 void addOutlineRects(Vector<LayoutRect>&,
183 const LayoutPoint& additionalOffset, 184 const LayoutPoint& additionalOffset,
184 IncludeBlockVisualOverflowOrNot) const final; 185 IncludeBlockVisualOverflowOrNot) const final;
185 // The following methods are called from the container if it has already added outline rects for line boxes 186 // The following methods are called from the container if it has already added
186 // and/or children of this LayoutInline. 187 // outline rects for line boxes and/or children of this LayoutInline.
187 void addOutlineRectsForChildrenAndContinuations( 188 void addOutlineRectsForChildrenAndContinuations(
188 Vector<LayoutRect>&, 189 Vector<LayoutRect>&,
189 const LayoutPoint& additionalOffset, 190 const LayoutPoint& additionalOffset,
190 IncludeBlockVisualOverflowOrNot) const; 191 IncludeBlockVisualOverflowOrNot) const;
191 void addOutlineRectsForContinuations(Vector<LayoutRect>&, 192 void addOutlineRectsForContinuations(Vector<LayoutRect>&,
192 const LayoutPoint& additionalOffset, 193 const LayoutPoint& additionalOffset,
193 IncludeBlockVisualOverflowOrNot) const; 194 IncludeBlockVisualOverflowOrNot) const;
194 195
195 using LayoutBoxModelObject::continuation; 196 using LayoutBoxModelObject::continuation;
196 using LayoutBoxModelObject::setContinuation; 197 using LayoutBoxModelObject::setContinuation;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 } 233 }
233 const LayoutObjectChildList* children() const { return &m_children; } 234 const LayoutObjectChildList* children() const { return &m_children; }
234 LayoutObjectChildList* children() { return &m_children; } 235 LayoutObjectChildList* children() { return &m_children; }
235 236
236 bool isLayoutInline() const final { return true; } 237 bool isLayoutInline() const final { return true; }
237 238
238 LayoutRect culledInlineVisualOverflowBoundingBox() const; 239 LayoutRect culledInlineVisualOverflowBoundingBox() const;
239 InlineBox* culledInlineFirstLineBox() const; 240 InlineBox* culledInlineFirstLineBox() const;
240 InlineBox* culledInlineLastLineBox() const; 241 InlineBox* culledInlineLastLineBox() const;
241 242
242 // For visualOverflowRect() only, to get bounding box of visual overflow of li ne boxes. 243 // For visualOverflowRect() only, to get bounding box of visual overflow of
244 // line boxes.
243 LayoutRect linesVisualOverflowBoundingBox() const; 245 LayoutRect linesVisualOverflowBoundingBox() const;
244 246
245 template <typename GeneratorContext> 247 template <typename GeneratorContext>
246 void generateLineBoxRects(GeneratorContext& yield) const; 248 void generateLineBoxRects(GeneratorContext& yield) const;
247 template <typename GeneratorContext> 249 template <typename GeneratorContext>
248 void generateCulledLineBoxRects(GeneratorContext& yield, 250 void generateCulledLineBoxRects(GeneratorContext& yield,
249 const LayoutInline* container) const; 251 const LayoutInline* container) const;
250 252
251 void addChildToContinuation(LayoutObject* newChild, 253 void addChildToContinuation(LayoutObject* newChild,
252 LayoutObject* beforeChild); 254 LayoutObject* beforeChild);
(...skipping 24 matching lines...) Expand all
277 279
278 PaintLayerType layerTypeRequired() const override; 280 PaintLayerType layerTypeRequired() const override;
279 281
280 LayoutUnit offsetLeft(const Element*) const final; 282 LayoutUnit offsetLeft(const Element*) const final;
281 LayoutUnit offsetTop(const Element*) const final; 283 LayoutUnit offsetTop(const Element*) const final;
282 LayoutUnit offsetWidth() const final { return linesBoundingBox().width(); } 284 LayoutUnit offsetWidth() const final { return linesBoundingBox().width(); }
283 LayoutUnit offsetHeight() const final { return linesBoundingBox().height(); } 285 LayoutUnit offsetHeight() const final { return linesBoundingBox().height(); }
284 286
285 LayoutRect absoluteClippedOverflowRect() const override; 287 LayoutRect absoluteClippedOverflowRect() const override;
286 288
287 // This method differs from visualOverflowRect in that it doesn't include the rects 289 // This method differs from visualOverflowRect in that it doesn't include the
288 // for culled inline boxes, which aren't necessary for paint invalidation. 290 // rects for culled inline boxes, which aren't necessary for paint
291 // invalidation.
289 LayoutRect localOverflowRectForPaintInvalidation() const override; 292 LayoutRect localOverflowRectForPaintInvalidation() const override;
290 293
291 bool mapToVisualRectInAncestorSpace( 294 bool mapToVisualRectInAncestorSpace(
292 const LayoutBoxModelObject* ancestor, 295 const LayoutBoxModelObject* ancestor,
293 LayoutRect&, 296 LayoutRect&,
294 VisualRectFlags = DefaultVisualRectFlags) const final; 297 VisualRectFlags = DefaultVisualRectFlags) const final;
295 298
296 PositionWithAffinity positionForPoint(const LayoutPoint&) final; 299 PositionWithAffinity positionForPoint(const LayoutPoint&) final;
297 300
298 IntRect borderBoundingBox() const final { 301 IntRect borderBoundingBox() const final {
299 IntRect boundingBox = enclosingIntRect(linesBoundingBox()); 302 IntRect boundingBox = enclosingIntRect(linesBoundingBox());
300 return IntRect(0, 0, boundingBox.width(), boundingBox.height()); 303 return IntRect(0, 0, boundingBox.width(), boundingBox.height());
301 } 304 }
302 305
303 virtual InlineFlowBox* createInlineFlowBox(); // Subclassed by SVG and Ruby 306 virtual InlineFlowBox* createInlineFlowBox(); // Subclassed by SVG and Ruby
304 307
305 void dirtyLinesFromChangedChild( 308 void dirtyLinesFromChangedChild(
306 LayoutObject* child, 309 LayoutObject* child,
307 MarkingBehavior markingBehaviour = MarkContainerChain) final { 310 MarkingBehavior markingBehaviour = MarkContainerChain) final {
308 m_lineBoxes.dirtyLinesFromChangedChild( 311 m_lineBoxes.dirtyLinesFromChangedChild(
309 LineLayoutItem(this), LineLayoutItem(child), 312 LineLayoutItem(this), LineLayoutItem(child),
310 markingBehaviour == MarkContainerChain); 313 markingBehaviour == MarkContainerChain);
311 } 314 }
312 315
313 // TODO(leviw): This should probably be an int. We don't snap equivalent lines to different heights. 316 // TODO(leviw): This should probably be an int. We don't snap equivalent lines
317 // to different heights.
314 LayoutUnit lineHeight( 318 LayoutUnit lineHeight(
315 bool firstLine, 319 bool firstLine,
316 LineDirectionMode, 320 LineDirectionMode,
317 LinePositionMode = PositionOnContainingLine) const final; 321 LinePositionMode = PositionOnContainingLine) const final;
318 int baselinePosition(FontBaseline, 322 int baselinePosition(FontBaseline,
319 bool firstLine, 323 bool firstLine,
320 LineDirectionMode, 324 LineDirectionMode,
321 LinePositionMode = PositionOnContainingLine) const final; 325 LinePositionMode = PositionOnContainingLine) const final;
322 326
323 void childBecameNonInline(LayoutObject* child) final; 327 void childBecameNonInline(LayoutObject* child) final;
324 328
325 void updateHitTestResult(HitTestResult&, const LayoutPoint&) final; 329 void updateHitTestResult(HitTestResult&, const LayoutPoint&) final;
326 330
327 void imageChanged(WrappedImagePtr, const IntRect* = nullptr) final; 331 void imageChanged(WrappedImagePtr, const IntRect* = nullptr) final;
328 332
329 void addAnnotatedRegions(Vector<AnnotatedRegionValue>&) final; 333 void addAnnotatedRegions(Vector<AnnotatedRegionValue>&) final;
330 334
331 void updateFromStyle() final; 335 void updateFromStyle() final;
332 336
333 LayoutInline* clone() const; 337 LayoutInline* clone() const;
334 338
335 LayoutBoxModelObject* continuationBefore(LayoutObject* beforeChild); 339 LayoutBoxModelObject* continuationBefore(LayoutObject* beforeChild);
336 340
337 LayoutObjectChildList m_children; 341 LayoutObjectChildList m_children;
338 LineBoxList 342 // All of the line boxes created for this inline flow. For example,
339 m_lineBoxes; // All of the line boxes created for this inline flow. For example, <i>Hello<br>world.</i> will have two <i> line boxes. 343 // <i>Hello<br>world.</i> will have two <i> line boxes.
344 LineBoxList m_lineBoxes;
340 }; 345 };
341 346
342 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutInline, isLayoutInline()); 347 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutInline, isLayoutInline());
343 348
344 } // namespace blink 349 } // namespace blink
345 350
346 #endif // LayoutInline_h 351 #endif // LayoutInline_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698