OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007-2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2007-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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 v8::Handle<v8::Object> wrapper = V8Document::createWrapper(impl, creationCon
text, isolate); | 97 v8::Handle<v8::Object> wrapper = V8Document::createWrapper(impl, creationCon
text, isolate); |
98 if (wrapper.IsEmpty()) | 98 if (wrapper.IsEmpty()) |
99 return wrapper; | 99 return wrapper; |
100 if (!isolatedWorldForEnteredContext()) { | 100 if (!isolatedWorldForEnteredContext()) { |
101 if (Frame* frame = impl->frame()) | 101 if (Frame* frame = impl->frame()) |
102 frame->script()->windowShell(mainThreadNormalWorld())->updateDocumen
tWrapper(wrapper); | 102 frame->script()->windowShell(mainThreadNormalWorld())->updateDocumen
tWrapper(wrapper); |
103 } | 103 } |
104 return wrapper; | 104 return wrapper; |
105 } | 105 } |
106 | 106 |
107 void V8Document::createTouchListMethodCustom(const v8::FunctionCallbackInfo<v8::
Value>& args) | |
108 { | |
109 RefPtr<TouchList> touchList = TouchList::create(); | |
110 | |
111 for (int i = 0; i < args.Length(); i++) { | |
112 Touch* touch = V8DOMWrapper::isWrapperOfType(args[i], &V8Touch::info) ?
V8Touch::toNative(args[i]->ToObject()) : 0; | |
113 touchList->append(touch); | |
114 } | |
115 | |
116 v8SetReturnValue(args, toV8(touchList.release(), args.Holder(), args.GetIsol
ate())); | |
117 } | |
118 | |
119 } // namespace WebCore | 107 } // namespace WebCore |
OLD | NEW |