<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>54618</bug_id>
          
          <creation_ts>2011-02-16 22:35:15 -0800</creation_ts>
          <short_desc>Web Inspector: Need renderer hint on implementing hovered node highlight in WebCore.</short_desc>
          <delta_ts>2011-08-08 22:47:52 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Inspector (Deprecated)</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Pavel Feldman">pfeldman</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hyatt</cc>
    
    <cc>jamesr</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>352616</commentid>
    <comment_count>0</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2011-02-16 22:35:15 -0800</bug_when>
    <thetext>Summarizing chats that I&apos;ve had on the IRC. Background:

When you hover over an element in inspector, we paint node highlight. Different ports handle it differently, all ultimately calling inspector&apos;s drawNodeHighlight defined in WebCore:

- Mac uses floating NSView in WebNodeHighlightView
- Windows uses floating native window in WebNodeHighlight
- GTK and Chromium simply issue repaint and stick inspector&apos;s drawNodeHighlight into their paint routines.
- WebKit2 is pending implementation

I&apos;d like to unify the approaches and keep all the code in the WebCore. There are two scenarios where naive approach of putting drawNodeHighlight into FrameView does not work:
- plugins that are on top of the screen
- accelerated compositing

We can give up the plugins one, but compositing still requires special handling.

I am a rendering idiot and reaching out for your hints. As I see, we could do two things:
1. Bump element&apos;s zindex on hover in its style and call highlight code from the RenderObject
2. Somehow have additional RenderLayer that would paint highlight

(1) has a side-effect of bringing node above other elements, but sounds simpler. It might be considered as either feature or a regression, I am not sure.
(2) would be simply perceived as no regressions.

On a side note, there is a pending request to make inspector highlight follow the moving / transforming elements, so (1) sounds more feasible to me, but I know nothing about rendering.

What do I miss?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>352955</commentid>
    <comment_count>1</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-02-17 09:12:06 -0800</bug_when>
    <thetext> &gt;1. Bump element&apos;s zindex on hover in its style and call highlight code from the RenderObject

That wont&apos; work.

&gt; 2. Somehow have additional RenderLayer that would paint highlight

I don&apos;t think you want that either.

When accelerated compositing is off, you could get away with painting something &quot;last&quot; in the painting order. See ScrollView for some code that does this for overlay scrollbars and the pan indicator.

When accelerated compositing is on, you&apos;ll need to render the highlight into its own GraphicsLayer which is above everything else. WebKit2 already has a notion of an overlay layer (it&apos;s used for the Find highlight), but we&apos;d need to pipe something through for WebKit1.

It would be nice if we could share the same &quot;overlay&quot; logic whether or not compositing is on, and have the GraphicsLayer part be hidden.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>448441</commentid>
    <comment_count>2</comment_count>
    <who name="Pavel Feldman">pfeldman</who>
    <bug_when>2011-08-08 22:47:52 -0700</bug_when>
    <thetext>Implemented in WebKit.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>