| 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 1236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1247 FloatPoint nodePoint(p->x(), p->y()); | 1247 FloatPoint nodePoint(p->x(), p->y()); |
| 1248 nodePoint = node->convertFromPage(nodePoint); | 1248 nodePoint = node->convertFromPage(nodePoint); |
| 1249 return DOMPoint::create(nodePoint.x(), nodePoint.y()); | 1249 return DOMPoint::create(nodePoint.x(), nodePoint.y()); |
| 1250 } | 1250 } |
| 1251 | 1251 |
| 1252 double DOMWindow::devicePixelRatio() const | 1252 double DOMWindow::devicePixelRatio() const |
| 1253 { | 1253 { |
| 1254 if (!m_frame) | 1254 if (!m_frame) |
| 1255 return 0.0; | 1255 return 0.0; |
| 1256 | 1256 |
| 1257 Page* page = m_frame->page(); | 1257 return m_frame->devicePixelRatio(); |
| 1258 if (!page) | |
| 1259 return 0.0; | |
| 1260 | |
| 1261 if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled()) | |
| 1262 return page->deviceScaleFactor() * m_frame->pageZoomFactor(); | |
| 1263 | |
| 1264 return page->deviceScaleFactor(); | |
| 1265 } | 1258 } |
| 1266 | 1259 |
| 1267 void DOMWindow::scrollBy(int x, int y) const | 1260 void DOMWindow::scrollBy(int x, int y) const |
| 1268 { | 1261 { |
| 1269 if (!isCurrentlyDisplayedInFrame()) | 1262 if (!isCurrentlyDisplayedInFrame()) |
| 1270 return; | 1263 return; |
| 1271 | 1264 |
| 1272 document()->updateLayoutIgnorePendingStylesheets(); | 1265 document()->updateLayoutIgnorePendingStylesheets(); |
| 1273 | 1266 |
| 1274 FrameView* view = m_frame->view(); | 1267 FrameView* view = m_frame->view(); |
| (...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1750 return static_cast<DOMWindowLifecycleNotifier*>(LifecycleContext::lifecycleN
otifier()); | 1743 return static_cast<DOMWindowLifecycleNotifier*>(LifecycleContext::lifecycleN
otifier()); |
| 1751 } | 1744 } |
| 1752 | 1745 |
| 1753 PassOwnPtr<LifecycleNotifier> DOMWindow::createLifecycleNotifier() | 1746 PassOwnPtr<LifecycleNotifier> DOMWindow::createLifecycleNotifier() |
| 1754 { | 1747 { |
| 1755 return DOMWindowLifecycleNotifier::create(this); | 1748 return DOMWindowLifecycleNotifier::create(this); |
| 1756 } | 1749 } |
| 1757 | 1750 |
| 1758 | 1751 |
| 1759 } // namespace WebCore | 1752 } // namespace WebCore |
| OLD | NEW |