This exposes the last hooks needed to implement flexbox layout. For now,
I didn't worry too much about the exact API we're exposing since this will
all change with the upcoming redesign (e.g. https://codereview.chromium.org/1093633002).
minContentWidth == the width if the element were to wrap at every wrapping point (not including border/padding)
maxContentWidth == the width if the element were to only wrap at hard wrapping points (e.g. \n inside a whitespace: pre).
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1101793003
If your layout manager changes, then you need to setNeedsLayout,
otherwise the next frame doesn't even get scheduled. We already
correctly handle going from not having layout to having one or
vice versa by doing the more drastic reattaching since that
requires changing your actual render class.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1060013005
We weren't correctly marking an element as needing style
recalc if it was *losing* it's layout manager. We were
only doing so when it was gaining a layout manager for
the first time.
Review URL: https://codereview.chromium.org/1082273004
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
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
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
- Immediate close means that anything pending will be discarded.
- Plumb immediate all the way down to the handle watcher close call.
- When an EventStream is closed because no one is listening for events, close immediately.
- Don't call Dart_NewSendPort with ILLEGAL_PORT in sky embedder.
- Bump DEPS to include fixes for Dart_NewSendPort and profiler signal handler executing after shared object is unloaded.
- Fixes https://github.com/domokit/mojo/issues/79R=zra@google.com
Review URL: https://codereview.chromium.org/1060193002
-Make display:flex, flex-direction: column, flex-shrink: 1 the default.
-Simplify StyleAdjuster::adjustStyleForAlignment to remove special cases we
won't need as we make flex the default and remove absolute positioning.
-Fix a bug this exposed in column flexboxes where we'd apply the wrong edge
of border/padding/margin.
-For now leave the default of align-items:stretch. The main change here is
that iframe/img will do width:auto the same as blocks (i.e. the width of
the parent). I think this is a good change, but we'll have to see how it feels
in practice.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1061163002
-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
This conflicts with adding them to HTMLElement for custom layout.
I grepped the codebase and couldn't find any uses of these. The
big thing we lose here is a way to set width/height on an image
that automatically maintains aspect ratio, but that's something
we should move into a custom layout method anyways.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1060443002
This allows setting x/y/width/height directly on an element
during a synchronous layout callback. At the moment, you can do
dangerous things (e.g. change tree structure). In a followup patch
we'll make that impossible via an IDL guard.
R=abarth@chromium.org
Review URL: https://codereview.chromium.org/1023753007
Previously we'd hit an ASSERT that elements in the style sharing list support
style sharing. However, it can happen that an element gets added to the style
sharing list and then loses the ability to share styles because it has an
active animation. This CL works around the problem by skiping over those
elements when considering style sharing candidates. A better solution would be
to clear the style sharing list when it might contain such an element. However,
it's likely we will remove style sharing in the future so its easier to just
work aroudn the issue for now.
R=ojan@chromium.org
Review URL: https://codereview.chromium.org/1036933002
Update from https://crrev.com/321900
Changes:
(1) OpenTypeSanitizer.cpp: Removed use of ots::EnableWOFF2() which was
removed from library and implementation was empty anyways.
(2) GraphicsContext.cpp: Header location for SkMatrixImageFilter.h moved.
(3) SkiaImageFilterBuilder.cpp: Header location for SkMatrixImageFilter.h moved.
(4) FEDropShadow.cpp: Function signature changed.
R=davemoore@chromium.org, jamesr@chromium.org
BUG=453591
Review URL: https://codereview.chromium.org/1028333002
The bindings, core, and application libraries are now referred to as, e.g.:
package:mojo/public/dart/core.dart
Since the handle watcher remains in the snapshot, it no
longer refers to types defined in core.dart. References to types defined
in core.dart are also removed from mojo_natives.cc.
In Dart packaged apps, the SDK is zipped up under mojo/public/dart.
For embedder tests, the SDK is copied into the generated source output directory.
A base_dir parameter is added to the 'dart_package' and 'mojom' GN macros so that
consumers of the Mojo SDK can all import using the same URIs regardless of where
the SDK lives in their source trees.
BUG=
R=erg@chromium.org
Review URL: https://codereview.chromium.org/1027603002
StockMenu was creating a container for the sole purpose of applying style to
PopupMenu. Now we just use a StyleNode.
Also, I've reverted the change to make box-sizing default to border-box. It
turns out that CL wasn't effective because we didn't use the initialBoxSizing
function to initialize box sizing. I've made us use initialBoxSizing but switch
the default back to content-box because actually using border-box breaks a
bunch of stuff.
R=eseidel@chromium.org
Review URL: https://codereview.chromium.org/1024083003