OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google Inc. All rights reserved. |
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 14 matching lines...) Expand all Loading... |
25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | 25 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 */ | 30 */ |
31 | 31 |
32 #include "config.h" | 32 #include "config.h" |
33 #include "core/rendering/GraphicsContextAnnotator.h" | 33 #include "core/rendering/GraphicsContextAnnotator.h" |
34 | 34 |
35 #include "core/platform/graphics/GraphicsContextAnnotation.h" | |
36 #include "core/rendering/PaintInfo.h" | 35 #include "core/rendering/PaintInfo.h" |
37 #include "core/rendering/RenderObject.h" | 36 #include "core/rendering/RenderObject.h" |
| 37 #include "platform/graphics/GraphicsContextAnnotation.h" |
38 #include "wtf/text/StringBuilder.h" | 38 #include "wtf/text/StringBuilder.h" |
39 | 39 |
40 namespace { | 40 namespace { |
41 | 41 |
42 static const char* paintPhaseName(WebCore::PaintPhase phase) | 42 static const char* paintPhaseName(WebCore::PaintPhase phase) |
43 { | 43 { |
44 switch (phase) { | 44 switch (phase) { |
45 case WebCore::PaintPhaseBlockBackground: | 45 case WebCore::PaintPhaseBlockBackground: |
46 return "BlockBackground"; | 46 return "BlockBackground"; |
47 case WebCore::PaintPhaseChildBlockBackground: | 47 case WebCore::PaintPhaseChildBlockBackground: |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 } | 115 } |
116 | 116 |
117 elementClass = classBuilder.toString(); | 117 elementClass = classBuilder.toString(); |
118 } | 118 } |
119 } | 119 } |
120 | 120 |
121 if ((mode & AnnotateElementTag) && element) | 121 if ((mode & AnnotateElementTag) && element) |
122 elementTag = element->tagName(); | 122 elementTag = element->tagName(); |
123 | 123 |
124 m_context = paintInfo.context; | 124 m_context = paintInfo.context; |
125 m_context->beginAnnotation(GraphicsContextAnnotation(rendererName, paintPhas
e, elementId, elementClass, elementTag)); | 125 m_context->beginAnnotation(rendererName, paintPhase, elementId, elementClass
, elementTag); |
126 } | 126 } |
127 | 127 |
128 void GraphicsContextAnnotator::finishAnnotation() | 128 void GraphicsContextAnnotator::finishAnnotation() |
129 { | 129 { |
130 ASSERT(m_context); | 130 ASSERT(m_context); |
131 m_context->endAnnotation(); | 131 m_context->endAnnotation(); |
132 } | 132 } |
133 | 133 |
134 } | 134 } |
OLD | NEW |