Closed Bug 641333 Opened 13 years ago Closed 13 years ago

Remove nsIDOM3Text

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: Ms2ger, Assigned: sicking)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Patch v1 (obsolete) — Splinter Review
      No description provided.
Attachment #519011 - Flags: review?(bzbarsky)
Flags: in-testsuite-
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+
Will do.
Whiteboard: [needs review] → [needs patch]
Attached patch Patch to fixSplinter Review
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]
Attachment #534495 - Flags: review? → review?(Ms2ger)
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+
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
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: