mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Auto merge of #21628 - paavininanda:Current-pixel-density, r=jdm
Current pixel density <!-- 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 a subset of #11416. <!-- Either: --> - [x] There are tests for these changes OR <!-- 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/21628) <!-- Reviewable:end -->
This commit is contained in:
commit
b0de9c5315
9 changed files with 74 additions and 43 deletions
|
@ -249,6 +249,9 @@ pub trait ThreadSafeLayoutNode: Clone + Copy + Debug + GetLayoutData + NodeInfo
|
|||
/// If this is an image element, returns its URL. If this is not an image element, fails.
|
||||
fn image_url(&self) -> Option<ServoUrl>;
|
||||
|
||||
/// If this is an image element, returns its current-pixel-density. If this is not an image element, fails.
|
||||
fn image_density(&self) -> Option<f64>;
|
||||
|
||||
fn canvas_data(&self) -> Option<HTMLCanvasData>;
|
||||
|
||||
fn svg_data(&self) -> Option<SVGSVGData>;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue