mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fix hover state on elements with transparent background colours.
Move culling of transparent display items to paint task rather than display list builder, so that hit testing detects mouse over on transparent background elements.
This commit is contained in:
parent
93d1f40a96
commit
0817f9ad44
2 changed files with 12 additions and 12 deletions
|
@ -28,6 +28,7 @@ use azure::azure_hl::{Color};
|
|||
|
||||
use collections::dlist::{self, DList};
|
||||
use geom::{Point2D, Rect, SideOffsets2D, Size2D, Matrix2D};
|
||||
use geom::approxeq::ApproxEq;
|
||||
use geom::num::Zero;
|
||||
use libc::uintptr_t;
|
||||
use paint_task::PaintLayer;
|
||||
|
@ -912,7 +913,9 @@ impl DisplayItem {
|
|||
|
||||
match *self {
|
||||
DisplayItem::SolidColorClass(ref solid_color) => {
|
||||
paint_context.draw_solid_color(&solid_color.base.bounds, solid_color.color)
|
||||
if !solid_color.color.a.approx_eq(&0.0) {
|
||||
paint_context.draw_solid_color(&solid_color.base.bounds, solid_color.color)
|
||||
}
|
||||
}
|
||||
|
||||
DisplayItem::TextClass(ref text) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue