491 Commits

Author SHA1 Message Date
Elliott Sprehn
b05eec5f30 Prune the API of StyleResolver.
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/858073003
2015-01-20 19:10:03 -08:00
Elliott Sprehn
f0e8f7c7d3 Treat UA rules like author rules when matching.
Sky doesn't have a concept of UA rules, just some default style
rules you can override.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/864693002
2015-01-20 18:49:23 -08:00
Elliott Sprehn
1d3828fb29 Put the StyleResourceLoader on the stack.
It has no state, we should just put it on the stack during style
resolve.

I also combined the methods inside StyleResourceLoader to make it
simpler.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/825433003
2015-01-20 16:49:40 -08:00
Elliott Sprehn
7686fb0b8f Simplify media query handling for stylesheets.
Just rebuild the sheets when the viewport changes sizes since that's
super rare in sky right now. This also causes a full document style
recalc, but we'll fix that later too. For now lets make the system
simpler.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/848483003
2015-01-20 15:35:25 -08:00
Elliott Sprehn
0fcd743a64 Remove Element::textFromChildren().
Instead just use textContent() and teach HTMLStyleElement how to atomize
its children. I also added the optimization to Node::textContent so that
Text just returns its value instead of allocating a new buffer which
avoids malloc and copy when getting the textContent of text.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/864613002
2015-01-20 14:26:54 -08:00
Elliott Sprehn
b3e4c186ee Remove HTMLStyleElement::scopingNode().
It's not used.

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/864533003
2015-01-20 14:26:43 -08:00
Adam Barth
0739d9395b Add blink::WebPointerEvent
This CL adds the WebPointerEvent class and code to convert from
WebPointerEvents (the platform abstraction) to PointerEvents (the DOM API).

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/845313011
2015-01-20 10:11:05 -08:00
Adam Barth
385cd6107c Remove unused hit testing modes in Sky
R=eseidel@google.com

Review URL: https://codereview.chromium.org/855223002
2015-01-19 19:11:20 -08:00
Adam Barth
e4ade99b70 Move WebInputEvent from public/web to public/platform
Moving WebInputEvent into public/platform lets us refer to it directly in core, which will let us remove the PlatformFooEvent classes.

The final pipeline will be:
1) mojo::InputEvent (IPC type, device pixels)
2) blink::WebInputEvent (platform abstraction, logical pixels)
3) blink::Event (DOM type, logical pixels)

If mojo::InputEvent used logical pixels, it would probably be easier to just
use mojo::InputEvent as the platform abstraction, but instead we use the
mojo-to-blink conversion to translate between device and logical pixels, like
we do everywhere else in Sky.

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

Review URL: https://codereview.chromium.org/860593003
2015-01-19 18:39:39 -08:00
Adam Barth
730d37dce1 Fix the build
TBR=ojan@chromium.org

Review URL: https://codereview.chromium.org/846643005
2015-01-17 01:02:52 -08:00
Ojan Vafai
100094dbf3 Delete document marker related invalidation code.
I believe this doesn't change behavior, but it's hard
to know since we don't have spellchecking hooked up.
Also, delete setToolTip. This is for tooltips on spelling
markers. We don't support tooltips.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/830273006
2015-01-16 20:01:02 -08:00
Ojan Vafai
607fb5f42e Delete dead invalidate function.
TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/826873003
2015-01-16 19:55:57 -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
Elliott Sprehn
1b2ab0c6db Don't queue mutation records when attributes don't change value.
There's no reason to queue records when an attribute didn't really
change value.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/840223006
2015-01-16 19:21:28 -08:00
Elliott Sprehn
4ddf1ce17a Fix the build.
TBR=jamesr@chromium.org

Review URL: https://codereview.chromium.org/854803003
2015-01-16 18:48:17 -08:00
Elliott Sprehn
543049dd5c Remove viewportDefiningElement.
This was used for quirky scrollbar behavior on the web related to
which element defined in the viewport (body, html, etc.). In Sky we plan to
allow multiple elements as direct children of the Document so we need to get
rid of checks like this. The good news is this already does nothing in sky
because the root never has scrollbars automatically.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/858713002
2015-01-16 18:35:12 -08:00
Ojan Vafai
af37dc8fde Delete some noop and dead scrollbar code.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/856443005
2015-01-16 18:15:11 -08:00
Elliott Sprehn
38c4d27f53 Remove custom element :unresolved.
Sky doesn't do upgrades and unknown elements become <error>
so this doesn't make sense.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/842033004
2015-01-16 17:50:18 -08:00
Elliott Sprehn
9bb2664b06 Get rid of ensureStyleResolver().
It doesn't have side effects anymore, and active documents always
have a StyleResolver.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/838003008
2015-01-16 17:49:32 -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
0f117ce13f Removed unused paintInvalidationRect member.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/854963002
2015-01-16 17:39:52 -08:00
Ojan Vafai
6ea92165d0 Merge diffNeedsFullLayout methods.
Now that we don't have paint invalidation, the distinction
is meaningless.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/851203003
2015-01-16 17:38:40 -08:00
Adam Barth
b8df508de7 Add support for GestureEvents to Sky
We'll likely change the API over time, but this is a start.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/857533002
2015-01-16 15:42:01 -08:00
Adam Barth
f1cbcfa80b Add PointerEvent interface to Sky
Currently this interface is constructable from script but isn't used internally
by the engine.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/846783003
2015-01-16 15:35:59 -08:00
Elliott Sprehn
d28c27efe5 Simplify Node::textContent().
We can make it iterative, and use isTextNode() which is just a bitfield check.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/855733005
2015-01-16 15:35:03 -08:00
Elliott Sprehn
5e18888a0b Be more strict about attributes in sky-binder.
Instead of making all the built in attributes be global we match them to the
elements they actually apply to. I also removed a bunch of attributes that no
longer work in Sky (but haven't been removed from HTMLAttributeNames.in) yet,
or which we plan to remove.

I also removed the title property from HTMLElement. The <sky-box> widget forgot
to declare its title attribute and no error was generated because of the title
property existing on all elements. Sky doesn't have this so lets remove the API
now and clean up the C++ later.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/807243003
2015-01-16 14:41:07 -08:00
Elliott Sprehn
f607133c18 Turn on harmony arrays and regexp.
adamk@ says these are pretty stable.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/845403009
2015-01-15 17:12:17 -08:00
Ojan Vafai
4256d4a224 Remove background obscuration checks.
This is an optimization to avoid painting backgrounds
that are obscured. It's a lot of complexity that it's
not clear we'll need given that we're using a GL backend.
Also, we can add it back in more easily/efficiently in the future
once we have a display list architecture.

This also means we can remove the needsPaintInvalidation
dirty bit and some opacity information on filters.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/856563006
2015-01-15 17:11:44 -08:00
Adam Barth
c312fcbaa4 Trace RenderLayer::paint
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/851473005
2015-01-15 15:18:02 -08:00
Elliott Sprehn
8f1c3bacfc Trim the deps of StyleResolver.h
TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/794783003
2015-01-15 13:11:10 -08:00
Ojan Vafai
6d49e56b24 Simplify the paint invalidation bits.
The only thing they're used for now is to clear the
background obscuration state on RenderBox. They're
also used in RenderLayerModelObject::styleWillChange,
but that usage seems like a huge premature optimization.
Unfortunately, the RenderBox one walks up the ancestor
chain, so it's likely a necessary performance optimization.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/851033002
2015-01-15 13:02:00 -08:00
Adam Barth
81e3233e3e Add a trace event for running microtasks
Otherwise there are mysterious gaps in the trace.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/853883005
2015-01-15 10:28:11 -08:00
Ojan Vafai
eb68343228 Remove deferredfiltersenabled settings.
I have no idea what this setting does, but I just mechanically
removed it since it's always set to true.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/848243002
2015-01-14 18:58:27 -08:00
Ojan Vafai
3b4eb72066 Delete unused paint invalidation function.
TBR=esprehn@chromium.org

Review URL: https://codereview.chromium.org/856453002
2015-01-14 18:48:43 -08:00
Ojan Vafai
21f4801613 Remove some unused paint invalidation members from RenderObject.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/854563005
2015-01-14 16:22:08 -08:00
Ojan Vafai
99f75b810d Inline paintInvalidationOrMarkForLayout.
The name doesn't really match what it does at all.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/854573003
2015-01-14 16:18:39 -08:00
Ojan Vafai
d563e42443 Unprefix -webkit-filter and add a pixel test for it.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/850103003
2015-01-14 15:14:46 -08:00
James Robinson
be2f656ab1 Pass ServiceProvider and ServiceProvider& params in Connect
In preperation for removing the Client annotation from ServiceProvider
this passes a second parameter of type ServiceProvider in the shell and
application Connect calls. In this patch the type signatures are updated
but the second parameter is basically unused. The intention is that the
first parameter |services| will be used for the connecting application to
request services from the connected application (as it does currently)
and the second parameter |exported_services| be used for the connecting
application to provide services to the connected application. We have
very few services exported in the second direction today - I'll update
them to use the second parameter in a follow-up patch.

R=darin@chromium.org

Review URL: https://codereview.chromium.org/845593003
2015-01-14 14:33:07 -08:00
Ojan Vafai
8e3f746bad Remove assorted dead paint invalidation code.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/850763008
2015-01-14 13:46:39 -08:00
Adam Barth
e89b1dda15 lowlevel/img.sky flaky crashes
We don't need to pump pending speculations if we don't have any.

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

Review URL: https://codereview.chromium.org/852043003
2015-01-14 13:32:21 -08:00
Ojan Vafai
22bc13f2cf Delete canInvalidatePaintDuringPerformLayout.
It doesn't do anything anymore.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/850763007
2015-01-14 13:31:33 -08:00
Ojan Vafai
3e26389e5d Delete PaintInvalidationState. It's unused.
Delete selection paint invalidation code.

There is a slight change in behavior in FrameSelection::revealSelection.
If you have a non-collapsed selection, then we'll center the start
of the selection instead of the whole selection in some cases. There's
a ton of callers of this code, so it's hard to be sure if any of this
actually changes behavior for sky. In manual testing, I couldn't find
any scenarios where there was a difference. Almost universally,
when we call revealSelection, we have a CaretSelection. The only
case I could think of where we have a RangeSelection is when
modifying an off-screen selection (e.g. shift+right), but in that case
we pass the RevealExtent option, so this patch doesn't change behavior
there.

Removing that caller makes all the rest of this rect computing
code into dead code.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/823123003
2015-01-14 13:25:49 -08:00
Ojan Vafai
5f718d3e63 Delete selection paint invalidation code.
There is a slight change in behavior in FrameSelection::revealSelection.
If you have a non-collapsed selection, then we'll center the start
of the selection instead of the whole selection in some cases. There's
a ton of callers of this code, so it's hard to be sure if any of this
actually changes behavior for sky. In manual testing, I couldn't find
any scenarios where there was a difference. Almost universally,
when we call revealSelection, we have a CaretSelection. The only
case I could think of where we have a RangeSelection is when
modifying an off-screen selection (e.g. shift+right), but in that case
we pass the RevealExtent option, so this patch doesn't change behavior
there.

Removing that caller makes all the rest of this rect computing
code into dead code.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/847303003
2015-01-14 13:25:16 -08:00
Elliot Glaysher
36e9807890 It is time.
Remove all of ui/views, ui/aura/, ui/compositor, ui/ozone,
and a whole bunch of dead code.

This is part one of multiple patches. This removes the
toplevel directories, and some utility files. Further
patches will deep dive to do surgery on the build system,
the resource bundles, et cetera.

BUG=443439
R=sky@chromium.org

Review URL: https://codereview.chromium.org/851853002
2015-01-14 12:56:27 -08:00
Ojan Vafai
d441d00961 Delete some dead ScrollAlignment code.
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/796623004
2015-01-14 11:14:53 -08:00
Elliott Sprehn
6f8568037a Move @font-face logic from ScopedStyleResolver to StyleEngine.
R=abarth@chromium.org, ojan@chromium.org

Review URL: https://codereview.chromium.org/851873002
2015-01-14 11:07:22 -08:00
Ojan Vafai
3c91916589 Remove the PaintInvalidation DocumentLifeCycle states.
We no longer have paint invalidation.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/847393003
2015-01-14 11:03:51 -08:00
Elliott Sprehn
e71cf28f76 Merge StyleSheetCollection into ScopedStyleResolver.
There's no reason to keep two identical lists of the sheets
and have this separate object. I also moved the updating
logic out of StyleResolver and into ScopedStyleResolver
which makes more sense. There's still some weirdness since
some global state still exists in the StyleResolver, but
that's something we can fix in future patches.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/852703002
2015-01-13 18:37:00 -08:00
Elliott Sprehn
3528612650 All documents should have a RegistrationContext.
There's no reason to have a concept of a document with no
registration context.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/841873006
2015-01-13 17:00:51 -08:00
Elliott Sprehn
66f96ff9bf Remove embedder custom elements.
In Sky there's no concept of embedder custom elements with
different naming rules. Lets remove this machinery.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/838463004
2015-01-13 16:27:56 -08:00