| 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 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1113 // If the pinch viewport's offset is (-1, -1) it means the history item | 1113 // If the pinch viewport's offset is (-1, -1) it means the history item |
| 1114 // is an old version of HistoryItem so distribute the scroll between | 1114 // is an old version of HistoryItem so distribute the scroll between |
| 1115 // the main frame and the pinch viewport as best as we can. | 1115 // the main frame and the pinch viewport as best as we can. |
| 1116 if (pinchViewportOffset.x() == -1 && pinchViewportOffset.y() == -1) | 1116 if (pinchViewportOffset.x() == -1 && pinchViewportOffset.y() == -1) |
| 1117 pinchViewportOffset = FloatPoint(frameScrollOffset - view->scrollPos
ition()); | 1117 pinchViewportOffset = FloatPoint(frameScrollOffset - view->scrollPos
ition()); |
| 1118 | 1118 |
| 1119 m_frame->host()->pinchViewport().setLocation(pinchViewportOffset); | 1119 m_frame->host()->pinchViewport().setLocation(pinchViewportOffset); |
| 1120 } else { | 1120 } else { |
| 1121 IntPoint adjustedScrollPosition = view->adjustScrollPositionWithinRange(
m_currentItem->scrollPoint()); | 1121 IntPoint adjustedScrollPosition = view->adjustScrollPositionWithinRange(
m_currentItem->scrollPoint()); |
| 1122 if (adjustedScrollPosition != view->scrollPosition()) | 1122 if (adjustedScrollPosition != view->scrollPosition()) |
| 1123 view->notifyScrollPositionChanged(adjustedScrollPosition); | 1123 view->setScrollPosition(adjustedScrollPosition, ProgrammaticScroll); |
| 1124 } | 1124 } |
| 1125 | 1125 |
| 1126 if (m_frame->isMainFrame()) { | 1126 if (m_frame->isMainFrame()) { |
| 1127 if (ScrollingCoordinator* scrollingCoordinator = m_frame->page()->scroll
ingCoordinator()) | 1127 if (ScrollingCoordinator* scrollingCoordinator = m_frame->page()->scroll
ingCoordinator()) |
| 1128 scrollingCoordinator->frameViewRootLayerDidChange(view); | 1128 scrollingCoordinator->frameViewRootLayerDidChange(view); |
| 1129 } | 1129 } |
| 1130 documentLoader()->initialScrollState().didRestoreFromHistory = true; | 1130 documentLoader()->initialScrollState().didRestoreFromHistory = true; |
| 1131 } | 1131 } |
| 1132 | 1132 |
| 1133 String FrameLoader::userAgent(const KURL& url) const | 1133 String FrameLoader::userAgent(const KURL& url) const |
| (...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1482 // FIXME: We need a way to propagate insecure requests policy flags to | 1482 // FIXME: We need a way to propagate insecure requests policy flags to |
| 1483 // out-of-process frames. For now, we'll always use default behavior. | 1483 // out-of-process frames. For now, we'll always use default behavior. |
| 1484 if (!parentFrame->isLocalFrame()) | 1484 if (!parentFrame->isLocalFrame()) |
| 1485 return nullptr; | 1485 return nullptr; |
| 1486 | 1486 |
| 1487 ASSERT(toLocalFrame(parentFrame)->document()); | 1487 ASSERT(toLocalFrame(parentFrame)->document()); |
| 1488 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1488 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
| 1489 } | 1489 } |
| 1490 | 1490 |
| 1491 } // namespace blink | 1491 } // namespace blink |
| OLD | NEW |