<?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>18329</bug_id>
          
          <creation_ts>2008-04-06 01:10:24 -0700</creation_ts>
          <short_desc>REGRESSION: Assertion failure in -[WebViewFactory endOfTextMarkerRange:] when invoking the Dictionary pop-up</short_desc>
          <delta_ts>2008-04-08 09:52:32 -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>Accessibility</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>OS X 10.5</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>Regression</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>mitz</reporter>
          <assigned_to name="Alice Liu">alice.barraclough</assigned_to>
          <cc>alice.barraclough</cc>
    
    <cc>ap</cc>
    
    <cc>bdakin</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>76413</commentid>
    <comment_count>0</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-04-06 01:10:24 -0700</bug_when>
    <thetext>Steps to reproduce:
1. On this page, move the mouse cursor over a word.
2. Press Command-Control-D (or whatever the keyboard shortcut for Look up in Dictionary is; see System Preferences &gt; Keyboard &amp; Mouse).

Result:
ASSERTION FAILED: range != nil
(WebKit/mac/WebCoreSupport/WebViewFactory.mm:405 WebCoreTextMarker* -[WebViewFactory endOfTextMarkerRange:](WebViewFactory*, objc_selector*, WebCoreTextMarkerRange*))

Backtrace:
#0  0x003b5103 in -[WebViewFactory endOfTextMarkerRange:] (self=0x3eb58a0, _cmd=0x26d7548, range=0x0) at WebKit/mac/WebCoreSupport/WebViewFactory.mm:405
#1  0x0236310b in visiblePositionForEndOfTextMarkerRange (textMarkerRange=0x0) at WebCore/page/mac/AccessibilityObjectWrapper.mm:160
#2  0x02363136 in -[AccessibilityObjectWrapper visiblePositionRangeForTextMarkerRange:] (self=0x17aa8c70, _cmd=0x26d77c0, textMarkerRange=0x0) at WebCore/page/mac/AccessibilityObjectWrapper.mm:575
#3  0x02366323 in -[AccessibilityObjectWrapper accessibilityAttributeValue:forParameter:] (self=0x17aa8c70, _cmd=0x94df6efc, attribute=0x19d0617c, parameter=0x17aa0220) at WebCore/page/mac/AccessibilityObjectWrapper.mm:1214
#4  0x19d0391b in DSAXGetTextOrigin ()
(More stack frames follow...)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76576</commentid>
    <comment_count>1</comment_count>
      <attachid>20401</attachid>
    <who name="Alice Liu">alice.barraclough</who>
    <bug_when>2008-04-08 01:37:50 -0700</bug_when>
    <thetext>Created attachment 20401
patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76577</commentid>
    <comment_count>2</comment_count>
    <who name="Alice Liu">alice.barraclough</who>
    <bug_when>2008-04-08 01:44:45 -0700</bug_when>
    <thetext>in AccessibilityObjectWrapper.mm, in -accessibilityAttributeValue:forParameter:, starting from the comment &quot;// Convert values to WebCore types&quot;, we have a few lines of code that &quot;prep&quot; webcore equivalent values of mac-specific types.  Although I&apos;m not too fond of the idea of prepping these values in cases where they&apos;re not needed, having it all in one section makes the rest of the code easier to compare to what used to be in WebCoreAXObject.cpp, and thus easier for debugging in this transition period. </thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76578</commentid>
    <comment_count>3</comment_count>
      <attachid>20401</attachid>
    <who name="">mitz</who>
    <bug_when>2008-04-08 01:48:48 -0700</bug_when>
    <thetext>Comment on attachment 20401
patch

Please add the bug URL and title to the change log.

+    if (textMarker != nil)
+    if (textMarkerRange != nil)

According to the style guidelines these should be written as
+    if (textMarker)
+    if (textMarkerRange)

r=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76579</commentid>
    <comment_count>4</comment_count>
    <who name="">mitz</who>
    <bug_when>2008-04-08 01:51:27 -0700</bug_when>
    <thetext>(In reply to comment #2)
&gt; in AccessibilityObjectWrapper.mm, in
&gt; -accessibilityAttributeValue:forParameter:, starting from the comment &quot;//
&gt; Convert values to WebCore types&quot;, we have a few lines of code that &quot;prep&quot;
&gt; webcore equivalent values of mac-specific types.  Although I&apos;m not too fond of
&gt; the idea of prepping these values in cases where they&apos;re not needed, having it
&gt; all in one section makes the rest of the code easier to compare to what used to
&gt; be in WebCoreAXObject.cpp, and thus easier for debugging in this transition
&gt; period. 

Just saw this comment. Perhaps you should add a FIXME or file a bug about improving that code in the future.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>76620</commentid>
    <comment_count>5</comment_count>
    <who name="Alice Liu">alice.barraclough</who>
    <bug_when>2008-04-08 09:52:32 -0700</bug_when>
    <thetext>fixed the changelog, style, and added a fixme comment. 

r31720</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>20401</attachid>
            <date>2008-04-08 01:37:50 -0700</date>
            <delta_ts>2008-04-08 01:48:48 -0700</delta_ts>
            <desc>patch</desc>
            <filename>patch.txt</filename>
            <type>text/plain</type>
            <size>1803</size>
            <attacher name="Alice Liu">alice.barraclough</attacher>
            
              <data encoding="base64">SW5kZXg6IENoYW5nZUxvZwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09Ci0tLSBDaGFuZ2VMb2cJKHJldmlzaW9uIDMxNzE5
KQorKysgQ2hhbmdlTG9nCSh3b3JraW5nIGNvcHkpCkBAIC0xLDMgKzEsMTQgQEAKKzI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pb24sIHJhbmdlLmxlbmd0aCk7CiAK
</data>
<flag name="review"
          id="8882"
          type_id="1"
          status="+"
          setter="mitz"
    />
          </attachment>
      

    </bug>

</bugzilla>