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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 1769683002: TextIteratorAlgorithm should not force layout update in constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 1235 matching lines...) Expand 10 before | Expand all | Expand 10 after
1246 1246
1247 // Get rendered text from WebLocalFrame. 1247 // Get rendered text from WebLocalFrame.
1248 // TODO: Currently IPC truncates any data that has a 1248 // TODO: Currently IPC truncates any data that has a
1249 // size > kMaximumMessageSize. May be split the text into smaller chunks and 1249 // size > kMaximumMessageSize. May be split the text into smaller chunks and
1250 // send back using multiple IPC. See http://crbug.com/393444. 1250 // send back using multiple IPC. See http://crbug.com/393444.
1251 static const size_t kMaximumMessageSize = 8 * 1024 * 1024; 1251 static const size_t kMaximumMessageSize = 8 * 1024 * 1024;
1252 // TODO(dglazkov): Using this API is wrong. It's not OOPIF-compatible and 1252 // TODO(dglazkov): Using this API is wrong. It's not OOPIF-compatible and
1253 // sends text in the wrong order. See http://crbug.com/584798. 1253 // sends text in the wrong order. See http://crbug.com/584798.
1254 // TODO(dglazkov): WebFrameContentDumper should only be used for 1254 // TODO(dglazkov): WebFrameContentDumper should only be used for
1255 // testing purposes. See http://crbug.com/585164. 1255 // testing purposes. See http://crbug.com/585164.
1256 webview()->updateAllLifecyclePhases();
1256 std::string text = 1257 std::string text =
1257 WebFrameContentDumper::dumpFrameTreeAsText( 1258 WebFrameContentDumper::dumpFrameTreeAsText(
1258 webview()->mainFrame()->toWebLocalFrame(), kMaximumMessageSize) 1259 webview()->mainFrame()->toWebLocalFrame(), kMaximumMessageSize)
1259 .utf8(); 1260 .utf8();
1260 1261
1261 Send(new ViewMsg_GetRenderedTextCompleted(routing_id(), text)); 1262 Send(new ViewMsg_GetRenderedTextCompleted(routing_id(), text));
1262 } 1263 }
1263 1264
1264 void RenderViewImpl::StartPluginIme() { 1265 void RenderViewImpl::StartPluginIme() {
1265 IPC::Message* msg = new ViewHostMsg_StartPluginIme(routing_id()); 1266 IPC::Message* msg = new ViewHostMsg_StartPluginIme(routing_id());
(...skipping 2279 matching lines...) Expand 10 before | Expand all | Expand 10 after
3545 if (IsUseZoomForDSFEnabled()) { 3546 if (IsUseZoomForDSFEnabled()) {
3546 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); 3547 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_);
3547 } else { 3548 } else {
3548 webview()->setDeviceScaleFactor(device_scale_factor_); 3549 webview()->setDeviceScaleFactor(device_scale_factor_);
3549 } 3550 }
3550 webview()->settings()->setPreferCompositingToLCDTextEnabled( 3551 webview()->settings()->setPreferCompositingToLCDTextEnabled(
3551 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 3552 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
3552 } 3553 }
3553 3554
3554 } // namespace content 3555 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_view_browsertest_mac.mm ('k') | third_party/WebKit/Source/core/editing/EditingTestBase.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698