629 Commits

Author SHA1 Message Date
Adam Barth
3d8ffb7f52 Make it possible to load a WebFrame from a URL
Previously, the WebFrame need to be created with a data pipe consumer handle.
This CL makes it possible to create a WebFrame with a URL and have the engine
issue the network request.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/940703002
2015-02-18 12:57:51 -08:00
Przemyslaw Pietrzkiewicz
6ea43eee14 Drop unneeded build deps on /net.
BUG=456130
R=blundell@chromium.org

Review URL: https://codereview.chromium.org/940473002
2015-02-18 12:03:28 +01:00
Adam Barth
1312b93456 Use Dart_EmptyString
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/933843004
2015-02-17 16:20:39 -08:00
Adam Barth
dff66fb1b7 Remove the concept of document.documentElement
Now documents can have many element children, all created equal.

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

Review URL: https://codereview.chromium.org/928393003
2015-02-17 16:20:07 -08:00
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
Eric Seidel
5e47f9a8f2 Make tests/clipping/canvas-rounded-corners.sky actually run.
Because we dump dart errors to LOG(ERROR) (stderr) instead
of console.log / stdout, tests with dart errors just "pass"
and we don't notice they're not running.

This was the case with canvas-rounded-corners.sky.

I don't think this test actually passes yet, despite it
claiming to, but I at least have made it run and not crash.

Required me commenting out a ton of CanvasRenderingContext2D, but
that's fine, it wasn't actually working and it's better to have
it be compiling valid dart.

R=abarth@chromium.org, ojan@chromium.org
BUG=

Review URL: https://codereview.chromium.org/936563002
2015-02-17 12:25:15 -08:00
Eric Seidel
7c33481af9 Fix the tests after my previous commit.
This actually makes [Named] work, previously it was
generating invalid dart.

TBR=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/931273002
2015-02-17 11:09:27 -08:00
Eric Seidel
9aba803749 Add support for named arguments to our bindings generation.
This doesn't yet support having both named and optional
arguments, but once I have an example of that it should
be trivial to add.

I also cleaned up the generation a little so the generated
dart file looks nicer. :)

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/923093003
2015-02-17 11:00:07 -08:00
Adam Barth
24b3a12e95 Throw exception for null listener in addEventListener
We appear to be missing a null check here as well.

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

Review URL: https://codereview.chromium.org/937443002
2015-02-17 10:49:52 -08:00
Adam Barth
5c2c411c40 ParentNode#appendChild(null) shouldn't crash
We just needed to throw the proper exception when handed null for a
non-nullable argument.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/934863002
2015-02-17 10:15:27 -08:00
Adam Barth
374a768d5b Improve DartLoader error handling.
Before this if a dart import 404s, we crash.
This makes some minor improvements in our logging
for better diagnosis of future errors.

R=abarth@chromium.org
BUG=

Review URL: https://codereview.chromium.org/926753002
2015-02-14 20:18:00 -08:00
Adam Barth
f7e974680c Morph the APIs for Node, ParentNode, and Element closer to the specs
These still don't match the specs exactly, but they're much closer.

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

Review URL: https://codereview.chromium.org/924203002
2015-02-13 21:36:53 -08:00
Ojan Vafai
0b9a9f98c2 Remove HitTestAction.
We no longer paint background and foreground separately,
so we don't need to hit test them separately.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/924273003
2015-02-13 21:08:59 -08:00
Ojan Vafai
04f9707e4f Remove HitTestFilter.
Background and foreground on a layer can't be hit indepdently
anymore, so merge them into a single hitTestContents call.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/924273002
2015-02-13 21:07:54 -08:00
Ojan Vafai
e0c039e035 Get rid of HitTestChildBlockBackground walk.
I'm not 100% what this was for, but looking at Blink,
it appears that HitTestChildBlockBackground being different
from HitTestBlockBackground had something to do with
multi-column/regions, which we don't have. I believe
this patch doesn't change any behavior.

Also added to the elementFromPoint test in order to
get more test coverage of the hitTesting code.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/924263002
2015-02-13 21:05:58 -08:00
Adam Barth
c6b03b42e5 Program _uriBaseClosure into the DartVM
Turns out you need a base URI to make the unit testing framework behave in a
sane way.

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

Review URL: https://codereview.chromium.org/926163002
2015-02-13 14:41:31 -08:00
Ojan Vafai
5e291c32e2 Prune HitTestResult and stop special-casing links.
Prunes a bunch of dead code from HitTestResult and
stops special-casing links for creating hand cursors.
This code already isn't working today anyways, so
in practice, there's no change in behavior.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/925933004
2015-02-13 14:17:42 -08:00
Ojan Vafai
1d3f70fc06 Remove unnecessary operator overload on RenderLayer::hitTest.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/925903005
2015-02-13 14:12:38 -08:00
Adam Barth
2d006b8294 Actually stop Sky from linking with V8
We don't use V8 anymore. There's no reason to link it in.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/918263003
2015-02-12 21:16:55 -08:00
Adam Barth
52b56750a1 Rename sky/engine/bindings2 to sky/engine/bindings
There's only one bindings system now.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/915293003
2015-02-12 20:16:17 -08:00
Adam Barth
30de02064c Remove unused V8 integration code in Sky
We don't build this code anymore.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/922053002
2015-02-12 19:44:16 -08:00
Adam Barth
f2d2e80e59 Merge the Sky Engine changes from the SkyDart branch
This CL flips the switch to make Sky use Dart.

TBR=eseidel@chromium.org
BUG=454613

Review URL: https://codereview.chromium.org/922893002
2015-02-12 15:06:03 -08:00
Eric Seidel
c7d2352897 Add the c++ code part of bindings2/
This is all the bindings-level dart code we had to write
to enable Dart in Sky.  We wrote this over the last 2
weeks in:
https://github.com/eseidel/skydart

R=abarth@chromium.org, jamesr@chromium.org
BUG=454613

Review URL: https://codereview.chromium.org/918333002
2015-02-12 13:42:11 -08:00
Adam Barth
c6dce9ad07 Add DartController and friends
This CL adds the DartController and associated classes. These classes let you
load and execute dart code.

R=rafaelw@chromium.org
BUG=454613

Review URL: https://codereview.chromium.org/921903002
2015-02-12 13:34:45 -08:00
Adam Barth
128591574e Build sky/engine/tonic
This CL adds a dependency from Sky to DartVM.  We need to remove Sky from the
ASAN build because DartVM doesn't currently build in ASAN (see https://code.google.com/p/dart/issues/detail?id=22121).

R=rafaelw@chromium.org
BUG=454613

Review URL: https://codereview.chromium.org/919463004
2015-02-12 13:18:25 -08:00
Rafael Weinstein
2a5e18ff64 Merge the tonic layer from skydart branch back to master
The tonic layer is analogous to "gin" for v8. It provides wrappers and helpers around common dart types and implements the basic infrastructure for allowing dart wrappers around sky DOM objects to have proper GC behavior.

R=abarth@chromium.org
TBR=eseidel
BUG=

Review URL: https://codereview.chromium.org/924593002
2015-02-12 12:55:01 -08:00
Eric Seidel
c0b8517544 Add a new bindings2/scripts directory for Dart bindings
These bindings were developed over the last 2 weeks on:
https://github.com/eseidel/skydart
They started as copies of the Dartium scripts (aka dart/tools/dom):
https://code.google.com/p/dart/source/browse/#svn%2Ftrunk%2Fdart%2Ftools%2Fdom
Which in turn started as a forked copy of Blink's
binding generation scripts from some years ago.

This is still way more python than we need to generate
bindings for SkyDart, but it's a start.

Reviews were done for many (but not all) of the patches.

I'll add the bindings2/ code and build system wiring
in further patches. Landing the new directories one at a
time so that it's easier to read through.

R=abarth@chromium.org, jamesr@chromium.org
BUG=454613

Review URL: https://codereview.chromium.org/914413004
2015-02-12 12:22:38 -08:00
Adam Barth
82c1ea5adc Remove bindings-dart
This code was a drop from Dartium and isn't used. It will be replaced with code
from the SkyDart branch.

TBR=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/918273002
2015-02-12 10:07:28 -08:00
Hans Muller
47bf46b00e Adds support for embedViewManagerClient() to IFrame.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/912183002
2015-02-10 17:09:22 -08:00
James Robinson
50527025ca Update from https://crrev.com/315085
This includes the switch to libc++ on Android.

Other fixes:

*) Add (dumb) impl of OrderingBarrier() to command buffer
*) "base/debug/trace_event.h" -> "base/trace_event/trace_event.h"
*) Added a few <cmath> includes to sky

Review URL: https://codereview.chromium.org/903273002
2015-02-06 15:14:04 -08:00
Ojan Vafai
effdf28e11 Remove position:relative.
The use-cases we care about are met better by translate2d.
Remove the parsing so that people writing on sky don't
depend on it. Followup patches will remove the functionality.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/904613005
2015-02-06 12:46:04 +11:00
Ojan Vafai
6ee8440f27 Walk render tree instead of render layers for paint.
This is the first step of getting rid of RenderLayer.
Instead of walking the RenderLayer tree, wall the RenderObject
tree and add any layers encountered to a vector to paint later.

This patch just consolidates and move the code from RenderLayer
to RenderBox and then changes the children painting to
iterate over the vector. Therefore we walk the RenderObject tree.
We still call out to RenderLayer in a bunch of places.
A followup patch will get rid of those.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/899753003
2015-02-06 11:38:25 +11:00
Adam Barth
1f8dd823f9 sky/shell should link with sky/engine
This CL causes sky/shell to create a blink::WebView to show that sky/shell
links with sky/engine. In the process, I've made it easier to be a trivial
embedder of sky/engine by removing the requirement to implement
blink::ServiceProvider.

This CL also causes sky/shell to link with mojo/edk/system to resolve link
errors with Mojo fabric (e.g., MojoClose, MojoWriteMessage, etc). To make this
work properly, we'll need to initialize the EDK in a future CL.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/873923003
2015-02-04 19:31:17 -08:00
Tony Gentilcore
2c277b5653 Fix render bounds of iframes on devices with a pixel ratio != 1.
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/896233002
2015-02-04 08:57:10 -08:00
Ojan Vafai
b139ec4316 Delete remaining masks dead code.
Removes the straggling code related to masks now that
we've removed the CSS properties.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/893093002
2015-02-03 13:56:34 +11:00
Adam Barth
254f3b5dbb Revert "Dart: 2++ = 3"
Revert "Rename dart_master.cpp to .cc, consistent with chromium style"
Revert "Move the files we're actually building into bindings2"

This reverts commit 0fc92de0468213f621cba0fbdfd96c1625052ba7.
This reverts commit 155144772817476e87bbe20ddc2071308e3f61e6.
This reverts commit fda181ae2420071af887b5914bd9a9bda8a09725.

These CLs belong in the skydart branch.

TBR=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/860273005
2015-02-02 12:25:52 -08:00
Adam Barth
8603909a6d Merge pull request #43 from eseidel/skydart
Skydart
2015-02-02 09:40:11 -08:00
Adam Barth
8b7e67f862 Move the files we're actually building into bindings2
Also, add copyright headers.

TBR=eseidel@chromium.org
2015-02-02 09:32:21 -08:00
Rafael Weinstein
ae9b5ee31b Rename dart_master.cpp to .cc, consistent with chromium style
TBR=eseidel
BUG=

Review URL: https://codereview.chromium.org/894753002
2015-02-02 08:56:30 -08:00
Ojan Vafai
b264b3c269 Remove the last remnant of paint phases.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/895483002
2015-02-01 21:09:10 -08:00
Ojan Vafai
4b9622480d Consolidate and delete a bunch of paint methods.
We've simplified paint code enough that most of these
methods are redundant.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/892033003
2015-02-01 21:01:07 -08:00
Ojan Vafai
bd590c7b05 Remove mask painting.
Now that we don't have -webkit-mask-*, this is dead code.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/886263003
2015-02-01 20:37:32 -08:00
Rafael Weinstein
464f03c914 Dart: 2++ = 3
BUG=

Review URL: https://codereview.chromium.org/894613002
2015-02-01 20:31:53 -08:00
Ojan Vafai
81ae67c906 Remove -webkit-mask-*.
This is for doing masking based off the alpha channel of
an image. This is a feature we want to support, but we
want a more general imperative API that the declarative thing
is built on top of.

In the meantime, the code is getting in our way and the
feature was already broken (likely from before making sky public).
We just paint the mask image on top instead of doing the actual
masking.

This patch just removes the parsing. Followup patches will
remove the implementation code.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/892903002
2015-02-01 18:45:44 -08:00
Adam Barth
2f39655a37 Cleanup unused #includes and declarations in PlatformImpl
These aren't needed anymore. Also, use more |override|.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/892053002
2015-02-01 13:40:42 -08:00
Adam Barth
bf14e27aca Move SharedTimer implementation into sky/engine
Now that sky/engine can talk to base directly, there's no reason to use
Platform::current to implement SharedTimer. Instead, we can just implement it
directly in SharedTimer.cpp.

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

Review URL: https://codereview.chromium.org/886263002
2015-02-01 09:35:02 -08:00
Adam Barth
e962904c7a Remove TRACE_EVENT indirection through blink::Platform
Normal trace events already go directly to base. This CL removes the remaining
trace events that were still indirected through blink::Platform. These were
just the half-finished inspector timeline trace events, which currently aren't
actually hooked up to anything.

This CL also removes the redunant "convertable to trace format" wrappers and
moves their one remaining use over to just using the version in base directly.

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

Review URL: https://codereview.chromium.org/889823002
2015-01-30 08:47:46 -08:00
Adam Barth
65a50f6c81 Remove unused trace sampling states
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/893503002
2015-01-29 22:08:19 -08:00
Adam Barth
fa57fe2819 WTF should get time from base directly
There's no reason to bounce through several indirections to get the current
time.  We can just call into base directly now.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/887883002
2015-01-29 22:08:02 -08:00
Ojan Vafai
194360db4f Inline two methods with only one caller.
TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/886923003
2015-01-29 21:02:16 -08:00