The default bug view has changed. See this FAQ.

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: Ms2ger, Assigned: sicking)

Tracking

Trunk
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

6 years ago
Created attachment 519011 [details] [diff] [review]
Patch v1
Attachment #519011 - Flags: review?(bzbarsky)
Flags: in-testsuite-
(Reporter)

Updated

6 years ago
Whiteboard: [needs review]
Comment on attachment 519011 [details] [diff] [review]
Patch v1

Put a blank line after splitText in the idl, and r=me
Attachment #519011 - Flags: review?(bzbarsky) → review+
(Reporter)

Comment 2

6 years ago
Will do.
Whiteboard: [needs review] → [needs patch]
Created attachment 534495 [details] [diff] [review]
Patch to fix

Patch to fix

I accidentally rewrote this patch having forgotten that ms2ger already had. However turns out this was a good thing as he's telling me that his patch doesn't quite work.

So here is mine :)
Assignee: Ms2ger → jonas
Attachment #519011 - Attachment is obsolete: true
Attachment #534495 - Flags: review?
Whiteboard: [needs patch]
(Reporter)

Updated

6 years ago
Attachment #534495 - Flags: review? → review?(Ms2ger)
(Reporter)

Comment 4

6 years ago
Comment on attachment 534495 [details] [diff] [review]
Patch to fix

>--- a/content/base/src/nsGenericDOMDataNode.cpp
>+++ b/content/base/src/nsGenericDOMDataNode.cpp
>+nsGenericDOMDataNode::ReplaceWholeText(const nsAString& aContent,
>+  SetText(aContent.BeginReading(), aContent.Length(), PR_TRUE);
>+  return CallQueryInterface(this, aResult);
>+
>+  return NS_OK;
> }

The latter return should surely go.

>diff --git a/dom/interfaces/core/nsIDOM3Text.idl b/dom/interfaces/core/nsIDOM3Text.idl
>--- a/dom/interfaces/core/nsIDOM3Text.idl
>+++ b/dom/interfaces/core/nsIDOM3Text.idl

Why not remove the file altogether?

>diff --git a/dom/interfaces/core/nsIDOMText.idl b/dom/interfaces/core/nsIDOMText.idl
>--- a/dom/interfaces/core/nsIDOMText.idl
>+++ b/dom/interfaces/core/nsIDOMText.idl
>@@ -42,14 +42,38 @@
> /**
>  * The nsIDOMText interface inherits from nsIDOMCharacterData and represents 
>  * the textual content (termed character data in XML) of an Element or Attr.
>  *
>  * For more information on this interface please see 
>  * http://www.w3.org/TR/DOM-Level-2-Core/
>  */

Link to a more recent spec, perhaps?

>diff --git a/js/src/xpconnect/src/dom_quickstubs.qsconf b/js/src/xpconnect/src/dom_quickstubs.qsconf
>--- a/js/src/xpconnect/src/dom_quickstubs.qsconf
>+++ b/js/src/xpconnect/src/dom_quickstubs.qsconf
>-    'nsIDOM3Text_': {
>-        'thisType': 'nsGenericTextNode'
>-        },
>-    'nsIDOM3Text_IsElementContentWhitespace': {
>-        'thisType': 'nsGenericTextNode',
>-        'code': '    PRBool result = self->IsElementContentWhitespace();',
>-        'canFail': False
>-        },
>-    'nsIDOM3Text_ReplaceWholeText': {
>-        'thisType': 'nsGenericTextNode',
>-        'code': '    nsIContent* result = '
>-                'self->ReplaceWholeText(PromiseFlatString(arg0), &rv);'
>-        },

Did this code even work, without having those methods listed in the members array?
Attachment #534495 - Flags: review?(Ms2ger) → review+
(Reporter)

Comment 5

6 years ago
You probably need to rev the CDATASection uuid too, but looks good to me otherwise. Do make sure it builds and passes tests, though :)
Checked in

http://hg.mozilla.org/mozilla-central/rev/111ca3e50989

Thanks for the review!
Status: ASSIGNED → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.