74 Commits

Author SHA1 Message Date
Eric Seidel
3046acd9eb Remove backface visibility
I made one edit in FrameView while looking at writing
RenderParagraph in Dart and then decided to look for
a slightly larger clean-up to justify committing it.
I found backface-visibility which I removed.

backface-visibility controls painting/hittesting of flipped objects.
https://developer.mozilla.org/en-US/docs/Web/CSS/backface-visibility

It's mostly used as a hack to get layers however. :)

TBR=abarth@chromium.org

Review URL: https://codereview.chromium.org/1161623004
2015-05-28 10:18:24 -07:00
Ojan Vafai
9a7eb76c46 Remove dead code around anonymous renderers.
There's no way to create anonymous renderers anymore.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1070233002
2015-04-10 11:34:46 -07:00
Ojan Vafai
b9f182a6bd Stop rendering text inside flex boxes.
Text can only only inside paragraphs and inlines. This patch makes it
so we stop putting such text nodes in the render tree at all if their
parent is not a paragraph or an inline.

This is the final step in making it so that we don't create anonymous
renderers, which fixes a crash in the new custom layout code.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1077473002
2015-04-09 11:40:03 -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
Ojan Vafai
b9df2edb7d Delete RenderBlockFlow.
We only ever create RenderParagraphs now. The only non-trivial change here
is making RenderView a RenderFlexibleBox. This required changing custom.sky.
That test was written in a fragile way that behaved differently if we
did multiple layouts. Instead, having it be less racy and only change
values during the test itself.

This also throws a wrench in moving all the layout code to dart
because we can't set the layout manager on the RenderView. Maybe
we need to explicitly let you do so.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1068683002
2015-04-07 16:59:36 -07:00
Ojan Vafai
6bfa21b190 Make custom layout actually work.
-Temporarily add setting override width as well so that we correctly bypass in RenderBox::computeLogicalWidth.
-Add setNeedsLayout so that the author code can force layouts (e.g. when the container's width changes).
-Have setLayoutManager force a reattach of the element if it's renderer wasn't a custom layout one before.
-Remove the laying out of children from RenderCustomLayout::layout. This is the job of the author code.
-Add a test case.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1055263002
2015-04-06 12:53:35 -07:00
Ojan Vafai
ef1b30faf7 Move FilterEffectRenderer out of RenderLayer into RenderBox.
It doesn't do anything RenderLayer specific anymore. This
does mean adding another pointer to RenderBox. We might want
to do something about that eventually, but for now it seems fine
to make forward progress in terms of getting rid of the RenderLayer
tree.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/963253002
2015-02-27 13:42:29 -08:00
Ojan Vafai
c885cea0f7 Cleanup transform-related methods in RenderLayer.
-Get rid of paintsWithTransform.
-Remove currentTransform. It was only ever called with
IncludeTransformOrigin and on non-null transforms.
-Remove renderableTransform. It was only called on
non-null transforms.
-Remove a layer()->parent() branch. The ASSERT had been
added in a previous patch, but the branch wasn't removed.
-Inline makeMatrixRenderable. It was only called in one
place.
-Add a test to make sure that transform origin is corrrectly
excluded from the transform computedStyle.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/958463002
2015-02-24 14:31:48 -08:00
Ojan Vafai
920920310e Delete RenderLayerModelObject.
Merge most of it into RenderBox. Only RenderBoxes can have
layers now. This also meant a bit of code could be cleaned up
since some virtuals (e.g. updateFromStyle) are no longer needed
since they're only called on RenderBoxes.

collectSelfPaintingLayers is the only bit that's moved into
RenderBoxModelObject instead of RenderBox. That's because we
need to be able to recurse down into RenderInlines since they
may contain RenderBoxes that have selfPaintingLayers.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/953673002
2015-02-23 17:24:38 -08:00
Ojan Vafai
a42e249b69 Remove dead position:relative code.
There are some cases in this patch where it's not
obvious that the code only applies to position:relative,
but the code asserts that it does. In those cases,
I trusted the asserts and deleted the code.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/938193004
2015-02-20 11:37:17 -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
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
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
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
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
bdc24bf049 Remove painting roots.
These appear to have been for ensuring that you
only paint elements in a given subtree. It's not clear
to me exactly how you get to painting an element that
is not rooted at the RenderLayer you started with.
I think it's just not possible in Sky anymore.
This code was added in 2004 for drag images, which
we no longer support.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/882223005
2015-01-28 19:53:44 -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
4e74d9df30 Remove RenderLayerScrollableArea
This CL is a first step towards removing the scrolling machinery from the
engine. Notice that we pay a tax for scrolling in RenderBlockFlow::layout.

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

Review URL: https://codereview.chromium.org/877043002
2015-01-27 09:58:45 -08:00
Ojan Vafai
785f64ed86 Remove outline painting on inlines.
Jagged edge outlines are more complexity than is justified
for the use-cases. We should enable to use-cases like this,
but with a lower-level line-box + custom painting API.

Removes the paintOutline method on RenderInline. Also removed
a number of dead methods that call absoluteRects so we can delete
that method and related code.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/867653005
2015-01-26 18:58:02 -08:00
Elliott Sprehn
ca9d4f1ab2 Consolidate callers to scheduleVisualUpdate.
Make everyone call through Document::scheduleVisualUpdate(). I also
removed some dead composited selection code that used this.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/865383003
2015-01-22 18:47:23 -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
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
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
Ojan Vafai
f97bad962e Get rid of the full invalidation bool on FrameView.
It doesn't do anything anymore. Also, delete some now
dead paint invalidation code in RenderObject.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/849763002
2015-01-12 18:14:27 -08:00
Ojan Vafai
a044a6d074 Get rid of the *AndFullPaintInvalidation methods.
They now do the same thing as the non-AdnFullPaintInvalidation
versions.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/840483004
2015-01-12 17:51:19 -08:00
Ojan Vafai
a198a95ea6 Delete invalidateTreeIfNeeded.
This is just setting and clearing paint invalidation dirty bits.
Also remove a bunch of the paint invalidation dirty bits entirely.
There's plenty more to do.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/791023006
2015-01-12 13:29:12 -08:00
Ojan Vafai
cfbabf0397 Delete a bunch of paint invalidation rect computing code.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/845873004
2015-01-09 19:05:59 -08:00
Ojan Vafai
a794eb951d Delete an assortment of unneeded paint invalidation code.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/845093002
2015-01-09 18:31:26 -08:00
Ojan Vafai
69fa7db132 Delete InvalidationReason.
Also delete some other paint invalidation code that
doesn't do anything in Sky.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/844023003
2015-01-09 18:01:27 -08:00
Ojan Vafai
ce43f3d0c1 First pass at deleting paint invalidation code.
This is all wasted effort in sky since we invalidate
the whole viewport on every frame. We'll probably eventually
add back in some invalidation, but it likely won't
be rect-based.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/840403003
2015-01-09 15:20:35 -08:00
Rafael Weinstein
be846a56b7 Remove CompositingReasons.*
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/794733004
2014-12-09 17:19:00 -08:00
Elliott Sprehn
51b98aa289 Remove more Node API.
R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/772743004
2014-12-02 11:26:42 -08:00
Rafael Weinstein
d6605f71f9 Remove a bunch of dead code from RenderLayer
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/735033003
2014-11-28 19:59:55 -08:00
Ojan Vafai
edbc055885 Get rid of CompositingState.
It's always NotComposited. Also removed some DisableCompositingQueryAsserts.
The asserts they are disabling no longer exist.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/768493002
2014-11-26 18:49:36 -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
Rafael Weinstein
acf6d9f29d setChildrenInline wasn't doing anything and childrenInlien always deferred to isRenderParagraph.
Also, add a test from the original webkit patch that called setChildrenInline in layoutBlock

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/748943002
2014-11-21 15:16:58 -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
Ojan Vafai
82ddd6096e Get rid of continuations.
This is all dead code now that inlines can't contain
blocks.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/734813004
2014-11-18 16:56:44 -08:00
Elliott Sprehn
3eb9946952 Remove lots of things from RenderObject
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/735193002
2014-11-18 16:06:22 -08:00
Ojan Vafai
7a37fa8c09 First step at getting rid of anonymous blocks and continuations.
-Add RenderParagraph and display:paragraph. This is the only
render type that's allowed to contain inlines or text.
-If you put text nodes directly in a non-paragraph, wrap them
in an anonymous paragraph. This may not be the place we want
to end up, but it's a good stopgap to make it so we don't
crash in this case.
-Make StyleAdjuster force that non-paragraph blocks only contain
RenderBlock subclasses and that paragraphs and inlines only contain
inlines.
-Considerably simplify addChildIgnoringAnonymousColumnBlocks
now that we only create anonymous blocks for the case of
text nodes in non-paragraphs. Also get rid of the behavior
where we try to group multiple nodes into a single
anonymous block.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/729693003
2014-11-17 18:39:52 -08:00
Rafael Weinstein
0b758e5227 Remove CSSCompositing
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/731863003
2014-11-17 14:34:30 -08:00
Matt Perry
465846c37d Sky: Move iframe geometry updates to FrameView::updateLayout instead of
RenderView::invalidateTree.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/737523002
2014-11-17 15:49:40 -05:00
Matt Perry
eee39ec5ad Sky: update the HTMLIFrameElement's geometry during paint invalidation rather
than layout.

This ends up being much smoother and only triggers once per layout cycle.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/730653002
2014-11-17 14:20:17 -05: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