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

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 // Fixed implementation for LayoutText, LayoutInline, LayoutTableCell and
1370 // LayoutBox.
1371 virtual LayoutRect debugRect() const
1372 {
1373 // This method should never be reached as it's overriden by subclasses.
1374 NOTREACHED();
1375 LayoutRect r;
1376 return r;
1377 }
1378
1369 // Painters can use const methods only, except for these explicitly declared methods. 1379 // Painters can use const methods only, except for these explicitly declared methods.
1370 class MutableForPainting { 1380 class MutableForPainting {
1371 public: 1381 public:
1372 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb ject.setPreviousPaintOffset(paintOffset); } 1382 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb ject.setPreviousPaintOffset(paintOffset); }
1373 void clearPaintInvalidationFlags() { m_layoutObject.clearPaintInvalidati onFlags(); } 1383 void clearPaintInvalidationFlags() { m_layoutObject.clearPaintInvalidati onFlags(); }
1374 void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) { m_layoutObject.setShouldDoFullPaintInvalidation(reason); } 1384 void setShouldDoFullPaintInvalidation(PaintInvalidationReason reason) { m_layoutObject.setShouldDoFullPaintInvalidation(reason); }
1375 void ensureIsReadyForPaintInvalidation() { m_layoutObject.ensureIsReadyF orPaintInvalidation(); } 1385 void ensureIsReadyForPaintInvalidation() { m_layoutObject.ensureIsReadyF orPaintInvalidation(); }
1376 1386
1377 void setPreviousPaintInvalidationRect(const LayoutRect& r) { m_layoutObj ect.setPreviousPaintInvalidationRect(r); } 1387 void setPreviousPaintInvalidationRect(const LayoutRect& r) { m_layoutObj ect.setPreviousPaintInvalidationRect(r); }
1378 void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& p) { m_layoutObject.setPreviousPositionFromPaintInvalidationBacking(p); } 1388 void setPreviousPositionFromPaintInvalidationBacking(const LayoutPoint& p) { m_layoutObject.setPreviousPositionFromPaintInvalidationBacking(p); }
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
2134 void showTree(const blink::LayoutObject*); 2144 void showTree(const blink::LayoutObject*);
2135 void showLineTree(const blink::LayoutObject*); 2145 void showLineTree(const blink::LayoutObject*);
2136 void showLayoutTree(const blink::LayoutObject* object1); 2146 void showLayoutTree(const blink::LayoutObject* object1);
2137 // We don't make object2 an optional parameter so that showLayoutTree 2147 // We don't make object2 an optional parameter so that showLayoutTree
2138 // can be called from gdb easily. 2148 // can be called from gdb easily.
2139 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2149 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2140 2150
2141 #endif 2151 #endif
2142 2152
2143 #endif // LayoutObject_h 2153 #endif // LayoutObject_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698