1. 13 10月, 2020 2 次提交
    • Y
      Revert "Migration to PlatformDispatcher and multi-window #20496" (#21792) · c2938d06
      Yuqian Li 提交于
      * Revert "Fix documentation build for window changes. (#21780)"
      
      This reverts commit 931a0468.
      
      * Revert "Migration to PlatformDispatcher and multi-window (#20496)"
      
      This reverts commit 85b0031f.
      c2938d06
    • C
      Extract a TextRange class for selection (#21722) · 05d97932
      Chris Bracken 提交于
      Extracts a TextRange class with a base and extent, and start(), end(),
      collapsed(), and length() getters.
      
      The possibility of reversed base and extent in selections and composing
      ranges makes reasoning about them complex and increases the chances of
      errors in the code. This change migrates most uses of base and extent in
      the text model to start()/end() or position(). The position() method is
      intended purely as an aid to readability to indicate that a collapsed
      selection is expected at the call site; it also enforces a debug-time
      assertion that this is the case.
      05d97932
  2. 10 10月, 2020 5 次提交
    • G
    • A
    • G
      Migration to PlatformDispatcher and multi-window (#20496) · 85b0031f
      Greg Spencer 提交于
      This is a PR for converting the dart:ui code in the engine to use a multi-window API. The goal here is to convert from the window singleton to an API that has the concept of multiple windows. Also, I'm matching up the new PlatformDispatcher class to talk directly to the PlatformConfiguration class in the engine. I'm not attempting to actually enable creating multiple windows here, just migrate to an API that has a concept of multiple windows. The multi-window API in this PR currently only ever creates one window.
      
      The design doc for this change is here.
      
      The major changes in this PR:
      
      Move the platfom-specific attributes out of Window, and into the new PlatformDispatcher class that holds all of the platform state, so that the platform code need only update the configuration on this class.
      Create FlutterView, FlutterWindow, and SingletonFlutterWindow classes to separate out the concepts of a view (of which there may be multiple in a window), a window (of which there may be multiple on a screen, and they host views), and a window where there is only ever expected to be one (this hosts the entire API of the former Window class, and will eventually be the type of the window singleton).
      Next step after this PR lands:
      
      Remove the Window class entirely (it is replaced by SingletonFlutterWindow). Some minor changes in the Framework are needed to switch to using SingletonFlutterWindow directly first.
      
      The Window class still exists in this PR, but will be removed as soon as the framework is converted to point to the SingletonFlutterWindow class instead. They share the same API, just have different names (Window is currently a subclass of SingletonFlutterWindow). The intention is that the Window name will be freed up to use as a widget class name in the framework for managing windows. The singleton called window will remain, and keep the same API it has now.
      85b0031f
    • G
      11d756a6
    • K
      Fix filesystem access prior to macOS 10.15 (#21740) · 5c196028
      Kaushik Iska 提交于
      5c196028
  3. 09 10月, 2020 8 次提交
  4. 08 10月, 2020 8 次提交
  5. 07 10月, 2020 4 次提交
    • D
      fuchsia: Don't send ViewportMetrics w/ 0 DPR (#21392) · d5dddf32
      David Worsham 提交于
      d5dddf32
    • J
      hasStrings Linux (#21388) · 9a7b556f
      Justin McCandless 提交于
      hasStrings method for clipboard status, Linux
      9a7b556f
    • S
      [linux] Allow engine flags via environment vars (#21497) · 042c7f04
      stuartmorgan 提交于
      Adds the ability to pass engine switches temporarily at runtime via
      environment variables. Uses the same approach recently added to
      Windows and macOS.
      
      This is enabled only for debug/profile to avoid potential issues with
      tampering with released applications, but if there is a need for that in
      the future it could be added (potentially with a whitelist, as is
      currently used for Dart VM flags).
      
      Fixes flutter/flutter#60393
      042c7f04
    • C
      Separate mutators for text and selection (#21612) · 7e6191de
      Chris Bracken 提交于
      Previously, TextInputModel's SetEditingState method was a 1:1 mapping of
      the underlying protocol used on the text input channel between the
      framework and the engine. This breaks it up into two methods, which
      allows the selection to be updated independently of the text, and avoids
      tying the API the the underlying protocol.
      
      This will become more important when we add additional state to support
      composing regions for multi-step input methods such as those used for
      Japanese.
      
      SetText resets the selection rather than making a best-efforts attempt
      to preserve it. This choice was primarily to keep the code simple and
      make the API easier to reason about. An alternative would have been to
      make a best-effort attempt to preserve the selection, potentially
      clamping one or both to the end of the new string. In all cases where an
      embedder resets the string, it is expected that they also have the
      selection, so can call SetSelection with an updated selection if needed.
      7e6191de
  6. 06 10月, 2020 2 次提交
  7. 03 10月, 2020 5 次提交
  8. 02 10月, 2020 2 次提交
  9. 01 10月, 2020 2 次提交
  10. 30 9月, 2020 2 次提交
    • F
      [fuchsia] fix typo (#21488) · 32682788
      Felipe Archondo 提交于
      32682788
    • G
      Use dispatchKeyEventPreIme, and handle keys sent to... · 539034ae
      Greg Spencer 提交于
      Use dispatchKeyEventPreIme, and handle keys sent to InputConnection.sendKeyEvent on Android (#21163)
      
      This switches from using dispatchKeyEvent to using dispatchKeyEventPreIme so that keys can be intercepted before they reach the IME and be handled by the framework.
      
      It also now intercepts key events sent to InputConnection.sendKeyEvent, as some IMEs do (e.g. the Hacker's Keyboard), and sends the to Flutter before sending them to the IME (which it now only does if they are not handled by the framework).
      
      This fixes the problem where pressing TAB on a hardware keyboard sends the tab to both the text field and to the focus traversal system.
      
      Note that we still can't intercept all keystrokes given to a soft keyboard, only those which the soft keyboard decides to send to InputConnection.sendKeyEvent.
      539034ae