Range no longer works on the trunk

RESOLVED FIXED

Status

RESOLVED FIXED
11 years ago
2 years ago

People

(Reporter: aaronr, Assigned: surkov)

Tracking

Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

(Reporter)

Description

11 years ago
xf:range doesn't work on the trunk anymore.  I see this error in my console: 

************************************************************
* Call to xpconnect wrapped JSObject produced this error:  *
[Exception... "'An error occured throwing an exception' when calling method: [ns
IXFormsUIWidget::refresh]"  nsresult: "0x8057001e (NS_ERROR_XPC_JS_THREW_STRING)
"  location: "JS frame :: chrome://xforms/content/xforms.xml ::  :: line 175"  d
ata: no]
************************************************************
(Reporter)

Comment 1

11 years ago
Created attachment 302865 [details]
testcase

no slider appears when the testcase is run
(Reporter)

Comment 2

11 years ago
I doubt that this is due to XForms.  I debugged it down to trying to get this._context in widgets-xhtml.xml  I can't even say, dump('AARON:   this._context = '+this._context+'\n'); without seeing the failure.
(Reporter)

Comment 3

11 years ago
I just separated out all of the range and slider xbl stuff into a standalone .xbl file (removed the xforms dependencies) and tried it on trunk and it worked.  So it is somehow related to the fact that XForms is in the mix.  But I don't see how that would cause what I'm seeing.
(Reporter)

Updated

11 years ago
Blocks: 417580
(Assignee)

Comment 4

11 years ago
It's pair range widget + slider widget. refresh() method calls min/max/step methods of slider widget and when slider tries to get access to fields then exception thrown. It doesn't matter who calls refresh() method, for example, the same result if it is called from js.
(Assignee)

Comment 5

11 years ago
When I make slider widget as
<binding id="slider">
    <implementation>
      <field name="_minlabel">null</field>
    </implementation>
  </binding>

it fails when I call "_minLabel" from js like range.control._minLabel. The magic should be in range widget.
(Assignee)

Comment 6

11 years ago
It sounds the problem in getControlElement

__proto__: this.ownerDocument.
              getAnonymousElementByAttribute(this, "anonid", "slider")

when I get access to field via control property (getControlElement()) then I fail but if I try it directly then it's ok.
(Assignee)

Updated

11 years ago
Depends on: 420649
(Assignee)

Comment 7

11 years ago
Created attachment 306967 [details] [diff] [review]
patch
Assignee: nobody → surkov.alexander
Status: NEW → ASSIGNED
Attachment #306967 - Flags: review?(aaronr)
(Assignee)

Updated

11 years ago
Attachment #306967 - Flags: review?(Olli.Pettay)
(Reporter)

Comment 8

11 years ago
Comment on attachment 306967 [details] [diff] [review]
patch

Brendan says not to use __proto__ in https://bugzilla.mozilla.org/show_bug.cgi?id=420649#c9 so r-'ing patch.

Thanks for figuring out this bug, Alex.  This'll be a nice bug to get out of the way.
Attachment #306967 - Flags: review?(aaronr) → review-
(Assignee)

Comment 9

11 years ago
Comment on attachment 306967 [details] [diff] [review]
patch

ok, probably we should get rid inheritance from DOM element in our control objects.
Attachment #306967 - Flags: review?(Olli.Pettay)
(Assignee)

Updated

11 years ago
Duplicate of this bug: 421456
(Assignee)

Comment 11

11 years ago
Created attachment 316206 [details] [diff] [review]
patch2
Attachment #306967 - Attachment is obsolete: true
Attachment #316206 - Flags: review?
(Assignee)

Updated

11 years ago
Attachment #316206 - Flags: review? → review?(aaronr)
(Reporter)

Updated

11 years ago
Attachment #316206 - Flags: review?(aaronr) → review+
(Assignee)

Updated

11 years ago
Attachment #316206 - Flags: review?(Olli.Pettay)

Updated

11 years ago
Attachment #316206 - Flags: review?(Olli.Pettay) → review+
(Assignee)

Comment 12

11 years ago
Checking in extensions/xforms/resources/content/range-xhtml.xml;
/cvsroot/mozilla/extensions/xforms/resources/content/range-xhtml.xml,v  <--  range-xhtml.xml
new revision: 1.7; previous revision: 1.6
done

Status: ASSIGNED → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
(Assignee)

Updated

10 years ago
Depends on: 467815
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.