OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 25 matching lines...) Expand all Loading... |
36 #include "platform/heap/Handle.h" | 36 #include "platform/heap/Handle.h" |
37 #include "wtf/HashMap.h" | 37 #include "wtf/HashMap.h" |
38 #include "wtf/HashSet.h" | 38 #include "wtf/HashSet.h" |
39 #include "wtf/Noncopyable.h" | 39 #include "wtf/Noncopyable.h" |
40 #include "wtf/OwnPtr.h" | 40 #include "wtf/OwnPtr.h" |
41 #include "wtf/PassOwnPtr.h" | 41 #include "wtf/PassOwnPtr.h" |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
45 class Document; | 45 class Document; |
| 46 class LayoutListItem; |
| 47 class LayoutListMarker; |
46 class RenderBlock; | 48 class RenderBlock; |
47 class RenderListItem; | |
48 class RenderListMarker; | |
49 | 49 |
50 // Single-pass text autosizer. Documentation at: | 50 // Single-pass text autosizer. Documentation at: |
51 // http://tinyurl.com/TextAutosizer | 51 // http://tinyurl.com/TextAutosizer |
52 | 52 |
53 class TextAutosizer final : public NoBaseWillBeGarbageCollectedFinalized<TextAut
osizer> { | 53 class TextAutosizer final : public NoBaseWillBeGarbageCollectedFinalized<TextAut
osizer> { |
54 WTF_MAKE_NONCOPYABLE(TextAutosizer); | 54 WTF_MAKE_NONCOPYABLE(TextAutosizer); |
55 public: | 55 public: |
56 static PassOwnPtrWillBeRawPtr<TextAutosizer> create(const Document* document
) | 56 static PassOwnPtrWillBeRawPtr<TextAutosizer> create(const Document* document
) |
57 { | 57 { |
58 return adoptPtrWillBeNoop(new TextAutosizer(document)); | 58 return adoptPtrWillBeNoop(new TextAutosizer(document)); |
59 } | 59 } |
60 static float computeAutosizedFontSize(float specifiedSize, float multiplier)
; | 60 static float computeAutosizedFontSize(float specifiedSize, float multiplier)
; |
61 | 61 |
62 void updatePageInfoInAllFrames(); | 62 void updatePageInfoInAllFrames(); |
63 void updatePageInfo(); | 63 void updatePageInfo(); |
64 void record(const RenderBlock*); | 64 void record(const RenderBlock*); |
65 void destroy(const RenderBlock*); | 65 void destroy(const RenderBlock*); |
66 void inflateListItem(RenderListItem*, RenderListMarker*); | 66 void inflateListItem(LayoutListItem*, LayoutListMarker*); |
67 | 67 |
68 DECLARE_TRACE(); | 68 DECLARE_TRACE(); |
69 | 69 |
70 class LayoutScope { | 70 class LayoutScope { |
71 public: | 71 public: |
72 explicit LayoutScope(RenderBlock*); | 72 explicit LayoutScope(RenderBlock*); |
73 ~LayoutScope(); | 73 ~LayoutScope(); |
74 protected: | 74 protected: |
75 TextAutosizer* m_textAutosizer; | 75 TextAutosizer* m_textAutosizer; |
76 RenderBlock* m_block; | 76 RenderBlock* m_block; |
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
306 FingerprintMapper m_fingerprintMapper; | 306 FingerprintMapper m_fingerprintMapper; |
307 Vector<RefPtr<LayoutStyle>> m_stylesRetainedDuringLayout; | 307 Vector<RefPtr<LayoutStyle>> m_stylesRetainedDuringLayout; |
308 // FIXME: All frames should share the same m_pageInfo instance. | 308 // FIXME: All frames should share the same m_pageInfo instance. |
309 PageInfo m_pageInfo; | 309 PageInfo m_pageInfo; |
310 bool m_updatePageInfoDeferred; | 310 bool m_updatePageInfoDeferred; |
311 }; | 311 }; |
312 | 312 |
313 } // namespace blink | 313 } // namespace blink |
314 | 314 |
315 #endif // TextAutosizer_h | 315 #endif // TextAutosizer_h |
OLD | NEW |