|
Use a bitmask for SVG render object types
This patch changes the virtual isSVG*() functions into regular
functions that check a bitmask (via the new virtual "getSVGType"). This
should have no impact on performance. For reference, a similar pattern
is used in Node.h.
This change adds RenderObject::isSVG() with no new virtual calls. In a
future patch, this new function will let us to remove the
O(height of tree) setNeedsBoundariesUpdate call in
RenderObject::willBeRemovedFromTree :)
Additionally, this change opens the door for some useful cleanups. For
example, RenderSVGResource has RenderSVGResourceMask which can be
folded into RenderObject::SVGType. Similarly, there is no
isRenderSVGModelObject() function today but this will be trivial to
add after this patch.
For reference, I put together a diagram of the SVG render tree hierarchy:
https://docs.google.com/a/chromium.org/drawings/d/1nayJX5XcclYj_-blbVuakVNjVWdRAzC5i5s6xBeHfzA/edit
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+62 lines, -38 lines) |
Patch |
 |
M |
Source/core/rendering/RenderObject.h
|
View
|
1
|
2 chunks |
+44 lines, -19 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGContainer.h
|
View
|
1
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGForeignObject.h
|
View
|
|
2 chunks |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGGradientStop.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGHiddenContainer.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGImage.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGInline.h
|
View
|
|
1 chunk |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGInlineText.h
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGPath.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGResourceContainer.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGResourceFilter.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGResourceFilterPrimitive.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGRoot.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGShape.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGText.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGTextPath.h
|
View
|
|
1 chunk |
+1 line, -2 lines |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGTransformableContainer.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/rendering/svg/RenderSVGViewportContainer.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
Total messages: 3 (0 generated)
|