Skip to content

Commit

Permalink
Spec basics + github workflows (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino authored Apr 26, 2022
1 parent b11337f commit 9e1a560
Show file tree
Hide file tree
Showing 8 changed files with 233 additions and 6 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: make ci
- name: Deploy
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./out
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
spec.html
out
5 changes: 5 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
All Reports in this Repository are licensed by Contributors under the [W3C Software and Document License](http://www.w3.org/Consortium/Legal/2015/copyright-software-and-document).

Contributions to Specifications are made under the [W3C CLA](https://www.w3.org/community/about/agreements/cla/).

Contributions to Test Suites are made under the [W3C 3-clause BSD License](https://www.w3.org/Consortium/Legal/2008/03-bsd-license.html).
1 change: 0 additions & 1 deletion LICENSE.md/LICENSE.md

This file was deleted.

30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
SHELL=/bin/bash

local: spec.bs
bikeshed --die-on=warning spec spec.bs spec.html

watch: spec.bs
bikeshed watch --die-on=warning spec.bs spec.html

spec.html: spec.bs
@ (HTTP_STATUS=$$(curl https://api.csswg.org/bikeshed/ \
--output spec.html \
--write-out "%{http_code}" \
--header "Accept: text/plain, text/html" \
-F die-on=warning \
-F [email protected]) && \
[[ "$$HTTP_STATUS" -eq "200" ]]) || ( \
echo ""; cat spec.html; echo ""; \
rm -f spec.html; \
exit 22 \
);

remote: spec.html

ci: spec.bs
mkdir -p out
make remote
mv spec.html out/index.html

clean:
rm spec.html
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

This is the repository for Fenced Frames.

See the [draft specification](https://wicg.github.io/fenced-frame).

The explainer is organized as follows:

* What is a fenced frame: the concept, HTML element, security and privacy considerations
Expand Down
167 changes: 167 additions & 0 deletions spec.bs
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
<pre class="metadata">
Title: Fenced frame
Shortname: fenced-frame
Repository: WICG/fenced-frame
Inline Github Issues: true
Group: WICG
Status: CG-DRAFT
Level: 1
URL: https://wicg.github.io/fenced-frame/
Boilerplate: omit conformance, omit feedback-header
Editor: Dominic Farolino, Google https://www.google.com/, [email protected], https://domfarolino.com
Abstract: The fenced frame enforces a boundary between the embedding page and the cross-site embedded document such that user data visible to the two sites is not able to be joined together.
!Participate: <a href="https://github.com/WICG/fenced-frame">GitHub WICG/fenced-frame</a> (<a href="https://github.com/WICG/fenced-frame/issues/new">new issue</a>, <a href="https://github.com/WICG/fenced-frame/issues?state=open">open issues</a>)
!Commits: <a href="https://github.com/WICG/fenced-frame/commits/main/spec.bs">GitHub spec.bs commits</a>
Complain About: accidental-2119 yes, missing-example-ids yes
Indent: 2
Default Biblio Status: current
Markup Shorthands: markdown yes
Assume Explicit For: yes
</pre>

<pre class="link-defaults">
</pre>
<pre class="anchors">
spec: html; urlPrefix: https://html.spec.whatwg.org/multipage/
type: dfn
text: categories; url: dom.html#concept-element-categories
text: contexts in which this element can be used; url: dom.html#concept-element-contexts
text: embedded content; url: dom.html#embedded-content-category
text: content model; url: dom.html#concept-element-content-model
text: nothing; url: dom.html#concept-content-nothing
text: content attributes; url: dom.html#concept-element-attributes
text: global attributes; url: dom.html#global-attributes
text: dom interface; url: dom.html#concept-element-dom
text: accessibility considerations; url: dom.html#concept-element-accessibility-considerations
text: reflect; url: common-dom-interfaces.html#reflect
text: width; url: embedded-content-other.html#attr-dim-width
text: height; url: embedded-content-other.html#attr-dim-height
</pre>

<style>
.selected-text-file-an-issue {
position: fixed;
bottom: 0;
right: 0;
background: rgba(255, 255, 255, 0.8);
font-size: smaller;
padding: 4px 10px;
z-index: 4;
}

dfn var {
font-style: italic;
}

table {
margin: 1em 0;
}

/* WHATWG-style <hr>s, instead of WICG-style. Specific selector is necessary to override WICG styles. */
:not(.head) > :not(.head) + hr {
display: block;
background: none;
border: none;
padding: 0;
margin: 3em 0;
height: auto;
}
:not(.head) > :not(.head) + hr::before {
content: none;
}

/* WHATWG-style element definition class */
.element {
background: #EEFFEE;
}
dt {
margin-top: 12px;
color: black;
}
dl, dd {
padding-left: .5em;
}

/* domintro from https://resources.whatwg.org/standard.css */
.domintro {
position: relative;
color: green;
background: #DDFFDD;
margin: 2.5em 0 2em 0;
padding: 1.5em 1em 0.5em 2em;
}

.domintro dt, .domintro dt * {
color: black;
font-size: inherit;
}
.domintro dd {
margin: 0.5em 0 1em 2em; padding: 0;
}
.domintro dd p {
margin: 0.5em 0;
}
.domintro::before {
content: 'For web developers (non-normative)';
background: green;
color: white;
padding: 0.15em 0.25em;
font-style: normal;
position: absolute;
top: -0.8em;
left: -0.8em;
}

/* .XXX from https://resources.whatwg.org/standard.css */
.XXX {
color: #D50606;
background: white;
border: solid #D50606;
}
</style>

<script src="https://resources.whatwg.org/file-issue.js" async></script>

<h2 id=the-fencedframe-element>The <dfn element>fencedframe</dfn> element</h2>

<dl class="element">
<dt>[=Categories=]:</dt>
<dd>[=Flow content=].</dd>
<dd>[=Phrasing content=].</dd>
<dd>[=Embedded content=].</dd>
<dd>[=Interactive content=].</dd>
<dd>[=Palpable content=].</dd>
<dt>[=Contexts in which this element can be used=]:</dt>
<dd>Where [=embedded content=] is expected.</dd>
<dt>[=Content model=]:</dt>
<dd>[=Nothing=].</dd>
<dt>[=Content attributes=]:</dt>
<dd>[=Global attributes=]</dd>
<dd><{fencedframe/src}> — Address of the resource</dd>
<dd>[=width=] — Horizontal dimension</dd>
<dd>[=height=] — Vertical dimension</dd>
<dt>[=Accessibility considerations=]:</dt>
<dd><p class=XXX>TODO</p></dd>
<dt>[=DOM interface=]:</dt>
<xmp class=idl>
[Exposed=Window]
interface HTMLFencedFrameElement : HTMLElement {
[HTMLConstructor] constructor();

[CEReactions] attribute USVString src;
[CEReactions] attribute DOMString width;
[CEReactions] attribute DOMString height;
};
</xmp>
<br>
</dl>

The <{fencedframe}> element represents a <span class=XXX>TODO: Wire up the browsing context "mode" that is being worked on in <a href=https://wicg.github.io/nav-speculation/prerendering.html#prerendering-bcs-subsection>WICG/nav-speculation</a> so we can have something like a nested top-level browsing context.</span>

The <dfn element-attr for=fencedframe>src</dfn> attribute <span class=XXX>TODO</span>.

The {{HTMLFencedFrameElement/src}} IDL attribute must [=reflect=] the respective content attribute of the same name.

<h3 id=dimension-attributes>Dimension attributes</h3>

This section details monkeypatches to [[!HTML]]'s <a href="https://html.spec.whatwg.org/multipage/embedded-content-other.html#dimension-attributes">Dimension attributes</a> section. This section will be updated to include <{fencedframe}> in the list of elements that the <code>[=width=]</code> and <code>[=height=]</code> dimension attributes apply to.
10 changes: 5 additions & 5 deletions w3c.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"group": [80485]
, "contacts": ["yoavweiss"]
, "repo-type": "cg-report"
}
{
"group": [80485],
"contacts": ["yoavweiss"],
"repo-type": "cg-report"
}

0 comments on commit 9e1a560

Please sign in to comment.