68 Commits

Author SHA1 Message Date
Adam Barth
d8d7db82a0 Really remove config.h
This CL generated by |sed -i '/sky\/engine\/config.h/d'| and a manual sweep to
catch some oddballs.

TBR=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1206763002.
2015-06-23 23:15:28 -07:00
Adam Barth
1f258f383e Add support for snapshot loading to Sky
This CL adds the ability to load Dart snapshot files created by sky_packager in
Sky. Using a snapshot lets us transmit all the code for an app in a single blob
and should improve startup time. Later CLs will make this codepath easier to
use and evaluate performance.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1197133004.
2015-06-23 18:40:01 -07:00
Eric Seidel
8aa3caf350 Make SkyView vs. WebView controlable via url path
We're currently in a transition between using main.sky and main.dart
files as our main() entry point for Sky applications.

This CL makes this runtime controlable by path name.  If it finds
a .dart in the path name it will use SkyView, otherwise it will
fall back to the existing WebView codepath.

SkyView does not expose a window object and much of the existing
Sky Engine is not initialized when main() is run.  Clients should
be transitioning away from main.sky towards main.dart in the near
future, however main.dart is probably not ready for general
consumption at this point.

R=ianh@google.com

Review URL: https://codereview.chromium.org/1152313002
2015-05-22 12:59:21 -07:00
James Robinson
209153d192 Fix up strings Sky passes to base/trace_event
String parameters passed to the trace macros in base/trace_event must
either be std::string (which Sky doesn't use very much), pointers to
null terminated C-style strings that live forever (like a string
literal) pointers to C-style strings that are annotated by macro as
needing to be copied. This fixes up a few instances that passed pointers
to temporary strings without the copying annotation or pointers to
non-null-terminated strings so the trace data doesn't have random
garbage memory in it.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1107853003
2015-05-05 17:59:09 -07:00
Eric Seidel
afaac6ec79 Remove our impressive amount of CSS Cursor code.
With this gone, cursors will no longer change
on hover when running Sky on a desktop.

Then again the iGeneration doesn't
probably even know what a mouse is, let alone
have a burning desire to set a CSS3 custom-cursor.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/1076623002
2015-04-08 14:23:13 -07: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
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
Adam Barth
54809a8877 Remove more scrolling code from Sky
None of this code does anything anymore.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/878303002
2015-01-27 15:20:14 -08:00
Adam Barth
c33c565f8b Remove ScrollableArea and Scrollbar
This code is unused.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/879993004
2015-01-27 12:08:24 -08:00
Adam Barth
c3fc9e9663 Add wheel support to sky-scrollable
This CL plumbs wheel events through Sky again and uses them in sky-scrollable.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/876853005
2015-01-27 09:58:22 -08:00
Elliott Sprehn
eb3e7d4b8b Get rid of Chrome, use Page.
This hides ChromeClient inside Page and gets rid of Chrome object.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/878673005
2015-01-26 18:06:24 -08:00
Elliott Sprehn
50e7a7c0a0 Rename scheduleAnimation() to scheduleVisualUpdate().
It causes a full screen raster right now, lets name it for what it does.
This also matches the name used in PageAnimator.

Merge WebWidgetClient into WebViewClient.

They're always the same thing in sky. I also removed all the methods that
don't do anything in sky.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/880713003
2015-01-26 16:09:40 -08:00
Elliott Sprehn
c7c5328338 Remove InputMethodContext.
We'll probably want a really different API in sky, and this just makes
ElementRareData bigger for now and isn't hooked up to anything.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/880663002
2015-01-26 13:12:08 -08:00
Adam Barth
07140ff848 Remove PlatformEvent
There aren't any more subclasses or uses. Also, remove PlatformEventController
and PlatformEventDispatcher, which are also dead code.

R=eseidel@google.com

Review URL: https://codereview.chromium.org/870413002
2015-01-25 23:48:07 -08:00
Adam Barth
3ddae5ea36 Switch KeyboardEvents over to NewEventHandler
This CL moves KeyboardEvents from the old event model to NewEventHandler. This
CL keeps the basic structure of keydown, keypress, keyup events even though
that's a bit wacky. As with pointer and gesture events, this CL removes
PlatformKeyboardEvent in favor of just using WebKeyboardEvent. I've also made
WebKeyboardEvent align more closely with Mojo's keyboard event.

The CL does change one important aspect of key event handling: on the web the
"keyCode" property of KeyboardEvent changes its meaning depending on whether
the event is a keydown or a keypress event. For the former events, keyCode is
the "virtual" (i.e., windows) key code where for the latter events, keyCode is
the character code. To be more precise, I've renamed keyCode to virtualKeyCode
and I've given it a zero (unknown key code) value during keypress events.

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

Review URL: https://codereview.chromium.org/872233002
2015-01-25 22:46:50 -08:00
Adam Barth
e3f9e2de4b Remove more mouse-specific code
This CL removes a bunch of unused mouse-related code, including the
MouseRelatedEvent base class.

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

Review URL: https://codereview.chromium.org/873963003
2015-01-24 11:18:35 -08:00
Adam Barth
f923562fa0 Move GestureEvent to NewEventDispatcher
The Sky engine doesn't respond to gesture events itself. Instead, the framework
will listen for gestures and respond to them. That means moving GestureEvents
over to the NewEventDispatcher is relatively straightforward.

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

Review URL: https://codereview.chromium.org/874823002
2015-01-24 11:18:12 -08:00
Adam Barth
87c4a4863d Remove touch events from Sky
We use pointer events instead.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/868133003
2015-01-23 12:41:56 -08:00
Adam Barth
d7daaf4c7d Remove mouse events from Sky
We use pointer events now.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/870073003
2015-01-23 12:16:09 -08:00
Adam Barth
b361c4b6c3 Switch Sky to pointer events
This CL switches Sky to a pointer events model that unifies mouse and touch
with a common event model. This implementation is just enough to make the
example widgets work. The rest of the design is in the specs, which we hope to
converge with over time.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/866213004
2015-01-23 09:38:45 -08:00
Adam Barth
3d511d7612 Remove TouchDisambiguation and WindowFocusAllowedIndicator
TouchDisambiguation is dead code. WindowFocusAllowedIndicator doesn't make any
sense because you're always allowed to focus.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/866283003
2015-01-22 18:25:27 -08:00
Adam Barth
473a700f02 Remove unused "Web" interfaces
These are all dead code.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/867093002
2015-01-22 16:08:26 -08:00
Adam Barth
63d7184715 Remove user gesture tracking
The developer has full control of Sky. We don't need to track whether something
was caused by a user gesture.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/868933003
2015-01-22 16:01:31 -08:00
Adam Barth
6354a8c53d Remove PageWidgetDelegate
There's only one page widget delegate: WebView.

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

Review URL: https://codereview.chromium.org/871643003
2015-01-22 15:31:29 -08:00
Adam Barth
68475c7f7c Remove more unused code in WebViewImpl
R=eseidel@chromium.org, esprehn@chromium.org

Review URL: https://codereview.chromium.org/866733007
2015-01-22 15:31:07 -08:00
Adam Barth
d4a9e8a55e Remove a number of unused features from WebViewImpl
This CL removes a bunch of unused code from WebViewImpl. The bulk of the code
is to let C++ drive scroll flights, but we're going to implement that using
gesture events and having the scroll driven in script.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/871683002
2015-01-22 14:58:11 -08:00
Elliott Sprehn
992eaea546 Remove attrs sky doesn't support.
This removes the attributes sky doesn't intend to support. It
removes references to the attrs, but leaves behind a lot of
plumbing that will be cleaned up in the future. This at least
removes the API surface.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/855803002
2015-01-16 19:42:52 -08:00
Ojan Vafai
d591ca1f14 Delete a bunch of noop paint invalidation code.
This deletes invalidateRect and all it's callers.
There are no logic changes, just deletes.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/842113005
2015-01-16 17:42:47 -08:00
Ojan Vafai
f5239bbcca Delete paint invalidation rect tracking.
We don't have paint invalidation rects, so we don't
need to track it.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/803863003
2015-01-09 16:58:25 -08:00
Ojan Vafai
3ffd336ad5 Remove relayout due to scrollbars taking up width
We only have overlay scrollbars, so we never need to
relayout due to the lack or presence of scrollbars.

Also remove a few stracking has*Scrollbar methods.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/783393006
2014-12-09 19:48:50 -08:00
Elliott Sprehn
1771ec30ea Remove SchemeRegistry and WebSecurityPolicy.
Mojo handles the security of our network layer, so we don't need
SchemeRegistry, and WebSecurityPolicy was just a wrapper around it.

R=eseidel@google.com

Review URL: https://codereview.chromium.org/758233004
2014-12-03 16:24:36 -08:00
Elliott Sprehn
dea3b116e6 Remove dead markup serialization code.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/771933002
2014-12-02 10:12:21 -08:00
Elliott Sprehn
a55ff6d55a Remove lots of code from the WebWidget/WebView/WebFrame layer.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/770223002
2014-12-02 01:03:37 -08:00
Ojan Vafai
9837d78956 Remove GraphicsLayer family of classes.
Remove all the GraphicsLayer* classes. This includes LinkHighlight
since that feature is built on the old compositing system.

It's all dead code!

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/762993003
2014-11-26 20:21:01 -08:00
Ojan Vafai
7d45831411 Get rid of the remaining uses of GraphicsLayer.
After this patch, GraphicsLayer is only used by GraphicsLayer-related
classes and LinkHighlight. We should be able to just delete all of them
in a followup patch.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/763013002
2014-11-26 18:51:43 -08:00
Ojan Vafai
32bd99e95a Delete most of rendering/compositing.
Particularly, this deletes RenderLayerCompositor. After this,
there's just CompositingState left to remove.

This is all dead code, so there should be no change in behavior.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/758843004
2014-11-26 15:15:23 -08:00
Ojan Vafai
e451291645 Remove m_layerTreeView from WebViewImpl.
It's always null now.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/757143004
2014-11-25 19:54:27 -08:00
Ojan Vafai
767c998cb2 Remove ENABLE(COMPOSITOR).
The new painting code seems to be working well enough.
So we can start removing the old compositing code.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/762723002
2014-11-25 19:32:27 -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
e4945302eb Move InspectorBackendMojo out of the blink namespace
This starts to break the dependency between blink and
the new v8_inspector.  At least now the front-end
object InspectorBackendMojo is treated as a peer to
WebView instead of WebView providing one.

Unfortunately I also had to teach Page about
InspectorHost in order to make it possible to
lookup the InspectorHost from the v8::Context.

I'm sure there is a nicer way to associate the
InspectorHost with the context but for now
I've chosen this path, we can untangle the
connection in a later patch.

I also ended up removing Page::allPages
and all callers, since they ended up as dead code.

R=abarth@chromium.org, yurys@chromium.org
BUG=435243

Review URL: https://codereview.chromium.org/746713002
2014-11-20 14:21:36 -08:00
Eric Seidel
bc10cd4167 Move inspector_backend_mojo.cc to v8_inspector
Also fixed several chromium style errors in the file.

I had to make web depend on v8_inspector for
the time being until v8_inspector can be
weened off of the Page class.

R=abarth@chromium.org, yurys@chromium.org
BUG=435243

Review URL: https://codereview.chromium.org/749523002
2014-11-20 11:30:01 -08:00
Rafael Weinstein
1dddb1fc9a Add compile flag for enabling the compostior
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/737793006
2014-11-19 14:34:09 -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
Eric Seidel
593c8f8de3 Wire up more of the DebuggerAgent
The debugger can now correctly break on exceptions
and show the corresponding line in the inspector.

It correctly understands which scripts are internal
to sky and does not pause during them.

There is still a ton to make work here
(including stacktraces which I have not tested),
but basic functionality seems to work.

The current implementation is not smart enough to
unpause the inspector when the frontend disconnects.

BUG=434510,434513
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/727593004
2014-11-18 15:05:05 -08:00
Eric Seidel
66bad10810 Remove a bunch of OS(MACOSX) code
This code is unused in sky.

Amazing how much code we had for dealing with old
versions of MSVC.

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

Review URL: https://codereview.chromium.org/709603006
2014-11-11 15:33:38 -08:00
Ojan Vafai
637d077ba2 Remove some straggling zoom-related code.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/714783003
2014-11-10 19:17:32 -08:00
Ojan Vafai
5f945bf69f Remove some more zoom-related code.
-Remove all references to zoomFactor.
-Remove zoomLevels.
-Remove unused m_zoom on StyleVisualData.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/714013002
2014-11-10 18:08:46 -08:00
Rafael Weinstein
c0ffe6fb23 remove updateTouchEventTargetRectsIfNeeded
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/713073003
2014-11-10 13:08:21 -08:00
Elliott Sprehn
9340924861 Remove lots of dead web/ classes.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/693603005
2014-11-07 16:14:13 -08:00
Elliott Sprehn
b76faaa539 Remove ViewportAnchor.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/706583004
2014-11-07 16:12:26 -08:00