Last Comment Bug 300870 - Ephemeral message: Does not support src and displays both inline and binding text
: Ephemeral message: Does not support src and displays both inline and binding ...
Status: RESOLVED DUPLICATE of bug 338135
:
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: x86 All
: -- normal (vote)
: ---
Assigned To: Merle Sterling
: Stephen Pride
Mentors:
: 301607 (view as bug list)
Depends on:
Blocks: 322255 326372 326373
  Show dependency treegraph
 
Reported: 2005-07-14 21:46 PDT by aaronr
Modified: 2016-07-15 14:46 PDT (History)
4 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
external resource file for testcase (30 bytes, text/plain)
2005-07-14 21:47 PDT, aaronr
no flags Details
testcase (1.44 KB, application/xhtml+xml)
2005-07-14 21:50 PDT, aaronr
no flags Details

Description aaronr 2005-07-14 21:46:40 PDT
Right now if you have an ephemeral message with both a single node bind and
inline text, both will show.  Also, an ephemeral message will not link to an
external resource (via @src).
Comment 1 aaronr 2005-07-14 21:47:51 PDT
Created attachment 189388 [details]
external resource file for testcase
Comment 2 aaronr 2005-07-14 21:50:03 PDT
Created attachment 189389 [details]
testcase
Comment 3 aaronr 2005-07-20 16:13:20 PDT
As part of https://bugzilla.mozilla.org/show_bug.cgi?id=300255 I'll be checking
in code that will sniff the external resource (value of the @src) to make sure
that it exists before going off to do all of the work that
nsXFormsMessageElement does when it displays a message.  For ephemeral messages,
it would make sense not to sniff, but rather grab the resource and cache its
contents to later be used in: nsXFormsMessageElement::HandleEphemeralMessage().
 Please consider this while fixing this bug.
Comment 4 Allan Beaufour 2005-07-25 06:55:14 PDT
*** Bug 301607 has been marked as a duplicate of this bug. ***
Comment 5 Doron Rosenberg (IBM) 2006-03-27 15:59:19 PST
So here is what is happening:

NS_IMETHODIMP
nsXFormsMessageElement::GetInsertionPoint(nsIDOMElement **aElement)
{
  NS_IF_ADDREF(*aElement = mVisualElement);
  return NS_OK;
}

GetInsertionPoint returns the visual element that we show/hide, so the text content of the xforms:message is added.

However, DOM3NODE->SetTextContent() does not overwrite that value, so we end up with this bug.  Returning null for GetInsertionPoint makes the testcase work, but obviously won't display inline text anymore.

Any ideas how we should handle this?  Aaron says we have crashers in repeat if we return null in GetInsertionPoint, so not sure if that is safe for message or not.
Comment 6 Allan Beaufour 2006-03-28 02:15:06 PST
(In reply to comment #5)
> Any ideas how we should handle this?  Aaron says we have crashers in repeat if
> we return null in GetInsertionPoint, so not sure if that is safe for message 
> or not.

We definately have some problems with that. I think XTF is to blame somehow, and I think it is related to (if not the same as) the crash in bug 330903.
Comment 7 Steve Speicher 2006-04-13 12:13:24 PDT
This fails testsuite testcase: 8.3.5.c
Comment 8 Merle Sterling 2006-05-24 09:39:03 PDT
Linking to an external resource via @src is fixed by the initial patch for bug 338135, but single node binding was not implemented. Because the two bugs are closely related and the fix must work for both, I am duping this bug to 338135.
 

*** This bug has been marked as a duplicate of 338135 ***

Note You need to log in before you can comment on or make changes to this bug.