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

Issue 1174023003: Remove one more use of mirrors: Components now have to explicitly sync their fields. (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

Remove one more use of mirrors: Components now have to explicitly sync their fields. This also removes one bit of magic to make it more obvious what on is going on during a sync, which should hopefully help. Components have to decide if they support being stateful or not. If they do, then they must implement syncFields() and have mutable fields; if they don't, then they must have final fields. This isn't particularly enforced, though. This also renames _willSync() to _retainStatefulNodeIfPossible(), for clarity, and fixes some minor style issues and one typo that was breaking the drawer. R=abarth@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/3bacbb2f7b295147c4201c66868805e954b2dbb7

Patch Set 1 #

Patch Set 2 : #

Total comments: 1

Patch Set 3 : fixes to make it actually work #

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+149 lines, -64 lines) Patch
M sky/examples/stocks2/lib/stock_app.dart View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M sky/examples/stocks2/lib/stock_arrow.dart View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M sky/examples/stocks2/lib/stock_list.dart View 1 2 chunks +9 lines, -2 lines 0 comments Download
M sky/examples/stocks2/lib/stock_menu.dart View 1 2 3 1 chunk +7 lines, -2 lines 0 comments Download
M sky/examples/stocks2/lib/stock_row.dart View 1 2 3 1 chunk +4 lines, -5 lines 0 comments Download
M sky/sdk/lib/framework/components2/animated_component.dart View 1 2 3 1 chunk +2 lines, -0 lines 0 comments Download
M sky/sdk/lib/framework/components2/button.dart View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/framework/components2/button_base.dart View 1 2 3 2 chunks +16 lines, -11 lines 0 comments Download
M sky/sdk/lib/framework/components2/checkbox.dart View 1 1 chunk +6 lines, -0 lines 0 comments Download
M sky/sdk/lib/framework/components2/drawer.dart View 1 1 chunk +7 lines, -0 lines 0 comments Download
M sky/sdk/lib/framework/components2/drawer_header.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M sky/sdk/lib/framework/components2/fixed_height_scrollable.dart View 1 2 3 5 chunks +16 lines, -9 lines 0 comments Download
M sky/sdk/lib/framework/components2/floating_action_button.dart View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/framework/components2/icon.dart View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/framework/components2/icon_button.dart View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/framework/components2/ink_well.dart View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M sky/sdk/lib/framework/components2/input.dart View 1 1 chunk +8 lines, -1 line 0 comments Download
M sky/sdk/lib/framework/components2/material.dart View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/framework/components2/menu_item.dart View 1 2 chunks +9 lines, -2 lines 0 comments Download
M sky/sdk/lib/framework/components2/modal_overlay.dart View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/framework/components2/popup_menu.dart View 1 1 chunk +8 lines, -1 line 0 comments Download
M sky/sdk/lib/framework/components2/popup_menu_item.dart View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
M sky/sdk/lib/framework/components2/radio.dart View 1 1 chunk +9 lines, -2 lines 0 comments Download
M sky/sdk/lib/framework/components2/scrollable.dart View 1 2 3 1 chunk +3 lines, -1 line 0 comments Download
M sky/sdk/lib/framework/components2/tool_bar.dart View 1 2 3 1 chunk +4 lines, -4 lines 0 comments Download
M sky/sdk/lib/framework/fn2.dart View 1 2 3 4 chunks +19 lines, -6 lines 0 comments Download
M sky/sdk/lib/framework/rendering/box.dart View 1 2 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 3 (1 generated)
abarth-chromium
lgtm https://codereview.chromium.org/1174023003/diff/20001/sky/sdk/lib/framework/components2/fixed_height_scrollable.dart File sky/sdk/lib/framework/components2/fixed_height_scrollable.dart (right): https://codereview.chromium.org/1174023003/diff/20001/sky/sdk/lib/framework/components2/fixed_height_scrollable.dart#newcode46 sky/sdk/lib/framework/components2/fixed_height_scrollable.dart:46: var itemNumber = 0; s/itemNumber/itemShowNumber/
5 years, 6 months ago (2015-06-10 17:07:58 UTC) #2
Hixie
5 years, 6 months ago (2015-06-10 17:33:09 UTC) #3
Message was sent while issue was closed.
Committed patchset #4 (id:60001) manually as
3bacbb2f7b295147c4201c66868805e954b2dbb7 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698