OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 const String& code() const { return m_code; } | 59 const String& code() const { return m_code; } |
60 | 60 |
61 protected: | 61 protected: |
62 v8::Local<v8::Object> getListenerObjectInternal(ExecutionContext*) override; | 62 v8::Local<v8::Object> getListenerObjectInternal(ExecutionContext*) override; |
63 | 63 |
64 private: | 64 private: |
65 V8LazyEventListener(v8::Isolate*, const AtomicString& functionName, const At
omicString& eventParameterName, const String& code, const String sourceURL, cons
t TextPosition&, Node*); | 65 V8LazyEventListener(v8::Isolate*, const AtomicString& functionName, const At
omicString& eventParameterName, const String& code, const String sourceURL, cons
t TextPosition&, Node*); |
66 | 66 |
67 v8::Local<v8::Value> callListenerFunction(ScriptState*, v8::Local<v8::Value>
, Event*) override; | 67 v8::Local<v8::Value> callListenerFunction(ScriptState*, v8::Local<v8::Value>
, Event*) override; |
68 | 68 |
69 // Needs to return true for all event handlers implemented in JavaScript so
that | |
70 // the SVG code does not add the event handler in both | |
71 // SVGUseElement::buildShadowTree and again in | |
72 // SVGUseElement::transferEventListenersToShadowTree | |
73 bool wasCreatedFromMarkup() const override { return true; } | |
74 | |
75 void compileScript(ScriptState*, ExecutionContext*); | 69 void compileScript(ScriptState*, ExecutionContext*); |
76 | 70 |
77 void fireErrorEvent(v8::Local<v8::Context>, ExecutionContext*, v8::Local<v8:
:Message>); | 71 void fireErrorEvent(v8::Local<v8::Context>, ExecutionContext*, v8::Local<v8:
:Message>); |
78 | 72 |
79 bool m_wasCompilationFailed; | 73 bool m_wasCompilationFailed; |
80 AtomicString m_functionName; | 74 AtomicString m_functionName; |
81 AtomicString m_eventParameterName; | 75 AtomicString m_eventParameterName; |
82 String m_code; | 76 String m_code; |
83 String m_sourceURL; | 77 String m_sourceURL; |
84 Member<Node> m_node; | 78 Member<Node> m_node; |
85 TextPosition m_position; | 79 TextPosition m_position; |
86 }; | 80 }; |
87 | 81 |
88 } // namespace blink | 82 } // namespace blink |
89 | 83 |
90 #endif // V8LazyEventListener_h | 84 #endif // V8LazyEventListener_h |
OLD | NEW |