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

Side by Side Diff: sky/engine/core/rendering/RenderBlock.h

Issue 763043002: Remove RenderBlockLineLayout (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: review Created 6 years 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
« no previous file with comments | « sky/engine/core/rendering/InlineTextBox.cpp ('k') | sky/engine/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Apple Inc. All r ights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All r ights 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 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObj ect* beforeChild = 0); 292 void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObj ect* beforeChild = 0);
293 293
294 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&); 294 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&);
295 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&); 295 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&);
296 296
297 void paintSelection(PaintInfo&, const LayoutPoint&); 297 void paintSelection(PaintInfo&, const LayoutPoint&);
298 void paintCarets(PaintInfo&, const LayoutPoint&); 298 void paintCarets(PaintInfo&, const LayoutPoint&);
299 299
300 bool hasCaret() const; 300 bool hasCaret() const;
301 301
302 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const;
303
304 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline 302 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline
305 // children. 303 // children.
306 virtual RenderBlock* firstLineBlock() const override; 304 virtual RenderBlock* firstLineBlock() const override;
307 305
308 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO bject* paintInvalidationContainer, bool /*clipToVisibleContent*/) override final 306 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO bject* paintInvalidationContainer, bool /*clipToVisibleContent*/) override final
309 { 307 {
310 return selectionGapRectsForPaintInvalidation(paintInvalidationContainer) ; 308 return selectionGapRectsForPaintInvalidation(paintInvalidationContainer) ;
311 } 309 }
312 bool isSelectionRoot() const; 310 bool isSelectionRoot() const;
313 GapRects selectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootBlockP hysicalPosition, const LayoutSize& offsetFromRootBlock, 311 GapRects selectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootBlockP hysicalPosition, const LayoutSize& offsetFromRootBlock,
314 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLe ft, LayoutUnit& lastLogicalRight, const PaintInfo* = 0); 312 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogicalLe ft, LayoutUnit& lastLogicalRight, const PaintInfo* = 0);
315 GapRects blockSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootB lockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 313 GapRects blockSelectionGaps(RenderBlock* rootBlock, const LayoutPoint& rootB lockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
316 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogi calLeft, LayoutUnit& lastLogicalRight, const PaintInfo*); 314 LayoutUnit& lastLogicalTop, LayoutUnit& lastLogi calLeft, LayoutUnit& lastLogicalRight, const PaintInfo*);
317 LayoutRect blockSelectionGap(RenderBlock* rootBlock, const LayoutPoint& root BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock, 315 LayoutRect blockSelectionGap(RenderBlock* rootBlock, const LayoutPoint& root BlockPhysicalPosition, const LayoutSize& offsetFromRootBlock,
318 LayoutUnit lastLogicalTop, LayoutUnit lastLogic alLeft, LayoutUnit lastLogicalRight, LayoutUnit logicalBottom, const PaintInfo*) ; 316 LayoutUnit lastLogicalTop, LayoutUnit lastLogic alLeft, LayoutUnit lastLogicalRight, LayoutUnit logicalBottom, const PaintInfo*) ;
319 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout Unit position); 317 virtual LayoutUnit logicalLeftSelectionOffset(RenderBlock* rootBlock, Layout Unit position);
320 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou tUnit position); 318 virtual LayoutUnit logicalRightSelectionOffset(RenderBlock* rootBlock, Layou tUnit position);
321 319
322 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const override; 320 virtual void absoluteRects(Vector<IntRect>&, const LayoutPoint& accumulatedO ffset) const override;
323 virtual void absoluteQuads(Vector<FloatQuad>&) const override; 321 virtual void absoluteQuads(Vector<FloatQuad>&) const override;
324 322
325 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e xtraWidthToEndOfLine = 0) override final; 323 virtual LayoutRect localCaretRect(InlineBox*, int caretOffset, LayoutUnit* e xtraWidthToEndOfLine = 0) override final;
326 324
327 void markLinesDirtyInBlockRange(LayoutUnit logicalTop, LayoutUnit logicalBot tom, RootInlineBox* highest = 0);
328
329 Position positionForBox(InlineBox*, bool start = true) const; 325 Position positionForBox(InlineBox*, bool start = true) const;
330 PositionWithAffinity positionForPointWithInlineChildren(const LayoutPoint&); 326 PositionWithAffinity positionForPointWithInlineChildren(const LayoutPoint&);
331 327
332 // End helper functions and structs used by layoutBlockChildren. 328 // End helper functions and structs used by layoutChildren.
333 329
334 void removeFromGlobalMaps(); 330 void removeFromGlobalMaps();
335 bool widthAvailableToChildrenHasChanged(); 331 bool widthAvailableToChildrenHasChanged();
336 332
337 protected: 333 protected:
338 bool createsBlockFormattingContext() const; 334 bool createsBlockFormattingContext() const;
339 335
340 // Adjust from painting offsets to the local coords of this renderer 336 // Adjust from painting offsets to the local coords of this renderer
341 void offsetForContents(LayoutPoint&) const; 337 void offsetForContents(LayoutPoint&) const;
342 338
(...skipping 10 matching lines...) Expand all
353 unsigned m_beingDestroyed : 1; 349 unsigned m_beingDestroyed : 1;
354 unsigned m_hasMarkupTruncation : 1; 350 unsigned m_hasMarkupTruncation : 1;
355 unsigned m_hasBorderOrPaddingLogicalWidthChanged : 1; 351 unsigned m_hasBorderOrPaddingLogicalWidthChanged : 1;
356 352
357 // FIXME-BLOCKFLOW: Remove this when the line layout stuff has all moved out of RenderBlock 353 // FIXME-BLOCKFLOW: Remove this when the line layout stuff has all moved out of RenderBlock
358 friend class LineBreaker; 354 friend class LineBreaker;
359 355
360 // FIXME: This is temporary as we move code that accesses block flow 356 // FIXME: This is temporary as we move code that accesses block flow
361 // member variables out of RenderBlock and into RenderBlockFlow. 357 // member variables out of RenderBlock and into RenderBlockFlow.
362 friend class RenderBlockFlow; 358 friend class RenderBlockFlow;
359 friend class RenderParagraph;
363 }; 360 };
364 361
365 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); 362 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock());
366 363
367 } // namespace blink 364 } // namespace blink
368 365
369 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCK_H_ 366 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCK_H_
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/InlineTextBox.cpp ('k') | sky/engine/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698