SHARE
TWEET

Untitled

a guest Mar 26th, 2019 91 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Block(0) - stacking context
  2.     Block(1) - Default hit flags
  3.         Inline(2) - Default hit flags
  4.     Block(3) - Something weird, maybe different flags or agr?
  5.         Inline(4)
  6.  
  7. Backgrounds for Block(1) and Block(3) should both go into the list for step 4 (BlockBorderBackgrounds() in gecko), and the backgrounds for Inline(2) and Inline(4) will go into the list for step 7 (Content() in gecko [1]) as part of 7.2.1.1
  8.  
  9. So the DL order is:
  10.  
  11. nsDisplayBackgroundColor(Block(1))
  12. nsDisplayBackgroundColor(Block(3))
  13. nsDisplayBackgroundColor(Inline(2))
  14. nsDisplayBackgroundColor(Inline(4))
  15.  
  16.  
  17. If we use the parent optimization to add hit test info, then we'd skip adding hit test info for Inline(2), since Block(1) already added it. This is incorrect though, since Block(3) will also add hit-test info (because of its weird flags), and it'll be behind Inline(2).
  18.  
  19. Trying to scroll with the mouse over Inline(2) will give the behaviour for Block(3), even though that's not what we want.
  20.  
  21.  
  22.  
  23. [1] Backgrounds (and hit test info) always get added to the BorderBackgrounds() list, but the code below creates a temporary nsDisplayListCollection where the BorderBackgrounds() list is a pointer to the outer collection's Content() list.
  24.  
  25. https://searchfox.org/mozilla-central/rev/a7315d78417179b151fef6108f2bce14786ba64d/layout/generic/nsBlockFrame.cpp#6344
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top