[Document Policy] Deduplicate document policy violation report
Most image policies can report multiple violations for a single cause(same image not following the rule) during layout, e.g. An unoptimized-lossless-image's bpp(byte per pixel) value can change multiple times if the image is being scaled in an animation. To avoid unnecessary duplicated reports being generated. This CL adds Hash method for DocumentPolicyViolationReport to uniquely identify each report and avoid the duplication by remembering these hash values in LocalDOMWindow and filter out reports that are in record. Bug: 924684, 926199 Change-Id: I785ad8b36ef372188da1b2cc4e25886e59c1e18b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2405646 Commit-Queue: Charlie Hu <chenleihu@google.com> Reviewed-by:Daniel Cheng <dcheng@chromium.org> Reviewed-by:
Jason Chase <chasej@chromium.org> Cr-Commit-Position: refs/heads/master@{#813231}
Showing
Please register or sign in to comment