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

Side by Side Diff: Source/core/rendering/RenderObject.h

Issue 591613003: Move painting code from RenderObject into a new ObjectPainter class. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Merge again. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSet.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 }; 84 };
85 85
86 enum HitTestAction { 86 enum HitTestAction {
87 HitTestBlockBackground, 87 HitTestBlockBackground,
88 HitTestChildBlockBackground, 88 HitTestChildBlockBackground,
89 HitTestChildBlockBackgrounds, 89 HitTestChildBlockBackgrounds,
90 HitTestFloat, 90 HitTestFloat,
91 HitTestForeground 91 HitTestForeground
92 }; 92 };
93 93
94 // Sides used when drawing borders and outlines. The values should run clockwise from top.
95 enum BoxSide {
96 BSTop,
97 BSRight,
98 BSBottom,
99 BSLeft
100 };
101
102 enum MarkingBehavior { 94 enum MarkingBehavior {
103 MarkOnlyThis, 95 MarkOnlyThis,
104 MarkContainingBlockChain, 96 MarkContainingBlockChain,
105 }; 97 };
106 98
107 enum MapCoordinatesMode { 99 enum MapCoordinatesMode {
108 IsFixed = 1 << 0, 100 IsFixed = 1 << 0,
109 UseTransforms = 1 << 1, 101 UseTransforms = 1 << 1,
110 ApplyContainerFlip = 1 << 2, 102 ApplyContainerFlip = 1 << 2,
111 TraverseDocumentBoundaries = 1 << 3, 103 TraverseDocumentBoundaries = 1 << 3,
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
1076 return layoutDidGetCalled() || mayNeedPaintInvalidation() || shouldDoFul lPaintInvalidation() || shouldDoFullPaintInvalidationIfSelfPaintingLayer(); 1068 return layoutDidGetCalled() || mayNeedPaintInvalidation() || shouldDoFul lPaintInvalidation() || shouldDoFullPaintInvalidationIfSelfPaintingLayer();
1077 } 1069 }
1078 1070
1079 bool supportsPaintInvalidationStateCachedOffsets() const { return !hasColumn s() && !hasTransform() && !hasReflection() && !style()->isFlippedBlocksWritingMo de(); } 1071 bool supportsPaintInvalidationStateCachedOffsets() const { return !hasColumn s() && !hasTransform() && !hasReflection() && !style()->isFlippedBlocksWritingMo de(); }
1080 1072
1081 void setNeedsOverflowRecalcAfterStyleChange(); 1073 void setNeedsOverflowRecalcAfterStyleChange();
1082 void markContainingBlocksForOverflowRecalc(); 1074 void markContainingBlocksForOverflowRecalc();
1083 1075
1084 virtual LayoutRect viewRect() const; 1076 virtual LayoutRect viewRect() const;
1085 1077
1086 // FIXME: make this not public.
1087 void drawLineForBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2, Bo xSide, Color, EBorderStyle, int adjbw1, int adjbw2, bool antialias = false);
1088
1089 protected: 1078 protected:
1090 inline bool layerCreationAllowedForSubtree() const; 1079 inline bool layerCreationAllowedForSubtree() const;
1091 1080
1092 // Overrides should call the superclass at the end. m_style will be 0 the fi rst time 1081 // Overrides should call the superclass at the end. m_style will be 0 the fi rst time
1093 // this function will be called. 1082 // this function will be called.
1094 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle); 1083 virtual void styleWillChange(StyleDifference, const RenderStyle& newStyle);
1095 // Overrides should call the superclass at the start. |oldStyle| will be 0 t he first 1084 // Overrides should call the superclass at the start. |oldStyle| will be 0 t he first
1096 // time this function is called. 1085 // time this function is called.
1097 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle); 1086 virtual void styleDidChange(StyleDifference, const RenderStyle* oldStyle);
1098 void propagateStyleToAnonymousChildren(bool blockChildrenOnly = false); 1087 void propagateStyleToAnonymousChildren(bool blockChildrenOnly = false);
1099 virtual void updateAnonymousChildStyle(const RenderObject* child, RenderStyl e* style) const { } 1088 virtual void updateAnonymousChildStyle(const RenderObject* child, RenderStyl e* style) const { }
1100 1089
1101 void drawDashedOrDottedBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
1102 BoxSide, Color, int thickness, EBorderStyle, bool antialias);
1103 void drawDoubleBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
1104 int length, BoxSide, Color, int thickness, int adjacentWidth1, int adjac entWidth2, bool antialias);
1105 void drawRidgeOrGrooveBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
1106 BoxSide, Color, EBorderStyle, int adjacentWidth1, int adjacentWidth2, bo ol antialias);
1107 void drawSolidBoxSide(GraphicsContext*, int x1, int y1, int x2, int y2,
1108 BoxSide, Color, int adjacentWidth1, int adjacentWidth2, bool antialias);
1109
1110 void paintFocusRing(PaintInfo&, const LayoutPoint&, RenderStyle*);
1111 public: 1090 public:
1112 void paintOutline(PaintInfo&, const LayoutRect&); 1091 void paintOutline(PaintInfo&, const LayoutRect&);
1113 protected: 1092 protected:
1114 void addChildFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer) const; 1093 void addChildFocusRingRects(Vector<LayoutRect>&, const LayoutPoint& addition alOffset, const RenderLayerModelObject* paintContainer) const;
1115 1094
1116 void clearLayoutRootIfNeeded() const; 1095 void clearLayoutRootIfNeeded() const;
1117 virtual void willBeDestroyed(); 1096 virtual void willBeDestroyed();
1118 void postDestroy(); 1097 void postDestroy();
1119 1098
1120 virtual void insertedIntoTree(); 1099 virtual void insertedIntoTree();
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
1570 void showTree(const blink::RenderObject*); 1549 void showTree(const blink::RenderObject*);
1571 void showLineTree(const blink::RenderObject*); 1550 void showLineTree(const blink::RenderObject*);
1572 void showRenderTree(const blink::RenderObject* object1); 1551 void showRenderTree(const blink::RenderObject* object1);
1573 // We don't make object2 an optional parameter so that showRenderTree 1552 // We don't make object2 an optional parameter so that showRenderTree
1574 // can be called from gdb easily. 1553 // can be called from gdb easily.
1575 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2); 1554 void showRenderTree(const blink::RenderObject* object1, const blink::RenderObjec t* object2);
1576 1555
1577 #endif 1556 #endif
1578 1557
1579 #endif // RenderObject_h 1558 #endif // RenderObject_h
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderMultiColumnSet.cpp ('k') | Source/core/rendering/RenderObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698