mirror of
https://github.com/servo/servo.git
synced 2025-08-11 16:35:33 +01:00
Move DL items from gfx to layout
Implement corner clipping. Remove PixelFormat from WebrenderImageInfo. Use WebRender text shadow. Remove MallocSizeOf and Deserialize for DL items. Closes #19649, #19680, #19802
This commit is contained in:
parent
782d4d4af6
commit
c0be925bed
26 changed files with 417 additions and 287 deletions
|
@ -10,12 +10,11 @@ path = "lib.rs"
|
|||
doctest = false
|
||||
|
||||
[dependencies]
|
||||
gfx = {path = "../../../components/gfx"}
|
||||
gfx_traits = {path = "../../../components/gfx_traits"}
|
||||
ipc-channel = "0.10"
|
||||
layout = {path = "../../../components/layout"}
|
||||
metrics = {path = "../../../components/metrics"}
|
||||
msg = {path = "../../../components/msg"}
|
||||
net_traits = {path = "../../../components/net_traits"}
|
||||
profile_traits = {path = "../../../components/profile_traits"}
|
||||
servo_url = {path = "../../../components/url"}
|
||||
time = "0.1.12"
|
||||
|
|
|
@ -4,12 +4,11 @@
|
|||
|
||||
#![cfg(test)]
|
||||
|
||||
extern crate gfx;
|
||||
extern crate gfx_traits;
|
||||
extern crate ipc_channel;
|
||||
extern crate layout;
|
||||
extern crate metrics;
|
||||
extern crate msg;
|
||||
extern crate net_traits;
|
||||
extern crate profile_traits;
|
||||
extern crate servo_url;
|
||||
extern crate time;
|
||||
|
|
|
@ -2,17 +2,15 @@
|
|||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use gfx::display_list::{BaseDisplayItem, WebRenderImageInfo};
|
||||
use gfx::display_list::{DisplayItem, DisplayList, ImageDisplayItem};
|
||||
use gfx_traits::Epoch;
|
||||
use ipc_channel::ipc;
|
||||
use layout::display_list::items::{BaseDisplayItem, DisplayItem, DisplayList, ImageDisplayItem};
|
||||
use metrics::{PaintTimeMetrics, ProfilerMetadataFactory, ProgressiveWebMetric};
|
||||
use msg::constellation_msg::TEST_PIPELINE_ID;
|
||||
use net_traits::image::base::PixelFormat;
|
||||
use profile_traits::time::{ProfilerChan, TimerMetadata};
|
||||
use servo_url::ServoUrl;
|
||||
use time;
|
||||
use webrender_api::{ImageRendering, LayoutSize};
|
||||
use webrender_api::{ImageKey, ImageRendering, LayoutSize};
|
||||
|
||||
struct DummyProfilerMetadataFactory {}
|
||||
impl ProfilerMetadataFactory for DummyProfilerMetadataFactory {
|
||||
|
@ -120,12 +118,7 @@ fn test_first_paint_setter() {
|
|||
fn test_first_contentful_paint_setter() {
|
||||
let image = DisplayItem::Image(Box::new(ImageDisplayItem {
|
||||
base: BaseDisplayItem::empty(),
|
||||
webrender_image: WebRenderImageInfo {
|
||||
width: 1,
|
||||
height: 1,
|
||||
format: PixelFormat::RGB8,
|
||||
key: None,
|
||||
},
|
||||
id: ImageKey::DUMMY,
|
||||
stretch_size: LayoutSize::zero(),
|
||||
tile_spacing: LayoutSize::zero(),
|
||||
image_rendering: ImageRendering::Auto,
|
||||
|
|
|
@ -100521,6 +100521,18 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-backgrounds/background-rounded-image-clip.html": [
|
||||
[
|
||||
"/css/css-backgrounds/background-rounded-image-clip.html",
|
||||
[
|
||||
[
|
||||
"/css/css-backgrounds/reference/background-rounded-image-clip.html",
|
||||
"=="
|
||||
]
|
||||
],
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-backgrounds/background-size-002.html": [
|
||||
[
|
||||
"/css/css-backgrounds/background-size-002.html",
|
||||
|
@ -236779,6 +236791,11 @@
|
|||
{}
|
||||
]
|
||||
],
|
||||
"css/css-backgrounds/reference/background-rounded-image-clip.html": [
|
||||
[
|
||||
{}
|
||||
]
|
||||
],
|
||||
"css/css-backgrounds/reference/background-size-002-ref.html": [
|
||||
[
|
||||
{}
|
||||
|
@ -483700,6 +483717,10 @@
|
|||
"36050bffda9382cfd978dc82a2f0244a535a6a46",
|
||||
"support"
|
||||
],
|
||||
"css/css-backgrounds/background-rounded-image-clip.html": [
|
||||
"c22edf865829fea1d69a54e34396b4462250585f",
|
||||
"reftest"
|
||||
],
|
||||
"css/css-backgrounds/background-size-001.html": [
|
||||
"7cf677bf25a1fcac569bd0accd28dd66e6060a1b",
|
||||
"testharness"
|
||||
|
@ -485904,6 +485925,10 @@
|
|||
"1141a4c270ace715755b9b8352dab9baffca27c4",
|
||||
"support"
|
||||
],
|
||||
"css/css-backgrounds/reference/background-rounded-image-clip.html": [
|
||||
"f5c1af4d9e5b415e762c921c6d93355b2861946c",
|
||||
"support"
|
||||
],
|
||||
"css/css-backgrounds/reference/background-size-002-ref.html": [
|
||||
"33d8850f315bedabb7024031b091a14177034c1d",
|
||||
"support"
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
<!DOCTYPE html>
|
||||
<meta charset="utf-8">
|
||||
<title>Background Clip Follows Rounded Corner</title>
|
||||
<link rel="match" href="reference/background-rounded-image-clip.html">
|
||||
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#corner-clipping">
|
||||
<style>
|
||||
html {
|
||||
background-color: green;
|
||||
}
|
||||
#a {
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
#b {
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
height: 200px;
|
||||
background-image: linear-gradient(green, green);
|
||||
background-clip: content-box;
|
||||
border-top-left-radius: 90px;
|
||||
border-width: 10px;
|
||||
border-style: solid;
|
||||
border-color: transparent;
|
||||
}
|
||||
</style>
|
||||
<body>
|
||||
<div id="a"></div>
|
||||
<div id="b"></div>
|
||||
</body>
|
|
@ -0,0 +1,15 @@
|
|||
<!doctype html>
|
||||
<style>
|
||||
html {
|
||||
background-color: green;
|
||||
}
|
||||
#a {
|
||||
top: 20px;
|
||||
left: 20px;
|
||||
position: absolute;
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
background-color: black;
|
||||
}
|
||||
</style>
|
||||
<div id="a"></div>
|
Loading…
Add table
Add a link
Reference in a new issue