<?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>141533</bug_id>
          
          <creation_ts>2015-02-12 14:07:28 -0800</creation_ts>
          <short_desc>min-width @media query with huge length incorrectly evaluates to true</short_desc>
          <delta_ts>2022-08-30 02:19:57 -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>CSS</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Mac (Intel)</rep_platform>
          <op_sys>OS X 10.11</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>CONFIGURATION CHANGED</resolution>
          
          
          <bug_file_loc>http://test.csswg.org/harness/test/mediaqueries-3_dev/single/min-width-001/</bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>HasReduction, InRadar, W3CTest</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Rebert">webkit</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ahmad.saleem792</cc>
    
    <cc>ap</cc>
    
    <cc>bfulgham</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1068730</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2015-02-12 14:07:28 -0800</bug_when>
    <thetext>Safari Version: 8.0.3 (10600.3.18)

Original Bootstrap issue: https://github.com/twbs/bootstrap/issues/13632

Example URL:
http://jsfiddle.net/Lc3vZ/

Steps to reproduce the problem:
1. Open http://jsfiddle.net/Lc3vZ/
2. Note that it contains the following CSS:
@media (min-width: 9999999999px) {
    body {
        background-color: red;
    }
}

What is the expected behavior?
The media query&apos;s condition should not be deemed satisfied since my monitor isn&apos;t several miles wide, and the background-color in the &quot;Result&quot; pane should thus remain at its default of white.

What went wrong?
The media query&apos;s condition somehow evaluated to true even though my viewport/screen is significantly less than 9999999999px wide. Thus, in the &quot;Result&quot; pane, the background is red.

Does this work in other browsers?
Yes. In OS X Firefox 29.0.1 and OS X Chrome 40.0.2214.111, the media query&apos;s condition correctly evaluates to false.
Chrome used to suffer from this same bug, but they&apos;ve fixed it; see https://code.google.com/p/chromium/issues/detail?id=375574

More details:
Based on http://www.w3.org/TR/css3-values/#length-value , Safari&apos;s current behavior seems incorrect:
&quot;In cases where the used length cannot be supported, user agents must approximate it in the actual value.&quot;
So Safari should be clamping it to some maximum value instead.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1092305</commentid>
    <comment_count>1</comment_count>
      <attachid>252517</attachid>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2015-05-06 13:48:12 -0700</bug_when>
    <thetext>Created attachment 252517
Copy of JS Fiddle example</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1110353</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2015-07-18 00:56:52 -0700</bug_when>
    <thetext>Filed a Radar for this:
&lt;rdar://problem/21886923&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1121972</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2015-08-28 23:31:37 -0700</bug_when>
    <thetext>A testcase for this has been added to the CSSWG test suite:
https://github.com/w3c/csswg-test/pull/788</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1177178</commentid>
    <comment_count>4</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2016-03-22 16:05:01 -0700</bug_when>
    <thetext>Still broken in Safari Version 9.1 (11601.5.17.1).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1230917</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Rebert">webkit</who>
    <bug_when>2016-09-17 23:11:31 -0700</bug_when>
    <thetext>Still broken in Tech Preview Release 13 (11603.1.5).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1894752</commentid>
    <comment_count>6</comment_count>
    <who name="Ahmad Saleem">ahmad.saleem792</who>
    <bug_when>2022-08-30 02:19:50 -0700</bug_when>
    <thetext>I am not able to reproduce this bug in Safari 15.6.1 and Safari Technology Preview 152 and it does not turn background to red and all other browsers (Firefox Nightly 106 and Chrome Canary 107) are also same and does not turn the background to red.

It might be related to this:

https://github.com/WebKit/WebKit/commit/dad086a7dd9d4b8d46313d35e94881d4a56cf604

I am going to mark this as &quot;RESOLVED CONFIGURATION CHANGED&quot; but if someone can mark this as &quot;DUPLICATE&quot;, if indeed above commit fixed this. Thanks!</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>252517</attachid>
            <date>2015-05-06 13:48:12 -0700</date>
            <delta_ts>2015-05-06 13:48:12 -0700</delta_ts>
            <desc>Copy of JS Fiddle example</desc>
            <filename>example-Lc3vZ.html</filename>
            <type>text/html</type>
            <size>367</size>
            <attacher name="Chris Rebert">webkit</attacher>
            
              <data encoding="base64">PCFET0NUWVBFIGh0bWw+CjxodG1sPgo8aGVhZD4KICA8bWV0YSBodHRwLWVxdWl2PSJjb250ZW50
LXR5cGUiIGNvbnRlbnQ9InRleHQvaHRtbDsgY2hhcnNldD1VVEYtOCI+CiAgPHRpdGxlPiAtIGpz
RmlkZGxlIGRlbW88L3RpdGxlPgogIAogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CiAgICBAbWVk
aWEgKG1pbi13aWR0aDogOTk5OTk5OTk5OXB4KSB7CiAgICBib2R5IHsKICAgICAgICBiYWNrZ3Jv
dW5kLWNvbG9yOiByZWQ7CiAgICB9Cn0KCiAgPC9zdHlsZT4KCgo8L2hlYWQ+Cjxib2R5PgogIFdo
eSBhbSBJIHNlZWluZyByZWQgZXZlbiB0aG91Z2ggbXkgc2NyZWVuIGlzbid0IG1hbnkgbWlsZXMg
d2lkZT8KICAKCjwvYm9keT48L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>