| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 class NodeVisitor : public WrappedNodeVisitor { | 265 class NodeVisitor : public WrappedNodeVisitor { |
| 266 public: | 266 public: |
| 267 NodeVisitor(Page* page, FramesWithUninstrumentedCanvases& result) | 267 NodeVisitor(Page* page, FramesWithUninstrumentedCanvases& result) |
| 268 : m_page(page) | 268 : m_page(page) |
| 269 , m_framesWithUninstrumentedCanvases(result) | 269 , m_framesWithUninstrumentedCanvases(result) |
| 270 { | 270 { |
| 271 } | 271 } |
| 272 | 272 |
| 273 virtual void visitNode(Node* node) OVERRIDE | 273 virtual void visitNode(Node* node) OVERRIDE |
| 274 { | 274 { |
| 275 if (!node->hasTagName(HTMLNames::canvasTag) || !node->document() ||
!node->document()->frame()) | 275 if (!node->hasTagName(HTMLNames::canvasTag) || !node->document().fra
me()) |
| 276 return; | 276 return; |
| 277 | 277 |
| 278 Frame* frame = node->document()->frame(); | 278 Frame* frame = node->document().frame(); |
| 279 if (frame->page() != m_page) | 279 if (frame->page() != m_page) |
| 280 return; | 280 return; |
| 281 | 281 |
| 282 if (toHTMLCanvasElement(node)->renderingContext()) | 282 if (toHTMLCanvasElement(node)->renderingContext()) |
| 283 m_framesWithUninstrumentedCanvases.set(frame, true); | 283 m_framesWithUninstrumentedCanvases.set(frame, true); |
| 284 } | 284 } |
| 285 | 285 |
| 286 private: | 286 private: |
| 287 Page* m_page; | 287 Page* m_page; |
| 288 FramesWithUninstrumentedCanvases& m_framesWithUninstrumentedCanvases; | 288 FramesWithUninstrumentedCanvases& m_framesWithUninstrumentedCanvases; |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 ErrorString error; | 343 ErrorString error; |
| 344 for (FramesWithUninstrumentedCanvases::const_iterator it = m_framesWithUnins
trumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it)
{ | 344 for (FramesWithUninstrumentedCanvases::const_iterator it = m_framesWithUnins
trumentedCanvases.begin(); it != m_framesWithUninstrumentedCanvases.end(); ++it)
{ |
| 345 InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, m
ainWorldScriptState(it->key)); | 345 InjectedScriptCanvasModule module = injectedScriptCanvasModule(&error, m
ainWorldScriptState(it->key)); |
| 346 if (!module.hasNoValue()) | 346 if (!module.hasNoValue()) |
| 347 module.markFrameEnd(); | 347 module.markFrameEnd(); |
| 348 } | 348 } |
| 349 } | 349 } |
| 350 | 350 |
| 351 } // namespace WebCore | 351 } // namespace WebCore |
| 352 | 352 |
| OLD | NEW |