Opened 5 years ago

Closed 5 years ago

#2077 closed defect (fixed)

Overlay highlighting selected element is covered by descendant with higher z-index

Reported by: passbrains Assignee: sebastian
Priority: P3 Milestone: Adblock-Plus-1.9-for-Chrome-Opera-Safari
Module: Platform Keywords:
Cc: sebastian Blocked By:
Blocking: Platform: Chrome
Ready: yes Confidential: no
Tester: Verified working: no
Review URL(s):

http://codereview.adblockplus.org/5859059588661248

Description (last modified by sebastian)

Adapted from https://www.passbrains.com/dashboard/view-ticket.php?ticket_no=ACH-141

Environment

Windows + Vista 64bit + Chrome + English
ABP version Version: 1.8.11.1363

How to reproduce

  1. Install latest ABP extension on chrome.
  1. Load page  http://guilty-gear.wikia.com/wiki/Guilty_Gear_XX
  1. Block the  wrapper by ABP option block element. see screenshot1
  1. Add the filter.
  1. Refresh the page and observe.

Verfied on 2 builds

Version: 1.8.11.1361

Version: 1.8.11.1363

Observed behaviour

Only the areas on the left and right are highlighted. However, the whole page's content is blocked. This is because there is an descendant with a higher z-index than the ancestor the overlay is created for.

Expected behaviour

The whole area of the element that is going to be blocked should be highlighted.

Attachments (2)

3668_1425054778_gear1.jpg (199.1 KB) - added by passbrains 5 years ago.
3668_1425054778_gear2.jpg (153.7 KB) - added by passbrains 5 years ago.

Download all attachments as: .zip

Change History (7)

Changed 5 years ago by passbrains

Changed 5 years ago by passbrains

comment:1 Changed 5 years ago by mapx

  • Component changed from Unknown to Platform
  • Description modified (diff)
  • Owner set to sebastian

comment:2 Changed 5 years ago by sebastian

  • Cc sebastian added
  • Owner sebastian deleted
  • Priority changed from Unknown to P3
  • Verified working unset

Yeah, z-index calculation strikes again, apparently not a trivial task.

comment:3 Changed 5 years ago by sebastian

  • Description modified (diff)
  • Owner set to sebastian
  • Ready set
  • Summary changed from Wrapper element is not blocked to Overlay highlighting selected element is covered by descendant with higher z-index

The z-index calculation doesn't consider descendants but only the selected element and its ancestors. Eventually, it's not possible to always inject the overlay in a way that it only covers the selected element's content. So we probably should just inject it with the highest possible z-index, potentially covering a little too much. This will simplify the logic and is consistent with the behavior of the inspector.

comment:4 Changed 5 years ago by sebastian

  • Review URL(s) modified (diff)
  • Status changed from new to reviewing

comment:5 Changed 5 years ago by sebastian

  • Milestone set to Adblock-Plus-for-Chrome-Opera-Safari-next
  • Resolution set to fixed
  • Status changed from reviewing to closed
Note: See TracTickets for help on using tickets.