Bug 18329 - REGRESSION: Assertion failure in -[WebViewFactory endOfTextMarkerRange:] when invoking the Dictionary pop-up
Summary: REGRESSION: Assertion failure in -[WebViewFactory endOfTextMarkerRange:] when...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Alice Liu
URL:
Keywords: Regression
Depends on:
Blocks:
 
Reported: 2008-04-06 01:10 PDT by mitz
Modified: 2008-04-08 09:52 PDT (History)
3 users (show)

See Also:


Attachments
patch (1.76 KB, patch)
2008-04-08 01:37 PDT, Alice Liu
mitz: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description mitz 2008-04-06 01:10:24 PDT
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 > Keyboard & 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...)
Comment 1 Alice Liu 2008-04-08 01:37:50 PDT
Created attachment 20401 [details]
patch
Comment 2 Alice Liu 2008-04-08 01:44:45 PDT
in AccessibilityObjectWrapper.mm, in -accessibilityAttributeValue:forParameter:, starting from the comment "// Convert values to WebCore types", we have a few lines of code that "prep" webcore equivalent values of mac-specific types.  Although I'm not too fond of the idea of prepping these values in cases where they'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. 
Comment 3 mitz 2008-04-08 01:48:48 PDT
Comment on attachment 20401 [details]
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
Comment 4 mitz 2008-04-08 01:51:27 PDT
(In reply to comment #2)
> in AccessibilityObjectWrapper.mm, in
> -accessibilityAttributeValue:forParameter:, starting from the comment "//
> Convert values to WebCore types", we have a few lines of code that "prep"
> webcore equivalent values of mac-specific types.  Although I'm not too fond of
> the idea of prepping these values in cases where they'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. 

Just saw this comment. Perhaps you should add a FIXME or file a bug about improving that code in the future.
Comment 5 Alice Liu 2008-04-08 09:52:32 PDT
fixed the changelog, style, and added a fixme comment. 

r31720