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

Side by Side Diff: Source/core/rendering/line/LineWidth.h

Issue 337113005: Reduce forward declarations in core/rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 6 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) 2013 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 17 matching lines...) Expand all
28 */ 28 */
29 29
30 #ifndef LineWidth_h 30 #ifndef LineWidth_h
31 #define LineWidth_h 31 #define LineWidth_h
32 32
33 #include "platform/LayoutUnit.h" 33 #include "platform/LayoutUnit.h"
34 34
35 namespace WebCore { 35 namespace WebCore {
36 36
37 class FloatingObject; 37 class FloatingObject;
38 class RenderBlock;
39 class RenderObject; 38 class RenderObject;
40 class RenderRubyRun; 39 class RenderRubyRun;
41 class RenderBlockFlow; 40 class RenderBlockFlow;
42 41
43 struct LineSegment;
44
45 enum IndentTextOrNot { DoNotIndentText, IndentText }; 42 enum IndentTextOrNot { DoNotIndentText, IndentText };
46 43
47 class LineWidth { 44 class LineWidth {
48 public: 45 public:
49 LineWidth(RenderBlockFlow&, bool isFirstLine, IndentTextOrNot shouldIndentTe xt); 46 LineWidth(RenderBlockFlow&, bool isFirstLine, IndentTextOrNot shouldIndentTe xt);
50 47
51 bool fitsOnLine() const { return currentWidth() <= (m_availableWidth + Layou tUnit::epsilon()); } 48 bool fitsOnLine() const { return currentWidth() <= (m_availableWidth + Layou tUnit::epsilon()); }
52 bool fitsOnLine(float extra) const { return currentWidth() + extra <= (m_ava ilableWidth + LayoutUnit::epsilon()); } 49 bool fitsOnLine(float extra) const { return currentWidth() + extra <= (m_ava ilableWidth + LayoutUnit::epsilon()); }
53 50
54 float currentWidth() const { return m_committedWidth + m_uncommittedWidth; } 51 float currentWidth() const { return m_committedWidth + m_uncommittedWidth; }
(...skipping 23 matching lines...) Expand all
78 float m_left; 75 float m_left;
79 float m_right; 76 float m_right;
80 float m_availableWidth; 77 float m_availableWidth;
81 bool m_isFirstLine; 78 bool m_isFirstLine;
82 IndentTextOrNot m_shouldIndentText; 79 IndentTextOrNot m_shouldIndentText;
83 }; 80 };
84 81
85 } 82 }
86 83
87 #endif // LineWidth_h 84 #endif // LineWidth_h
OLDNEW
« no previous file with comments | « Source/core/rendering/line/LineLayoutState.h ('k') | Source/core/rendering/style/KeyframeList.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698