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

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

Issue 131113003: Fix DOMWindow::isCurrentlyDisplayedInFrame to return false when detached (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix ScreenOrientation + test window.open. Created 6 years, 9 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2007, 2010 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 26 matching lines...) Expand all
37 37
38 BarProp::BarProp(LocalFrame* frame, Type type) 38 BarProp::BarProp(LocalFrame* frame, Type type)
39 : DOMWindowProperty(frame) 39 : DOMWindowProperty(frame)
40 , m_type(type) 40 , m_type(type)
41 { 41 {
42 ScriptWrappable::init(this); 42 ScriptWrappable::init(this);
43 } 43 }
44 44
45 bool BarProp::visible() const 45 bool BarProp::visible() const
46 { 46 {
47 ASSERT(m_frame);
48 if (!m_frame) 47 if (!m_frame)
49 return false; 48 return false;
50 FrameHost* host = m_frame->host(); 49 FrameHost* host = m_frame->host();
51 if (!host) 50 if (!host)
52 return false; 51 return false;
53 52
54 switch (m_type) { 53 switch (m_type) {
55 case Locationbar: 54 case Locationbar:
56 case Personalbar: 55 case Personalbar:
57 case Toolbar: 56 case Toolbar:
58 return host->chrome().toolbarsVisible(); 57 return host->chrome().toolbarsVisible();
59 case Menubar: 58 case Menubar:
60 return host->chrome().menubarVisible(); 59 return host->chrome().menubarVisible();
61 case Scrollbars: 60 case Scrollbars:
62 return host->chrome().scrollbarsVisible(); 61 return host->chrome().scrollbarsVisible();
63 case Statusbar: 62 case Statusbar:
64 return host->chrome().statusbarVisible(); 63 return host->chrome().statusbarVisible();
65 } 64 }
66 65
67 ASSERT_NOT_REACHED(); 66 ASSERT_NOT_REACHED();
68 return false; 67 return false;
69 } 68 }
70 69
71 } // namespace WebCore 70 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698