{"action":"created","comment":{"url":"https://api.github.com/repos/flutter/engine/pulls/comments/41290992","id":41290992,"diff_hunk":"@@ -6,247 +6,76 @@ import 'dart:sky' as sky;\n \n import 'package:sky/material.dart';\n import 'package:sky/rendering.dart';\n+import 'package:sky/src/widgets/basic.dart';\n import 'package:sky/src/widgets/framework.dart';\n \n-// Slots are painted in this order and hit tested in reverse of this order\n-enum _ScaffoldSlots {\n-  body,\n-  statusBar,\n-  toolbar,\n-  snackBar,\n-  floatingActionButton,\n-  drawer\n-}\n-\n-class _RenderScaffold extends RenderBox {\n-\n-  _RenderScaffold({\n-    RenderBox body,\n-    RenderBox statusBar,\n-    RenderBox toolbar,\n-    RenderBox snackBar,\n-    RenderBox floatingActionButton,\n-    RenderBox drawer\n-  }) {\n-    this[_ScaffoldSlots.body] = body;\n-    this[_ScaffoldSlots.statusBar] = statusBar;\n-    this[_ScaffoldSlots.toolbar] = toolbar;\n-    this[_ScaffoldSlots.snackBar] = snackBar;\n-    this[_ScaffoldSlots.floatingActionButton] = floatingActionButton;\n-    this[_ScaffoldSlots.drawer] = drawer;\n-  }\n-\n-  Map<_ScaffoldSlots, RenderBox> _slots = new Map<_ScaffoldSlots, RenderBox>();\n-  RenderBox operator[] (_ScaffoldSlots slot) => _slots[slot];\n-  void operator[]= (_ScaffoldSlots slot, RenderBox value) {\n-    RenderBox old = _slots[slot];\n-    if (old == value)\n-      return;\n-    if (old != null)\n-      dropChild(old);\n-    if (value == null) {\n-      _slots.remove(slot);\n-    } else {\n-      _slots[slot] = value;\n-      adoptChild(value);\n-    }\n-    markNeedsLayout();\n-  }\n-\n-  void attachChildren() {\n-    for (_ScaffoldSlots slot in _ScaffoldSlots.values) {\n-      RenderBox box = _slots[slot];\n-      if (box != null)\n-        box.attach();\n-    }\n-  }\n-\n-  void detachChildren() {\n-    for (_ScaffoldSlots slot in _ScaffoldSlots.values) {\n-      RenderBox box = _slots[slot];\n-      if (box != null)\n-        box.detach();\n-    }\n-  }\n-\n-  void visitChildren(RenderObjectVisitor visitor) {\n-    for (_ScaffoldSlots slot in _ScaffoldSlots.values) {\n-      RenderBox box = _slots[slot];\n-      if (box != null)\n-        visitor(box);\n-    }\n-  }\n-\n-  _ScaffoldSlots remove(RenderBox child) {\n-    assert(child != null);\n-    for (_ScaffoldSlots slot in _ScaffoldSlots.values) {\n-      if (_slots[slot] == child) {\n-        this[slot] = null;\n-        return slot;\n-      }\n-    }\n-    return null;\n-  }\n-\n-  bool get sizedByParent => true;","path":"sky/packages/sky/lib/src/widgets/scaffold.dart","position":87,"original_position":87,"commit_id":"637d51ca986d2811faf1da200b7ff449186c068f","original_commit_id":"1aa55d01d09779aa385cb724b68c9e1dfdf92910","user":{"login":"Hixie","id":551196,"avatar_url":"https://avatars.githubusercontent.com/u/551196?v=3","gravatar_id":"","url":"https://api.github.com/users/Hixie","html_url":"https://github.com/Hixie","followers_url":"https://api.github.com/users/Hixie/followers","following_url":"https://api.github.com/users/Hixie/following{/other_user}","gists_url":"https://api.github.com/users/Hixie/gists{/gist_id}","starred_url":"https://api.github.com/users/Hixie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hixie/subscriptions","organizations_url":"https://api.github.com/users/Hixie/orgs","repos_url":"https://api.github.com/users/Hixie/repos","events_url":"https://api.github.com/users/Hixie/events{/privacy}","received_events_url":"https://api.github.com/users/Hixie/received_events","type":"User","site_admin":false},"body":"you lost this optimisation :-(","created_at":"2015-10-06T16:55:17Z","updated_at":"2015-10-06T16:55:17Z","html_url":"https://github.com/flutter/engine/pull/1503#discussion_r41290992","pull_request_url":"https://api.github.com/repos/flutter/engine/pulls/1503","_links":{"self":{"href":"https://api.github.com/repos/flutter/engine/pulls/comments/41290992"},"html":{"href":"https://github.com/flutter/engine/pull/1503#discussion_r41290992"},"pull_request":{"href":"https://api.github.com/repos/flutter/engine/pulls/1503"}}},"pull_request":{"url":"https://api.github.com/repos/flutter/engine/pulls/1503","id":46863855,"html_url":"https://github.com/flutter/engine/pull/1503","diff_url":"https://github.com/flutter/engine/pull/1503.diff","patch_url":"https://github.com/flutter/engine/pull/1503.patch","issue_url":"https://api.github.com/repos/flutter/engine/issues/1503","number":1503,"state":"open","locked":false,"title":"Simplify Scaffold","user":{"login":"abarth","id":112007,"avatar_url":"https://avatars.githubusercontent.com/u/112007?v=3","gravatar_id":"","url":"https://api.github.com/users/abarth","html_url":"https://github.com/abarth","followers_url":"https://api.github.com/users/abarth/followers","following_url":"https://api.github.com/users/abarth/following{/other_user}","gists_url":"https://api.github.com/users/abarth/gists{/gist_id}","starred_url":"https://api.github.com/users/abarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abarth/subscriptions","organizations_url":"https://api.github.com/users/abarth/orgs","repos_url":"https://api.github.com/users/abarth/repos","events_url":"https://api.github.com/users/abarth/events{/privacy}","received_events_url":"https://api.github.com/users/abarth/received_events","type":"User","site_admin":false},"body":"Rather than using a custom render object, we can just use a Stack.","created_at":"2015-10-06T05:28:53Z","updated_at":"2015-10-06T16:55:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ab9c95f70518b7c9668158fdee7437a8a42625d1","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/flutter/engine/pulls/1503/commits","review_comments_url":"https://api.github.com/repos/flutter/engine/pulls/1503/comments","review_comment_url":"https://api.github.com/repos/flutter/engine/pulls/comments{/number}","comments_url":"https://api.github.com/repos/flutter/engine/issues/1503/comments","statuses_url":"https://api.github.com/repos/flutter/engine/statuses/637d51ca986d2811faf1da200b7ff449186c068f","head":{"label":"abarth:simplify_scaffold","ref":"simplify_scaffold","sha":"637d51ca986d2811faf1da200b7ff449186c068f","user":{"login":"abarth","id":112007,"avatar_url":"https://avatars.githubusercontent.com/u/112007?v=3","gravatar_id":"","url":"https://api.github.com/users/abarth","html_url":"https://github.com/abarth","followers_url":"https://api.github.com/users/abarth/followers","following_url":"https://api.github.com/users/abarth/following{/other_user}","gists_url":"https://api.github.com/users/abarth/gists{/gist_id}","starred_url":"https://api.github.com/users/abarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abarth/subscriptions","organizations_url":"https://api.github.com/users/abarth/orgs","repos_url":"https://api.github.com/users/abarth/repos","events_url":"https://api.github.com/users/abarth/events{/privacy}","received_events_url":"https://api.github.com/users/abarth/received_events","type":"User","site_admin":false},"repo":{"id":39215675,"name":"engine","full_name":"abarth/engine","owner":{"login":"abarth","id":112007,"avatar_url":"https://avatars.githubusercontent.com/u/112007?v=3","gravatar_id":"","url":"https://api.github.com/users/abarth","html_url":"https://github.com/abarth","followers_url":"https://api.github.com/users/abarth/followers","following_url":"https://api.github.com/users/abarth/following{/other_user}","gists_url":"https://api.github.com/users/abarth/gists{/gist_id}","starred_url":"https://api.github.com/users/abarth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abarth/subscriptions","organizations_url":"https://api.github.com/users/abarth/orgs","repos_url":"https://api.github.com/users/abarth/repos","events_url":"https://api.github.com/users/abarth/events{/privacy}","received_events_url":"https://api.github.com/users/abarth/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/abarth/engine","description":"The Sky engine","fork":true,"url":"https://api.github.com/repos/abarth/engine","forks_url":"https://api.github.com/repos/abarth/engine/forks","keys_url":"https://api.github.com/repos/abarth/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/abarth/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/abarth/engine/teams","hooks_url":"https://api.github.com/repos/abarth/engine/hooks","issue_events_url":"https://api.github.com/repos/abarth/engine/issues/events{/number}","events_url":"https://api.github.com/repos/abarth/engine/events","assignees_url":"https://api.github.com/repos/abarth/engine/assignees{/user}","branches_url":"https://api.github.com/repos/abarth/engine/branches{/branch}","tags_url":"https://api.github.com/repos/abarth/engine/tags","blobs_url":"https://api.github.com/repos/abarth/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/abarth/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/abarth/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/abarth/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/abarth/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/abarth/engine/languages","stargazers_url":"https://api.github.com/repos/abarth/engine/stargazers","contributors_url":"https://api.github.com/repos/abarth/engine/contributors","subscribers_url":"https://api.github.com/repos/abarth/engine/subscribers","subscription_url":"https://api.github.com/repos/abarth/engine/subscription","commits_url":"https://api.github.com/repos/abarth/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/abarth/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/abarth/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/abarth/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/abarth/engine/contents/{+path}","compare_url":"https://api.github.com/repos/abarth/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/abarth/engine/merges","archive_url":"https://api.github.com/repos/abarth/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/abarth/engine/downloads","issues_url":"https://api.github.com/repos/abarth/engine/issues{/number}","pulls_url":"https://api.github.com/repos/abarth/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/abarth/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/abarth/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/abarth/engine/labels{/name}","releases_url":"https://api.github.com/repos/abarth/engine/releases{/id}","created_at":"2015-07-16T19:18:24Z","updated_at":"2015-09-19T15:57:18Z","pushed_at":"2015-10-06T16:54:33Z","git_url":"git://github.com/abarth/engine.git","ssh_url":"git@github.com:abarth/engine.git","clone_url":"https://github.com/abarth/engine.git","svn_url":"https://github.com/abarth/engine","homepage":null,"size":76924,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"flutter:master","ref":"master","sha":"ed041a2971a0a56ab5934e7e981481601a1db920","user":{"login":"flutter","id":14101776,"avatar_url":"https://avatars.githubusercontent.com/u/14101776?v=3","gravatar_id":"","url":"https://api.github.com/users/flutter","html_url":"https://github.com/flutter","followers_url":"https://api.github.com/users/flutter/followers","following_url":"https://api.github.com/users/flutter/following{/other_user}","gists_url":"https://api.github.com/users/flutter/gists{/gist_id}","starred_url":"https://api.github.com/users/flutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flutter/subscriptions","organizations_url":"https://api.github.com/users/flutter/orgs","repos_url":"https://api.github.com/users/flutter/repos","events_url":"https://api.github.com/users/flutter/events{/privacy}","received_events_url":"https://api.github.com/users/flutter/received_events","type":"Organization","site_admin":false},"repo":{"id":39211337,"name":"engine","full_name":"flutter/engine","owner":{"login":"flutter","id":14101776,"avatar_url":"https://avatars.githubusercontent.com/u/14101776?v=3","gravatar_id":"","url":"https://api.github.com/users/flutter","html_url":"https://github.com/flutter","followers_url":"https://api.github.com/users/flutter/followers","following_url":"https://api.github.com/users/flutter/following{/other_user}","gists_url":"https://api.github.com/users/flutter/gists{/gist_id}","starred_url":"https://api.github.com/users/flutter/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/flutter/subscriptions","organizations_url":"https://api.github.com/users/flutter/orgs","repos_url":"https://api.github.com/users/flutter/repos","events_url":"https://api.github.com/users/flutter/events{/privacy}","received_events_url":"https://api.github.com/users/flutter/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/flutter/engine","description":"The Flutter engine","fork":false,"url":"https://api.github.com/repos/flutter/engine","forks_url":"https://api.github.com/repos/flutter/engine/forks","keys_url":"https://api.github.com/repos/flutter/engine/keys{/key_id}","collaborators_url":"https://api.github.com/repos/flutter/engine/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/flutter/engine/teams","hooks_url":"https://api.github.com/repos/flutter/engine/hooks","issue_events_url":"https://api.github.com/repos/flutter/engine/issues/events{/number}","events_url":"https://api.github.com/repos/flutter/engine/events","assignees_url":"https://api.github.com/repos/flutter/engine/assignees{/user}","branches_url":"https://api.github.com/repos/flutter/engine/branches{/branch}","tags_url":"https://api.github.com/repos/flutter/engine/tags","blobs_url":"https://api.github.com/repos/flutter/engine/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/flutter/engine/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/flutter/engine/git/refs{/sha}","trees_url":"https://api.github.com/repos/flutter/engine/git/trees{/sha}","statuses_url":"https://api.github.com/repos/flutter/engine/statuses/{sha}","languages_url":"https://api.github.com/repos/flutter/engine/languages","stargazers_url":"https://api.github.com/repos/flutter/engine/stargazers","contributors_url":"https://api.github.com/repos/flutter/engine/contributors","subscribers_url":"https://api.github.com/repos/flutter/engine/subscribers","subscription_url":"https://api.github.com/repos/flutter/engine/subscription","commits_url":"https://api.github.com/repos/flutter/engine/commits{/sha}","git_commits_url":"https://api.github.com/repos/flutter/engine/git/commits{/sha}","comments_url":"https://api.github.com/repos/flutter/engine/comments{/number}","issue_comment_url":"https://api.github.com/repos/flutter/engine/issues/comments{/number}","contents_url":"https://api.github.com/repos/flutter/engine/contents/{+path}","compare_url":"https://api.github.com/repos/flutter/engine/compare/{base}...{head}","merges_url":"https://api.github.com/repos/flutter/engine/merges","archive_url":"https://api.github.com/repos/flutter/engine/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/flutter/engine/downloads","issues_url":"https://api.github.com/repos/flutter/engine/issues{/number}","pulls_url":"https://api.github.com/repos/flutter/engine/pulls{/number}","milestones_url":"https://api.github.com/repos/flutter/engine/milestones{/number}","notifications_url":"https://api.github.com/repos/flutter/engine/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/flutter/engine/labels{/name}","releases_url":"https://api.github.com/repos/flutter/engine/releases{/id}","created_at":"2015-07-16T17:39:56Z","updated_at":"2015-10-06T14:32:22Z","pushed_at":"2015-10-06T16:54:33Z","git_url":"git://github.com/flutter/engine.git","ssh_url":"git@github.com:flutter/engine.git","clone_url":"https://github.com/flutter/engine.git","svn_url":"https://github.com/flutter/engine","homepage":"http://flutter.io","size":87148,"stargazers_count":263,"watchers_count":263,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":68,"mirror_url":null,"open_issues_count":182,"forks":68,"open_issues":182,"watchers":263,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/flutter/engine/pulls/1503"},"html":{"href":"https://github.com/flutter/engine/pull/1503"},"issue":{"href":"https://api.github.com/repos/flutter/engine/issues/1503"},"comments":{"href":"https://api.github.com/repos/flutter/engine/issues/1503/comments"},"review_comments":{"href":"https://api.github.com/repos/flutter/engine/pulls/1503/comments"},"review_comment":{"href":"https://api.github.com/repos/flutter/engine/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/flutter/engine/pulls/1503/commits"},"statuses":{"href":"https://api.github.com/repos/flutter/engine/statuses/637d51ca986d2811faf1da200b7ff449186c068f"}}}}