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 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 v8::Handle<v8::Object> wrapper = V8Document::createWrapper(impl, creationCon
text, isolate); | 100 v8::Handle<v8::Object> wrapper = V8Document::createWrapper(impl, creationCon
text, isolate); |
101 if (wrapper.IsEmpty()) | 101 if (wrapper.IsEmpty()) |
102 return wrapper; | 102 return wrapper; |
103 if (!isolatedWorldForEnteredContext()) { | 103 if (!isolatedWorldForEnteredContext()) { |
104 if (Frame* frame = impl->frame()) | 104 if (Frame* frame = impl->frame()) |
105 frame->script()->windowShell(mainThreadNormalWorld())->updateDocumen
tWrapper(wrapper); | 105 frame->script()->windowShell(mainThreadNormalWorld())->updateDocumen
tWrapper(wrapper); |
106 } | 106 } |
107 return wrapper; | 107 return wrapper; |
108 } | 108 } |
109 | 109 |
110 #if ENABLE(TOUCH_EVENTS) | |
111 v8::Handle<v8::Value> V8Document::createTouchListMethodCustom(const v8::Argument
s& args) | 110 v8::Handle<v8::Value> V8Document::createTouchListMethodCustom(const v8::Argument
s& args) |
112 { | 111 { |
113 RefPtr<TouchList> touchList = TouchList::create(); | 112 RefPtr<TouchList> touchList = TouchList::create(); |
114 | 113 |
115 for (int i = 0; i < args.Length(); i++) { | 114 for (int i = 0; i < args.Length(); i++) { |
116 Touch* touch = V8DOMWrapper::isWrapperOfType(args[i], &V8Touch::info) ?
V8Touch::toNative(args[i]->ToObject()) : 0; | 115 Touch* touch = V8DOMWrapper::isWrapperOfType(args[i], &V8Touch::info) ?
V8Touch::toNative(args[i]->ToObject()) : 0; |
117 touchList->append(touch); | 116 touchList->append(touch); |
118 } | 117 } |
119 | 118 |
120 return toV8(touchList.release(), args.Holder(), args.GetIsolate()); | 119 return toV8(touchList.release(), args.Holder(), args.GetIsolate()); |
121 } | 120 } |
122 #endif | |
123 | 121 |
124 } // namespace WebCore | 122 } // namespace WebCore |
OLD | NEW |