| 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 613 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 624 // Respect SVGs zoomAndPan="disabled" property in standalone SVG documents. | 624 // Respect SVGs zoomAndPan="disabled" property in standalone SVG documents. |
| 625 // FIXME: How to handle compound documents + zoomAndPan="disabled"? Needs SVG
WG clarification. | 625 // FIXME: How to handle compound documents + zoomAndPan="disabled"? Needs SVG
WG clarification. |
| 626 if (document->isSVGDocument()) { | 626 if (document->isSVGDocument()) { |
| 627 if (!document->accessSVGExtensions().zoomAndPanEnabled()) | 627 if (!document->accessSVGExtensions().zoomAndPanEnabled()) |
| 628 return; | 628 return; |
| 629 } | 629 } |
| 630 | 630 |
| 631 if (m_pageZoomFactor != pageZoomFactor) { | 631 if (m_pageZoomFactor != pageZoomFactor) { |
| 632 if (FrameView* view = this->view()) { | 632 if (FrameView* view = this->view()) { |
| 633 // Update the scroll position when doing a full page zoom, so the content
stays in relatively the same position. | 633 // Update the scroll position when doing a full page zoom, so the content
stays in relatively the same position. |
| 634 LayoutPoint scrollPosition = view->scrollPosition(); | 634 ScrollOffset scrollOffset = view->scrollOffset(); |
| 635 float percentDifference = (pageZoomFactor / m_pageZoomFactor); | 635 float percentDifference = (pageZoomFactor / m_pageZoomFactor); |
| 636 view->setScrollPosition( | 636 view->setScrollOffset( |
| 637 DoublePoint(scrollPosition.x() * percentDifference, | 637 ScrollOffset(scrollOffset.width() * percentDifference, |
| 638 scrollPosition.y() * percentDifference), | 638 scrollOffset.height() * percentDifference), |
| 639 ProgrammaticScroll); | 639 ProgrammaticScroll); |
| 640 } | 640 } |
| 641 } | 641 } |
| 642 | 642 |
| 643 m_pageZoomFactor = pageZoomFactor; | 643 m_pageZoomFactor = pageZoomFactor; |
| 644 m_textZoomFactor = textZoomFactor; | 644 m_textZoomFactor = textZoomFactor; |
| 645 | 645 |
| 646 for (Frame* child = tree().firstChild(); child; | 646 for (Frame* child = tree().firstChild(); child; |
| 647 child = child->tree().nextSibling()) { | 647 child = child->tree().nextSibling()) { |
| 648 if (child->isLocalFrame()) | 648 if (child->isLocalFrame()) |
| (...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 888 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 889 m_frame->client()->frameBlameContext()->Enter(); | 889 m_frame->client()->frameBlameContext()->Enter(); |
| 890 } | 890 } |
| 891 | 891 |
| 892 ScopedFrameBlamer::~ScopedFrameBlamer() { | 892 ScopedFrameBlamer::~ScopedFrameBlamer() { |
| 893 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) | 893 if (m_frame && m_frame->client() && m_frame->client()->frameBlameContext()) |
| 894 m_frame->client()->frameBlameContext()->Leave(); | 894 m_frame->client()->frameBlameContext()->Leave(); |
| 895 } | 895 } |
| 896 | 896 |
| 897 } // namespace blink | 897 } // namespace blink |
| OLD | NEW |