<?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>38927</bug_id>
          
          <creation_ts>2010-05-11 12:32:15 -0700</creation_ts>
          <short_desc>Make the :window-inactive pseudo class apply to everything (or atleast the body/root element)</short_desc>
          <delta_ts>2024-01-25 17:44:22 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>CSS</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>PC</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>REOPENED</bug_status>
          <resolution></resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Timothy Hatcher">timothy</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bdakin</cc>
    
    <cc>bfulgham</cc>
    
    <cc>hyatt</cc>
    
    <cc>joepeck</cc>
    
    <cc>marcoos+bwo</cc>
    
    <cc>mitz</cc>
    
    <cc>ntim</cc>
    
    <cc>rniwa</cc>
    
    <cc>simon.fraser</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>zalan</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>224086</commentid>
    <comment_count>0</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2010-05-11 12:32:15 -0700</bug_when>
    <thetext>Right now scrollbars and selection work with window-inactive. But it would be useful for other things, at least the body/root element.


From CSSStyleSelector.cpp:

    // FIXME: This is a temporary hack for resizers and scrollbar corners.  Eventually :window-inactive should become a real
    // pseudo class and just apply to everything.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1029298</commentid>
    <comment_count>1</comment_count>
      <attachid>236642</attachid>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2014-08-14 20:34:32 -0700</bug_when>
    <thetext>Created attachment 236642
[TEST] Reduction

Hey! It seems like this selector now works for any element because of:
http://trac.webkit.org/changeset/172220

However it seems that querySelector identifies the elements, but the elements do not recalculate style and repaint. For example (attached test):

    &lt;style&gt;
    div { width: 200px; height: 200px; background: blue; }
    div:window-inactive { background: red; }
    &lt;/style&gt;

    &lt;div&gt;&lt;/div&gt;

Note when inspector is focused that querySelector(&quot;div:window-inactive&quot;) finds the div. But the div is not red =(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887159</commentid>
    <comment_count>2</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-07-27 13:58:19 -0700</bug_when>
    <thetext>I am able to reproduce this bug in Safari 15.6 on macOS 12.5 using attached test case and it shows &quot;Red&quot; square / box while all other browsers (Chrome Canary 106 &amp; Firefox Nightly 105) show &quot;Blue&quot; square / box. Thanks!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1887206</commentid>
    <comment_count>3</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-07-27 17:53:17 -0700</bug_when>
    <thetext>&lt;rdar://problem/97693996&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1984013</commentid>
    <comment_count>4</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2023-10-10 09:24:00 -0700</bug_when>
    <thetext>Seems to be fixed in Safari 17 and Safari Technology Preview 180 and show &apos;Blue&apos; square.

Marking this as &apos;RESOLVED CONFIGURATION CHANGED&apos;. It might be fixed by Anne&apos;s selector serialization bug.

Although happy if some can do triage and add related commits detail, where this get fixed.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2007436</commentid>
    <comment_count>5</comment_count>
    <who name="Timothy Hatcher">timothy</who>
    <bug_when>2024-01-24 19:02:01 -0800</bug_when>
    <thetext>Not fixed. The div should be blue when the window is focused, and red when it is in the background.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>2007785</commentid>
    <comment_count>6</comment_count>
    <who name="Tim Nguyen (:ntim)">ntim</who>
    <bug_when>2024-01-25 17:44:22 -0800</bug_when>
    <thetext>I don&apos;t think we should pursue this, we should instead look into standardizing a media query https://github.com/w3c/csswg-drafts/issues/5828</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>236642</attachid>
            <date>2014-08-14 20:34:32 -0700</date>
            <delta_ts>2014-08-14 20:34:32 -0700</delta_ts>
            <desc>[TEST] Reduction</desc>
            <filename>window-inactive-reduction.html</filename>
            <type>text/html</type>
            <size>126</size>
            <attacher name="Joseph Pecoraro">joepeck</attacher>
            
              <data encoding="base64">PHN0eWxlPgpkaXYgeyB3aWR0aDogMjAwcHg7IGhlaWdodDogMjAwcHg7IGJhY2tncm91bmQ6IGJs
dWU7IH0KZGl2OndpbmRvdy1pbmFjdGl2ZSB7IGJhY2tncm91bmQ6IHJlZDsgfQo8L3N0eWxlPgoK
PGRpdj48L2Rpdj4K
</data>

          </attachment>
      

    </bug>

</bugzilla>