abarth/webkit — pull request #2 by mikewest (2012-05-10 18:21:23+00:00)
Title: DOM API: Work in progress.

Hey Adam,

This isn't nearly finished, but I'd like feedback earlier rather than later since this is my first time working with any of this code. :)

`document.securityPolicy.active` and `document.securityPolicy.reportURIs` are implemented, and (poorly) tested. I've just started on `document.securityPolicy.isWhitelisted`, and I'm not entirely sure what the best approach is.

`ContentSecurityPolicy::allow*FromSource` seems to be the right place to get the information I need to implement `isWhitelisted`, but there doesn't seem to be a mechanism to query the policy _without_ sending a report (`allow*FromSource` pipe all end up in `CSPDirectiveList::checkSourceAndReportViolation`). Would you suggest piping a boolean all the way through to determine whether reporting should take place? Or creating new methods that explicitly don't send reports?

Thanks!