OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 return toLayoutPart(object); | 281 return toLayoutPart(object); |
282 } | 282 } |
283 | 283 |
284 Settings* Frame::settings() const | 284 Settings* Frame::settings() const |
285 { | 285 { |
286 if (m_host) | 286 if (m_host) |
287 return &m_host->settings(); | 287 return &m_host->settings(); |
288 return nullptr; | 288 return nullptr; |
289 } | 289 } |
290 | 290 |
| 291 bool Frame::isCrossOrigin() const |
| 292 { |
| 293 // Check to see if the frame can script into the top level document. |
| 294 const SecurityOrigin* securityOrigin = securityContext()->getSecurityOrigin(
); |
| 295 Frame* top = tree().top(); |
| 296 return top && !securityOrigin->canAccess(top->securityContext()->getSecurity
Origin()); |
| 297 } |
| 298 |
291 Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner) | 299 Frame::Frame(FrameClient* client, FrameHost* host, FrameOwner* owner) |
292 : m_treeNode(this) | 300 : m_treeNode(this) |
293 , m_host(host) | 301 , m_host(host) |
294 , m_owner(owner) | 302 , m_owner(owner) |
295 , m_client(client) | 303 , m_client(client) |
296 , m_isLoading(false) | 304 , m_isLoading(false) |
297 { | 305 { |
298 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter); | 306 InstanceCounters::incrementCounter(InstanceCounters::FrameCounter); |
299 | 307 |
300 ASSERT(page()); | 308 ASSERT(page()); |
301 | 309 |
302 if (m_owner) | 310 if (m_owner) |
303 m_owner->setContentFrame(*this); | 311 m_owner->setContentFrame(*this); |
304 else | 312 else |
305 page()->setMainFrame(this); | 313 page()->setMainFrame(this); |
306 } | 314 } |
307 | 315 |
308 } // namespace blink | 316 } // namespace blink |
OLD | NEW |