| OLD | NEW |
| 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 915 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 926 if (host->settings().viewportEnabled() && frame->isMainFrame()) | 926 if (host->settings().viewportEnabled() && frame->isMainFrame()) |
| 927 frame->document()->updateLayoutIgnorePendingStylesheets(); | 927 frame->document()->updateLayoutIgnorePendingStylesheets(); |
| 928 | 928 |
| 929 // FIXME: This is potentially too much work. We really only need to know the
dimensions of the parent frame's layoutObject. | 929 // FIXME: This is potentially too much work. We really only need to know the
dimensions of the parent frame's layoutObject. |
| 930 if (Frame* parent = frame->tree().parent()) { | 930 if (Frame* parent = frame->tree().parent()) { |
| 931 if (parent && parent->isLocalFrame()) | 931 if (parent && parent->isLocalFrame()) |
| 932 toLocalFrame(parent)->document()->updateLayoutIgnorePendingStyleshee
ts(); | 932 toLocalFrame(parent)->document()->updateLayoutIgnorePendingStyleshee
ts(); |
| 933 } | 933 } |
| 934 | 934 |
| 935 return frame->isMainFrame() && !host->settings().inertVisualViewport() | 935 return frame->isMainFrame() && !host->settings().inertVisualViewport() |
| 936 ? host->visualViewport().visibleRect().size() | 936 ? FloatSize(host->visualViewport().visibleRect().size()) |
| 937 : view->visibleContentRect(IncludeScrollbars).size(); | 937 : FloatSize(view->visibleContentRect(IncludeScrollbars).size()); |
| 938 } | 938 } |
| 939 | 939 |
| 940 int LocalDOMWindow::innerHeight() const | 940 int LocalDOMWindow::innerHeight() const |
| 941 { | 941 { |
| 942 if (!frame()) | 942 if (!frame()) |
| 943 return 0; | 943 return 0; |
| 944 | 944 |
| 945 FloatSize viewportSize = getViewportSize(frame()); | 945 FloatSize viewportSize = getViewportSize(frame()); |
| 946 return adjustForAbsoluteZoom(expandedIntSize(viewportSize).height(), frame()
->pageZoomFactor()); | 946 return adjustForAbsoluteZoom(expandedIntSize(viewportSize).height(), frame()
->pageZoomFactor()); |
| 947 } | 947 } |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1529 { | 1529 { |
| 1530 // If the LocalDOMWindow still has a frame reference, that frame must point | 1530 // If the LocalDOMWindow still has a frame reference, that frame must point |
| 1531 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation | 1531 // back to this LocalDOMWindow: otherwise, it's easy to get into a situation |
| 1532 // where script execution leaks between different LocalDOMWindows. | 1532 // where script execution leaks between different LocalDOMWindows. |
| 1533 if (m_frameObserver->frame()) | 1533 if (m_frameObserver->frame()) |
| 1534 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); | 1534 ASSERT_WITH_SECURITY_IMPLICATION(m_frameObserver->frame()->domWindow() =
= this); |
| 1535 return m_frameObserver->frame(); | 1535 return m_frameObserver->frame(); |
| 1536 } | 1536 } |
| 1537 | 1537 |
| 1538 } // namespace blink | 1538 } // namespace blink |
| OLD | NEW |