[Layout] Add style property to ASLayoutable (#2261)

* Add style property to ASLayoutable

* Add styles property to further layout specs

* Adjust some examples

* Add `loadStyle` to create the style object in a ASLayoutable

* Revert "Add `loadStyle` to create the style object in a ASLayoutable"

This reverts commit 2b7240f2c7dc993e38cadf290cfdf08482dd70c7.

* Revert "Adjust some examples"

This reverts commit 3254ae0a321e75db3ecfa80adee9d96bde93a33d.

* Revert "Add styles property to further layout specs"

This reverts commit c779dcb876ead27122c1af1300146a6ad36912cb.

* Rename ASLayoutableStyleDeclaration to ASLayoutableStyle

* Add styleClass class property for extensibility support of the ASLayoutable style object

* flexShrink should not be YES by default
This commit is contained in:
Michael Schneider
2016-09-22 16:00:52 -07:00
committed by GitHub
parent a9857f9963
commit 75dca556e6
24 changed files with 418 additions and 533 deletions

View File

@@ -143,12 +143,12 @@
const auto baselinePositionedLayout = ASStackBaselinePositionedLayout::compute(positionedLayout, style, constrainedSize);
if (self.direction == ASStackLayoutDirectionVertical) {
ASDN::MutexLocker l(__instanceLock__);
self.ascender = [stackChildren.front() ascender];
self.descender = [stackChildren.back() descender];
self.style.ascender = stackChildren.front().style.ascender;
self.style.descender = stackChildren.back().style.descender;
} else {
ASDN::MutexLocker l(__instanceLock__);
self.ascender = baselinePositionedLayout.ascender;
self.descender = baselinePositionedLayout.descender;
self.style.ascender = baselinePositionedLayout.ascender;
self.style.descender = baselinePositionedLayout.descender;
}
if (needsBaselinePass) {