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

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

Issue 2405633002: Reformat comments in core/layout (Closed)
Patch Set: Created 4 years, 2 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * Copyright (C) 2006 Apple Computer, Inc. 3 * Copyright (C) 2006 Apple Computer, Inc.
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // 57 //
58 // Because there is one LayoutView per rooted layout tree (or Frame), this class 58 // Because there is one LayoutView per rooted layout tree (or Frame), this class
59 // is used to add members shared by this tree (e.g. m_layoutState or 59 // is used to add members shared by this tree (e.g. m_layoutState or
60 // m_layoutQuoteHead). 60 // m_layoutQuoteHead).
61 class CORE_EXPORT LayoutView final : public LayoutBlockFlow { 61 class CORE_EXPORT LayoutView final : public LayoutBlockFlow {
62 public: 62 public:
63 explicit LayoutView(Document*); 63 explicit LayoutView(Document*);
64 ~LayoutView() override; 64 ~LayoutView() override;
65 void willBeDestroyed() override; 65 void willBeDestroyed() override;
66 66
67 // hitTest() will update layout, style and compositing first while hitTestNoLi fecycleUpdate() does not. 67 // hitTest() will update layout, style and compositing first while
68 // hitTestNoLifecycleUpdate() does not.
68 bool hitTest(HitTestResult&); 69 bool hitTest(HitTestResult&);
69 bool hitTestNoLifecycleUpdate(HitTestResult&); 70 bool hitTestNoLifecycleUpdate(HitTestResult&);
70 71
71 // Returns the total count of calls to HitTest, for testing. 72 // Returns the total count of calls to HitTest, for testing.
72 unsigned hitTestCount() const { return m_hitTestCount; } 73 unsigned hitTestCount() const { return m_hitTestCount; }
73 unsigned hitTestCacheHits() const { return m_hitTestCacheHits; } 74 unsigned hitTestCacheHits() const { return m_hitTestCacheHits; }
74 75
75 void clearHitTestCache(); 76 void clearHitTestCache();
76 77
77 const char* name() const override { return "LayoutView"; } 78 const char* name() const override { return "LayoutView"; }
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Notification that this view moved into or out of a native window. 179 // Notification that this view moved into or out of a native window.
179 void setIsInWindow(bool); 180 void setIsInWindow(bool);
180 181
181 PaintLayerCompositor* compositor(); 182 PaintLayerCompositor* compositor();
182 bool usesCompositing() const; 183 bool usesCompositing() const;
183 184
184 LayoutRect backgroundRect(LayoutBox* backgroundLayoutObject) const; 185 LayoutRect backgroundRect(LayoutBox* backgroundLayoutObject) const;
185 186
186 IntRect documentRect() const; 187 IntRect documentRect() const;
187 188
188 // LayoutObject that paints the root background has background-images which al l have background-attachment: fixed. 189 // LayoutObject that paints the root background has background-images which
190 // all have background-attachment: fixed.
189 bool rootBackgroundIsEntirelyFixed() const; 191 bool rootBackgroundIsEntirelyFixed() const;
190 192
191 IntervalArena* intervalArena(); 193 IntervalArena* intervalArena();
192 194
193 void setLayoutQuoteHead(LayoutQuote* head) { m_layoutQuoteHead = head; } 195 void setLayoutQuoteHead(LayoutQuote* head) { m_layoutQuoteHead = head; }
194 LayoutQuote* layoutQuoteHead() const { return m_layoutQuoteHead; } 196 LayoutQuote* layoutQuoteHead() const { return m_layoutQuoteHead; }
195 197
196 // FIXME: This is a work around because the current implementation of counters 198 // FIXME: This is a work around because the current implementation of counters
197 // requires walking the entire tree repeatedly and most pages don't actually u se either 199 // requires walking the entire tree repeatedly and most pages don't actually
198 // feature so we shouldn't take the performance hit when not needed. Long term we should 200 // use either feature so we shouldn't take the performance hit when not
199 // rewrite the counter and quotes code. 201 // needed. Long term we should rewrite the counter and quotes code.
200 void addLayoutCounter() { m_layoutCounterCount++; } 202 void addLayoutCounter() { m_layoutCounterCount++; }
201 void removeLayoutCounter() { 203 void removeLayoutCounter() {
202 ASSERT(m_layoutCounterCount > 0); 204 ASSERT(m_layoutCounterCount > 0);
203 m_layoutCounterCount--; 205 m_layoutCounterCount--;
204 } 206 }
205 bool hasLayoutCounters() { return m_layoutCounterCount; } 207 bool hasLayoutCounters() { return m_layoutCounterCount; }
206 208
207 bool backgroundIsKnownToBeOpaqueInRect( 209 bool backgroundIsKnownToBeOpaqueInRect(
208 const LayoutRect& localRect) const override; 210 const LayoutRect& localRect) const override;
209 211
210 // Returns the viewport size in (CSS pixels) that vh and vw units are calculat ed from. 212 // Returns the viewport size in (CSS pixels) that vh and vw units are
213 // calculated from.
211 FloatSize viewportSizeForViewportUnits() const; 214 FloatSize viewportSizeForViewportUnits() const;
212 215
213 void pushLayoutState(LayoutState& layoutState) { 216 void pushLayoutState(LayoutState& layoutState) {
214 m_layoutState = &layoutState; 217 m_layoutState = &layoutState;
215 } 218 }
216 void popLayoutState() { 219 void popLayoutState() {
217 ASSERT(m_layoutState); 220 ASSERT(m_layoutState);
218 m_layoutState = m_layoutState->next(); 221 m_layoutState = m_layoutState->next();
219 } 222 }
220 223
221 LayoutRect visualOverflowRect() const override; 224 LayoutRect visualOverflowRect() const override;
222 LayoutRect localOverflowRectForPaintInvalidation() const override; 225 LayoutRect localOverflowRectForPaintInvalidation() const override;
223 226
224 // Invalidates paint for the entire view, including composited descendants, bu t not including child frames. 227 // Invalidates paint for the entire view, including composited descendants,
228 // but not including child frames.
225 // It is very likely you do not want to call this method. 229 // It is very likely you do not want to call this method.
226 void setShouldDoFullPaintInvalidationForViewAndAllDescendants(); 230 void setShouldDoFullPaintInvalidationForViewAndAllDescendants();
227 231
228 // The document scrollbar is always on the right, even in RTL. This is to prev ent it from moving around on navigations. 232 // The document scrollbar is always on the right, even in RTL. This is to
229 // TODO(skobes): This is not quite the ideal behavior, see http://crbug.com/25 0514 and http://crbug.com/249860. 233 // prevent it from moving around on navigations.
234 // TODO(skobes): This is not quite the ideal behavior, see
235 // http://crbug.com/250514 and http://crbug.com/249860.
230 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const override { 236 bool shouldPlaceBlockDirectionScrollbarOnLogicalLeft() const override {
231 return false; 237 return false;
232 } 238 }
233 239
234 // Some LayoutMedias want to know about their viewport visibility for 240 // Some LayoutMedias want to know about their viewport visibility for
235 // crbug.com/487345,402044 . This facility will be removed once those 241 // crbug.com/487345,402044 . This facility will be removed once those
236 // experiments complete. 242 // experiments complete.
237 // TODO(ojan): Merge this with IntersectionObserver once it lands. 243 // TODO(ojan): Merge this with IntersectionObserver once it lands.
238 void registerMediaForPositionChangeNotification(LayoutMedia&); 244 void registerMediaForPositionChangeNotification(LayoutMedia&);
239 void unregisterMediaForPositionChangeNotification(LayoutMedia&); 245 void unregisterMediaForPositionChangeNotification(LayoutMedia&);
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 Persistent<HitTestCache> m_hitTestCache; 328 Persistent<HitTestCache> m_hitTestCache;
323 329
324 Vector<LayoutMedia*> m_mediaForPositionNotification; 330 Vector<LayoutMedia*> m_mediaForPositionNotification;
325 }; 331 };
326 332
327 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView()); 333 DEFINE_LAYOUT_OBJECT_TYPE_CASTS(LayoutView, isLayoutView());
328 334
329 } // namespace blink 335 } // namespace blink
330 336
331 #endif // LayoutView_h 337 #endif // LayoutView_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutVideo.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698