Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(181)

Side by Side Diff: third_party/WebKit/Source/web/WebViewImpl.cpp

Issue 2949073002: Changing scroll and view state in onpopstate shouldn't overwrite back/forward state restore (Closed)
Patch Set: +test Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 3281 matching lines...) Expand 10 before | Expand all | Expand 10 after
3292 frame_view->LayoutViewportScrollableArea(); 3292 frame_view->LayoutViewportScrollableArea();
3293 3293
3294 if (!scrollable_area->GetScrollOffset().IsZero()) 3294 if (!scrollable_area->GetScrollOffset().IsZero())
3295 scrollable_area->SetScrollOffset(ScrollOffset(), kProgrammaticScroll); 3295 scrollable_area->SetScrollOffset(ScrollOffset(), kProgrammaticScroll);
3296 } 3296 }
3297 3297
3298 if (Document* document = 3298 if (Document* document =
3299 ToLocalFrame(GetPage()->MainFrame())->GetDocument()) { 3299 ToLocalFrame(GetPage()->MainFrame())->GetDocument()) {
3300 if (DocumentLoader* loader = document->Loader()) { 3300 if (DocumentLoader* loader = document->Loader()) {
3301 if (HistoryItem* item = loader->GetHistoryItem()) 3301 if (HistoryItem* item = loader->GetHistoryItem())
3302 item->SetDidSaveScrollOrScaleState(false); 3302 item->ClearScrollAndViewState();
3303 } 3303 }
3304 } 3304 }
3305 3305
3306 GetPageScaleConstraintsSet().SetNeedsReset(true); 3306 GetPageScaleConstraintsSet().SetNeedsReset(true);
3307 } 3307 }
3308 3308
3309 void WebViewImpl::PerformMediaPlayerAction(const WebMediaPlayerAction& action, 3309 void WebViewImpl::PerformMediaPlayerAction(const WebMediaPlayerAction& action,
3310 const WebPoint& location) { 3310 const WebPoint& location) {
3311 HitTestResult result = HitTestResultForViewportPos(location); 3311 HitTestResult result = HitTestResultForViewportPos(location);
3312 Node* node = result.InnerNode(); 3312 Node* node = result.InnerNode();
(...skipping 815 matching lines...) Expand 10 before | Expand all | Expand 10 after
4128 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) 4128 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame())
4129 return nullptr; 4129 return nullptr;
4130 return focused_frame; 4130 return focused_frame;
4131 } 4131 }
4132 4132
4133 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { 4133 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const {
4134 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; 4134 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr;
4135 } 4135 }
4136 4136
4137 } // namespace blink 4137 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698