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

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: Reset ViewState when trying to copy from a nullptr Created 3 years, 5 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 3293 matching lines...) Expand 10 before | Expand all | Expand 10 after
3304 frame_view->LayoutViewportScrollableArea(); 3304 frame_view->LayoutViewportScrollableArea();
3305 3305
3306 if (!scrollable_area->GetScrollOffset().IsZero()) 3306 if (!scrollable_area->GetScrollOffset().IsZero())
3307 scrollable_area->SetScrollOffset(ScrollOffset(), kProgrammaticScroll); 3307 scrollable_area->SetScrollOffset(ScrollOffset(), kProgrammaticScroll);
3308 } 3308 }
3309 3309
3310 if (Document* document = 3310 if (Document* document =
3311 ToLocalFrame(GetPage()->MainFrame())->GetDocument()) { 3311 ToLocalFrame(GetPage()->MainFrame())->GetDocument()) {
3312 if (DocumentLoader* loader = document->Loader()) { 3312 if (DocumentLoader* loader = document->Loader()) {
3313 if (HistoryItem* item = loader->GetHistoryItem()) 3313 if (HistoryItem* item = loader->GetHistoryItem())
3314 item->SetDidSaveScrollOrScaleState(false); 3314 item->ClearViewState();
3315 } 3315 }
3316 } 3316 }
3317 3317
3318 GetPageScaleConstraintsSet().SetNeedsReset(true); 3318 GetPageScaleConstraintsSet().SetNeedsReset(true);
3319 } 3319 }
3320 3320
3321 void WebViewImpl::PerformMediaPlayerAction(const WebMediaPlayerAction& action, 3321 void WebViewImpl::PerformMediaPlayerAction(const WebMediaPlayerAction& action,
3322 const WebPoint& location) { 3322 const WebPoint& location) {
3323 HitTestResult result = HitTestResultForViewportPos(location); 3323 HitTestResult result = HitTestResultForViewportPos(location);
3324 Node* node = result.InnerNode(); 3324 Node* node = result.InnerNode();
(...skipping 820 matching lines...) Expand 10 before | Expand all | Expand 10 after
4145 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) 4145 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame())
4146 return nullptr; 4146 return nullptr;
4147 return focused_frame; 4147 return focused_frame;
4148 } 4148 }
4149 4149
4150 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { 4150 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const {
4151 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; 4151 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr;
4152 } 4152 }
4153 4153
4154 } // namespace blink 4154 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/loader/HistoryItem.cpp ('k') | third_party/WebKit/Source/web/tests/WebFrameTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698