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

Issue 1213473003: Add asserts to catch potential misuses of the rendering framework. (Closed)

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

Description

Add asserts to catch potential misuses of the rendering framework. New asserts: - verify that after layout, the size fits the constraints - verify that after layout, the size isn't infinite - verify that you don't set the size in performLayout() if you have sizedByParent set - verify that nobody reads your size during layout except you, or your parent if they said parentUsesSize:true Fixes some bugs found by those asserts: - RenderBlock, RenderStack, and RenderScaffold were not always setting parentUsesSize correctly - RenderScaffold was setting its slot entries to null rather than removing them when the slot went away, which led to null derefs in certain circumstances Also, rename a local variable in RenderStack.performLayout() because it was shadowing a variable on the object itself, which was really confusing when I first tried to debug this function... R=abarth@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/6d24f84e513b46fbe05938d7ac2fda6f66a0c5df

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+115 lines, -57 lines) Patch
M sky/engine/core/painting/Size.dart View 1 chunk +2 lines, -0 lines 0 comments Download
M sky/examples/rendering/sector_layout.dart View 1 chunk +11 lines, -0 lines 0 comments Download
M sky/sdk/lib/rendering/README.md View 1 1 chunk +7 lines, -0 lines 0 comments Download
M sky/sdk/lib/rendering/block.dart View 1 1 chunk +1 line, -2 lines 0 comments Download
M sky/sdk/lib/rendering/box.dart View 1 4 chunks +30 lines, -25 lines 0 comments Download
M sky/sdk/lib/rendering/object.dart View 1 5 chunks +33 lines, -2 lines 0 comments Download
M sky/sdk/lib/rendering/stack.dart View 1 1 chunk +25 lines, -25 lines 0 comments Download
M sky/sdk/lib/widgets/scaffold.dart View 1 2 chunks +6 lines, -3 lines 0 comments Download

Messages

Total messages: 3 (1 generated)
abarth-chromium
lgtm
5 years, 6 months ago (2015-06-25 23:55:48 UTC) #2
Hixie
5 years, 6 months ago (2015-06-26 00:08:10 UTC) #3
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
6d24f84e513b46fbe05938d7ac2fda6f66a0c5df (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698