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

Side by Side Diff: Source/core/rendering/RenderBlock.h

Issue 414863002: Minimize RenderObject* casting to RenderText* (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/InlineTextBox.cpp ('k') | Source/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 19 matching lines...) Expand all
30 #include "core/rendering/RenderLineBoxList.h" 30 #include "core/rendering/RenderLineBoxList.h"
31 #include "core/rendering/RootInlineBox.h" 31 #include "core/rendering/RootInlineBox.h"
32 #include "core/rendering/style/ShapeValue.h" 32 #include "core/rendering/style/ShapeValue.h"
33 #include "platform/text/TextBreakIterator.h" 33 #include "platform/text/TextBreakIterator.h"
34 #include "platform/text/TextRun.h" 34 #include "platform/text/TextRun.h"
35 #include "wtf/ListHashSet.h" 35 #include "wtf/ListHashSet.h"
36 #include "wtf/OwnPtr.h" 36 #include "wtf/OwnPtr.h"
37 37
38 namespace blink { 38 namespace blink {
39 39
40 class LineInfo;
40 class LineLayoutState; 41 class LineLayoutState;
42 struct PaintInfo;
41 class RenderInline; 43 class RenderInline;
42 44 class RenderRubyRun;
43 struct PaintInfo; 45 class RenderText;
44 class WordMeasurement; 46 class WordMeasurement;
45 47
46 class LineInfo;
47 class RenderRubyRun;
48
49 template <class Run> class BidiRunList; 48 template <class Run> class BidiRunList;
50 typedef WTF::ListHashSet<RenderBox*, 16> TrackedRendererListHashSet; 49 typedef WTF::ListHashSet<RenderBox*, 16> TrackedRendererListHashSet;
51 typedef WTF::HashMap<const RenderBlock*, OwnPtr<TrackedRendererListHashSet> > Tr ackedDescendantsMap; 50 typedef WTF::HashMap<const RenderBlock*, OwnPtr<TrackedRendererListHashSet> > Tr ackedDescendantsMap;
52 typedef WTF::HashMap<const RenderBox*, OwnPtr<HashSet<RenderBlock*> > > TrackedC ontainerMap; 51 typedef WTF::HashMap<const RenderBox*, OwnPtr<HashSet<RenderBlock*> > > TrackedC ontainerMap;
53 typedef Vector<WordMeasurement, 64> WordMeasurements; 52 typedef Vector<WordMeasurement, 64> WordMeasurements;
54 53
55 enum ContainingBlockState { NewContainingBlock, SameContainingBlock }; 54 enum ContainingBlockState { NewContainingBlock, SameContainingBlock };
56 55
57 class RenderBlock : public RenderBox { 56 class RenderBlock : public RenderBox {
58 public: 57 public:
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 virtual void addChildIgnoringContinuation(RenderObject* newChild, RenderObje ct* beforeChild) OVERRIDE; 350 virtual void addChildIgnoringContinuation(RenderObject* newChild, RenderObje ct* beforeChild) OVERRIDE;
352 void addChildToAnonymousColumnBlocks(RenderObject* newChild, RenderObject* b eforeChild); 351 void addChildToAnonymousColumnBlocks(RenderObject* newChild, RenderObject* b eforeChild);
353 352
354 void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObj ect* beforeChild = 0); 353 void addChildIgnoringAnonymousColumnBlocks(RenderObject* newChild, RenderObj ect* beforeChild = 0);
355 354
356 virtual bool isSelfCollapsingBlock() const OVERRIDE; 355 virtual bool isSelfCollapsingBlock() const OVERRIDE;
357 356
358 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&); 357 void insertIntoTrackedRendererMaps(RenderBox* descendant, TrackedDescendants Map*&, TrackedContainerMap*&);
359 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&); 358 static void removeFromTrackedRendererMaps(RenderBox* descendant, TrackedDesc endantsMap*&, TrackedContainerMap*&);
360 359
361 void createFirstLetterRenderer(RenderObject* firstLetterBlock, RenderObject* currentChild, unsigned length); 360 void createFirstLetterRenderer(RenderObject* firstLetterBlock, RenderText& c urrentChild, unsigned length);
362 void updateFirstLetterStyle(RenderObject* firstLetterBlock, RenderObject* fi rstLetterContainer); 361 void updateFirstLetterStyle(RenderObject* firstLetterBlock, RenderObject* fi rstLetterContainer);
363 362
364 Node* nodeForHitTest() const; 363 Node* nodeForHitTest() const;
365 364
366 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow 365 // FIXME-BLOCKFLOW: Remove virtualizaion when all callers have moved to Rend erBlockFlow
367 virtual void paintFloats(PaintInfo&, const LayoutPoint&, bool) { } 366 virtual void paintFloats(PaintInfo&, const LayoutPoint&, bool) { }
368 void paintContents(PaintInfo&, const LayoutPoint&); 367 void paintContents(PaintInfo&, const LayoutPoint&);
369 void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats = false); 368 void paintColumnContents(PaintInfo&, const LayoutPoint&, bool paintFloats = false);
370 void paintColumnRules(PaintInfo&, const LayoutPoint&); 369 void paintColumnRules(PaintInfo&, const LayoutPoint&);
371 void paintSelection(PaintInfo&, const LayoutPoint&); 370 void paintSelection(PaintInfo&, const LayoutPoint&);
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
506 // FIXME: This is temporary as we move code that accesses block flow 505 // FIXME: This is temporary as we move code that accesses block flow
507 // member variables out of RenderBlock and into RenderBlockFlow. 506 // member variables out of RenderBlock and into RenderBlockFlow.
508 friend class RenderBlockFlow; 507 friend class RenderBlockFlow;
509 }; 508 };
510 509
511 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock()); 510 DEFINE_RENDER_OBJECT_TYPE_CASTS(RenderBlock, isRenderBlock());
512 511
513 } // namespace blink 512 } // namespace blink
514 513
515 #endif // RenderBlock_h 514 #endif // RenderBlock_h
OLDNEW
« no previous file with comments | « Source/core/rendering/InlineTextBox.cpp ('k') | Source/core/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698