We only need to walk the immediate children of the paragraph.
The other inline children of the paragraph will get paint called
on them and they will then appropriately add the self painting
layers to the array inside their paint calls.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/945223002
This CL implements custom elements. The design is as follows:
1) Authors subclass Element and call registerElement.
2) When we create C++ elements for custom elements, we call the author's
constructor synchronously.
3) The attach/detach/attributeChanged callbacks are called either:
a) when exiting the current custom element callback scoped (e.g., before
returning from appendChild), or
b) when draining the microtask queue.
The implementation in this CL is a bit fragile because we don't detect name
registration conflicts and we let you create custom elements with the same name
as built-in elements. Also, not every part of the engine is prepared to execute
script synchronously below createElement. We'll need to iron out these issues
over time, but this CL is a start.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/943013002
The only bit that was still used was the
containingBlockLogicalWidthChanged check in
RenderBlock::widthAvailableToChildrenHasChanged.
a4f1e657ff
is the patch that added that code. I added a
test to confirm we still pass the test case
that code was added for.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/945003002
This does several things:
1. Teaches sky about asynchronous script execution. Previously once all imports
were loaded and the script text was available, we executed a script and assumed
it completed synchronously. We left the parser loop to do so, but that was fine
as the next chunk from the background thread would resume the parser. In this
change scripts now load and execute separately. The "load" step may trigger
further dart import loads which may cause the execution to happen asynchronously
which required teaching both the DartController and the HTMLScriptRunner to
take callbacks to allow HTMLDocumentParser to know to continue parsing after
the Dart script has resolved its imports and executed.
This required re-working some of how the parser executes scripts and I
re-purposed isWaitingForScripts to include "is the parser blocked" where
as before it was limited only to "does the treebuilder have a script", even
though the imports system may have had pending scripts as well.
I made HTMLScriptRunner live only as long as the script it was executing
since it only contained per-script state at this point.
2. Fixed an error reporting bug whereby we would not show errors when "init"
failed to execute, only "main". This required using the dart_mirrors_api.h
which required adding an include path to the core build. :(
3. Made it possible for a single sky file to contain multiple dart <script>
tags. Each <script> is a separate library and executes as
soon as </script> is seen. main or init is called for each. This required
mangling "urls" for these script blocks since Dart unique's libraries by urls.
Before this change it may have been possible to do <import 'foo.sky'> and then
<script>import 'foo.sky'</script> and have it work!?
R=abarth@chromium.org
BUG=
Review URL: https://codereview.chromium.org/938623005
Change hit testing to walk over the render tree instead of
the RenderLayer tree. This is a step in the direction of
removing the RenderLayer tree entirely.
For now, there's a few calls back into RenderLayer that
will be removed in a followup patch. This patch also
breaks hit testing on transformed inlines. I'll be
removing the ability to transform inlines in a
followup patch anyways, so it's ok for hit testing
to give the wrong result temporarily here.
Almost all of this patch is just moving code from
RenderLayer to RenderBox. The primary substantive change
is in RenderBox::hitTestLayer. Instead of having
hitTestChildren calls, we call collectSelfPaintingLayers,
reverse sort by z-index (so we start at the top),
and then iterate over the result.
The test-case also exposes that we don't correctly hit
transformed elements inside inline-blocks. I went back as
far as 4153b8a515d54275934d4244aaf2d5a7a8fe3333 and the
bug still happened.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/945693002
These now appear on internals as takeServicesProvidedToEmbedder and
takeServicesProvidedByEmbedder. When you call these functions, you get back the
raw int that represents the handle. We'll need to wrap them up inside the Dart
VM with the appropriate types. We can create a nice wrapper for that in a
future CL.
R=hansmuller@google.com, hansmuller@chromium.org
Review URL: https://codereview.chromium.org/944733002
This switches to using StrongBinding<>s in sky's ContentHandlerImpl
and TestHarnessImpl implementations.
These are the last uses of the deprecated InterfaceImpl<> helper in
the mojo repo (more uses exist in other repos).
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/934403002
This CL is the beginnings of an implementation of url_loader.mojom using the
OkHttp library. OkHttp is a relatively simple HTTP client library for Android
that implements HTTP/1.1 and HTTP/2.0. We might want to use OkHttp to bootstrap
into a more full-featured network_service implementation based on //net.
R=jamesr@chromium.org
Review URL: https://codereview.chromium.org/930673002
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
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
This CL removes a number of tests that we don't plan to port to Dart:
1) custom-elements. We're going to use a different mechanism for custom
elements. We'll need to write a new set of tests as we implement it.
2) inspector. These are tests of the JS inspector backend, which we don't
plan to use.
3) js. This is a test of a JavaScript feature.
4) mocha. These are tests of the JavaScript testing framework we were using.
5) mutation-observer. We're keeping the C++ code for mutation observers, but
it's unclear how we want to expose this in the platform.
6) resources. These are JavaScript-based testing frameworks.
R=eseidel@chromium.org, ojan@chromium.org
Review URL: https://codereview.chromium.org/920343002
Unfortunately, using --origin on Linux is slow and too painful to use at the
moment. We should work on fixing that, but currently many of us have this in
our local working copy anyway.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/922823002
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
This CL plumbs resize notifications from SkyView to Engine. I've taken the
opportunity to reorganize how notifications generated by SkyView are plumbed to
the GPU and UI threads. This approach should reduce the amount of plumbing
needed for new notifications.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/880443003
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
The tracing service logically provides one service, TraceCoordinator, which can
start and stop tracing sessions. It also can connect to any number of
TraceControllers each of which can supply tracing information on demand.
Whenever an app connects to the tracing service, the tracing service attempts to
connect to that app's TraceController interface. If the app provides this
interface then tracing data will be requested whenever tracing starts. If the
app doesn't, then the pipe just closes. Thus apps that want to be traced can do
so by creating however many connections to the tracing service they want and
registering a TraceController implementation on each outgoing connection.
The shell connects in a similar fashion by connecting to the tracing service and
providing a TraceController implementation. The code looks a bit different since
the shell is special.
BUG=451319
R=viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/791493006
mojo.Surface's client had two methods:
*) SetIdNamespace replaced by mojo.Surface.GetIdNamespace which returns
the id namespace via a callback.
*) ReturnResources split into a ResourceReturner interface which can be
(optionally) set on the mojo.Surface via
mojo.Surface.SetResourceReturner
Also beefed up the comments a bit.
BUG=451319
R=sky@chromium.org
Review URL: https://codereview.chromium.org/871373015
This CL adds a SkyShell.apk, which will become a direct embedding of Sky on
Android that will let us run performance tests on the Sky engine in a
self-contained environment on a real device.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/893643002
Before we start adding more uses of mojo app ids we should use
to a non-broken hash function. :)
What was holding me back before was I wasn't aware of us having an
incremental hash api other than base/md5.h (others in base only operate
on the full input data), however it turns out that the crypto/ library
has one in crypto/secure_hash.h.
R=abarth@chromium.org
BUG=
Review URL: https://codereview.chromium.org/868253006
Already other applications use sky's simple window
manager (mojo:sky_debugger) as a full-screen window
manager. This moves this to /services and removes
all sky references from it.
As a part of this I've removed inspector support
from skydb. It was already broken and will need
to be re-thought to not involve calls into
this new window manager.
I'm also flipping the relationship between prompt.cc
and debugger.cc for skydb. Skydb will tell mojo_shell
to start sky_debugger_prompt instead of sky_debugger.
I'm also renaming sky_debugger_prompt to be
sky_debugger.
R=abarth@chromium.org
BUG=
Review URL: https://codereview.chromium.org/883983004