40 Commits

Author SHA1 Message Date
Elliott Sprehn
c6f3d36fe2 Simplify HTMLStyleElement.
The parser will never insert more than one child into a <style>, so we don't
need explicit logic to batch up parsing. Once I removed that it exposed that
all the line number and parser created logic is from error reporting in the
parser that's been dead in Blink for over a year.

By doing this simplification I was able to remove the finishParsingChildren()
callback entirely.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/788113002
2014-12-09 19:01:46 -08:00
Eric Seidel
295f920116 Fix sky include guards to match Chromium style
I wrote a script to do this which is attached
to the bug.

TBR=abarth@chromium.org
BUG=435361

Review URL: https://codereview.chromium.org/736373003
2014-11-21 02:48:38 -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
55b5bc485d Sort headers
Fix (most) generated includes to have gen/ in their path.

This makes it easier to tell where files exist on disk.

Unfortunately I had to leave the old include path
in engine/BUILD.gn to support all the v8 includes
which were too many to deal with in this patch.

It's a little nasty to have the raw build directory
in our include path, but it produces nicer paths.

R=abarth@chromium.org
2014-11-19 12:33:42 -08:00
Elliott Sprehn
a0abae6ce1 Remove parserRemoveChild.
This was for the adoption agency which we don't have anymore.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/734063005
2014-11-17 13:48:49 -08:00
Elliott Sprehn
0a474a4c0b Remove parserInsertBefore.
This code was for the foster parenting algorithm.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/729713003
2014-11-17 13:10:12 -08:00
Elliott Sprehn
42d362ff6b Remove tons of OILPAN.
This removes ::trace, traceAfterDispatch and finalizeGarbageCollectedObject.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/723253004
2014-11-13 16:56:13 -08:00
Adam Barth
5192329f25 Script-based imports should basically work
This CL adds the beginning of a new module loading system that matches the
conceptual module in the spec. I've writed it up to the import API on
AbstractModule. In a future CL, I'll replace the old module loading system with
this one.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/720903002
2014-11-12 13:29:14 -08:00
Adam Barth
a8cf7c7b43 Remove dynamic cast from DocumentPaser interface
This CL cleans up the DocumentParser interface to match what's actually needed
by clients. As part of this cleanup, I've removed the asHTMLDocumentParser
dynamic cast and just exposed virtual functions for the state folks were
accessing via the dynamic cast.

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

Review URL: https://codereview.chromium.org/722743002
2014-11-12 13:23:50 -08:00
Eric Seidel
5bdc6515b9 Re-land 714393002 after fixing android build.
Original CL:
https://codereview.chromium.org/714393002

Reverted in:
https://codereview.chromium.org/719063002

One fix was to use static_assert instead
of _Static_assert in COMPILE_ASSERT.

_Static_assert is C11, static_assert is C++11
and Android's stdlib doesn't have C11 support,
but we don't care since we never use COMPILE_ASSERT
in plain C code.

The second fix was also for the android STL
and was adding back the nullptr_t type
definition in NullPtr.h for old versions of STL.

I compile this locally for android to verify
that it works
mojo/tools/mojob.py build --android

TBR=jamesr@chromium.org,qsr@chromium.org

Review URL: https://codereview.chromium.org/722723003
2014-11-12 12:16:05 -08:00
Benjamin Lerman
59f42240ba Revert "Remove support for MSVC"
This reverts commit d9cfbefcfe8710f1cb190ae817757853c8058797.

This CL broke android build:
http://build.chromium.org/p/client.mojo/builders/Mojo%20Android%20Builder%20%28dbg%29/builds/248

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/719063002
2014-11-12 13:31:10 +01:00
Eric Seidel
4ab80f640b Remove support for MSVC
I also removed COMPILER_SUPPORTS since
all of the checks were for old versions of
GCC which we no longer support.

Mojo requires GCC 4.8 or later.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/714393002
2014-11-11 16:59:04 -08:00
Adam Barth
b71fee9e48 Move exports from Document to Module
This CL moves the |exports| from Document to the new |Module| interface,
matching the spec. Also, the |module| object available to scripts is now really
an instance of |Module|.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/703593003
2014-11-10 15:34:25 -08:00
Elliott Sprehn
d1e3759806 Remove more oilpan.
I also unraveled lots of transitive deps from Handle.h

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/709203002
2014-11-07 18:11:03 -08:00
Elliott Sprehn
d11b95703b Remove many attributes.
This removes many attributes we don't want from HTMLAttributeNames.in
and the associated code.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/708233002
2014-11-07 16:48:59 -08:00
Elliott Sprehn
ca3b2661ef Remove a lot of API surface from Element.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/696903002
2014-10-31 16:48:20 -07:00
Adam Barth
fc451b47eb Unfork Sky's trace events
This CL remove the body of Sky's TraceEvent.h in favor of the version in base.
There's still some more of the system to unwind before we can remove all the
other boilerplate.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/691663002
2014-10-30 09:39:46 -07:00
Adam Barth
8385799d73 Fix line numbers in JavaScript stack traces
Instead of calling the function constructor to compile script in Sky, we now
concatenate strings. This has the advantage of making the line numbers
generated in error messages correct but the disadvantage of being a hack. I've
filed https://code.google.com/p/v8/issues/detail?id=3624 to request a proper
API for this purpose.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/688033003
2014-10-29 14:00:57 -07: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
7639e0fe39 Simplify HTMLInputStream
We don't need to deal with all the insertion point complexity.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/683693002
2014-10-27 17:06:10 -07:00
Adam Barth
82cdb4de3b Remove HTMLTokenizerNames
We don't need these anymore.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/682903002
2014-10-27 17:05:46 -07:00
Adam Barth
6df700c6ff Remove HTML entity crazy
This CL removes the bulk of the old HTML entity machinery. We don't need this
anymore.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/680173002
2014-10-27 17:05:17 -07:00
Adam Barth
710a717192 Parse comments according to parsing.md
Now we don't even generate comment tokens. The new tokenizer for comments is
much easier.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/682893002
2014-10-27 17:04:52 -07:00
Eric Seidel
64b5cb61a1 Remove all oilpan transitional types
I used do-webcore-rename from Blink/WebKit
which is very good at doing this kind
of search-replace.

Also removed toRefPrtNativeArray after
conversion since it previously had two
separate flavors.  Both versions are no longer
used so I've removed the code until we
need one again.

https://www.irccloud.com/pastebin/5C16p5cE
is the diff I used to do-webcore-rename

TBR=abarth@chromium.org
2014-10-27 14:13:01 -07:00
Adam Barth
5d98345d17 Parse Sky entities according to the spec
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/678073002
2014-10-27 13:05:31 -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
2e40b82606 Remove more unused HTMLTokenizer features
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/678903002
2014-10-27 13:04:17 -07:00
Adam Barth
51b354f23a Fix bad merge 2014-10-24 22:57:53 -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
8f729a9b64 Delete DecodedDataDocumentParser
It doesn't do anything.

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

Review URL: https://codereview.chromium.org/675313003
2014-10-24 22:47:58 -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
b07dff7033 Remove the ability to parse HTML fragments
Also, removed a bunch of show() function from the custom element microtask
queue that bottom out in innerHTML.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/665613003
2014-10-24 16:51:11 -07:00
Adam Barth
e8c9ecc556 Use override and final instead of OVERRIDE and FINAL 2014-10-24 15:15:13 -07:00
Adam Barth
08164a0e81 Delete ScriptableDocumentParser
There's only one parser: the HTMLDocumentParser. No need for the complex class
hierarchy.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/680583003
2014-10-24 11:04:40 -07:00
Adam Barth
0bf6b1a8eb Delete HTMLStackItem
The stack now just has ContainerNodes.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/666913005
2014-10-23 16:39:13 -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