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

Side by Side Diff: sky/engine/core/rendering/RenderObject.h

Issue 1228463002: Remove RenderImage (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 5 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 12 matching lines...) Expand all
23 * 23 *
24 */ 24 */
25 25
26 #ifndef SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_ 26 #ifndef SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_
27 #define SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_ 27 #define SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_
28 28
29 #include "sky/engine/core/dom/Document.h" 29 #include "sky/engine/core/dom/Document.h"
30 #include "sky/engine/core/dom/DocumentLifecycle.h" 30 #include "sky/engine/core/dom/DocumentLifecycle.h"
31 #include "sky/engine/core/dom/Element.h" 31 #include "sky/engine/core/dom/Element.h"
32 #include "sky/engine/core/editing/TextAffinity.h" 32 #include "sky/engine/core/editing/TextAffinity.h"
33 #include "sky/engine/core/fetch/ImageResourceClient.h"
34 #include "sky/engine/core/html/HTMLElement.h" 33 #include "sky/engine/core/html/HTMLElement.h"
35 #include "sky/engine/core/rendering/HitTestRequest.h" 34 #include "sky/engine/core/rendering/HitTestRequest.h"
36 #include "sky/engine/core/rendering/RenderObjectChildList.h" 35 #include "sky/engine/core/rendering/RenderObjectChildList.h"
37 #include "sky/engine/core/rendering/SubtreeLayoutScope.h" 36 #include "sky/engine/core/rendering/SubtreeLayoutScope.h"
38 #include "sky/engine/core/rendering/style/RenderStyle.h" 37 #include "sky/engine/core/rendering/style/RenderStyle.h"
39 #include "sky/engine/core/rendering/style/StyleInheritedData.h" 38 #include "sky/engine/core/rendering/style/StyleInheritedData.h"
40 #include "sky/engine/platform/geometry/FloatQuad.h" 39 #include "sky/engine/platform/geometry/FloatQuad.h"
41 #include "sky/engine/platform/geometry/LayoutRect.h" 40 #include "sky/engine/platform/geometry/LayoutRect.h"
42 #include "sky/engine/platform/transforms/TransformationMatrix.h" 41 #include "sky/engine/platform/transforms/TransformationMatrix.h"
43 42
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 bool draggable; 94 bool draggable;
96 }; 95 };
97 96
98 typedef WTF::HashMap<const RenderLayer*, Vector<LayoutRect> > LayerHitTestRects; 97 typedef WTF::HashMap<const RenderLayer*, Vector<LayoutRect> > LayerHitTestRects;
99 98
100 #ifndef NDEBUG 99 #ifndef NDEBUG
101 const int showTreeCharacterOffset = 39; 100 const int showTreeCharacterOffset = 39;
102 #endif 101 #endif
103 102
104 // Base class for all rendering tree objects. 103 // Base class for all rendering tree objects.
105 class RenderObject : public ImageResourceClient { 104 class RenderObject {
106 friend class RenderBlock; 105 friend class RenderBlock;
107 friend class RenderObjectChildList; 106 friend class RenderObjectChildList;
108 WTF_MAKE_NONCOPYABLE(RenderObject); 107 WTF_MAKE_NONCOPYABLE(RenderObject);
109 public: 108 public:
110 // TODO(ojan): Pass in a reference since the node can no longer be null. 109 // TODO(ojan): Pass in a reference since the node can no longer be null.
111 explicit RenderObject(Node*); 110 explicit RenderObject(Node*);
112 virtual ~RenderObject(); 111 virtual ~RenderObject();
113 112
114 virtual const char* renderName() const = 0; 113 virtual const char* renderName() const = 0;
115 114
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 #endif 245 #endif
247 246
248 public: 247 public:
249 virtual bool isBoxModelObject() const { return false; } 248 virtual bool isBoxModelObject() const { return false; }
250 virtual bool isCanvas() const { return false; } 249 virtual bool isCanvas() const { return false; }
251 virtual bool isImage() const { return false; } 250 virtual bool isImage() const { return false; }
252 virtual bool isInlineBlock() const { return false; } 251 virtual bool isInlineBlock() const { return false; }
253 virtual bool isRenderBlock() const { return false; } 252 virtual bool isRenderBlock() const { return false; }
254 virtual bool isRenderCustomLayout() const { return false; } 253 virtual bool isRenderCustomLayout() const { return false; }
255 virtual bool isRenderParagraph() const { return false; } 254 virtual bool isRenderParagraph() const { return false; }
256 virtual bool isRenderImage() const { return false; }
257 virtual bool isRenderInline() const { return false; } 255 virtual bool isRenderInline() const { return false; }
258 virtual bool isRenderView() const { return false; } 256 virtual bool isRenderView() const { return false; }
259 257
260 bool everHadLayout() const { return m_bitfields.everHadLayout(); } 258 bool everHadLayout() const { return m_bitfields.everHadLayout(); }
261 259
262 bool alwaysCreateLineBoxesForRenderInline() const 260 bool alwaysCreateLineBoxesForRenderInline() const
263 { 261 {
264 ASSERT(isRenderInline()); 262 ASSERT(isRenderInline());
265 return m_bitfields.alwaysCreateLineBoxesForRenderInline(); 263 return m_bitfields.alwaysCreateLineBoxesForRenderInline();
266 } 264 }
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 // Virtual function helper for the new FlexibleBox Layout (display: -webkit- flex). 548 // Virtual function helper for the new FlexibleBox Layout (display: -webkit- flex).
551 virtual bool isFlexibleBox() const { return false; } 549 virtual bool isFlexibleBox() const { return false; }
552 550
553 virtual int caretMinOffset() const; 551 virtual int caretMinOffset() const;
554 virtual int caretMaxOffset() const; 552 virtual int caretMaxOffset() const;
555 553
556 virtual int previousOffset(int current) const; 554 virtual int previousOffset(int current) const;
557 virtual int previousOffsetForBackwardDeletion(int current) const; 555 virtual int previousOffsetForBackwardDeletion(int current) const;
558 virtual int nextOffset(int current) const; 556 virtual int nextOffset(int current) const;
559 557
560 virtual void imageChanged(ImageResource*, const IntRect* = 0) override final ;
561 virtual void imageChanged(WrappedImagePtr, const IntRect* = 0);
562 virtual bool willRenderImage(ImageResource*) override final;
563
564 void selectionStartEnd(int& spos, int& epos) const; 558 void selectionStartEnd(int& spos, int& epos) const;
565 559
566 void remove() { if (parent()) parent()->removeChild(this); } 560 void remove() { if (parent()) parent()->removeChild(this); }
567 561
568 bool supportsTouchAction() const; 562 bool supportsTouchAction() const;
569 563
570 bool visibleToHitTestRequest(const HitTestRequest& request) const { return ( request.ignorePointerEventsNone() || style()->pointerEvents() != PE_NONE); } 564 bool visibleToHitTestRequest(const HitTestRequest& request) const { return ( request.ignorePointerEventsNone() || style()->pointerEvents() != PE_NONE); }
571 565
572 bool visibleToHitTesting() const { return style()->pointerEvents() != PE_NON E; } 566 bool visibleToHitTesting() const { return style()->pointerEvents() != PE_NON E; }
573 567
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
857 void showTree(const blink::RenderObject*); 851 void showTree(const blink::RenderObject*);
858 void showLineTree(const blink::RenderObject*); 852 void showLineTree(const blink::RenderObject*);
859 void showRenderTree(const blink::RenderObject* object1); 853 void showRenderTree(const blink::RenderObject* object1);
860 // We don't make object2 an optional parameter so that showRenderTree 854 // We don't make object2 an optional parameter so that showRenderTree
861 // can be called from gdb easily. 855 // can be called from gdb easily.
862 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 856 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
863 857
864 #endif 858 #endif
865 859
866 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_ 860 #endif // SKY_ENGINE_CORE_RENDERING_RENDEROBJECT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/rendering/RenderImageResourceStyleImage.cpp ('k') | sky/engine/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698