Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(415)

Issue 1023753007: First iteration on custom layout. (Closed)

Created:
5 years, 9 months ago by ojan
Modified:
5 years, 8 months ago
Reviewers:
abarth-chromium
CC:
abarth-chromium, mojo-reviews_chromium.org, ojan, qsr+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

First iteration on custom layout. 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.

Patch Set 1 #

Patch Set 2 : fix liscense header #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -0 lines) Patch
M sky/engine/core/core.gni View 3 chunks +4 lines, -0 lines 0 comments Download
M sky/engine/core/dom/Element.h View 3 chunks +17 lines, -0 lines 0 comments Download
M sky/engine/core/dom/Element.cpp View 3 chunks +66 lines, -0 lines 2 comments Download
M sky/engine/core/dom/Element.idl View 2 chunks +7 lines, -0 lines 0 comments Download
A sky/engine/core/layout/LayoutCallback.h View 1 chunk +18 lines, -0 lines 0 comments Download
A + sky/engine/core/layout/LayoutCallback.idl View 1 chunk +4 lines, -0 lines 0 comments Download
A sky/engine/core/rendering/RenderCustomLayout.h View 1 1 chunk +24 lines, -0 lines 0 comments Download
A sky/engine/core/rendering/RenderCustomLayout.cpp View 1 chunk +42 lines, -0 lines 0 comments Download
A sky/examples/layout/basic.sky View 1 chunk +20 lines, -0 lines 2 comments Download

Messages

Total messages: 3 (1 generated)
abarth-chromium
lgtm https://codereview.chromium.org/1023753007/diff/20001/sky/engine/core/dom/Element.cpp File sky/engine/core/dom/Element.cpp (right): https://codereview.chromium.org/1023753007/diff/20001/sky/engine/core/dom/Element.cpp#newcode957 sky/engine/core/dom/Element.cpp:957: m_layoutManager = callback; Do we need to dirty ...
5 years, 9 months ago (2015-03-25 00:18:51 UTC) #2
ojan
5 years, 8 months ago (2015-04-02 00:02:29 UTC) #3
https://codereview.chromium.org/1023753007/diff/20001/sky/engine/core/dom/Ele...
File sky/engine/core/dom/Element.cpp (right):

https://codereview.chromium.org/1023753007/diff/20001/sky/engine/core/dom/Ele...
sky/engine/core/dom/Element.cpp:957: m_layoutManager = callback;
On 2015/03/25 00:18:51, abarth wrote:
> Do we need to dirty ourselves somehow so that Element::createRenderer will
pick
> up the change to this state?

Yes! Will fix in followup patch. There's a number of relayout bugs here.

https://codereview.chromium.org/1023753007/diff/20001/sky/examples/layout/bas...
File sky/examples/layout/basic.sky (right):

https://codereview.chromium.org/1023753007/diff/20001/sky/examples/layout/bas...
sky/examples/layout/basic.sky:20: </script>
On 2015/03/25 00:18:51, abarth wrote:
> Can we make this into a test rather than an example?

Good point. This should be easy to test. I was just mimicking your custom paint
patch.

Powered by Google App Engine
This is Rietveld 408576698