w3c / webappsec-secure-contexts

WebAppSec Secure Contexts
https://w3c.github.io/webappsec-secure-contexts/
Other
33 stars 38 forks source link

Rewrite and simpify algorithms to avoid iteration #20

Closed jwatt closed 8 years ago

jwatt commented 8 years ago

This commit rewrites the Algorithms section with the intention of making it simpler to understand and closer to how implementations will likely be written. Previously, whether a settings object is a secure context or not was determined by walking the entire creator chain examining HTTPS state etc. on each creator. The new algorithms now simply looks at the immediate creator (if any) and checks that it is a secure context before checking HTTPS state etc. on the settings object that is the subject of the algorithm. In other words the algorithm now relies on recursion instead of iteration. This does away with the need for the 'Gather document’s relevant ancestors' section and simplifies the 'Is settings object a secure context?' section.

mikewest commented 8 years ago

LGTM with tiny nits.

mikewest commented 8 years ago

Ok. We'll do naming separately.