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

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

Issue 1497873002: Make DisplayItemClient an interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years 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 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // because only boxes implementing the full box model have a need for them. 197 // because only boxes implementing the full box model have a need for them.
198 // Because LayoutBlockFlow's intrinsic widths rely on the underlying text 198 // Because LayoutBlockFlow's intrinsic widths rely on the underlying text
199 // content, LayoutBlockFlow may call LayoutText::computePreferredLogicalWidths. 199 // content, LayoutBlockFlow may call LayoutText::computePreferredLogicalWidths.
200 // 200 //
201 // The 2 widths are computed lazily during layout when the getters are called. 201 // The 2 widths are computed lazily during layout when the getters are called.
202 // The computation is done by calling computePreferredLogicalWidths() behind the 202 // The computation is done by calling computePreferredLogicalWidths() behind the
203 // scene. The boolean used to control the lazy recomputation is 203 // scene. The boolean used to control the lazy recomputation is
204 // preferredLogicalWidthsDirty. 204 // preferredLogicalWidthsDirty.
205 // 205 //
206 // See the individual getters below for more details about what each width is. 206 // See the individual getters below for more details about what each width is.
207 class CORE_EXPORT LayoutObject : public ImageResourceClient { 207 class CORE_EXPORT LayoutObject : public ImageResourceClient, public DisplayItemC lient {
208 friend class LayoutObjectChildList; 208 friend class LayoutObjectChildList;
209 WTF_MAKE_NONCOPYABLE(LayoutObject); 209 WTF_MAKE_NONCOPYABLE(LayoutObject);
210 public: 210 public:
211 // Anonymous objects should pass the document as their node, and they will t hen automatically be 211 // Anonymous objects should pass the document as their node, and they will t hen automatically be
212 // marked as anonymous in the constructor. 212 // marked as anonymous in the constructor.
213 explicit LayoutObject(Node*); 213 explicit LayoutObject(Node*);
214 ~LayoutObject() override; 214 ~LayoutObject() override;
215 215
216 // Returns the name of the layout object. 216 // Returns the name of the layout object.
217 virtual const char* name() const = 0; 217 virtual const char* name() const = 0;
(...skipping 1074 matching lines...) Expand 10 before | Expand all | Expand 10 after
1292 1292
1293 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con st 1293 bool shouldCheckForPaintInvalidationRegardlessOfPaintInvalidationState() con st
1294 { 1294 {
1295 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() || shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation( ); 1295 return mayNeedPaintInvalidation() || shouldDoFullPaintInvalidation() || shouldInvalidateSelection() || m_bitfields.childShouldCheckForPaintInvalidation( );
1296 } 1296 }
1297 1297
1298 virtual bool supportsPaintInvalidationStateCachedOffsets() const { return !h asTransformRelatedProperty() && !hasReflection() && !style()->isFlippedBlocksWri tingMode(); } 1298 virtual bool supportsPaintInvalidationStateCachedOffsets() const { return !h asTransformRelatedProperty() && !hasReflection() && !style()->isFlippedBlocksWri tingMode(); }
1299 1299
1300 virtual LayoutRect viewRect() const; 1300 virtual LayoutRect viewRect() const;
1301 1301
1302 DisplayItemClient displayItemClient() const { return toDisplayItemClient(thi s); } 1302 void invalidateDisplayItemClient(const DisplayItemClient&) const;
1303
1304 void invalidateDisplayItemClient(const DisplayItemClientWrapper&) const;
1305 void invalidateDisplayItemClientsIncludingNonCompositingDescendants(const La youtBoxModelObject* paintInvalidationContainer, PaintInvalidationReason, const L ayoutRect* paintInvalidationRect) const; 1303 void invalidateDisplayItemClientsIncludingNonCompositingDescendants(const La youtBoxModelObject* paintInvalidationContainer, PaintInvalidationReason, const L ayoutRect* paintInvalidationRect) const;
1306 1304
1307 // Called before anonymousChild.setStyle(). Override to set custom styles fo r the child. 1305 // Called before anonymousChild.setStyle(). Override to set custom styles fo r the child.
1308 virtual void updateAnonymousChildStyle(const LayoutObject& anonymousChild, C omputedStyle& style) const { } 1306 virtual void updateAnonymousChildStyle(const LayoutObject& anonymousChild, C omputedStyle& style) const { }
1309 1307
1310 // Painters can use const methods only, except for these explicitly declared methods. 1308 // Painters can use const methods only, except for these explicitly declared methods.
1311 class MutableForPainting { 1309 class MutableForPainting {
1312 public: 1310 public:
1313 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb ject.setPreviousPaintOffset(paintOffset); } 1311 void setPreviousPaintOffset(const LayoutPoint& paintOffset) { m_layoutOb ject.setPreviousPaintOffset(paintOffset); }
1314 1312
(...skipping 726 matching lines...) Expand 10 before | Expand all | Expand 10 after
2041 void showTree(const blink::LayoutObject*); 2039 void showTree(const blink::LayoutObject*);
2042 void showLineTree(const blink::LayoutObject*); 2040 void showLineTree(const blink::LayoutObject*);
2043 void showLayoutTree(const blink::LayoutObject* object1); 2041 void showLayoutTree(const blink::LayoutObject* object1);
2044 // We don't make object2 an optional parameter so that showLayoutTree 2042 // We don't make object2 an optional parameter so that showLayoutTree
2045 // can be called from gdb easily. 2043 // can be called from gdb easily.
2046 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2); 2044 void showLayoutTree(const blink::LayoutObject* object1, const blink::LayoutObjec t* object2);
2047 2045
2048 #endif 2046 #endif
2049 2047
2050 #endif // LayoutObject_h 2048 #endif // LayoutObject_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp ('k') | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698