Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report image url for oversized/unoptimized images #18337

Merged
merged 1 commit into from Aug 16, 2019

Conversation

chromium-wpt-export-bot
Copy link
Collaborator

@chromium-wpt-export-bot chromium-wpt-export-bot commented Aug 8, 2019

Add image url to FeaturePolicyViolationReportBody when there is a
oversized/unoptimized image feature policy violated. Previously the
fileSource field in report is set to null when policy is violated.

The effect is achieved by letting LocationReportBody represents both
a location in JavaScript source code and a location of a general
resource, e.g. a image. Because image does not have line number and
column number, these attrs are represented in optional value, and
LocationReportBody now saves pieces of actual information it needs
to generate the report, instead of a reference to SourceLocation.

Bug: 989701
Change-Id: Ibe88f07e7fa93c3d54b17380f8627221c119e106
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1741958
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Charlie Hu <chenleihu@google.com>
Cr-Commit-Position: refs/heads/master@{#687829}

Copy link
Collaborator

@wpt-pr-bot wpt-pr-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already reviewed downstream.

@chromium-wpt-export-bot chromium-wpt-export-bot changed the title add test for oversized-image reporting Add image url to FeaturePolicyViolationReportBody when there is a oversize image feature policy violated. Previously the fileSource field in report is set to null when policy is violated. Aug 9, 2019
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1741958 branch 3 times, most recently from e6be48d to bf6f18e Compare August 12, 2019 20:35
@chromium-wpt-export-bot chromium-wpt-export-bot changed the title Add image url to FeaturePolicyViolationReportBody when there is a oversize image feature policy violated. Previously the fileSource field in report is set to null when policy is violated. Add image url to FeaturePolicyViolationReportBody when there is a oversize/unoptimized image feature policy violated. Previously the fileSource field in report is set to null when policy is violated. Aug 13, 2019
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1741958 branch 4 times, most recently from c84b55c to d3e5c77 Compare August 13, 2019 20:51
@chromium-wpt-export-bot chromium-wpt-export-bot changed the title Add image url to FeaturePolicyViolationReportBody when there is a oversize/unoptimized image feature policy violated. Previously the fileSource field in report is set to null when policy is violated. Report image url for oversized/unoptimized images Aug 14, 2019
@chromium-wpt-export-bot chromium-wpt-export-bot force-pushed the chromium-export-cl-1741958 branch 3 times, most recently from a45edef to 8b5f819 Compare August 16, 2019 15:25
Add image url to FeaturePolicyViolationReportBody when there is a
oversized/unoptimized image feature policy violated. Previously the
fileSource field in report is set to null when policy is violated.

The effect is achieved by letting LocationReportBody represents both
a location in JavaScript source code and a location of a general
resource, e.g. a image. Because image does not have line number and
column number, these attrs are represented in optional value, and
LocationReportBody now saves pieces of actual information it needs
to generate the report, instead of a reference to SourceLocation.

Bug: 989701
Change-Id: Ibe88f07e7fa93c3d54b17380f8627221c119e106
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1741958
Reviewed-by: Ian Clelland <iclelland@chromium.org>
Reviewed-by: Jeremy Roman <jbroman@chromium.org>
Commit-Queue: Charlie Hu <chenleihu@google.com>
Cr-Commit-Position: refs/heads/master@{#687829}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants