New issue
Advanced search Search tips

Issue 871521 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 17
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 850624



Sign in to add a comment

NavigationPredictor: A clicked anchor element contains image or not

Project Member Reported by chelu@chromium.org, Aug 6

Issue description

We recording whether a clicked anchor element contains image or not, the result is only from the anchor clicked.

https://cs.chromium.org/chromium/src/chrome/browser/navigation_predictor/navigation_predictor.cc?l=171

Ideally, it should merge with other anchor elements that have the same href. For example, if a doc contains 2 anchor elements (one image, and one non-image) both pointing to same URL, and the user clicks on non-image part, the recording should be "contains image", while currently it records "does not contain image".

One possible fix is to store the merged result in NavigationScore (https://cs.chromium.org/chromium/src/chrome/browser/navigation_predictor/navigation_predictor.cc?l=20) and loop up the result here.




 
Cc: -tbansal@chromium.org chelu@chromium.org
Owner: tbansal@chromium.org
Status: Assigned (was: Available)
Summary: NavigationPredictor: A clicked anchor element contains image or not (was: A clicked anchor element contains image or not)
Labels: -Intent-Implement-NotStarted -Intent-Ship-NotStarted
Labels: -Pri-3 -Type-Design-Review M-71 Pri-2 Type-Bug
Project Member

Comment 5 by bugdroid1@chromium.org, Oct 16

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/61fc2f0a5a2283f886c36327005ae5f7cbb27667

commit 61fc2f0a5a2283f886c36327005ae5f7cbb27667
Author: Tarun Bansal <tbansal@chromium.org>
Date: Tue Oct 16 03:39:50 2018

Correctly record if clicked anchor element contains image or not

Currently, when an anchor element is clicked, we record if it
contains image or not based on only the properties of the clicked element.

This CL changes the logic to also look at other anchor elements
in the page that point to the same HREF. If any of
the other anchor element in the page point to the same
href as the clicked href, and contains image,
then we record that the clicked anchor element also contains image.

Bug:  871521 
Change-Id: Ia21133e023596128e62621551931ad054fda98e3
Reviewed-on: https://chromium-review.googlesource.com/c/1278468
Reviewed-by: Ryan Sturm <ryansturm@chromium.org>
Commit-Queue: Tarun Bansal <tbansal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#599836}
[modify] https://crrev.com/61fc2f0a5a2283f886c36327005ae5f7cbb27667/chrome/browser/navigation_predictor/navigation_predictor.cc
[modify] https://crrev.com/61fc2f0a5a2283f886c36327005ae5f7cbb27667/chrome/browser/navigation_predictor/navigation_predictor_browsertest.cc
[modify] https://crrev.com/61fc2f0a5a2283f886c36327005ae5f7cbb27667/chrome/test/data/navigation_predictor/anchors_same_href.html

Labels: -M-71 M-72
Status: Fixed (was: Assigned)
Blocking: 850624

Sign in to add a comment