| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 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 copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 | 43 |
| 44 class TextAutosizer { | 44 class TextAutosizer { |
| 45 WTF_MAKE_NONCOPYABLE(TextAutosizer); | 45 WTF_MAKE_NONCOPYABLE(TextAutosizer); |
| 46 | 46 |
| 47 public: | 47 public: |
| 48 static PassOwnPtr<TextAutosizer> create(Document* document) { return adoptPt
r(new TextAutosizer(document)); } | 48 static PassOwnPtr<TextAutosizer> create(Document* document) { return adoptPt
r(new TextAutosizer(document)); } |
| 49 | 49 |
| 50 virtual ~TextAutosizer(); | 50 virtual ~TextAutosizer(); |
| 51 | 51 |
| 52 bool processSubtree(RenderObject* layoutRoot); | 52 bool processSubtree(RenderObject* layoutRoot); |
| 53 void recalculateMultipliers(); |
| 53 | 54 |
| 54 static float computeAutosizedFontSize(float specifiedSize, float multiplier)
; | 55 static float computeAutosizedFontSize(float specifiedSize, float multiplier)
; |
| 55 | 56 |
| 56 private: | 57 private: |
| 57 enum TraversalDirection { | 58 enum TraversalDirection { |
| 58 FirstToLast, | 59 FirstToLast, |
| 59 LastToFirst | 60 LastToFirst |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 explicit TextAutosizer(Document*); | 63 explicit TextAutosizer(Document*); |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 static void getNarrowDescendantsGroupedByWidth(const TextAutosizingClusterIn
fo& parentClusterInfo, Vector<Vector<TextAutosizingClusterInfo> >&); | 98 static void getNarrowDescendantsGroupedByWidth(const TextAutosizingClusterIn
fo& parentClusterInfo, Vector<Vector<TextAutosizingClusterInfo> >&); |
| 98 | 99 |
| 99 Document* m_document; | 100 Document* m_document; |
| 100 }; | 101 }; |
| 101 | 102 |
| 102 } // namespace WebCore | 103 } // namespace WebCore |
| 103 | 104 |
| 104 #endif // ENABLE(TEXT_AUTOSIZING) | 105 #endif // ENABLE(TEXT_AUTOSIZING) |
| 105 | 106 |
| 106 #endif // TextAutosizer_h | 107 #endif // TextAutosizer_h |
| OLD | NEW |