Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: Source/core/frame/LocalDOMWindow.cpp

Issue 538323003: Have window.closed return true when frame is closed. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Un-inline and improve formatting of Frame::setHasBeenClosed() Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/frame/Frame.cpp ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2007, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
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 1177 matching lines...) Expand 10 before | Expand all | Expand 10 after
1188 if (!view) 1188 if (!view)
1189 return 0; 1189 return 0;
1190 1190
1191 m_frame->document()->updateLayoutIgnorePendingStylesheets(); 1191 m_frame->document()->updateLayoutIgnorePendingStylesheets();
1192 1192
1193 return adjustForAbsoluteZoom(view->scrollY(), m_frame->pageZoomFactor()); 1193 return adjustForAbsoluteZoom(view->scrollY(), m_frame->pageZoomFactor());
1194 } 1194 }
1195 1195
1196 bool LocalDOMWindow::closed() const 1196 bool LocalDOMWindow::closed() const
1197 { 1197 {
1198 return !m_frame; 1198 return !m_frame || m_frame->hasBeenClosed();
1199 } 1199 }
1200 1200
1201 unsigned LocalDOMWindow::length() const 1201 unsigned LocalDOMWindow::length() const
1202 { 1202 {
1203 if (!isCurrentlyDisplayedInFrame()) 1203 if (!isCurrentlyDisplayedInFrame())
1204 return 0; 1204 return 0;
1205 1205
1206 return m_frame->tree().scopedChildCount(); 1206 return m_frame->tree().scopedChildCount();
1207 } 1207 }
1208 1208
(...skipping 705 matching lines...) Expand 10 before | Expand all | Expand 10 after
1914 LifecycleContext<LocalDOMWindow>::trace(visitor); 1914 LifecycleContext<LocalDOMWindow>::trace(visitor);
1915 } 1915 }
1916 1916
1917 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate) 1917 v8::Handle<v8::Object> LocalDOMWindow::wrap(v8::Handle<v8::Object> creationConte xt, v8::Isolate* isolate)
1918 { 1918 {
1919 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8]. 1919 ASSERT_NOT_REACHED(); // LocalDOMWindow has [Custom=ToV8].
1920 return v8::Handle<v8::Object>(); 1920 return v8::Handle<v8::Object>();
1921 } 1921 }
1922 1922
1923 } // namespace blink 1923 } // namespace blink
OLDNEW
« no previous file with comments | « Source/core/frame/Frame.cpp ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698