dart-lang/spark — pull request #665 by ussuri (2014-01-14 09:23:52+00:00)
Title: Fix deployed ui

Sorry for another large CL.

* Do away with spark_bootstrap.js: simply `ln -s *.precompiled.js *.js` -- simpler code, less black magic during deploy and load, faster load.
* Fixed the styling of the deployed Polymer UI:
* In addition to the existing `@host {...}` CSS blocks in the elements' definitions, added analogous `:host {...}` blocks -- this is a new syntax understood by Chromium, but not yet understood by Dartium (that's why both are temporarily required).
* Fixed data- and event-bindings in the deployed Polymer UI. In particular, fixed spark-overlay, which in turn fixed spark-menu-button not expanding and spark-modal dialogs not closing on a button click:
* Replaced simple data binding for the `SparkOverlay.opened` attribute with a getter/setter pair, where the setter force-calls `openedChanged()` handler -- simple binding didn't work -- external and internal changes to `opened` didn't trigger `openedChanged()`, unlike in the undeployed code.
* Correspondingly, for the deployed code, force-set `opened` on the underlying `SparkOverlay` in `SparkMenuButton.toggle()`. Again, simply binding `SparkOverlay.opened` to `SparkMenuButton.opened` via `opened="{{opened}}"` in the HTML didn't work.
* Additionally added `::content` CSS blocks analogous to the existing `::-webkit-distributed` blocks, which are being phased out. This is not essential for the fix, but complements `:host`-related changes.