| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> | 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org> |
| 3 * 1999 Lars Knoll <knoll@kde.org> | 3 * 1999 Lars Knoll <knoll@kde.org> |
| 4 * 1999 Antti Koivisto <koivisto@kde.org> | 4 * 1999 Antti Koivisto <koivisto@kde.org> |
| 5 * 2000 Simon Hausmann <hausmann@kde.org> | 5 * 2000 Simon Hausmann <hausmann@kde.org> |
| 6 * 2000 Stefan Schimanski <1Stein@gmx.de> | 6 * 2000 Stefan Schimanski <1Stein@gmx.de> |
| 7 * 2001 George Staikos <staikos@kde.org> | 7 * 2001 George Staikos <staikos@kde.org> |
| 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. | 8 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r
ights reserved. |
| 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> | 9 * Copyright (C) 2005 Alexey Proskuryakov <ap@nypop.com> |
| 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 185 { | 185 { |
| 186 // We the custom scroll bars as early as possible to prevent m_doc->detach() | 186 // We the custom scroll bars as early as possible to prevent m_doc->detach() |
| 187 // from messing with the view such that its scroll bars won't be torn down. | 187 // from messing with the view such that its scroll bars won't be torn down. |
| 188 // FIXME: We should revisit this. | 188 // FIXME: We should revisit this. |
| 189 if (m_view) | 189 if (m_view) |
| 190 m_view->prepareForDetach(); | 190 m_view->prepareForDetach(); |
| 191 | 191 |
| 192 // Prepare for destruction now, so any unload event handlers get run and the
DOMWindow is | 192 // Prepare for destruction now, so any unload event handlers get run and the
DOMWindow is |
| 193 // notified. If we wait until the view is destroyed, then things won't be ho
oked up enough for | 193 // notified. If we wait until the view is destroyed, then things won't be ho
oked up enough for |
| 194 // these calls to work. | 194 // these calls to work. |
| 195 if (!view && document() && document()->confusingAndOftenMisusedAttached()) { | 195 if (!view && document() && document()->isActive()) { |
| 196 // FIXME: We don't call willRemove here. Why is that OK? | 196 // FIXME: We don't call willRemove here. Why is that OK? |
| 197 document()->prepareForDestruction(); | 197 document()->prepareForDestruction(); |
| 198 } | 198 } |
| 199 | 199 |
| 200 if (m_view) | 200 if (m_view) |
| 201 m_view->unscheduleRelayout(); | 201 m_view->unscheduleRelayout(); |
| 202 | 202 |
| 203 eventHandler().clear(); | 203 eventHandler().clear(); |
| 204 | 204 |
| 205 m_view = view; | 205 m_view = view; |
| (...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 677 if (!m_page) | 677 if (!m_page) |
| 678 return 0; | 678 return 0; |
| 679 | 679 |
| 680 double ratio = m_page->deviceScaleFactor(); | 680 double ratio = m_page->deviceScaleFactor(); |
| 681 if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled()) | 681 if (RuntimeEnabledFeatures::devicePixelRatioIncludesZoomEnabled()) |
| 682 ratio *= pageZoomFactor(); | 682 ratio *= pageZoomFactor(); |
| 683 return ratio; | 683 return ratio; |
| 684 } | 684 } |
| 685 | 685 |
| 686 } // namespace WebCore | 686 } // namespace WebCore |
| OLD | NEW |