flex-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mihai Chira (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (FLEX-35321) LayoutManager initializes components which are no longer on stage
Date Mon, 28 Aug 2017 10:31:00 GMT

    [ https://issues.apache.org/jira/browse/FLEX-35321?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16143603#comment-16143603
] 

Mihai Chira edited comment on FLEX-35321 at 8/28/17 10:30 AM:
--------------------------------------------------------------

Reopening this because it introduced a bug: if the object isn't on stage when we'd normally
set its {{initialized}} flag to {{true}}, we correctly skip this step, but we also need to
set its {{updateCompletePendingFlag}} back to {{false}}, so that in case it's added to stage
again it can work as expected, and have its {{initialized}} flag set to {{true}} normally.
This second step did not happen in the proposed fix. This could be noticed, for example, in
DataGrid, which would not show the renderers which it initially used in {{GridViewLayout.updateTypicalCellSizes()}}.


was (Author: evolverine):
Reopening this because it introduced a bug: if the object isn't on stage when we'd normally
set its {{initialized}} flag to {{true}}, we correctly skip this step, but we also need to
set its {{updateCompletePendingFlag}} back to {{false}}, so that in case it's added to stage
again it can work as expected, and have its {{initialized}} flag set to {{true}} normally.
This second step did not happen in the proposed fix.

> LayoutManager initializes components which are no longer on stage
> -----------------------------------------------------------------
>
>                 Key: FLEX-35321
>                 URL: https://issues.apache.org/jira/browse/FLEX-35321
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: Layout - General
>    Affects Versions: Apache Flex 4.16.0
>            Reporter: Mihai Chira
>            Assignee: Mihai Chira
>             Fix For: Apache Flex 4.17.0
>
>         Attachments: FLEX-35321 potential solution.patch
>
>
> *Scenario A*: during an object's validation cycle some code resulting from {{validateSize()}},
{{validateProperties()}} or {{validateDisplayList()}} results in the object's removal from
stage.
> *Scenario B*: a user performs an action whose effect is the removal of a component, exactly
when that component is being validated in phases ({{LayoutManager.usePhasedInstantiation ==
true}}, which is to say, in the span of two-three frames).
> ----
> *Expected behaviour*: {{LayoutManager}} detects the object's removal from stage, stops
validating it, and never sets its {{initialized}} flag to {{true}}.
> *Actual behaviour*: {{LayoutManager}} does not detect the object's removal from stage,
continues validating it, and ends up setting the object's {{initialized}} flag to {{true}}.
> *Unit test*: {{LayoutManager_FLEX_35321_Tests}}.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message