OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 // Calling it will bring about the release and finalization of the frame object, | 64 // Calling it will bring about the release and finalization of the frame object, |
65 // and everything underneath. | 65 // and everything underneath. |
66 // | 66 // |
67 // How frames are destroyed | 67 // How frames are destroyed |
68 // ------------------------ | 68 // ------------------------ |
69 // | 69 // |
70 // The main frame is never destroyed and is re-used. The FrameLoader is re-used | 70 // The main frame is never destroyed and is re-used. The FrameLoader is re-used |
71 // and a reference to the main frame is kept by the Page. | 71 // and a reference to the main frame is kept by the Page. |
72 // | 72 // |
73 // When frame content is replaced, all subframes are destroyed. This happens | 73 // When frame content is replaced, all subframes are destroyed. This happens |
74 // in FrameLoader::detachFromParent for each subframe in a pre-order depth-first | 74 // in Frame::detachChildren for each subframe in a pre-order depth-first |
75 // traversal. Note that child node order may not match DOM node order! | 75 // traversal. Note that child node order may not match DOM node order! |
76 // detachFromParent() calls FrameLoaderClient::detachedFromParent(), which calls | 76 // detachChildren() (virtually) calls Frame::detach(), which again calls |
77 // WebFrame::frameDetached(). This triggers WebFrame to clear its reference to | 77 // FrameLoaderClient::detached(). This triggers WebFrame to clear its reference
to |
78 // LocalFrame, and also notifies the embedder via WebFrameClient that the frame
is | 78 // LocalFrame. FrameLoaderClient::detached() also notifies the embedder via WebF
rameClient |
79 // detached. Most embedders will invoke close() on the WebFrame at this point, | 79 // that the frame is detached. Most embedders will invoke close() on the WebFram
e |
80 // triggering its deletion unless something else is still retaining a reference. | 80 // at this point, triggering its deletion unless something else is still retaini
ng a reference. |
81 // | 81 // |
82 // The client is expected to be set whenever the WebLocalFrameImpl is attached t
o | 82 // The client is expected to be set whenever the WebLocalFrameImpl is attached t
o |
83 // the DOM. | 83 // the DOM. |
84 | 84 |
85 #include "config.h" | 85 #include "config.h" |
86 #include "web/WebLocalFrameImpl.h" | 86 #include "web/WebLocalFrameImpl.h" |
87 | 87 |
88 #include "bindings/core/v8/BindingSecurity.h" | 88 #include "bindings/core/v8/BindingSecurity.h" |
89 #include "bindings/core/v8/DOMWrapperWorld.h" | 89 #include "bindings/core/v8/DOMWrapperWorld.h" |
90 #include "bindings/core/v8/ExceptionState.h" | 90 #include "bindings/core/v8/ExceptionState.h" |
(...skipping 2109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2200 } | 2200 } |
2201 | 2201 |
2202 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const | 2202 WebSandboxFlags WebLocalFrameImpl::effectiveSandboxFlags() const |
2203 { | 2203 { |
2204 if (!frame()) | 2204 if (!frame()) |
2205 return WebSandboxFlags::None; | 2205 return WebSandboxFlags::None; |
2206 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); | 2206 return static_cast<WebSandboxFlags>(frame()->loader().effectiveSandboxFlags(
)); |
2207 } | 2207 } |
2208 | 2208 |
2209 } // namespace blink | 2209 } // namespace blink |
OLD | NEW |