Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@GaryQian
Copy link
Contributor

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.

glyph_positions.back().x_pos.end),
line_number, metrics, run.direction());
}
} // for each in glyph_blobs
Copy link
Contributor Author

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.

} else {
// Set each box to the max height of each line to ensure continuity.
float min_top = DBL_MAX;
float max_bottom = -1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why -1?

Copy link
Contributor Author

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not zero, then?

@Hixie
Copy link
Contributor

Hixie commented Sep 26, 2018

Is the plan to expose this in the dart:ui API?

@GaryQian
Copy link
Contributor Author

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.

@GaryQian
Copy link
Contributor Author

GaryQian commented Oct 1, 2018

@jason-simmons @Hixie Any feedback/additional suggestions?

@Hixie
Copy link
Contributor

Hixie commented Oct 1, 2018

i'll defer to jason.

@GaryQian GaryQian merged commit 3a9c22a into flutter:master Oct 2, 2018
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 2, 2018
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.
GaryQian added a commit to GaryQian/engine that referenced this pull request Oct 2, 2018
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 2, 2018
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.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 2, 2018
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.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 2, 2018
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.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 2, 2018
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.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 3, 2018
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.
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Oct 3, 2018
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.
dnfield pushed a commit to flutter/flutter that referenced this pull request Oct 3, 2018
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.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants