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

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

Issue 2280153002: Refactoring out the code in LayoutTreeAsText::writeLayoutObject. (Closed)
Patch Set: Codereview update Created 4 years, 3 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) 2000 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 2000 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Antti Koivisto (koivisto@kde.org) 3 * (C) 2000 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved. 6 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2012 Apple Inc. All r ights reserved.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after
1359 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and 1359 // not including children which will be invalidated normally during invalida teTreeIfNeeded() and
1360 // parts which are invalidated separately (e.g. scrollbars). 1360 // parts which are invalidated separately (e.g. scrollbars).
1361 // The caller should ensure the painting layer has been setNeedsRepaint befo re calling this function. 1361 // The caller should ensure the painting layer has been setNeedsRepaint befo re calling this function.
1362 virtual void invalidateDisplayItemClients(PaintInvalidationReason) const; 1362 virtual void invalidateDisplayItemClients(PaintInvalidationReason) const;
1363 1363
1364 virtual bool hasNonCompositedScrollbars() const { return false; } 1364 virtual bool hasNonCompositedScrollbars() const { return false; }
1365 1365
1366 // Called before anonymousChild.setStyle(). Override to set custom styles fo r the child. 1366 // Called before anonymousChild.setStyle(). Override to set custom styles fo r the child.
1367 virtual void updateAnonymousChildStyle(const LayoutObject& anonymousChild, C omputedStyle& style) const { } 1367 virtual void updateAnonymousChildStyle(const LayoutObject& anonymousChild, C omputedStyle& style) const { }
1368 1368
1369 // Returns a rect corresponding to this LayoutObject's bounds for use in deb ugging output
1370 virtual LayoutRect debugRect() const
1371 {
1372 // This method should never be reached as it's overriden by subclasses.
1373 NOTREACHED();
1374 LayoutRect r;
1375 return r;
1376 }
1377
1369 // Painters can use const methods only, except for these explicitly declared methods. 1378 // Painters can use const methods only, except for these explicitly declared methods.
1370 class MutableForPainting { 1379 class MutableForPainting {
1371 public: 1380 public:
1372 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb ject.setPreviousPaintOffset(paintOffset); } 1381 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb ject.setPreviousPaintOffset(paintOffset); }
1373 void clearPaintInvalidationFlags() { m_layoutObject.clearPaintInvalidati onFlags(); } 1382 void clearPaintInvalidationFlags() { m_layoutObject.clearPaintInvalidati onFlags(); }
1374 void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) { m_layoutObject.setShouldDoFullPaintInvalidation(reason); } 1383 void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) { m_layoutObject.setShouldDoFullPaintInvalidation(reason); }
1375 void ensureIsReadyForPaintInvalidation() { m_layoutObject.ensureIsReadyF orPaintInvalidation(); } 1384 void ensureIsReadyForPaintInvalidation() { m_layoutObject.ensureIsReadyF orPaintInvalidation(); }
1376 1385
1377 void setPreviousPaintInvalidationRect(const LayoutRect& r) { m_layoutObj ect.setPreviousPaintInvalidationRect(r); } 1386 void setPreviousPaintInvalidationRect(const LayoutRect& r) { m_layoutObj ect.setPreviousPaintInvalidationRect(r); }
1378 void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& p) { m_layoutObject.setPreviousPositionFromPaintInvalidationBacking(p); } 1387 void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& p) { m_layoutObject.setPreviousPositionFromPaintInvalidationBacking(p); }
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
2138 void showTree(const blink::LayoutObject*); 2147 void showTree(const blink::LayoutObject*);
2139 void showLineTree(const blink::LayoutObject*); 2148 void showLineTree(const blink::LayoutObject*);
2140 void showLayoutTree(const blink::LayoutObject* object1); 2149 void showLayoutTree(const blink::LayoutObject* object1);
2141 // We don't make object2 an optional parameter so that showLayoutTree 2150 // We don't make object2 an optional parameter so that showLayoutTree
2142 // can be called from gdb easily. 2151 // can be called from gdb easily.
2143 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2152 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2144 2153
2145 #endif 2154 #endif
2146 2155
2147 #endif // LayoutObject_h 2156 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698