<?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>70250</bug_id>
          
          <creation_ts>2011-10-17 11:21:34 -0700</creation_ts>
          <short_desc>Web Inspector: Margin should be correctly displayed for block-level elements with over-constrained widths.</short_desc>
          <delta_ts>2026-01-12 09:05:38 -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>Web Inspector</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>NEW</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="Vsevolod Vlasov">vsevik</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>apavlov</cc>
    
    <cc>bweinstein</cc>
    
    <cc>graouts</cc>
    
    <cc>inspector-bugzilla-changes</cc>
    
    <cc>keishi</cc>
    
    <cc>loislo</cc>
    
    <cc>pfeldman</cc>
    
    <cc>pmuellr</cc>
    
    <cc>rik</cc>
    
    <cc>webkit-bug-importer</cc>
    
    <cc>yurys</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>485306</commentid>
    <comment_count>0</comment_count>
    <who name="Vsevolod Vlasov">vsevik</who>
    <bug_when>2011-10-17 11:21:34 -0700</bug_when>
    <thetext>Element highlighting shows non existing margin for divs with limited width.

To reproduce inspect red square in the example attached.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>485307</commentid>
    <comment_count>1</comment_count>
      <attachid>111287</attachid>
    <who name="Vsevolod Vlasov">vsevik</who>
    <bug_when>2011-10-17 11:22:16 -0700</bug_when>
    <thetext>Created attachment 111287
example of the error</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>485320</commentid>
    <comment_count>2</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2011-10-17 11:40:31 -0700</bug_when>
    <thetext>Yah, I was confused by this the other day. The issue is that, as a display:block,
the rest of the line is is displayed with the &quot;margin&quot; color but it isn&apos;t really a
margin. I don&apos;t know the technical term for this region.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>485324</commentid>
    <comment_count>3</comment_count>
    <who name="Vsevolod Vlasov">vsevik</who>
    <bug_when>2011-10-17 11:45:29 -0700</bug_when>
    <thetext>This could just be called block probably.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>485348</commentid>
    <comment_count>4</comment_count>
    <who name="Joseph Pecoraro">joepeck</who>
    <bug_when>2011-10-17 12:02:06 -0700</bug_when>
    <thetext>Antti just pointed me to:
http://www.w3.org/TR/CSS21/visudet.html#blockwidth

&gt; The following constraints must hold among the used values of the other properties:
&gt; 
&gt;   &apos;margin-left&apos; + &apos;border-left-width&apos; + &apos;padding-left&apos; + &apos;width&apos; + &apos;padding-right&apos; + &apos;border-right-width&apos; + &apos;margin-right&apos; = width of containing block
&gt; 
&gt; If &apos;width&apos; is not &apos;auto&apos; and &apos;border-left-width&apos; + &apos;padding-left&apos; + &apos;width&apos; + &apos;padding-right&apos; + &apos;border-right-width&apos;
&gt; (plus any of &apos;margin-left&apos; or &apos;margin-right&apos; that are not &apos;auto&apos;) is larger than the width of the containing block,
&gt; then any &apos;auto&apos; values for &apos;margin-left&apos; or &apos;margin-right&apos; are, for the following rules, treated as zero.
&gt; 
&gt; If all of the above have a computed value other than &apos;auto&apos;, the values are said to be &quot;over-constrained&quot; and one of
&gt; the used values will have to be different from its computed value. If the &apos;direction&apos; property of the containing block
&gt; has the value &apos;ltr&apos;, the specified value of &apos;margin-right&apos; is ignored and the value is calculated so as to make the
&gt; equality true. If the value of &apos;direction&apos; is &apos;rtl&apos;, this happens to &apos;margin-left&apos; instead.

Seems like in this case that really is the margin.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>485497</commentid>
    <comment_count>5</comment_count>
    <who name="Vsevolod Vlasov">vsevik</who>
    <bug_when>2011-10-17 14:17:52 -0700</bug_when>
    <thetext>Great. We should have correct values in Metrics pane and Computed Style section then. Renaming the bug.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1056420</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-12-17 11:22:37 -0800</bug_when>
    <thetext>&lt;rdar://problem/19281516&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1056473</commentid>
    <comment_count>7</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2014-12-17 11:27:01 -0800</bug_when>
    <thetext>&lt;rdar://problem/19281650&gt;</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="0"
              isprivate="0"
          >
            <attachid>111287</attachid>
            <date>2011-10-17 11:22:16 -0700</date>
            <delta_ts>2011-10-17 11:22:16 -0700</delta_ts>
            <desc>example of the error</desc>
            <filename>div-margin.html</filename>
            <type>text/html</type>
            <size>100</size>
            <attacher name="Vsevolod Vlasov">vsevik</attacher>
            
              <data encoding="base64">PGh0bWw+Cjxib2R5Pgo8ZGl2IHN0eWxlPSJ3aWR0aDoxMDBweDsgaGVpZ2h0OjEwMHB4OyBiYWNr
Z3JvdW5kLWNvbG9yOnJlZDsiPgo8L2Rpdj4KPC9ib2R5Pgo8L2h0bWw+Cg==
</data>

          </attachment>
      

    </bug>

</bugzilla>