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

Issue 1308113002: Make content text retrieval in ChromeRenderViewObserver never force layout. (Closed)

Created:
5 years, 4 months ago by dglazkov
Modified:
4 years, 10 months ago
CC:
chromium-reviews, creis+watch_chromium.org, darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, dcheng
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make content text retrieval in ChromeRenderViewObserver never force layout. Use the hooks, introduced in https://codereview.chromium.org/1309883003/ to remove the need for both searching for meta tags and an 8-second speculative text retrieval on a timer. This includes plumbing RenderViewObserver::DidFirstLayoutAfterFinishedParsing so that the RenderView observer could us this call. BUG=521149 R=jochen@chromium.org

Patch Set 1 #

Patch Set 2 : Updated to match upstream changes. #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -47 lines) Patch
M chrome/renderer/chrome_render_view_observer.h View 2 chunks +1 line, -3 lines 0 comments Download
M chrome/renderer/chrome_render_view_observer.cc View 1 6 chunks +10 lines, -44 lines 0 comments Download
M content/public/renderer/render_view_observer.h View 1 chunk +1 line, -0 lines 1 comment Download
M content/renderer/render_view_impl.h View 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_view_impl.cc View 1 chunk +5 lines, -0 lines 0 comments Download

Messages

Total messages: 14 (6 generated)
dglazkov
5 years, 4 months ago (2015-08-21 22:31:33 UTC) #1
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1308113002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1308113002/20001
5 years, 4 months ago (2015-08-24 16:22:20 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/103141)
5 years, 4 months ago (2015-08-24 16:58:41 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1308113002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1308113002/20001
5 years, 4 months ago (2015-08-24 18:04:14 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/103211)
5 years, 4 months ago (2015-08-24 18:39:17 UTC) #10
nasko
https://codereview.chromium.org/1308113002/diff/20001/content/public/renderer/render_view_observer.h File content/public/renderer/render_view_observer.h (right): https://codereview.chromium.org/1308113002/diff/20001/content/public/renderer/render_view_observer.h#newcode62 content/public/renderer/render_view_observer.h:62: virtual void DidFirstLayoutAfterFinishedParsing() {} We shouldn't be putting any ...
5 years, 4 months ago (2015-08-24 22:59:05 UTC) #12
dglazkov
On 2015/08/24 at 22:59:05, nasko wrote: > https://codereview.chromium.org/1308113002/diff/20001/content/public/renderer/render_view_observer.h > File content/public/renderer/render_view_observer.h (right): > > https://codereview.chromium.org/1308113002/diff/20001/content/public/renderer/render_view_observer.h#newcode62 ...
5 years, 4 months ago (2015-08-25 02:56:46 UTC) #13
dcheng
5 years, 4 months ago (2015-08-25 06:59:09 UTC) #14
On 2015/08/25 at 02:56:46, dglazkov wrote:
> On 2015/08/24 at 22:59:05, nasko wrote:
> >
https://codereview.chromium.org/1308113002/diff/20001/content/public/renderer...
> > File content/public/renderer/render_view_observer.h (right):
> > 
> >
https://codereview.chromium.org/1308113002/diff/20001/content/public/renderer...
> > content/public/renderer/render_view_observer.h:62: virtual void
DidFirstLayoutAfterFinishedParsing() {}
> > We shouldn't be putting any new members on RenderViewObserver, as we are
trying to kill it. RenderFrameObserver should be used instead.
> 
> Interesting. RenderFrameObserver looks like a slightly odd abstraction for
this. All the hooks are all frame lifecycle-related. On the other hand, the
RenderViewObserver looks more like a view (compositor surface)-observing
abstraction. Why are you trying to kill it? It seems that we shouldn't be
conflating the two.

A RenderView/WebView can have a remote main frame. In that case, there's no
compositor surface associated with the RenderView/WebView.

Quoting from the Blink review (since commenting on closed reviews is annoying):
> It's currently only called on main frame, because it's actually tied to
producing a frame (in the rendering sense -- the WebViewImpl::layout), rather
than just layout (in the document layout sense -- the FrameView::layout). I
don't have a better name for that, but maybe we should invent something.

Methods on WebViewClient should still make sense to call even if the WebView has
a remote main frame. It sounds like this method wouldn't make sense to call on a
WebView with a remote main frame (as a remote main frame doesn't perform
layout).

Powered by Google App Engine
This is Rietveld 408576698