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 upAbsolute positioned images with padding do not have correct size #18706
Comments
ocerman
commented
Oct 2, 2017
•
|
|
|
It is alright to work on this? I think I know what is wrong, just need to check the change doesn't break anything and add a reftest |
|
I created the pull request but I'm not 100% sure that all paths through are now going to work as all paths in https://github.com/servo/servo/blob/master/components/layout/block.rs#L232 are not exercised by my tests. I'm not sure how to get block_start_margin and block_end_margin to match with Auto. Also I wanted to see if all the tests pass. The fix counters the use of border_box at https://github.com/servo/servo/blob/master/components/layout/block.rs#L1262. border_box already includes the padding so the later addition off padding to size causes the bug. |
…ding, r=<try> fix block size for absolute replaced element Absolutely replaced elements with padding were incorrectly setting their block size to include twice the padding values. This attempts to stop that extra padding for replaced elements but leave the working flow for non replaced elements <!-- Please describe your changes on the following line: --> --- <!-- 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 #18706 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/19184) <!-- Reviewable:end -->
…ding, r=mbrubeck fix block size for absolute replaced element Absolutely replaced elements with padding were incorrectly setting their block size to include twice the padding values. This attempts to stop that extra padding for replaced elements but leave the working flow for non replaced elements <!-- Please describe your changes on the following line: --> --- <!-- 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 #18706 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/19184) <!-- Reviewable:end -->
…ding, r=mbrubeck fix block size for absolute replaced element Absolutely replaced elements with padding were incorrectly setting their block size to include twice the padding values. This attempts to stop that extra padding for replaced elements but leave the working flow for non replaced elements <!-- Please describe your changes on the following line: --> --- <!-- 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 #18706 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/19184) <!-- Reviewable:end -->
…ding, r=mbrubeck fix block size for absolute replaced element Absolutely replaced elements with padding were incorrectly setting their block size to include twice the padding values. This attempts to stop that extra padding for replaced elements but leave the working flow for non replaced elements <!-- Please describe your changes on the following line: --> --- <!-- 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 #18706 (github issue number if applicable). <!-- Either: --> - [X] There are tests for these changes OR - [ ] These changes do not require tests because _____ <!-- 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/19184) <!-- Reviewable:end -->
