| 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 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1098 // If the pinch viewport's offset is (-1, -1) it means the history item | 1098 // If the pinch viewport's offset is (-1, -1) it means the history item |
| 1099 // is an old version of HistoryItem so distribute the scroll between | 1099 // is an old version of HistoryItem so distribute the scroll between |
| 1100 // the main frame and the pinch viewport as best as we can. | 1100 // the main frame and the pinch viewport as best as we can. |
| 1101 if (pinchViewportOffset.x() == -1 && pinchViewportOffset.y() == -1) | 1101 if (pinchViewportOffset.x() == -1 && pinchViewportOffset.y() == -1) |
| 1102 pinchViewportOffset = FloatPoint(frameScrollOffset - view->scrollPos
ition()); | 1102 pinchViewportOffset = FloatPoint(frameScrollOffset - view->scrollPos
ition()); |
| 1103 | 1103 |
| 1104 m_frame->host()->pinchViewport().setLocation(pinchViewportOffset); | 1104 m_frame->host()->pinchViewport().setLocation(pinchViewportOffset); |
| 1105 } else { | 1105 } else { |
| 1106 IntPoint adjustedScrollPosition = view->adjustScrollPositionWithinRange(
m_currentItem->scrollPoint()); | 1106 IntPoint adjustedScrollPosition = view->adjustScrollPositionWithinRange(
m_currentItem->scrollPoint()); |
| 1107 if (adjustedScrollPosition != view->scrollPosition()) | 1107 if (adjustedScrollPosition != view->scrollPosition()) |
| 1108 view->notifyScrollPositionChanged(adjustedScrollPosition); | 1108 view->setScrollPosition(adjustedScrollPosition, ProgrammaticScroll); |
| 1109 } | 1109 } |
| 1110 | 1110 |
| 1111 if (m_frame->isMainFrame()) { | 1111 if (m_frame->isMainFrame()) { |
| 1112 if (ScrollingCoordinator* scrollingCoordinator = m_frame->page()->scroll
ingCoordinator()) | 1112 if (ScrollingCoordinator* scrollingCoordinator = m_frame->page()->scroll
ingCoordinator()) |
| 1113 scrollingCoordinator->frameViewRootLayerDidChange(view); | 1113 scrollingCoordinator->frameViewRootLayerDidChange(view); |
| 1114 } | 1114 } |
| 1115 documentLoader()->initialScrollState().didRestoreFromHistory = true; | 1115 documentLoader()->initialScrollState().didRestoreFromHistory = true; |
| 1116 } | 1116 } |
| 1117 | 1117 |
| 1118 String FrameLoader::userAgent(const KURL& url) const | 1118 String FrameLoader::userAgent(const KURL& url) const |
| (...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1475 // FIXME: We need a way to propagate insecure requests policy flags to | 1475 // FIXME: We need a way to propagate insecure requests policy flags to |
| 1476 // out-of-process frames. For now, we'll always use default behavior. | 1476 // out-of-process frames. For now, we'll always use default behavior. |
| 1477 if (!parentFrame->isLocalFrame()) | 1477 if (!parentFrame->isLocalFrame()) |
| 1478 return nullptr; | 1478 return nullptr; |
| 1479 | 1479 |
| 1480 ASSERT(toLocalFrame(parentFrame)->document()); | 1480 ASSERT(toLocalFrame(parentFrame)->document()); |
| 1481 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; | 1481 return toLocalFrame(parentFrame)->document()->insecureNavigationsToUpgrade()
; |
| 1482 } | 1482 } |
| 1483 | 1483 |
| 1484 } // namespace blink | 1484 } // namespace blink |
| OLD | NEW |