Closed Bug 826834 Opened 10 years ago Closed 9 years ago

Support sharing HTML so we can share with more apps in Windows 8


(Core :: Widget: Win32, defect)

Windows 8.1
Not set





(Reporter: bbondy, Assigned: bbondy)



(Whiteboard: [metro-it2][LOE:1][completed-elm])


(1 file, 2 obsolete files)

We currently support sharing only what's selected but it is text only.
This should also support HTML text selections.
I really like this feature by the way for sharing to the mail app and to evernote. I did most of this over the holidays, just finished up today.
Attached patch Patch v1 (obsolete) — Splinter Review
Assignee: nobody → netzen
Attachment #698069 - Flags: review?(jmathies)
This line is for parity with IE10:

It shows up on the sharing panes better for a bunch of apps when you do that.
Comment on attachment 698069 [details] [diff] [review]
Patch v1

On the winrt bits, r+. Forwarding the review on the logic in _expandURLs to ehsan.
Attachment #698069 - Flags: review?(jmathies)
Attachment #698069 - Flags: review?(ehsan)
Attachment #698069 - Flags: review+
ehsan let me know if you can think of other important tags you think we should expand as well assuming the expanding code is OK.
Comment on attachment 698069 [details] [diff] [review]
Patch v1

Review of attachment 698069 [details] [diff] [review]:

::: widget/windows/winrt/MetroUIUtils.js
@@ +97,5 @@
> +      } else {
> +        this._expandURLs(n.children[i]);
> +      }
> +    }
> +  },

Stealing ideas from <>, you want to handle things like:

* form.action
* link.href
* img.longdesc

Attachment #698069 - Flags: review?(ehsan) → review-
Attached patch Patch v2 (obsolete) — Splinter Review
expanded support for resolving URLs. 
Also changed to getAttribute/setAttribute because the previous trick no longer worked for some attributes.
Attachment #698069 - Attachment is obsolete: true
Attachment #698819 - Flags: review?(ehsan)
Comment on attachment 698819 [details] [diff] [review]
Patch v2

Review of attachment 698819 [details] [diff] [review]:

Actually let me replace all those toLower() calls with a single one.
Attachment #698819 - Flags: review?(ehsan)
Attached patch Patch v3.Splinter Review
Attachment #698819 - Attachment is obsolete: true
Attachment #698823 - Flags: review?(ehsan)
Comment on attachment 698823 [details] [diff] [review]
Patch v3.

Review of attachment 698823 [details] [diff] [review]:

Sorry for being pedantic, but this code can be made less horrible if you define a data table like below and just iterate over it.  r=me with that.

  'a': 'href',
  'img': ['src', 'longdesc'],
Attachment #698823 - Flags: review?(ehsan) → review+
ok sounds good.
Implemented comments as per comment 10
Whiteboard: [metro-it2][LOE:1] → [metro-it2][LOE:1][completed-elm]
(In reply to comment #12)
> Implemented comments as per comment 10

Nit on you should probably use const.
Duplicate of this bug: 823961
No longer blocks: 801131
Blocks: 833123
This was part of the elm -> m-c migration.
Closed: 9 years ago
Resolution: --- → FIXED
OS: Windows 8 Metro → Windows 8.1
You need to log in before you can comment on or make changes to this bug.