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

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

Issue 1740173003: TextIteratorAlgorithm should not force layout update in constructor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed my WIP comment. 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 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after
1251 1251
1252 // Get rendered text from WebLocalFrame. 1252 // Get rendered text from WebLocalFrame.
1253 // TODO: Currently IPC truncates any data that has a 1253 // TODO: Currently IPC truncates any data that has a
1254 // size > kMaximumMessageSize. May be split the text into smaller chunks and 1254 // size > kMaximumMessageSize. May be split the text into smaller chunks and
1255 // send back using multiple IPC. See http://crbug.com/393444. 1255 // send back using multiple IPC. See http://crbug.com/393444.
1256 static const size_t kMaximumMessageSize = 8 * 1024 * 1024; 1256 static const size_t kMaximumMessageSize = 8 * 1024 * 1024;
1257 // TODO(dglazkov): Using this API is wrong. It's not OOPIF-compatible and 1257 // TODO(dglazkov): Using this API is wrong. It's not OOPIF-compatible and
1258 // sends text in the wrong order. See http://crbug.com/584798. 1258 // sends text in the wrong order. See http://crbug.com/584798.
1259 // TODO(dglazkov): WebFrameContentDumper should only be used for 1259 // TODO(dglazkov): WebFrameContentDumper should only be used for
1260 // testing purposes. See http://crbug.com/585164. 1260 // testing purposes. See http://crbug.com/585164.
1261 webview()->updateAllLifecyclePhases();
1261 std::string text = 1262 std::string text =
1262 WebFrameContentDumper::dumpFrameTreeAsText( 1263 WebFrameContentDumper::dumpFrameTreeAsText(
1263 webview()->mainFrame()->toWebLocalFrame(), kMaximumMessageSize) 1264 webview()->mainFrame()->toWebLocalFrame(), kMaximumMessageSize)
1264 .utf8(); 1265 .utf8();
1265 1266
1266 Send(new ViewMsg_GetRenderedTextCompleted(routing_id(), text)); 1267 Send(new ViewMsg_GetRenderedTextCompleted(routing_id(), text));
1267 } 1268 }
1268 1269
1269 void RenderViewImpl::StartPluginIme() { 1270 void RenderViewImpl::StartPluginIme() {
1270 IPC::Message* msg = new ViewHostMsg_StartPluginIme(routing_id()); 1271 IPC::Message* msg = new ViewHostMsg_StartPluginIme(routing_id());
(...skipping 2281 matching lines...) Expand 10 before | Expand all | Expand 10 after
3552 if (IsUseZoomForDSFEnabled()) { 3553 if (IsUseZoomForDSFEnabled()) {
3553 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_); 3554 webview()->setZoomFactorForDeviceScaleFactor(device_scale_factor_);
3554 } else { 3555 } else {
3555 webview()->setDeviceScaleFactor(device_scale_factor_); 3556 webview()->setDeviceScaleFactor(device_scale_factor_);
3556 } 3557 }
3557 webview()->settings()->setPreferCompositingToLCDTextEnabled( 3558 webview()->settings()->setPreferCompositingToLCDTextEnabled(
3558 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_)); 3559 PreferCompositingToLCDText(compositor_deps_, device_scale_factor_));
3559 } 3560 }
3560 3561
3561 } // namespace content 3562 } // 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