Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upFragments aren't generated for inline elements containing no non-whitespace characters. #13982
Comments
|
Alright, I'm only breaking two reftests now, and I don't think they're any of my business. I'm going to rebase and write one or more new tests, then I'll submit a pull request. |
|
Actually, I forgot to run test-css. Still breaking a bunch of reftests. It's late, so I'll look into it tomorrow. |
bors-servo
added a commit
that referenced
this issue
Jan 4, 2017
Make offset parent queries less buggy. <!-- Please describe your changes on the following line: --> Offset parent queries, which are used in the getters for HTMLElement's `offsetParent`, `offsetTop`, `offsetLeft`, `offsetWidth`, and `offsetHeight`, are pretty busted. The most egregious bug is that, as reported in #12939, inline elements are treated as if they're not present in the document. This PR fixes that and all of the other bugs I could trace directly to the offset parent query code, but `offsetTop` and `offsetLeft` are still terribly unreliable for reasons I haven't looked into (#13708). Inline elements with no content are still treated as not present due to #13982, so #13944 isn't fixed with this PR, either. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12939, #12595 <!-- Either: --> - [X] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/14839) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Jan 5, 2017
Make offset parent queries less buggy. <!-- Please describe your changes on the following line: --> Offset parent queries, which are used in the getters for HTMLElement's `offsetParent`, `offsetTop`, `offsetLeft`, `offsetWidth`, and `offsetHeight`, are pretty busted. The most egregious bug is that, as reported in #12939, inline elements are treated as if they're not present in the document. This PR fixes that and all of the other bugs I could trace directly to the offset parent query code, but `offsetTop` and `offsetLeft` are still terribly unreliable for reasons I haven't looked into (#13708). Inline elements with no content are still treated as not present due to #13982, so #13944 isn't fixed with this PR, either. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12939, #12595 <!-- Either: --> - [X] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/14839) <!-- Reviewable:end -->
bors-servo
added a commit
that referenced
this issue
Jan 18, 2017
Make offset parent queries less buggy. <!-- Please describe your changes on the following line: --> Offset parent queries, which are used in the getters for HTMLElement's `offsetParent`, `offsetTop`, `offsetLeft`, `offsetWidth`, and `offsetHeight`, are pretty busted. The most egregious bug is that, as reported in #12939, inline elements are treated as if they're not present in the document. This PR fixes that and all of the other bugs I could trace directly to the offset parent query code, but `offsetTop` and `offsetLeft` are still unreliable in certain circumstances for reasons I haven't looked into (#13708). Inline elements with no content are still treated as not present due to #13982, so #13944 isn't fixed with this PR, either. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #12939 and fix #12595 <!-- Either: --> - [X] There are tests for these changes <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/14839) <!-- Reviewable:end -->
|
This still happens. |
|
I've still got that branch with a fix, but it's still breaking tests. I always mean to keep working on it. :P Should I open a PR with [WIP], perhaps? |
|
@Permutatrix If you open a PR, people can help you fix the breaking tests. But it's up to you either way! |
bors-servo
added a commit
that referenced
this issue
Oct 8, 2017
[WIP] Ensure every inline flow starts and ends with a text fragment. <!-- Please describe your changes on the following line: --> Not every inline flow begins or ends with actual text—they may begin or end with replaced elements, for instance, or they may contain nothing at all. But for purposes of both rendering (e.g. rendering the inline-start and inline-end borders of an element) and queries (from scripts), it's sometimes important to know where an inline node begins and ends. The only way this can currently be determined in Servo's layout code is by finding the fragments with `InlineFragmentNodeInfo`s that correspond to said node and have the `FIRST_FRAGMENT_OF_ELEMENT` and `LAST_FRAGMENT_OF_ELEMENT` flags set. It's therefore important that fragments with these flags be generated. This PR ensures that these fragments are generated. Unfortunately, the layout code currently depends on the _absence_ of these fragments for correctness in a number of cases, so making this change broke a lot of tests. I've fixed some of them, but there are still 20 or so that are broken. This PR is thus a work in progress and shouldn't be merged yet. It could also probably use some more comments in some places. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./mach test-tidy` does not report any errors - [ ] These changes fix #13982. <!-- Either: --> - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- 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/18780) <!-- Reviewable:end -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I ran into this problem while working on #12939, since
process_offset_parent_queryneeds to find at least one fragment corresponding to an element in order to produce results. This can also have an effect on rendering, e.g.:In most browsers, that element looks like this:
In Servo, it isn't rendered and doesn't affect the layout.
I've got a fix for this already, though it introduces a couple more rendering bugs which I suppose I should fix as well before submitting a pull request.