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

Unified Diff: Source/core/rendering/RenderBlock.h

Issue 23855004: Refactoring LineBreaker and RenderTextInfo out of RenderBlock.h (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixing silly mistake. Created 7 years, 3 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
« no previous file with comments | « no previous file | Source/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBlock.h
diff --git a/Source/core/rendering/RenderBlock.h b/Source/core/rendering/RenderBlock.h
index c09bbf8240ae2c281be387f2a4b6bba843921421..50fe7f800e3cf923655355db9a556b5765def0bb 100644
--- a/Source/core/rendering/RenderBlock.h
+++ b/Source/core/rendering/RenderBlock.h
@@ -49,6 +49,7 @@ class RenderText;
struct BidiRun;
struct PaintInfo;
+class LineBreaker;
class LineInfo;
class RenderRubyRun;
class TextLayout;
@@ -675,44 +676,6 @@ private:
LayoutPoint computeLogicalLocationForFloat(const FloatingObject*, LayoutUnit logicalTopOffset) const;
- // The following functions' implementations are in RenderBlockLineLayout.cpp.
- struct RenderTextInfo {
- // Destruction of m_layout requires TextLayout to be a complete type, so the constructor and destructor are made non-inline to avoid compilation errors.
- RenderTextInfo();
- ~RenderTextInfo();
-
- RenderText* m_text;
- OwnPtr<TextLayout> m_layout;
- LazyLineBreakIterator m_lineBreakIterator;
- const Font* m_font;
- };
-
- class LineBreaker {
- public:
- LineBreaker(RenderBlock* block)
- : m_block(block)
- {
- reset();
- }
-
- InlineIterator nextLineBreak(InlineBidiResolver&, LineInfo&, RenderTextInfo&, FloatingObject* lastFloatFromPreviousLine, unsigned consecutiveHyphenatedLines, WordMeasurements&);
-
- bool lineWasHyphenated() { return m_hyphenated; }
- const Vector<RenderBox*>& positionedObjects() { return m_positionedObjects; }
- EClear clear() { return m_clear; }
- private:
- void reset();
-
- InlineIterator nextSegmentBreak(InlineBidiResolver&, LineInfo&, RenderTextInfo&, FloatingObject* lastFloatFromPreviousLine, unsigned consecutiveHyphenatedLines, WordMeasurements&);
- void skipTrailingWhitespace(InlineIterator&, const LineInfo&);
- void skipLeadingWhitespace(InlineBidiResolver&, LineInfo&, FloatingObject* lastFloatFromPreviousLine, LineWidth&);
-
- RenderBlock* m_block;
- bool m_hyphenated;
- EClear m_clear;
- Vector<RenderBox*> m_positionedObjects;
- };
-
void checkFloatsInCleanLine(RootInlineBox*, Vector<FloatWithRect>&, size_t& floatIndex, bool& encounteredNewFloat, bool& dirtiedByFloat);
RootInlineBox* determineStartPosition(LineLayoutState&, InlineBidiResolver&);
void determineEndPosition(LineLayoutState&, RootInlineBox* startBox, InlineIterator& cleanLineStart, BidiStatus& cleanLineBidiStatus);
@@ -1081,6 +1044,7 @@ protected:
// RenderRubyBase objects need to be able to split and merge, moving their children around
// (calling moveChildTo, moveAllChildrenTo, and makeChildrenNonInline).
friend class RenderRubyBase;
+ friend class LineBreaker;
friend class LineWidth; // Needs to know FloatingObject
private:
« no previous file with comments | « no previous file | Source/core/rendering/RenderBlockLineLayout.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698