| 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 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 } | 115 } |
| 116 | 116 |
| 117 annotations.append(std::make_pair(AnnotationKeyElementClass, classBu
ilder.toString())); | 117 annotations.append(std::make_pair(AnnotationKeyElementClass, classBu
ilder.toString())); |
| 118 } | 118 } |
| 119 } | 119 } |
| 120 | 120 |
| 121 if ((mode & AnnotateElementTag) && element) | 121 if ((mode & AnnotateElementTag) && element) |
| 122 annotations.append(std::make_pair(AnnotationKeyElementTag, element->tagN
ame())); | 122 annotations.append(std::make_pair(AnnotationKeyElementTag, element->tagN
ame())); |
| 123 | 123 |
| 124 if (mode & AnnotateInspectorId) { | 124 if (mode & AnnotateInspectorId) { |
| 125 if (Node* ownerNode = object->generatingNode()) { | 125 if (Node* ownerNode = object->node()) { |
| 126 annotations.append(std::make_pair(AnnotationKeyInspectorNodeId, | 126 annotations.append(std::make_pair(AnnotationKeyInspectorNodeId, |
| 127 String::number(InspectorNodeIds::idForNode(ownerNode)))); | 127 String::number(InspectorNodeIds::idForNode(ownerNode)))); |
| 128 } | 128 } |
| 129 } | 129 } |
| 130 | 130 |
| 131 m_context = paintInfo.context; | 131 m_context = paintInfo.context; |
| 132 m_context->beginAnnotation(annotations); | 132 m_context->beginAnnotation(annotations); |
| 133 } | 133 } |
| 134 | 134 |
| 135 void GraphicsContextAnnotator::finishAnnotation() | 135 void GraphicsContextAnnotator::finishAnnotation() |
| 136 { | 136 { |
| 137 ASSERT(m_context); | 137 ASSERT(m_context); |
| 138 m_context->endAnnotation(); | 138 m_context->endAnnotation(); |
| 139 } | 139 } |
| 140 | 140 |
| 141 } // namespace blink | 141 } // namespace blink |
| OLD | NEW |