| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2007 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 30 matching lines...) Expand all Loading... |
| 41 Screen::Screen(Frame* frame) | 41 Screen::Screen(Frame* frame) |
| 42 : DOMWindowProperty(frame) | 42 : DOMWindowProperty(frame) |
| 43 { | 43 { |
| 44 ScriptWrappable::init(this); | 44 ScriptWrappable::init(this); |
| 45 } | 45 } |
| 46 | 46 |
| 47 unsigned Screen::height() const | 47 unsigned Screen::height() const |
| 48 { | 48 { |
| 49 if (!m_frame) | 49 if (!m_frame) |
| 50 return 0; | 50 return 0; |
| 51 long height = static_cast<long>(screenRect(m_frame->view()).height()); | 51 return static_cast<unsigned>(screenRect(m_frame->view()).height()); |
| 52 InspectorInstrumentation::applyScreenHeightOverride(m_frame, &height); | |
| 53 return static_cast<unsigned>(height); | |
| 54 } | 52 } |
| 55 | 53 |
| 56 unsigned Screen::width() const | 54 unsigned Screen::width() const |
| 57 { | 55 { |
| 58 if (!m_frame) | 56 if (!m_frame) |
| 59 return 0; | 57 return 0; |
| 60 long width = static_cast<long>(screenRect(m_frame->view()).width()); | 58 return static_cast<unsigned>(screenRect(m_frame->view()).width()); |
| 61 InspectorInstrumentation::applyScreenWidthOverride(m_frame, &width); | |
| 62 return static_cast<unsigned>(width); | |
| 63 } | 59 } |
| 64 | 60 |
| 65 unsigned Screen::colorDepth() const | 61 unsigned Screen::colorDepth() const |
| 66 { | 62 { |
| 67 if (!m_frame) | 63 if (!m_frame) |
| 68 return 0; | 64 return 0; |
| 69 return static_cast<unsigned>(screenDepth(m_frame->view())); | 65 return static_cast<unsigned>(screenDepth(m_frame->view())); |
| 70 } | 66 } |
| 71 | 67 |
| 72 unsigned Screen::pixelDepth() const | 68 unsigned Screen::pixelDepth() const |
| (...skipping 25 matching lines...) Expand all Loading... |
| 98 } | 94 } |
| 99 | 95 |
| 100 unsigned Screen::availWidth() const | 96 unsigned Screen::availWidth() const |
| 101 { | 97 { |
| 102 if (!m_frame) | 98 if (!m_frame) |
| 103 return 0; | 99 return 0; |
| 104 return static_cast<unsigned>(screenAvailableRect(m_frame->view()).width()); | 100 return static_cast<unsigned>(screenAvailableRect(m_frame->view()).width()); |
| 105 } | 101 } |
| 106 | 102 |
| 107 } // namespace WebCore | 103 } // namespace WebCore |
| OLD | NEW |