|
Lines 99-110
JSValue nonCachingStaticFunctionGetter(ExecState* exec, JSValue, const Identifie
a/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp_sec1
|
| 99 |
|
99 |
|
| 100 |
static JSValue childFrameGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName) |
100 |
static JSValue childFrameGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName) |
| 101 |
{ |
101 |
{ |
| 102 |
return toJS(exec, static_cast<JSDOMWindow*>(asObject(slotBase))->impl()->frame()->tree()->child(identifierToAtomicString(propertyName))->domWindow()); |
102 |
return toJS(exec, static_cast<JSDOMWindow*>(asObject(slotBase))->impl()->frame()->tree()->documentChild(identifierToAtomicString(propertyName))->domWindow()); |
| 103 |
} |
103 |
} |
| 104 |
|
104 |
|
| 105 |
static JSValue indexGetter(ExecState* exec, JSValue slotBase, unsigned index) |
105 |
static JSValue indexGetter(ExecState* exec, JSValue slotBase, unsigned index) |
| 106 |
{ |
106 |
{ |
| 107 |
return toJS(exec, static_cast<JSDOMWindow*>(asObject(slotBase))->impl()->frame()->tree()->child(index)->domWindow()); |
107 |
return toJS(exec, static_cast<JSDOMWindow*>(asObject(slotBase))->impl()->frame()->tree()->documentChild(index)->domWindow()); |
| 108 |
} |
108 |
} |
| 109 |
|
109 |
|
| 110 |
static JSValue namedItemGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName) |
110 |
static JSValue namedItemGetter(ExecState* exec, JSValue slotBase, const Identifier& propertyName) |
|
Lines 220-226
bool JSDOMWindow::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identi
a/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp_sec2
|
| 220 |
// naming frames things that conflict with window properties that |
220 |
// naming frames things that conflict with window properties that |
| 221 |
// are in Moz but not IE. Since we have some of these, we have to do |
221 |
// are in Moz but not IE. Since we have some of these, we have to do |
| 222 |
// it the Moz way. |
222 |
// it the Moz way. |
| 223 |
if (thisObject->impl()->frame()->tree()->child(identifierToAtomicString(propertyName))) { |
223 |
if (thisObject->impl()->frame()->tree()->documentChild(identifierToAtomicString(propertyName))) { |
| 224 |
slot.setCustom(thisObject, childFrameGetter); |
224 |
slot.setCustom(thisObject, childFrameGetter); |
| 225 |
return true; |
225 |
return true; |
| 226 |
} |
226 |
} |
|
Lines 244-250
bool JSDOMWindow::getOwnPropertySlot(JSCell* cell, ExecState* exec, const Identi
a/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp_sec3
|
| 244 |
// allow window[1] or parent[1] etc. (#56983) |
244 |
// allow window[1] or parent[1] etc. (#56983) |
| 245 |
bool ok; |
245 |
bool ok; |
| 246 |
unsigned i = propertyName.toArrayIndex(ok); |
246 |
unsigned i = propertyName.toArrayIndex(ok); |
| 247 |
if (ok && i < thisObject->impl()->frame()->tree()->childCount()) { |
247 |
if (ok && i < thisObject->impl()->frame()->tree()->documentChildCount()) { |
| 248 |
slot.setCustomIndex(thisObject, i, indexGetter); |
248 |
slot.setCustomIndex(thisObject, i, indexGetter); |
| 249 |
return true; |
249 |
return true; |
| 250 |
} |
250 |
} |
|
Lines 310-316
bool JSDOMWindow::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, co
a/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp_sec4
|
| 310 |
// naming frames things that conflict with window properties that |
310 |
// naming frames things that conflict with window properties that |
| 311 |
// are in Moz but not IE. Since we have some of these, we have to do |
311 |
// are in Moz but not IE. Since we have some of these, we have to do |
| 312 |
// it the Moz way. |
312 |
// it the Moz way. |
| 313 |
if (thisObject->impl()->frame()->tree()->child(identifierToAtomicString(propertyName))) { |
313 |
if (thisObject->impl()->frame()->tree()->documentChild(identifierToAtomicString(propertyName))) { |
| 314 |
PropertySlot slot; |
314 |
PropertySlot slot; |
| 315 |
slot.setCustom(thisObject, childFrameGetter); |
315 |
slot.setCustom(thisObject, childFrameGetter); |
| 316 |
descriptor.setDescriptor(slot.getValue(exec, propertyName), ReadOnly | DontDelete | DontEnum); |
316 |
descriptor.setDescriptor(slot.getValue(exec, propertyName), ReadOnly | DontDelete | DontEnum); |
|
Lines 319-325
bool JSDOMWindow::getOwnPropertyDescriptor(JSObject* object, ExecState* exec, co
a/Source/WebCore/bindings/js/JSDOMWindowCustom.cpp_sec5
|
| 319 |
|
319 |
|
| 320 |
bool ok; |
320 |
bool ok; |
| 321 |
unsigned i = propertyName.toArrayIndex(ok); |
321 |
unsigned i = propertyName.toArrayIndex(ok); |
| 322 |
if (ok && i < thisObject->impl()->frame()->tree()->childCount()) { |
322 |
if (ok && i < thisObject->impl()->frame()->tree()->documentChildCount()) { |
| 323 |
PropertySlot slot; |
323 |
PropertySlot slot; |
| 324 |
slot.setCustomIndex(thisObject, i, indexGetter); |
324 |
slot.setCustomIndex(thisObject, i, indexGetter); |
| 325 |
descriptor.setDescriptor(slot.getValue(exec, propertyName), ReadOnly | DontDelete | DontEnum); |
325 |
descriptor.setDescriptor(slot.getValue(exec, propertyName), ReadOnly | DontDelete | DontEnum); |