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

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

Issue 2854863002: Don't update viewport size from UpdateAfterLayout. (Closed)
Patch Set: Fix ResizeFrameView invocation Created 3 years, 7 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3673 matching lines...) Expand 10 before | Expand all | Expand 10 after
3684 frame->View()->SetInitialViewportSize(size_); 3684 frame->View()->SetInitialViewportSize(size_);
3685 3685
3686 client_->DidAutoResize(size_); 3686 client_->DidAutoResize(size_);
3687 SendResizeEventAndRepaint(); 3687 SendResizeEventAndRepaint();
3688 } 3688 }
3689 } 3689 }
3690 3690
3691 if (GetPageScaleConstraintsSet().ConstraintsDirty()) 3691 if (GetPageScaleConstraintsSet().ConstraintsDirty())
3692 RefreshPageScaleFactorAfterLayout(); 3692 RefreshPageScaleFactorAfterLayout();
3693 3693
3694 UpdateICBAndResizeViewport(); 3694 ResizeFrameView(webframe);
3695 } 3695 }
3696 3696
3697 void WebViewImpl::LayoutUpdated(WebLocalFrameImpl* webframe) { 3697 void WebViewImpl::LayoutUpdated(WebLocalFrameImpl* webframe) {
3698 LocalFrame* frame = webframe->GetFrame(); 3698 LocalFrame* frame = webframe->GetFrame();
3699 if (!client_ || !client_->CanUpdateLayout() || !frame->IsMainFrame()) 3699 if (!client_ || !client_->CanUpdateLayout() || !frame->IsMainFrame())
3700 return; 3700 return;
3701 3701
3702 ResizeAfterLayout(webframe); 3702 ResizeAfterLayout(webframe);
3703 3703
3704 // Relayout immediately to avoid violating the rule that needsLayout() 3704 // Relayout immediately to avoid violating the rule that needsLayout()
(...skipping 475 matching lines...) Expand 10 before | Expand all | Expand 10 after
4180 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame()) 4180 if (focused_frame->LocalFrameRoot() != MainFrameImpl()->GetFrame())
4181 return nullptr; 4181 return nullptr;
4182 return focused_frame; 4182 return focused_frame;
4183 } 4183 }
4184 4184
4185 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const { 4185 LocalFrame* WebViewImpl::FocusedLocalFrameAvailableForIme() const {
4186 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr; 4186 return ime_accept_events_ ? FocusedLocalFrameInWidget() : nullptr;
4187 } 4187 }
4188 4188
4189 } // namespace blink 4189 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698