1. 12 Mar, 2020 1 commit
  2. 11 Mar, 2020 2 commits
  3. 10 Mar, 2020 2 commits
  4. 09 Mar, 2020 2 commits
  5. 06 Mar, 2020 1 commit
  6. 05 Mar, 2020 1 commit
  7. 04 Mar, 2020 2 commits
  8. 03 Mar, 2020 3 commits
  9. 02 Mar, 2020 1 commit
  10. 28 Feb, 2020 3 commits
  11. 27 Feb, 2020 3 commits
    • Greg Spencer's avatar
      Change Focus.unfocus to take a disposition for where the focus… (#50831) · d4226566
      Greg Spencer authored
      When Focus.unfocus is called, the caller usually just thinks about wanting to remove focus from the node, but really, unfocus is a request to automatically pass the focus to another (hopefully useful) node.
      
      This PR removes the focusPrevious flag from unfocus, and replaces it with a disposition enum that indicates where the focus should go from here.
      
      The other value of the UnfocusDisposition enum is UnfocusDisposition.scope.
      
      UnfocusDisposition.previouslyFocusedChild is closest to what focusPrevious used to do: focus the nearest enclosing scope and use its focusedChild field to walk down the tree, finding the leaf focusedChild. This PR modifies it slightly so that it walks up to the nearest focusable enclosing scope before trying to focus the children. This change addresses #48903
      
      A new mode: UnfocusDisposition.scope will focus the nearest focusable enclosing scope of this node without trying to use the FocusScopeNode.focusedChild value to descend to the leaf focused child. This is useful as a default for both text field finalization and for what happens when canRequestFocus is set to false. It allows the scope to stay focused so that nextFocus/previousFocus still work as expected, but removes the focus from primary focus.
      
      In addition to those changes, unfocus called on a FocuScope that wasn't the primary focus used to unfocus the primary focus instead. I removed that behavior, since it was buggy: if the primary focus was inside of a child scope, and you called unfocus on the parent scope, then the child scope could have focused another of its children instead, leaving the scope that you called unfocus on with hasFocus returning true still. If you want to remove the focus from the primary focus instead of the scope, that's easy enough to do: just call primaryFocus.unfocus().
      
      Fixes #48903
      d4226566
    • Dan Field's avatar
      444b13b8
    • Dan Field's avatar
      Live image cache (#51485) · c75db983
      Dan Field authored
      * Reland "Live image cache" (#51441)
      
      This reverts commit 419a2853.
      
      * Make evict safer
      c75db983
  12. 26 Feb, 2020 2 commits
  13. 24 Feb, 2020 1 commit
  14. 23 Feb, 2020 1 commit
  15. 20 Feb, 2020 2 commits
  16. 19 Feb, 2020 1 commit
  17. 18 Feb, 2020 1 commit
  18. 14 Feb, 2020 2 commits
  19. 13 Feb, 2020 3 commits
    • Gary Qian's avatar
    • Greg Spencer's avatar
      Reland: Add OrderedFocusTraversalPolicy and FocusTraversalGrou… (#50672) · d57d4935
      Greg Spencer authored
      This re-lands #49235 with the addition of includeSemantics flag on the Focus widget so that the FocusTraversalGroup can create a Focus widget without affecting the semantics tree.
      
      The FocusTraversalGroup uses the Focus widget to create a grouping of descendants for traversal, but doesn't actually participate in focus (canRequestFocus is always false), so we don't want it to add a Semantics widget in that case, since that can cause semantics changes. The canRequestFocus attribute can also be used when a widget is disabled, so we do sometimes want to include Semantics even if that is false, but not in the case where it is always false, as for FocusTraversalGroup.
      
      - Added a test to make sure that FocusTraversalGroup doesn't add any semantics information.
      d57d4935
    • Greg Spencer's avatar
      Fix lack of ancestor notification when a focus node is unfocus… (#50319) · b2a7ff36
      Greg Spencer authored
      This fixes a problem when unfocusing focus nodes where the ancestor focus nodes and scopes don't receive notification that a child was unfocused.
      
      Fixes #43497
      b2a7ff36
  20. 12 Feb, 2020 3 commits
  21. 11 Feb, 2020 3 commits
    • LongCatIsLooong's avatar
    • Alexandre Ardhuin's avatar
      f15c887c
    • Greg Spencer's avatar
      Add OrderedFocusTraversalPolicy and FocusTraversalGroup to all… (#49235) · 8ef5e2f0
      Greg Spencer authored
      This change adds a way to provide explicit focus order for a part of the widget tree.
      
      It adds FocusTraversalPolicyGroup, which in many ways is similar to DefaultFocusTraversal, except that it groups a widget subtree together so that those nodes are traversed as a group. DefaultFocusTraversal doesn't work as one would expect: If there is more than one DefaultFocusTraversal inside of a focus scope, the policy can change depending on which node was asked to move "next", which can cause unexpected behavior. The new grouping mechanism doesn't have that problem. I deprecate DefaultFocusTraversal in this PR.
      
      It also adds OrderedFocusTraversalPolicy, which is a policy that can be supplied to FocusTraversalPolicyGroup to set the policy for a sub-tree. It looks for FocusTraversalOrder inherited widgets, which use a FocusOrder to do the sorting. FocusOrder has two subclasses: NumericalFocusOrder (which sorts based on a double), and LexicalFocusOrder, which sorts based on a String.
      
      As part of doing this, I refactored the way FocusTraversalPolicy is implemented so that it has more default implementation methods, and exposes a new protected member: sortDescendants, which makes it easier for developers to make their own policy subclasses: they only need to implement sortDescendants to get a new ordering behavior, but can also still override any of the default implementation behaviors if they need different behavior.
      
      I was able to do this without breaking the API (AFAICT).
      8ef5e2f0