54 Commits

Author SHA1 Message Date
Ojan Vafai
d3ea308c89 Fix border painting on self-painting layers.
Commit efc3afd428bd85fd3d12e0dc941b5eb7248ca30b broke it because
we'd computed an empty foreground layer. Now that background
painting is part of the foreground phase, we need to use the
background rect for clipping. As best I can tell, the
background rect is always >= the size of the foreground
rect, so it should be safe to use.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/876243002
2015-01-26 22:45:30 -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
Ojan Vafai
b854dc1ebf Remove negative z-index.
There's no good use-case for putting descendants behind
their ancestors.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/873983007
2015-01-26 18:55:09 -08:00
Ojan Vafai
81341480bf Merge the background paint phase into the foreground phase.
First step in getting rid of paint phases. Verified that
deleting this phase entirely would cause flights-app-pixel.sky
to fail and that it still passes in this patch, which just does
the background painting as part of the foreground phase.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/867463005
2015-01-26 15:52:47 -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
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
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
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
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
1729b054e2 Delete dead painting code around m_pendingSheetLayout.
m_pendingSheetLayout is never set to a non-default value.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/837633003
2015-01-12 17:15:26 -08:00
Ojan Vafai
544a24a448 Delete RenderSelectionInfo and other selection rect paint invalidation code.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/851593002
2015-01-12 17:08:36 -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
7d4c460653 Delete RenderLayerRepainter.
It's dead code.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/795843008
2015-01-09 17:44:40 -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
Eric Seidel
870da02623 Fix hit-testing
It was broken during removal of RenderLayer::collectFragments:
https://codereview.chromium.org/778043005/

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

Review URL: https://codereview.chromium.org/791933004
2014-12-12 09:25:48 -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
Eric Seidel
d4de7b0d3e Reverted the wrong one.
Revert "Revert "Get rid of LayerFragment.""

This reverts commit e68e8688f1105ca9fe7c49bac73246297ee76fb0.

TBR=ojan@chromium.org

Review URL: https://codereview.chromium.org/793123002
2014-12-10 15:01:32 -08:00
Eric Seidel
f353cd6cac Revert of Remove RenderLayer::collectFragments. (patchset #1 id:1 of https://codereview.chromium.org/778043005/)
Reason for revert:
This broke hit testing.  Hit testing always returns the root node now. :)

Original issue's description:
> Remove RenderLayer::collectFragments.
>
> Sky always has exactly one per RenderLayer. This patch
> gets rid of the hitTestLayer use of LayerFragment
> and gets paintLayerContents to create the list of
> fragments itself since it's the only caller.
>
> Also, delete dead code from LayerFragment.h.
>
> R=abarth@chromium.org
>
> Committed: 4a3b676dc3

TBR=esprehn@chromium.org,rafaelw@chromium.org,abarth@chromium.org,ojan@chromium.org
NOTREECHECKS=true
NOTRY=true

Review URL: https://codereview.chromium.org/788383002
2014-12-10 14:58:48 -08:00
Ojan Vafai
1492a0d635 Remove the straggling DisableCompositingQueryAsserts.
We don't have compositing query asserts anymore,
so there's nothing to disable.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/787293002
2014-12-09 20:25:18 -08:00
Ojan Vafai
b00d41f26c Get rid of LayerFragment.
We don't have fragmentation. So no need for this abstraction.
This simplifies a lot of code so that we can do less work.
For example, we can check shouldPaintContent only up in
paintLayerContents instead of in each nested function.

Instead of passing the LayerFragment, pass the layer location
and the clip rect for each nested function.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/789643002
2014-12-08 17:37:43 -08:00
Ojan Vafai
0069ab6369 Remove RenderLayer::collectFragments.
Sky always has exactly one per RenderLayer. This patch
gets rid of the hitTestLayer use of LayerFragment
and gets paintLayerContents to create the list of
fragments itself since it's the only caller.

Also, delete dead code from LayerFragment.h.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/778043005
2014-12-08 16:37:50 -08:00
Ojan Vafai
31343b63fe Get rid of the PaintLayerFlags bitmask.
Make it a regular enum and remove it from all the functions
it's not actually used. Also, make paintLayer and PaintLayerFlags
private since they're only used in RenderLayer.

R=eseidel@google.com

Review URL: https://codereview.chromium.org/779183004
2014-12-08 09:21:12 -08:00
Ojan Vafai
87b58eda51 Remove PaintBehavior. It's unused.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/768973004
2014-12-08 08:57:37 -08:00
Ojan Vafai
2c71f77297 Get rid of background-clip:text and PaintBehaviorForceBlackText.
http://blog.ericzhang.com/punch-through-text-masks-with-css-and-html5/
shows that you can achieve the similar effects using canvas. This
doesn't need to be built into the core engine. It's OK for this
to require more than a line of CSS to achieve.

Unfortunately, the test included this this patch doesn't actually
show that I didn't break anything because background-image
is broken. I got the test from
47e0d126e8%5E%21/#F4

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/756183004
2014-12-04 12:15:39 -08:00
Ojan Vafai
405dedb984 Remove all but one of the PaintLayerFlags.
Only PaintLayerPaintingOverlayScrollbars is actually ever set
to a different value in different codepaths.

-PaintLayerHaveTransparency can just be replaced with
isTransparent() calls.
-PaintLayerPaintingCompositingScrollingPhase is unused.
-PaintLayerPaintingCompositingAllPhases is always set,
which means that the other three compositing ones are
also always set.

The third bullet more clearly falls out when you see that
the only caller of paintLayerContents is
paintLayerContentsAndReflection, which sets
PaintLayerPaintingCompositingAllPhases on the paint flags.
Get rid of paintLayerContentsAndReflection since we no
longer have reflections.

The rest of the changes are all just propagating the now
always false or true booleans in paintLayerContents.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/778883002
2014-12-04 12:12:05 -08:00
Ojan Vafai
6e6e9181de Remove PaintLayerPaintingOverflowContents.
It was added for compositing overflow:scroll, which we don't do.
This also means that only the RespectOverflowClip enum value is
used. And PaintingClipRectsIgnoringOverflowClip is unused.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/778753002
2014-12-03 19:09:56 -08:00
Ojan Vafai
e719d6ea2d Remove PaintLayerAppliedTransform.
This was for RenderReplica, which we no longer have.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/772333002
2014-12-03 09:47:41 -08:00
Ojan Vafai
96648748fb Remove PaintLayerPaintingChildClippingMaskPhase.
It's never set. It was added in
7176977ba5%5E%21/#F21

The test cases from that patch seem to pass.
Included one in this patch.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/772193004
2014-12-02 20:12:23 -08:00
Ojan Vafai
ec0519a888 Remove some dead paint flags.
These are all dead code.

R=rafaelw@chromium.org

Review URL: https://codereview.chromium.org/766303002
2014-12-01 16:08:07 -08:00
Rafael Weinstein
12a09d9d9c Remove uses of PaintBehaviorFlattenCompositingLayers
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/766943003
2014-11-29 20:24:38 -08:00
Ojan Vafai
e002477491 Get rid of PaintBehaviorSelectionOnly.
It's never set.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/772473004
2014-12-01 11:31:53 -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
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
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
Ojan Vafai
0a60268106 Remove most of the old compositing code.
This is all dead code. Just started with CompositedLayerMapping
and deleted everything that touches it.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/758373002
2014-11-25 20:47:53 -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
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
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
Rafael Weinstein
f973fd339e Removed ScrollingCoordinator and a bunch of composited scrolling'
BUG=
R=ojan@chromium.org

Review URL: https://codereview.chromium.org/721473002
2014-11-11 16:42:00 -08:00
Ojan Vafai
aadd9d43cf Remove some more assorted code from RenderBox.
R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/691223003
2014-11-11 10:16:03 -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
Ojan Vafai
1fad59d33b Remove OverlayScrollbarSizeRelevancy.
It doesn't do anything anymore.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/715453002
2014-11-07 18:13:42 -08:00
Rafael Weinstein
f6b3a8cb02 Remove usesCompositedScrolling
BUG=
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/712573003
2014-11-07 13:59:11 -08:00
Ojan Vafai
2793661b5a Remove scroll corners and resizers.
We never paint scroll corners. The only thing we need them
for is so that the vertical and horizontal scrollbars don't
overlap each other. So, that's the only place left that
still computes a scroll corner rect.

We don't support resizers. Remove the code for them as well
as the CSS resize property.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/689283003
2014-11-07 09:46:16 -08:00
Ojan Vafai
aae0aab814 Delete unused methods/arguments from RenderBlockFlow.
No change in behavior. Just deleting dead code.
Removes hit testing and paint phase for floats. They
bottomed out into empty functions.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/706953003
2014-11-06 11:17:20 -08:00