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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutState.h

Issue 1833493003: Remove ForceHorriblySlowRectMapping (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@pi
Patch Set: Created 4 years, 8 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) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 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
26 #ifndef LayoutState_h 26 #ifndef LayoutState_h
27 #define LayoutState_h 27 #define LayoutState_h
28 28
29 #include "platform/geometry/LayoutRect.h" 29 #include "platform/geometry/LayoutRect.h"
30 #include "wtf/Allocator.h" 30 #include "wtf/Allocator.h"
31 #include "wtf/HashMap.h" 31 #include "wtf/HashMap.h"
32 #include "wtf/Noncopyable.h" 32 #include "wtf/Noncopyable.h"
33 33
34 namespace blink { 34 namespace blink {
35 35
36 class ForceHorriblySlowRectMapping;
37 class LayoutBox; 36 class LayoutBox;
38 class LayoutFlowThread; 37 class LayoutFlowThread;
39 class LayoutObject; 38 class LayoutObject;
40 class LayoutView; 39 class LayoutView;
41 40
42 // LayoutState is an optimization used during layout. 41 // LayoutState is an optimization used during layout.
43 // 42 //
44 // LayoutState's purpose is to cache information as we walk down the container 43 // LayoutState's purpose is to cache information as we walk down the container
45 // block chain during layout. In particular, the absolute layout offset for the 44 // block chain during layout. In particular, the absolute layout offset for the
46 // current LayoutObject is O(1) when using LayoutState, when it is 45 // current LayoutObject is O(1) when using LayoutState, when it is
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; } 86 bool pageLogicalHeightChanged() const { return m_pageLogicalHeightChanged; }
88 bool containingBlockLogicalWidthChanged() const { return m_containingBlockLo gicalWidthChanged; } 87 bool containingBlockLogicalWidthChanged() const { return m_containingBlockLo gicalWidthChanged; }
89 88
90 LayoutState* next() const { return m_next; } 89 LayoutState* next() const { return m_next; }
91 90
92 LayoutFlowThread* flowThread() const { return m_flowThread; } 91 LayoutFlowThread* flowThread() const { return m_flowThread; }
93 92
94 LayoutObject& layoutObject() const { return m_layoutObject; } 93 LayoutObject& layoutObject() const { return m_layoutObject; }
95 94
96 private: 95 private:
97 friend class ForceHorriblySlowRectMapping;
98
99 // Do not add anything apart from bitfields until after m_flowThread. See ht tps://bugs.webkit.org/show_bug.cgi?id=100173 96 // Do not add anything apart from bitfields until after m_flowThread. See ht tps://bugs.webkit.org/show_bug.cgi?id=100173
100 bool m_isPaginated : 1; 97 bool m_isPaginated : 1;
101 // If our page height has changed, this will force all blocks to relayout. 98 // If our page height has changed, this will force all blocks to relayout.
102 bool m_pageLogicalHeightChanged : 1; 99 bool m_pageLogicalHeightChanged : 1;
103 bool m_containingBlockLogicalWidthChanged : 1; 100 bool m_containingBlockLogicalWidthChanged : 1;
104 101
105 LayoutFlowThread* m_flowThread; 102 LayoutFlowThread* m_flowThread;
106 103
107 LayoutState* m_next; 104 LayoutState* m_next;
108 105
109 // x/y offset from container. Does not include relative positioning or scrol l offsets. 106 // x/y offset from container. Does not include relative positioning or scrol l offsets.
110 LayoutSize m_layoutOffset; 107 LayoutSize m_layoutOffset;
111 108
112 // The current page height for the pagination model that encloses us. 109 // The current page height for the pagination model that encloses us.
113 LayoutUnit m_pageLogicalHeight; 110 LayoutUnit m_pageLogicalHeight;
114 // The offset of the start of the first page in the nearest enclosing pagina tion model. 111 // The offset of the start of the first page in the nearest enclosing pagina tion model.
115 LayoutSize m_pageOffset; 112 LayoutSize m_pageOffset;
116 113
117 LayoutObject& m_layoutObject; 114 LayoutObject& m_layoutObject;
118 }; 115 };
119 116
120 } // namespace blink 117 } // namespace blink
121 118
122 #endif // LayoutState_h 119 #endif // LayoutState_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698