1# Mapping of spec concepts to code 2 3Blink is Chromium's implementation of the open web platform. This document 4attempts to map terms and concepts found in the specification of the open web 5platform to classes and files found in Blink's source tree. 6 7[TOC] 8 9## HTML 10 11Concepts found in the [HTML spec](https://html.spec.whatwg.org/). 12 13### [browsing context](https://html.spec.whatwg.org/C/#browsing-context) 14 15A browsing context corresponds to the [Frame] interface where the main 16implementation is [LocalFrame]. 17 18[Frame]: https://cs.chromium.org/src/third_party/blink/renderer/core/frame/frame.h 19[LocalFrame]: https://cs.chromium.org/src/third_party/blink/renderer/core/frame/local_frame.h 20 21### [origins](https://html.spec.whatwg.org/C/#concept-origin) 22 23An origin corresponds to the [SecurityOrigin]. You can test for [same-origin] 24using `SecurityOrigin::canAccess` and for [same-origin domain] using 25`SecurityOrigin::isSameSchemeHostPort`. 26 27[SecurityOrigin]: https://cs.chromium.org/src/third_party/blink/renderer/platform/weborigin/security_origin.h 28[same-origin]: https://html.spec.whatwg.org/C/#same-origin 29[same-origin domain]: https://html.spec.whatwg.org/C/#same-origin-domain 30 31 32### [Window object](https://html.spec.whatwg.org/C/#window) 33 34A Window object corresponds to the [DOMWindow] interface where the main 35implementation is [LocalDOMWindow]. 36 37[DOMWindow]: https://cs.chromium.org/src/third_party/blink/renderer/core/frame/dom_window.h 38[LocalDOMWindow]: https://cs.chromium.org/src/third_party/blink/renderer/core/frame/local_dom_window.h 39 40### [WindowProxy](https://html.spec.whatwg.org/C/#windowproxy) 41 42The WindowProxy is part of the bindings implemented by the 43[WindowProxy class](https://cs.chromium.org/Source/bindings/core/v8/WindowProxy.h). 44 45### [canvas](https://html.spec.whatwg.org/C/#the-canvas-element) 46 47An HTML element into which drawing can be performed imperatively via 48JavaScript. Multiple 49[context types](https://html.spec.whatwg.org/C/#dom-canvas-getcontext) 50are supported for different use cases. 51 52The main element's sources are in [HTMLCanvasElement]. Contexts are implemented 53via modules. The top-level module is [HTMLCanvasElementModule]. 54 55[HTMLCanvasElement]: https://cs.chromium.org/chromium/src/third_party/blink/renderer/core/html/html_canvas_element.h 56[HTMLCanvasElementModule]: https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/canvas/html_canvas_element_module.h 57 58 59The [2D canvas context] is implemented in [modules/canvas2d]. 60 61[2D canvas context]: https://html.spec.whatwg.org/C/#canvasrenderingcontext2d 62[modules/canvas2d]: https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/canvas2d/ 63 64 65The [WebGL 1.0] and [WebGL 2.0] contexts ([WebGL Github repo]) are implemented 66in [modules/webgl]. 67 68[WebGL 1.0]: https://www.khronos.org/registry/webgl/specs/latest/1.0/ 69[WebGL 2.0]: https://www.khronos.org/registry/webgl/specs/latest/2.0/ 70[WebGL Github repo]: https://github.com/KhronosGroup/WebGL 71[modules/webgl]: https://cs.chromium.org/chromium/src/third_party/blink/renderer/modules/webgl/ 72