| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserv
ed. |
| 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) | 3 * Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies) |
| 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 4 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
| 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> | 5 * Copyright (C) 2008 Alp Toker <alp@atoker.com> |
| 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. | 6 * Copyright (C) Research In Motion Limited 2009. All rights reserved. |
| 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> | 7 * Copyright (C) 2011 Kris Jordan <krisjordan@gmail.com> |
| 8 * Copyright (C) 2011 Google Inc. All rights reserved. | 8 * Copyright (C) 2011 Google Inc. All rights reserved. |
| 9 * | 9 * |
| 10 * Redistribution and use in source and binary forms, with or without | 10 * Redistribution and use in source and binary forms, with or without |
| (...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1040 m_frame->page()->setPageScaleFactor(m_currentItem->pageScaleFactor(), fr
ameScrollOffset); | 1040 m_frame->page()->setPageScaleFactor(m_currentItem->pageScaleFactor(), fr
ameScrollOffset); |
| 1041 | 1041 |
| 1042 // If the pinch viewport's offset is (-1, -1) it means the history item | 1042 // If the pinch viewport's offset is (-1, -1) it means the history item |
| 1043 // is an old version of HistoryItem so distribute the scroll between | 1043 // is an old version of HistoryItem so distribute the scroll between |
| 1044 // the main frame and the pinch viewport as best as we can. | 1044 // the main frame and the pinch viewport as best as we can. |
| 1045 if (pinchViewportOffset.x() == -1 && pinchViewportOffset.y() == -1) | 1045 if (pinchViewportOffset.x() == -1 && pinchViewportOffset.y() == -1) |
| 1046 pinchViewportOffset = FloatPoint(frameScrollOffset - view->scrollPos
ition()); | 1046 pinchViewportOffset = FloatPoint(frameScrollOffset - view->scrollPos
ition()); |
| 1047 | 1047 |
| 1048 m_frame->host()->pinchViewport().setLocation(pinchViewportOffset); | 1048 m_frame->host()->pinchViewport().setLocation(pinchViewportOffset); |
| 1049 } else { | 1049 } else { |
| 1050 view->setScrollPositionNonProgrammatically(m_currentItem->scrollPoint())
; | 1050 IntPoint adjustedScrollPosition = view->adjustScrollPositionWithinRange(
m_currentItem->scrollPoint()); |
| 1051 if (adjustedScrollPosition != view->scrollPosition()) |
| 1052 view->notifyScrollPositionChanged(adjustedScrollPosition); |
| 1051 } | 1053 } |
| 1052 | 1054 |
| 1053 if (m_frame->isMainFrame()) { | 1055 if (m_frame->isMainFrame()) { |
| 1054 if (ScrollingCoordinator* scrollingCoordinator = m_frame->page()->scroll
ingCoordinator()) | 1056 if (ScrollingCoordinator* scrollingCoordinator = m_frame->page()->scroll
ingCoordinator()) |
| 1055 scrollingCoordinator->frameViewRootLayerDidChange(view); | 1057 scrollingCoordinator->frameViewRootLayerDidChange(view); |
| 1056 } | 1058 } |
| 1057 } | 1059 } |
| 1058 | 1060 |
| 1059 String FrameLoader::userAgent(const KURL& url) const | 1061 String FrameLoader::userAgent(const KURL& url) const |
| 1060 { | 1062 { |
| (...skipping 390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1451 // FIXME: We need a way to propagate insecure requests policy flags to | 1453 // FIXME: We need a way to propagate insecure requests policy flags to |
| 1452 // out-of-process frames. For now, we'll always use default behavior. | 1454 // out-of-process frames. For now, we'll always use default behavior. |
| 1453 if (!parentFrame->isLocalFrame()) | 1455 if (!parentFrame->isLocalFrame()) |
| 1454 return nullptr; | 1456 return nullptr; |
| 1455 | 1457 |
| 1456 ASSERT(toLocalFrame(parentFrame)->document()); | 1458 ASSERT(toLocalFrame(parentFrame)->document()); |
| 1457 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1459 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
| 1458 } | 1460 } |
| 1459 | 1461 |
| 1460 } // namespace blink | 1462 } // namespace blink |
| OLD | NEW |