Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overwrite default RunInfo values with the first real ones encountered. #16258

Merged
merged 1 commit into from Apr 13, 2017

Conversation

jdm
Copy link
Member

@jdm jdm commented Apr 4, 2017

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.



This change is Reviewable

@highfive
Copy link

highfive commented Apr 4, 2017

Heads up! This PR modifies the following files:

  • @emilio: components/layout/text.rs

@highfive
Copy link

highfive commented Apr 4, 2017

warning Warning warning

  • These commits include an empty title element (<title></title>). Consider adding appropriate metadata.

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Apr 4, 2017
@jdm
Copy link
Member Author

jdm commented Apr 4, 2017

@stshine Is this something you could review?

@jdm
Copy link
Member Author

jdm commented Apr 4, 2017

@bors-servo: try

@bors-servo
Copy link
Contributor

⌛ Trying commit 60f09b7 with merge 4a3a692...

bors-servo pushed a commit that referenced this pull request Apr 4, 2017
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16258)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - linux-rel-wpt

@highfive highfive added the S-tests-failed The changes caused existing tests to fail. label Apr 4, 2017
@jdm
Copy link
Member Author

jdm commented Apr 4, 2017

Sigh. The new test passes on my macbook and fails on both the linux and mac builders.

Copy link
Contributor

@stshine stshine left a comment

Choose a reason for hiding this comment

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

This looks good to me. However, to make text-overflow actually working we need #16265 get merged first.

@@ -230,6 +231,14 @@ impl TextRunScanner {
None => false
};

if !initialized_run_info {
Copy link
Contributor

@stshine stshine Apr 5, 2017

Choose a reason for hiding this comment

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

During the iteration every time we start to deal with a fragment if the font changed we may create an empty mapping, and when we are done with the fragment we flush all the remaining text to mapping, so instead using a temp variable for the whole iteration we should check if end_position is zero.

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed.

@stshine
Copy link
Contributor

stshine commented Apr 6, 2017

@bors-servo try

@stshine
Copy link
Contributor

stshine commented Apr 6, 2017

@bors-servo retry

@bors-servo
Copy link
Contributor

⌛ Trying commit 60f09b7 with merge d93d627...

bors-servo pushed a commit that referenced this pull request Apr 6, 2017
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16258)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-msvc-dev
State: approved= try=True

@highfive highfive removed the S-tests-failed The changes caused existing tests to fail. label Apr 11, 2017
Copy link
Contributor

@stshine stshine left a comment

Choose a reason for hiding this comment

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

Looks good!

@jdm
Copy link
Member Author

jdm commented Apr 11, 2017

@bors-servo: r=stshine

@bors-servo
Copy link
Contributor

📌 Commit a2e8ab4 has been approved by stshine

@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Apr 11, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit a2e8ab4 with merge a5b035e...

bors-servo pushed a commit that referenced this pull request Apr 11, 2017
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16258)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - mac-rel-css

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Apr 11, 2017
@highfive highfive added S-awaiting-review There is new code that needs to be reviewed. and removed S-tests-failed The changes caused existing tests to fail. labels Apr 12, 2017
@jdm
Copy link
Member Author

jdm commented Apr 12, 2017

@bors-servo: try

@bors-servo
Copy link
Contributor

⌛ Trying commit 7c9efa6 with merge e07f484...

bors-servo pushed a commit that referenced this pull request Apr 12, 2017
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16258)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-msvc-dev
State: approved= try=True

@jdm
Copy link
Member Author

jdm commented Apr 12, 2017

@pcwalton Could you verify that this makes sense?

@pcwalton
Copy link
Contributor

Looks good overall. Only one nit: maybe rename flush_mapping to new_mapping_needed. With this patch as is, the flush_mapping Boolean doesn't necessarily mean the mapping is flushed, which could be confusing.

@jdm
Copy link
Member Author

jdm commented Apr 12, 2017

@bors-servo: r=pcwalton,stshine

@bors-servo
Copy link
Contributor

📌 Commit a20d0bc has been approved by pcwalton,stshine

@highfive highfive assigned pcwalton and unassigned asajeffrey Apr 12, 2017
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Apr 12, 2017
@bors-servo
Copy link
Contributor

⌛ Testing commit a20d0bc with merge 628ba1d...

bors-servo pushed a commit that referenced this pull request Apr 12, 2017
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16258)
<!-- Reviewable:end -->
@bors-servo
Copy link
Contributor

💔 Test failed - android

@highfive highfive added S-tests-failed The changes caused existing tests to fail. and removed S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. labels Apr 13, 2017
@jdm
Copy link
Member Author

jdm commented Apr 13, 2017

@bors-servo: retry

@bors-servo
Copy link
Contributor

⌛ Testing commit a20d0bc with merge 9c0d8e4...

bors-servo pushed a commit that referenced this pull request Apr 13, 2017
Overwrite default RunInfo values with the first real ones encountered.

TextRunScanner::flush_clump_to_list compares the values in the RunInfo object against the ones determined from the current fragment, but these values can be arbitrary defaults that don't mean anything useful.

---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #14783
- [X] There are tests for these changes

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16258)
<!-- Reviewable:end -->
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-tests-failed The changes caused existing tests to fail. labels Apr 13, 2017
@bors-servo
Copy link
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css, mac-rel-wpt1, mac-rel-wpt2, windows-msvc-dev
Approved by: pcwalton,stshine
Pushing 9c0d8e4 to master...

@bors-servo bors-servo merged commit a20d0bc into servo:master Apr 13, 2017
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Apr 13, 2017
@stshine
Copy link
Contributor

stshine commented Apr 13, 2017

@jdm Thank you for letting me review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Layout assertion visiting google accounts help page
6 participants