Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[iOS][Bugfix]move the new member position in WXCoreCSSStyle. the posi…
Browse files Browse the repository at this point in the history
…tion will impact the inline function's result.
  • Loading branch information
晨燕 committed Dec 20, 2018
1 parent 5d33cd7 commit 915fd66
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions weex_core/Source/core/layout/style.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,6 @@ namespace WeexCore {

WXCorePositionType mPositionType;

WXCoreDirection mDirection;

float mFlexGrow;

Expand All @@ -229,6 +228,8 @@ namespace WeexCore {
WXCoreBorderWidth mBorderWidth;

WXCorePosition mStylePosition;

WXCoreDirection mDirection;

constexpr static float kFlexGrowDefault = 0;

Expand All @@ -246,7 +247,7 @@ namespace WeexCore {

constexpr static WXCorePositionType kWXCorePositionTypeDefault = kRelative;

WXCoreCSSStyle() : mDirection(kDirectionInherit),
WXCoreCSSStyle() :
mFlexDirection(kFlexDirectionDefault),
mFlexWrap(kFlexWrapDefault),
mJustifyContent(kFlexJustifyContentDefault),
Expand All @@ -257,12 +258,12 @@ namespace WeexCore {
mStyleWidth(NAN), mStyleHeight(NAN),
mStyleHeightLevel(FALLBACK_STYLE), mStyleWidthLevel(FALLBACK_STYLE),
mMaxWidth(NAN), mMaxHeight(NAN),
mMinWidth(NAN), mMinHeight(NAN) {
mMinWidth(NAN), mMinHeight(NAN),
mDirection(kDirectionInherit) {

}

~WXCoreCSSStyle() {
mDirection = kDirectionInherit;
mFlexDirection = kFlexDirectionDefault;
mFlexWrap = kFlexWrapDefault;
mJustifyContent = kFlexJustifyContentDefault;
Expand All @@ -277,6 +278,7 @@ namespace WeexCore {
mMaxHeight = NAN;
mMinWidth = NAN;
mMinHeight = NAN;
mDirection = kDirectionInherit;
}

inline float sumPaddingBorderOfEdge(const WXCoreEdge edge){
Expand Down

0 comments on commit 915fd66

Please sign in to comment.