OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2010 Apple 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 15 matching lines...) Expand all Loading... |
26 #ifndef VerticalPositionCache_h | 26 #ifndef VerticalPositionCache_h |
27 #define VerticalPositionCache_h | 27 #define VerticalPositionCache_h |
28 | 28 |
29 #include "core/layout/api/LineLayoutItem.h" | 29 #include "core/layout/api/LineLayoutItem.h" |
30 #include "platform/fonts/FontBaseline.h" | 30 #include "platform/fonts/FontBaseline.h" |
31 #include "wtf/Allocator.h" | 31 #include "wtf/Allocator.h" |
32 #include "wtf/HashMap.h" | 32 #include "wtf/HashMap.h" |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 class LayoutObject; | |
37 | |
38 // Values for vertical alignment. | 36 // Values for vertical alignment. |
39 const int PositionUndefined = 0x80000000; | 37 const int PositionUndefined = 0x80000000; |
40 | 38 |
41 class VerticalPositionCache { | 39 class VerticalPositionCache { |
42 STACK_ALLOCATED(); | 40 STACK_ALLOCATED(); |
43 WTF_MAKE_NONCOPYABLE(VerticalPositionCache); | 41 WTF_MAKE_NONCOPYABLE(VerticalPositionCache); |
44 | 42 |
45 public: | 43 public: |
46 VerticalPositionCache() {} | 44 VerticalPositionCache() {} |
47 | 45 |
(...skipping 18 matching lines...) Expand all Loading... |
66 } | 64 } |
67 | 65 |
68 private: | 66 private: |
69 HashMap<LineLayoutItem, int> m_alphabeticPositions; | 67 HashMap<LineLayoutItem, int> m_alphabeticPositions; |
70 HashMap<LineLayoutItem, int> m_ideographicPositions; | 68 HashMap<LineLayoutItem, int> m_ideographicPositions; |
71 }; | 69 }; |
72 | 70 |
73 } // namespace blink | 71 } // namespace blink |
74 | 72 |
75 #endif // VerticalPositionCache_h | 73 #endif // VerticalPositionCache_h |
OLD | NEW |