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

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

Issue 754493002: Start splitting RenderParagraph logic out of RenderBlock (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: preland 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 | « no previous file | 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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 virtual bool hasLineIfEmpty() const; 259 virtual bool hasLineIfEmpty() const;
260 260
261 bool simplifiedLayout(); 261 bool simplifiedLayout();
262 virtual void simplifiedNormalFlowLayout(); 262 virtual void simplifiedNormalFlowLayout();
263 263
264 public: 264 public:
265 virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool = false); 265 virtual void computeOverflow(LayoutUnit oldClientAfterEdge, bool = false);
266 protected: 266 protected:
267 virtual void addOverflowFromChildren(); 267 virtual void addOverflowFromChildren();
268 void addOverflowFromPositionedObjects(); 268 void addOverflowFromPositionedObjects();
269 void addOverflowFromBlockChildren();
270 269
271 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer = 0) const override; 270 virtual void addFocusRingRects(Vector<IntRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer = 0) const override;
272 271
273 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox* ); 272 void updateBlockChildDirtyBitsBeforeLayout(bool relayoutChildren, RenderBox* );
274 273
275 virtual bool isInlineBlock() const override final { return isInline() && isR eplaced(); } 274 virtual bool isInlineBlock() const override final { return isInline() && isR eplaced(); }
276 275
277 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override; 276 virtual void invalidateTreeIfNeeded(const PaintInvalidationState&) override;
278 277
278 virtual void paintContents(PaintInfo&, const LayoutPoint&);
279
280 virtual bool hitTestContents(const HitTestRequest&, HitTestResult&, const Hi tTestLocation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTes tAction);
281
279 private: 282 private:
280 virtual RenderObjectChildList* virtualChildren() override final { return chi ldren(); } 283 virtual RenderObjectChildList* virtualChildren() override final { return chi ldren(); }
281 virtual const RenderObjectChildList* virtualChildren() const override final { return children(); } 284 virtual const RenderObjectChildList* virtualChildren() const override final { return children(); }
282 285
283 virtual const char* renderName() const override; 286 virtual const char* renderName() const override;
284 287
285 virtual bool isRenderBlock() const override final { return true; } 288 virtual bool isRenderBlock() const override final { return true; }
286 289
287 virtual void dirtyLinesFromChangedChild(RenderObject* child) override final { m_lineBoxes.dirtyLinesFromChangedChild(this, child); } 290 virtual void dirtyLinesFromChangedChild(RenderObject* child) override final { m_lineBoxes.dirtyLinesFromChangedChild(this, child); }
288 291
289 void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObj ect* beforeChild = 0); 292 void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObj ect* beforeChild = 0);
290 293
291 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&); 294 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&);
292 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&); 295 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&);
293 296
294 void paintContents(PaintInfo&, const LayoutPoint&);
295 void paintSelection(PaintInfo&, const LayoutPoint&); 297 void paintSelection(PaintInfo&, const LayoutPoint&);
296 void paintCarets(PaintInfo&, const LayoutPoint&); 298 void paintCarets(PaintInfo&, const LayoutPoint&);
297 299
298 bool hasCaret() const; 300 bool hasCaret() const;
299 301
300 bool hitTestContents(const HitTestRequest&, HitTestResult&, const HitTestLoc ation& locationInContainer, const LayoutPoint& accumulatedOffset, HitTestAction) ;
301
302 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const; 302 void computeBlockPreferredLogicalWidths(LayoutUnit& minLogicalWidth, LayoutU nit& maxLogicalWidth) const;
303 303
304 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline 304 // Obtains the nearest enclosing block (including this block) that contribut es a first-line style to our inline
305 // children. 305 // children.
306 virtual RenderBlock* firstLineBlock() const override; 306 virtual RenderBlock* firstLineBlock() const override;
307 307
308 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO bject* paintInvalidationContainer, bool /*clipToVisibleContent*/) override final 308 virtual LayoutRect selectionRectForPaintInvalidation(const RenderLayerModelO bject* paintInvalidationContainer, bool /*clipToVisibleContent*/) override final
309 { 309 {
310 return selectionGapRectsForPaintInvalidation(paintInvalidationContainer) ; 310 return selectionGapRectsForPaintInvalidation(paintInvalidationContainer) ;
311 } 311 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 // FIXME: This is temporary as we move code that accesses block flow 360 // FIXME: This is temporary as we move code that accesses block flow
361 // member variables out of RenderBlock and into RenderBlockFlow. 361 // member variables out of RenderBlock and into RenderBlockFlow.
362 friend class RenderBlockFlow; 362 friend class RenderBlockFlow;
363 }; 363 };
364 364
365 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); 365 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock());
366 366
367 } // namespace blink 367 } // namespace blink
368 368
369 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCK_H_ 369 #endif // SKY_ENGINE_CORE_RENDERING_RENDERBLOCK_H_
OLDNEW
« no previous file with comments | « no previous file | sky/engine/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698