OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2007, 2008 Apple 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
239 return frame ? static_cast<WebFrameLoaderClient*>(frame->loader()->client())
->webFrame() : nil; | 239 return frame ? static_cast<WebFrameLoaderClient*>(frame->loader()->client())
->webFrame() : nil; |
240 } | 240 } |
241 | 241 |
242 Page* core(WebView *webView) | 242 Page* core(WebView *webView) |
243 { | 243 { |
244 return [webView page]; | 244 return [webView page]; |
245 } | 245 } |
246 | 246 |
247 WebView *kit(Page* page) | 247 WebView *kit(Page* page) |
248 { | 248 { |
249 return page ? static_cast<WebChromeClient*>(page->chrome()->client())->webVi
ew() : nil; | 249 return page ? static_cast<WebView*>(page->chrome()->client()->webView()) : n
il; |
250 } | 250 } |
251 | 251 |
252 WebView *getWebView(WebFrame *webFrame) | 252 WebView *getWebView(WebFrame *webFrame) |
253 { | 253 { |
254 Frame* coreFrame = core(webFrame); | 254 Frame* coreFrame = core(webFrame); |
255 if (!coreFrame) | 255 if (!coreFrame) |
256 return nil; | 256 return nil; |
257 return kit(coreFrame->page()); | 257 return kit(coreFrame->page()); |
258 } | 258 } |
259 | 259 |
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1593 | 1593 |
1594 - (JSGlobalContextRef)globalContext | 1594 - (JSGlobalContextRef)globalContext |
1595 { | 1595 { |
1596 Frame* coreFrame = _private->coreFrame; | 1596 Frame* coreFrame = _private->coreFrame; |
1597 if (!coreFrame) | 1597 if (!coreFrame) |
1598 return 0; | 1598 return 0; |
1599 return toGlobalRef(coreFrame->script()->globalObject(mainThreadNormalWorld()
)->globalExec()); | 1599 return toGlobalRef(coreFrame->script()->globalObject(mainThreadNormalWorld()
)->globalExec()); |
1600 } | 1600 } |
1601 | 1601 |
1602 @end | 1602 @end |
OLD | NEW |