<?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>64782</bug_id>
          
          <creation_ts>2011-07-18 22:12:47 -0700</creation_ts>
          <short_desc>Possible unintentional early return in CSSStyleSelector::applyProperty() for CSSPropertyWebkitTextEmphasisStyle.</short_desc>
          <delta_ts>2011-08-02 16:51:54 -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>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</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>
          <dependson>64784</dependson>
    
    <dependson>64785</dependson>
    
    <dependson>65517</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Luke Macpherson">macpherson</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>hyatt</cc>
    
    <cc>macpherson</cc>
    
    <cc>mitz</cc>
    
    <cc>simon.fraser</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>438961</commentid>
    <comment_count>0</comment_count>
    <who name="Luke Macpherson">macpherson</who>
    <bug_when>2011-07-18 22:12:47 -0700</bug_when>
    <thetext>Just looking at CSSStyleSelector::applyProperty() for the CSSPropertyWebkitTextEmphasisStyle case, and I see:

HANDLE_INHERIT_AND_INITIAL(textEmphasisFill, TextEmphasisFill)
HANDLE_INHERIT_AND_INITIAL(textEmphasisMark, TextEmphasisMark)
HANDLE_INHERIT_AND_INITIAL(textEmphasisCustomMark, TextEmphasisCustomMark)
if (isInherit || isInitial)
    return;

I wanted to check with mitz (svn blame owner) this was the intended behavior - though the more I look at it the more unlikely that seems.
Currently the HANDLE_INHERIT_AND_INITIAL macro will return immediately in the TextEmphasisFill case when (isInherit || isInitial), so the subsequent code is unreachable.

If you can confirm that the intended behavior was to call all three cases, I&apos;ll fix it up during an upcoming refactoring.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>438962</commentid>
    <comment_count>1</comment_count>
    <who name="Luke Macpherson">macpherson</who>
    <bug_when>2011-07-18 22:19:44 -0700</bug_when>
    <thetext>Hmm, I notice the same logical error happens for CSSPropertyWebkitTransformOrigin and CSSPropertyWebkitPerspectiveOrigin have the same issue.

Just goes to show how bad hiding a return statement inside a macro is.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>438963</commentid>
    <comment_count>2</comment_count>
    <who name="">mitz</who>
    <bug_when>2011-07-18 22:21:18 -0700</bug_when>
    <thetext>Thanks for noticing this!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>438964</commentid>
    <comment_count>3</comment_count>
    <who name="Simon Fraser (smfr)">simon.fraser</who>
    <bug_when>2011-07-18 22:26:58 -0700</bug_when>
    <thetext>I hate those macros!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>438966</commentid>
    <comment_count>4</comment_count>
    <who name="Luke Macpherson">macpherson</who>
    <bug_when>2011-07-18 22:36:17 -0700</bug_when>
    <thetext>Working on it, hopefully all those macros will be gone soon.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>