|
|
Created:
7 years, 7 months ago by kouhei (in TOK) Modified:
7 years, 7 months ago CC:
blink-reviews, eae+blinkwatch, adamk+blink_chromium.org, tburkard, cbentzel, haraken Base URL:
https://chromium.googlesource.com/chromium/blink.git@master Visibility:
Public. |
DescriptionTrigger preconnect for link anchor tags on pre-click {mouse,gesture} events.
Also, check that the anchor tag has prefetchable URL as its href.
BUG=235361
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=151170
Patch Set 1 #
Total comments: 18
Patch Set 2 : style fix #Patch Set 3 : typo #Patch Set 4 : minor fix #Patch Set 5 : #Messages
Total messages: 18 (0 generated)
abarth: Would you take a look?
FYI: Just merging this patch would not actually enable these pre-connecting end-to-end yet. Chrome side impl. http://crrev.com/14749005 is not yet landed, and pre-connecting will be enabled to very limited user base controlled by Finch.
abarth: ping. Would you take a look?
Sorry for the delay in reviewing. Generally looks good. I'd like to see one more iteration because I've got a bunch of style comments. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... File Source/core/html/HTMLAnchorElement.cpp (right): https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:64: WebKit::Platform::current()->prescientNetworking(); There's no 80 col limit, so you can put this on one line if you like. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:68: prescientNetworking->preconnect(WebKit::WebURL(url), motivation); No need to call WebKit::WebURL explicitly. The compiler will do the conversion for you. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:83: PrefetchEventHandler(HTMLAnchorElement*); Please use the "explicit" keyword for one-argument constructor.s https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:679: HTMLAnchorElement* anchorElement) This line should be combined with the previous one https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:796: Document* doc = m_anchorElement->document(); doc -> document (please use complete words in variable names) https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:800: // is valid url? We prefer skipping these sorts of comments. Good comments explain the "why" behind the code rather than "what" the code does. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:815: String targetStr = m_anchorElement->target(); targetStr -> target (The "str" postfix isn't a complete word and doesn't add anything to the name.) https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:823: WebKit::WebPreconnectMotivation motivation) Please combine this line with the previous line. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:825: KURL url = m_anchorElement->href(); KURL -> const KURL&
Thanks for your comments. Updated patch. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... File Source/core/html/HTMLAnchorElement.cpp (right): https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:64: WebKit::Platform::current()->prescientNetworking(); On 2013/05/24 05:58:12, abarth wrote: > There's no 80 col limit, so you can put this on one line if you like. Done. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:68: prescientNetworking->preconnect(WebKit::WebURL(url), motivation); On 2013/05/24 05:58:12, abarth wrote: > No need to call WebKit::WebURL explicitly. The compiler will do the conversion > for you. Done. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:83: PrefetchEventHandler(HTMLAnchorElement*); On 2013/05/24 05:58:12, abarth wrote: > Please use the "explicit" keyword for one-argument constructor.s Done. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:679: HTMLAnchorElement* anchorElement) On 2013/05/24 05:58:12, abarth wrote: > This line should be combined with the previous one Done. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:796: Document* doc = m_anchorElement->document(); On 2013/05/24 05:58:12, abarth wrote: > doc -> document (please use complete words in variable names) Done. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:800: // is valid url? On 2013/05/24 05:58:12, abarth wrote: > We prefer skipping these sorts of comments. Good comments explain the "why" > behind the code rather than "what" the code does. Done. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:815: String targetStr = m_anchorElement->target(); On 2013/05/24 05:58:12, abarth wrote: > targetStr -> target (The "str" postfix isn't a complete word and doesn't add > anything to the name.) Done. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:823: WebKit::WebPreconnectMotivation motivation) On 2013/05/24 05:58:12, abarth wrote: > Please combine this line with the previous line. Done. https://codereview.chromium.org/15352003/diff/1/Source/core/html/HTMLAnchorEl... Source/core/html/HTMLAnchorElement.cpp:825: KURL url = m_anchorElement->href(); On 2013/05/24 05:58:12, abarth wrote: > KURL -> const KURL& Done.
LGTM. Thanks!
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/15352003/9001
Retried try job too often on linux_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_layo...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/15352003/9001
Retried try job too often on mac_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/15352003/9001
Retried try job too often on linux_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_layo...
I think I found the cause of failing tests. It seems that call to frame->loader()->findFrameForNavigation(target) is logging duplicated warning.
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/15352003/34001
Omitted call to frame->loader()->findFrameForNavigation(target). Retrying...
Retried try job too often on mac_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=mac_layout...
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/kouhei@chromium.org/15352003/34001
Message was sent while issue was closed.
Change committed as 151170 |