13 Commits

Author SHA1 Message Date
Eric Seidel
4790abe2f7 Remove the concept of pendingScripts from HTMLScriptRunner
We shouldn't need pendingScripts in ScriptRunner since
we should never be trying to run scripts when we're
not ready to run them.

However this wasn't completely true in the case of imports
there was code to have us break before any start tag after
an <import> was seen, but it was subtly wrong in that it
it would include the start-tag it was trying to break before
in the chunk it sent to the main thread.

This didn't run out to be the problem I was facing, but I fixed
it anyway.  The problem which was actually preventing me from
removing pendingScripts was adding a check inside
didRecieveParsedChunk... to check if imports were pending and
add the chunk to the list of pending chunks.

I also renamed m_speculations to m_pendingChunks since these
chunks are never speculative anymore.

We can't test the off-by-one import-breaking code with our
current system, but it would be trivial to test with a
self-closing custom element if/when we ever add custom
elements back to the system.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/934083002
2015-02-17 16:13:30 -08:00
Adam Barth
6b2c0b2c58 The Sky parser should yield before start tags
This CL makes the parser yield before non-import start tags if there are
outstanding imports. This will let use remove the upgrade path from custom
elements because we can require the registration to happen before the tree
building.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/814173005
2015-01-08 14:48:02 -08:00
Eric Seidel
a251cf3ecb Move Sky's DataPipeDrainer to mojo/common
I want to use DataPipeDrainer in some non-sky code
it seems generally useful (and compiled w/o modification).

R=jimbe@chromium.org, jamesr@chromium.org

Review URL: https://codereview.chromium.org/811873003
2014-12-17 12:16:34 -08:00
Eric Seidel
e0fd75b5ab Make absolute and sort all Sky headers
This caused us to lose our gn check certification. :(

Turns out gn check was just ignoring all the header
paths it didn't understand and so gn check passing
for sky wasn't meaning much.  I tried to straighten
out some of the mess in this CL, but its going to take
several more rounds of massaging before gn check
passes again.  On the bright side (almost) all of
our headers are absolute now.  Turns out my script
(attached to the bug) didn't notice ../ includes
but I'll fix that in the next patch.

R=abarth@chromium.org
BUG=435361

Review URL: https://codereview.chromium.org/746023002
2014-11-20 17:42:05 -08:00
Eric Seidel
70c382c012 Remove wtf/Functional.h
The background parser was the last client.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/684813003
2014-10-28 10:41:02 -07:00
Adam Barth
26813e1c3c Update tokenizer to match spec
This CL is a rough pass over the HTMLTokenizer to align it with parsing.md.
We'll need to do another pass more carefully in the future, but this CL gets us
roughly in the right ballpark.

We're not handling EOF properly. The parsing.md spec doesn't push the EOF
though the parser, which breaks our current way of handling EOF. We do ok if we
get EOF in the DataState, and that's enough to pass the tests for now.

Also, update camel-case.sky to reflect the fact that the parser doesn't
lower-case tag names anymore.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/678263002
2014-10-27 20:38:29 -07:00
Adam Barth
1bceb35cdf Remove ScriptData* states
In the new parsing.md spec, we parse <script> the same way as <style> so we
don't need all these tokenizer states.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/678913002
2014-10-27 13:04:45 -07:00
Adam Barth
22b946ab61 Remove HTMLParserOptions
We always use threading now and there aren't any other options.

R=eseidel@chromium.org, esprehn@chromium.org

Review URL: https://codereview.chromium.org/676133002
2014-10-24 22:49:38 -07:00
Adam Barth
61a2a00c78 Live the dream
This CL plumbs the data pipe from the network stack all the way to the parser
thread. We now drain the data pipe on the parser thread, which means network
bytes don't need to transit the main thread to reach the parser.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/664573004
2014-10-24 16:51:56 -07:00
Adam Barth
1bf5cca3e1 Remove unused code from the Sky parser system
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/673963002
2014-10-23 15:47:50 -07:00
Adam Barth
b189c4cd22 Remove HTMLTreeBuilderSimulator
There's no need to simulate the tree builder.  It doesn't have any state.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/678533003
2014-10-23 15:47:13 -07:00
Adam Barth
04bb022ded Remove BackgroundHTMLInputStream
Now that we don't have checkpoints, we can just use SegmentedString directly.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/676763003
2014-10-23 15:46:28 -07:00
Adam Barth
ae72930937 Open the Sky 2014-10-23 11:17:19 -07:00