-
Notifications
You must be signed in to change notification settings - Fork 6k
Make GetRectsForRange provide more detailed/nuanced metrics through RectStyle enum. #6335
Conversation
| glyph_positions.back().x_pos.end), | ||
| line_number, metrics, run.direction()); | ||
| } | ||
| } // for each in glyph_blobs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A brief description of the for loops that this brace encloses. This method is long and this helps make sense of it.
third_party/txt/src/txt/paragraph.cc
Outdated
| } else { | ||
| // Set each box to the max height of each line to ensure continuity. | ||
| float min_top = DBL_MAX; | ||
| float max_bottom = -1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why -1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any value smaller than zero should do, since the bottom of it cannot be above the top, and the highest the top can be is zero.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not zero, then?
|
Is the plan to expose this in the dart:ui API? |
|
Yes, we would make a similar enum system in the Dart-side Paragraph class' getRectsForRange(), and default the optional enum to the current behavior. Currently, I have it defaulted in the C++ layer and have not exposed it at all to dart. |
|
@jason-simmons @Hixie Any feedback/additional suggestions? |
|
i'll defer to jason. |
flutter/engine@b59c864...3a9c22a git log b59c864..3a9c22a --no-merges --oneline 3a9c22a Allow GetRectsForRange to provide more detailed/nuanced metrics through RectStyle enum. (flutter/engine#6335) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
…gh RectStyle enum. (flutter#6335)
flutter/engine@f6af1f2...44a5149 git log f6af1f2..44a5149 --no-merges --oneline 44a5149 Roll src/third_party/skia 7dae882574d2..cc4dbfcfbd8a (15 commits) (flutter/engine#6405) de32c65 Roll src/third_party/skia 3b8b11e1f912..7dae882574d2 (15 commits) (flutter/engine#6403) 3a9c22a Allow GetRectsForRange to provide more detailed/nuanced metrics through RectStyle enum. (flutter/engine#6335) b59c864 Rename the Android fragment support library JAR (flutter/engine#6400) 4213ac1 Add an Android fragment support library to third_party (flutter/engine#6384) a785b25 do not count Hidden nodes at the beginning of the scrollable (flutter/engine#6381) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
flutter/engine@f6af1f2...dc2634d git log f6af1f2..dc2634d --no-merges --oneline dc2634d Force lf-line endings for so that source offsets match across platforms. (flutter/engine#6408) 44a5149 Roll src/third_party/skia 7dae882574d2..cc4dbfcfbd8a (15 commits) (flutter/engine#6405) de32c65 Roll src/third_party/skia 3b8b11e1f912..7dae882574d2 (15 commits) (flutter/engine#6403) 3a9c22a Allow GetRectsForRange to provide more detailed/nuanced metrics through RectStyle enum. (flutter/engine#6335) b59c864 Rename the Android fragment support library JAR (flutter/engine#6400) 4213ac1 Add an Android fragment support library to third_party (flutter/engine#6384) a785b25 do not count Hidden nodes at the beginning of the scrollable (flutter/engine#6381) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
flutter/engine@f6af1f2...fa719e3 git log f6af1f2..fa719e3 --no-merges --oneline fa719e3 Roll src/third_party/skia cc4dbfcfbd8a..6719fcc43b1e (17 commits) (flutter/engine#6409) dc2634d Force lf-line endings for so that source offsets match across platforms. (flutter/engine#6408) 44a5149 Roll src/third_party/skia 7dae882574d2..cc4dbfcfbd8a (15 commits) (flutter/engine#6405) de32c65 Roll src/third_party/skia 3b8b11e1f912..7dae882574d2 (15 commits) (flutter/engine#6403) 3a9c22a Allow GetRectsForRange to provide more detailed/nuanced metrics through RectStyle enum. (flutter/engine#6335) b59c864 Rename the Android fragment support library JAR (flutter/engine#6400) 4213ac1 Add an Android fragment support library to third_party (flutter/engine#6384) a785b25 do not count Hidden nodes at the beginning of the scrollable (flutter/engine#6381) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
flutter/engine@f6af1f2...9ccc966 git log f6af1f2..9ccc966 --no-merges --oneline 9ccc966 Share engine layers with the framework (flutter/engine#6406) fa719e3 Roll src/third_party/skia cc4dbfcfbd8a..6719fcc43b1e (17 commits) (flutter/engine#6409) dc2634d Force lf-line endings for so that source offsets match across platforms. (flutter/engine#6408) 44a5149 Roll src/third_party/skia 7dae882574d2..cc4dbfcfbd8a (15 commits) (flutter/engine#6405) de32c65 Roll src/third_party/skia 3b8b11e1f912..7dae882574d2 (15 commits) (flutter/engine#6403) 3a9c22a Allow GetRectsForRange to provide more detailed/nuanced metrics through RectStyle enum. (flutter/engine#6335) b59c864 Rename the Android fragment support library JAR (flutter/engine#6400) 4213ac1 Add an Android fragment support library to third_party (flutter/engine#6384) a785b25 do not count Hidden nodes at the beginning of the scrollable (flutter/engine#6381) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
flutter/engine@f6af1f2...2de87a8 git log f6af1f2..2de87a8 --no-merges --oneline 2de87a8 Roll src/third_party/skia 6719fcc43b1e..deb512045e6a (7 commits) (flutter/engine#6411) 68a42e3 Add nullability annotations to MethodChannel/MethodCall. (flutter/engine#6393) 71ba20a Dart SDK roll for 2018-10-02 to d2c5a24fd9ead97a7f18d02786e679293cc3709e (flutter/engine#6410) 9ccc966 Share engine layers with the framework (flutter/engine#6406) fa719e3 Roll src/third_party/skia cc4dbfcfbd8a..6719fcc43b1e (17 commits) (flutter/engine#6409) dc2634d Force lf-line endings for so that source offsets match across platforms. (flutter/engine#6408) 44a5149 Roll src/third_party/skia 7dae882574d2..cc4dbfcfbd8a (15 commits) (flutter/engine#6405) de32c65 Roll src/third_party/skia 3b8b11e1f912..7dae882574d2 (15 commits) (flutter/engine#6403) 3a9c22a Allow GetRectsForRange to provide more detailed/nuanced metrics through RectStyle enum. (flutter/engine#6335) b59c864 Rename the Android fragment support library JAR (flutter/engine#6400) 4213ac1 Add an Android fragment support library to third_party (flutter/engine#6384) a785b25 do not count Hidden nodes at the beginning of the scrollable (flutter/engine#6381) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
flutter/engine@f6af1f2...74662ab git log f6af1f2..74662ab --no-merges --oneline 74662ab Revert "Share engine layers with the framework" (flutter/engine#6412) 2de87a8 Roll src/third_party/skia 6719fcc43b1e..deb512045e6a (7 commits) (flutter/engine#6411) 68a42e3 Add nullability annotations to MethodChannel/MethodCall. (flutter/engine#6393) 71ba20a Dart SDK roll for 2018-10-02 to d2c5a24fd9ead97a7f18d02786e679293cc3709e (flutter/engine#6410) 9ccc966 Share engine layers with the framework (flutter/engine#6406) fa719e3 Roll src/third_party/skia cc4dbfcfbd8a..6719fcc43b1e (17 commits) (flutter/engine#6409) dc2634d Force lf-line endings for so that source offsets match across platforms. (flutter/engine#6408) 44a5149 Roll src/third_party/skia 7dae882574d2..cc4dbfcfbd8a (15 commits) (flutter/engine#6405) de32c65 Roll src/third_party/skia 3b8b11e1f912..7dae882574d2 (15 commits) (flutter/engine#6403) 3a9c22a Allow GetRectsForRange to provide more detailed/nuanced metrics through RectStyle enum. (flutter/engine#6335) b59c864 Rename the Android fragment support library JAR (flutter/engine#6400) 4213ac1 Add an Android fragment support library to third_party (flutter/engine#6384) a785b25 do not count Hidden nodes at the beginning of the scrollable (flutter/engine#6381) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
flutter/engine@f6af1f2...74662ab git log f6af1f2..74662ab --no-merges --oneline 74662ab Revert "Share engine layers with the framework" (flutter/engine#6412) 2de87a8 Roll src/third_party/skia 6719fcc43b1e..deb512045e6a (7 commits) (flutter/engine#6411) 68a42e3 Add nullability annotations to MethodChannel/MethodCall. (flutter/engine#6393) 71ba20a Dart SDK roll for 2018-10-02 to d2c5a24fd9ead97a7f18d02786e679293cc3709e (flutter/engine#6410) 9ccc966 Share engine layers with the framework (flutter/engine#6406) fa719e3 Roll src/third_party/skia cc4dbfcfbd8a..6719fcc43b1e (17 commits) (flutter/engine#6409) dc2634d Force lf-line endings for so that source offsets match across platforms. (flutter/engine#6408) 44a5149 Roll src/third_party/skia 7dae882574d2..cc4dbfcfbd8a (15 commits) (flutter/engine#6405) de32c65 Roll src/third_party/skia 3b8b11e1f912..7dae882574d2 (15 commits) (flutter/engine#6403) 3a9c22a Allow GetRectsForRange to provide more detailed/nuanced metrics through RectStyle enum. (flutter/engine#6335) b59c864 Rename the Android fragment support library JAR (flutter/engine#6400) 4213ac1 Add an Android fragment support library to third_party (flutter/engine#6384) a785b25 do not count Hidden nodes at the beginning of the scrollable (flutter/engine#6381) The AutoRoll server is located here: https://autoroll.skia.org/r/flutter-engine-flutter-autoroll Documentation for the AutoRoller is here: https://skia.googlesource.com/buildbot/+/master/autoroll/README.md If the roll is causing failures, please contact the current sheriff, who should be CC'd on the roll, and stop the roller if necessary.
This PR adds the advanced GetRectsForRange functionality to LibTxt, but does not yet enable it in the framework because this would change the current behavior.
RectStyle provides an OR-able enum that defines a number of properties that the rects will have.