Last Comment Bug 641333 - Remove nsIDOM3Text
: Remove nsIDOM3Text
Status: RESOLVED FIXED
:
Product: Core
Classification: Components
Component: DOM: Core & HTML (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Jonas Sicking (:sicking) PTO Until July 5th
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-03-13 08:36 PDT by :Ms2ger
Modified: 2011-05-24 22:41 PDT (History)
0 users
Ms2ger: in‑testsuite-
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1 (16.23 KB, patch)
2011-03-13 08:36 PDT, :Ms2ger
bzbarsky: review+
Details | Diff | Review
Patch to fix (21.24 KB, patch)
2011-05-23 11:19 PDT, Jonas Sicking (:sicking) PTO Until July 5th
Ms2ger: review+
Details | Diff | Review

Description :Ms2ger 2011-03-13 08:36:59 PDT
Created attachment 519011 [details] [diff] [review]
Patch v1
Comment 1 Boris Zbarsky [:bz] (Out June 25-July 6) 2011-03-14 08:39:07 PDT
Comment on attachment 519011 [details] [diff] [review]
Patch v1

Put a blank line after splitText in the idl, and r=me
Comment 2 :Ms2ger 2011-03-14 12:33:27 PDT
Will do.
Comment 3 Jonas Sicking (:sicking) PTO Until July 5th 2011-05-23 11:19:16 PDT
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 :)
Comment 4 :Ms2ger 2011-05-23 12:25:48 PDT
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?
Comment 5 :Ms2ger 2011-05-23 12:29:26 PDT
You probably need to rev the CDATASection uuid too, but looks good to me otherwise. Do make sure it builds and passes tests, though :)
Comment 6 Jonas Sicking (:sicking) PTO Until July 5th 2011-05-24 22:41:31 PDT
Checked in

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

Thanks for the review!

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