42 Commits

Author SHA1 Message Date
Hixie
41c3e58e27 Use the baseline information exposed by C++ to pipe baseline data through RenderBox.
This also fixes the C++ side to give the right baseline information.
Previously it was giving the baseline distance for the font, but not
for the actual laid-out text.

I considered also providing a "defaultBaseline" accessor that returns
the distance for the actual dominant baseline, but it turns out right
now we never decide the baseline is ideographic. We always use the
alphabetic baseline. We should probably fix that...

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1200233002.
2015-06-24 17:01:14 -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
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
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
8ba8641a1d Remove LayoutState.
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
2015-02-20 14:02:42 -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
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
4b9622480d Consolidate and delete a bunch of paint methods.
We've simplified paint code enough that most of these
methods are redundant.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/892033003
2015-02-01 21:01:07 -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
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
bebd6e370d Remove layoutBlock.
We've simplified RenderBlock::layout to the point where we
no longer need it or layoutBlock. The RenderBlock subclasses
can just override layout the way every other renderer does.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/876663003
2015-01-26 21:33:43 -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
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
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
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
Rafael Weinstein
6d450eddcb Split more Paragraph-specific code from RenderBlock into RenderParagraph.
In this episode: inlineSelectionGaps, markupTruncation, lineCount, heightForLineCount, lineAtIndex, lastLineBoxBaseline, firstLineBoxBaseline

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/762073002
2014-11-27 12:39:17 -08:00
Rafael Weinstein
0649efbf80 Remove RenderBlockLineLayout.
This patch moves most of the RenderBlockFlow from RenderBlockLineLayout methods into RenderParagraph.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/763043002
2014-11-27 12:03:43 -08:00
Rafael Weinstein
9e43ce3605 Start splitting RenderParagraph logic out of RenderBlock.
In particular, move RenderParagraph-specific code from
hitTestContents, paintContents, simplifiedNormalFlowLayout & addOverflowFromChildren.

R=ojan@chromium.org

Review URL: https://codereview.chromium.org/754493002
2014-11-26 11:15:01 -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
c2276d3976 Remove canCollapseAnonymousBlockChild.
The only place it's used now is making it so that
anonymous flex items don't do ellipsizing the same
way anonymous items inside a block would. This
is something we don't need, especially now that
we only have anonymous paragraphs around text nodes.

It's not clear to me if we want this looking at the
parent behavior at all, but that's something that
can be fixed in a followup.

Also delete some dead anonymous block functions.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/741893002
2014-11-20 15:28:37 -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
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
Ojan Vafai
0f803f8d3c Remove ResourceLoadPriorityOptimizer.
We want to expose the ability to do this in the framework,
not bake it into the platform.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/710743006
2014-11-11 14:53:02 -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
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
Ojan Vafai
4ecaa91c6c Remove margin collapsing.
Margin collapsing is a document-oriented feature. For applications
it just causes confusion and slowness.

margins.sky has failure output because offsetTop is returning the
wrong values. That's not new with this patch though. When I look
at it visually in skydb, everything seems to be in the right place.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/700743002
2014-11-03 21:30:40 -08:00
Ojan Vafai
29ff7e21fd Remove more float machinery.
Also removed the clear property since it's only purpose was
to clear floats.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/700703002
2014-11-03 17:00:27 -08:00
Ojan Vafai
ed0c01cdca Remove CSS Grid Layout and grid media queries.
The two are unrelated, but it was easier to just grep for grid
and remove them all. Aside from the media query change, there
isn't any change in behavior since grid was behind a flag.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/689853003
2014-10-31 16:40:03 -07:00
Ojan Vafai
afa0148e0b First pass at removing dead vertical writing mode code.
This just removes a random subset of vertical writing mode bits
that I grepped for. There's a ton more to do, but it seems best to
do it in chunks.

The key things for understanding this patch, isWritingModeRoot is
always false and isHorizontalWritingMode is always true. Also,
we're never flipped* modes of any kind, so we can undo any flipping.

R=esprehn@chromium.org

Review URL: https://codereview.chromium.org/688213002
2014-10-29 19:06:59 -07:00
Elliott Sprehn
7c0366d891 Remove most of FloatingObject.
This leaves some uses of FloatingObject*, but it doesn't
leave the impl of the class so it's all dead code passing
around null pointers. I'll remove that in a future patch.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/689733003
2014-10-29 15:04:40 -07:00
Ojan Vafai
054799183a Remove a bit more position:fixed plumbing.
No change in behavior.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/688443003
2014-10-28 12:56:42 -07:00
Ojan Vafai
42ea48b379 Remove a bunch of fixed position dead code.
There is not change in behavior here. Just removing dead
code now that we no longer support position:fixed.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/686653002
2014-10-28 09:34:19 -07:00
Adam Barth
969ccf4282 Remove compiler feature detection for = delete
All supported compilers have this feature. Also remove unused macros for
OVERRIDE now that override are broadly supported.

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

Review URL: https://codereview.chromium.org/673403002
2014-10-24 23:19:08 -07:00
Adam Barth
e8c9ecc556 Use override and final instead of OVERRIDE and FINAL 2014-10-24 15:15:13 -07:00
Adam Barth
ae72930937 Open the Sky 2014-10-23 11:17:19 -07:00