OLD | NEW |
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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 | 294 |
295 void showRenderObject() const; | 295 void showRenderObject() const; |
296 // We don't make printedCharacters an optional parameter so that | 296 // We don't make printedCharacters an optional parameter so that |
297 // showRenderObject can be called from gdb easily. | 297 // showRenderObject can be called from gdb easily. |
298 void showRenderObject(int printedCharacters) const; | 298 void showRenderObject(int printedCharacters) const; |
299 void showRenderTreeAndMark(const RenderObject* markedObject1 = 0, const char
* markedLabel1 = 0, const RenderObject* markedObject2 = 0, const char* markedLab
el2 = 0, int depth = 0) const; | 299 void showRenderTreeAndMark(const RenderObject* markedObject1 = 0, const char
* markedLabel1 = 0, const RenderObject* markedObject2 = 0, const char* markedLab
el2 = 0, int depth = 0) const; |
300 #endif | 300 #endif |
301 | 301 |
302 static RenderObject* createObject(Element*, RenderStyle*); | 302 static RenderObject* createObject(Element*, RenderStyle*); |
303 | 303 |
304 // Overloaded new operator. Derived classes must override operator new | 304 #if ENABLE(PARTITION_ALLOC) |
305 // in order to allocate out of the RenderArena. | 305 void* operator new(size_t); |
306 void* operator new(size_t, RenderArena*); | 306 #endif |
307 | |
308 // Overridden to prevent the normal delete from being called. | |
309 void operator delete(void*, size_t); | |
310 | |
311 private: | |
312 // The normal operator new is disallowed on all render objects. | |
313 void* operator new(size_t) throw(); | |
314 | |
315 public: | |
316 RenderArena* renderArena() const { return document()->renderArena(); } | |
317 | 307 |
318 bool isPseudoElement() const { return node() && node()->isPseudoElement(); } | 308 bool isPseudoElement() const { return node() && node()->isPseudoElement(); } |
319 | 309 |
320 virtual bool isBR() const { return false; } | 310 virtual bool isBR() const { return false; } |
321 virtual bool isBlockFlow() const { return false; } | 311 virtual bool isBlockFlow() const { return false; } |
322 virtual bool isBoxModelObject() const { return false; } | 312 virtual bool isBoxModelObject() const { return false; } |
323 virtual bool isCounter() const { return false; } | 313 virtual bool isCounter() const { return false; } |
324 virtual bool isDialog() const { return false; } | 314 virtual bool isDialog() const { return false; } |
325 virtual bool isQuote() const { return false; } | 315 virtual bool isQuote() const { return false; } |
326 | 316 |
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
943 { | 933 { |
944 return outlineBoundsForRepaint(0); | 934 return outlineBoundsForRepaint(0); |
945 } | 935 } |
946 | 936 |
947 // Return the renderer whose background style is used to paint the root back
ground. Should only be called on the renderer for which isRoot() is true. | 937 // Return the renderer whose background style is used to paint the root back
ground. Should only be called on the renderer for which isRoot() is true. |
948 RenderObject* rendererForRootBackground(); | 938 RenderObject* rendererForRootBackground(); |
949 | 939 |
950 RespectImageOrientationEnum shouldRespectImageOrientation() const; | 940 RespectImageOrientationEnum shouldRespectImageOrientation() const; |
951 | 941 |
952 protected: | 942 protected: |
| 943 #if ENABLE(PARTITION_ALLOC) |
| 944 void operator delete(void*); |
| 945 #endif |
953 inline bool layerCreationAllowedForSubtree() const; | 946 inline bool layerCreationAllowedForSubtree() const; |
954 | 947 |
955 // Overrides should call the superclass at the end | 948 // Overrides should call the superclass at the end |
956 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle); | 949 virtual void styleWillChange(StyleDifference, const RenderStyle* newStyle); |
957 // Overrides should call the superclass at the start | 950 // Overrides should call the superclass at the start |
958 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); | 951 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); |
959 void propagateStyleToAnonymousChildren(bool blockChildrenOnly = false); | 952 void propagateStyleToAnonymousChildren(bool blockChildrenOnly = false); |
960 | 953 |
961 void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, Bo
xSide, | 954 void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, Bo
xSide, |
962 Color, EBorderStyle, int adjbw1, int adjbw2, bool an
tialias = false); | 955 Color, EBorderStyle, int adjbw1, int adjbw2, bool an
tialias = false); |
963 | 956 |
964 void paintFocusRing(PaintInfo&, const LayoutPoint&, RenderStyle*); | 957 void paintFocusRing(PaintInfo&, const LayoutPoint&, RenderStyle*); |
965 void paintOutline(PaintInfo&, const LayoutRect&); | 958 void paintOutline(PaintInfo&, const LayoutRect&); |
966 void addPDFURLRect(GraphicsContext*, const LayoutRect&); | 959 void addPDFURLRect(GraphicsContext*, const LayoutRect&); |
967 | 960 |
968 virtual LayoutRect viewRect() const; | 961 virtual LayoutRect viewRect() const; |
969 | 962 |
970 void adjustRectForOutlineAndShadow(LayoutRect&) const; | 963 void adjustRectForOutlineAndShadow(LayoutRect&) const; |
971 | 964 |
972 void clearLayoutRootIfNeeded() const; | 965 void clearLayoutRootIfNeeded() const; |
973 virtual void willBeDestroyed(); | 966 virtual void willBeDestroyed(); |
974 void arenaDelete(RenderArena*, void* objectBase); | 967 void postDestroy(); |
975 | 968 |
976 virtual bool canBeReplacedWithInlineRunIn() const; | 969 virtual bool canBeReplacedWithInlineRunIn() const; |
977 | 970 |
978 virtual void insertedIntoTree(); | 971 virtual void insertedIntoTree(); |
979 virtual void willBeRemovedFromTree(); | 972 virtual void willBeRemovedFromTree(); |
980 | 973 |
981 void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_
node = document; } | 974 void setDocumentForAnonymous(Document* document) { ASSERT(isAnonymous()); m_
node = document; } |
982 | 975 |
983 private: | 976 private: |
984 RenderFlowThread* locateFlowThreadContainingBlock() const; | 977 RenderFlowThread* locateFlowThreadContainingBlock() const; |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1318 // Outside the WebCore namespace for ease of invocation from gdb. | 1311 // Outside the WebCore namespace for ease of invocation from gdb. |
1319 void showTree(const WebCore::RenderObject*); | 1312 void showTree(const WebCore::RenderObject*); |
1320 void showLineTree(const WebCore::RenderObject*); | 1313 void showLineTree(const WebCore::RenderObject*); |
1321 void showRenderTree(const WebCore::RenderObject* object1); | 1314 void showRenderTree(const WebCore::RenderObject* object1); |
1322 // We don't make object2 an optional parameter so that showRenderTree | 1315 // We don't make object2 an optional parameter so that showRenderTree |
1323 // can be called from gdb easily. | 1316 // can be called from gdb easily. |
1324 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); | 1317 void showRenderTree(const WebCore::RenderObject* object1, const WebCore::RenderO
bject* object2); |
1325 #endif | 1318 #endif |
1326 | 1319 |
1327 #endif // RenderObject_h | 1320 #endif // RenderObject_h |
OLD | NEW |