Closed Bug 837494 Opened 11 years ago Closed 11 years ago

re-implement `contentStyle*` using the new nsIDOMWindowUtils methods

Categories

(Add-on SDK Graveyard :: General, defect, P1)

x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: zer0, Assigned: zer0)

References

Details

Attachments

(2 files)

Thanks to the works made by Gabor on platform side, now we can apply a stylesheet on a given document (bug 737003) as author sheet (bug 676054 and bug 804120).

So we can implement `contentStyle*` in a better way, without using data: url and global stylesheet; see: https://github.com/mozilla/addon-sdk/wiki/contentStyle-issues for further details.

This implementation will also fixes bug 755606 and bug 759190 too.
Blocks: 755606, 759190
I had already an implementation, but after talking at FOSDEM with Irakli we decided to try another approach, that I'm close to finish.
Assignee: nobody → zer0
Attachment #721850 - Flags: feedback?(rFobic)
Attachment #723734 - Flags: review?(rFobic)
Attachment #723734 - Flags: review?(rFobic) → review+
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/62ce3339c514c1fc097ff355957081c0027f3bea
Merge pull request #848 from ZER0/method

Bug 837494 - re-implement `contentStyle*` using the new nsIDOMWindowUtils methods r=@gozala
Blocks: 785759
This is fixed, right?
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
No is not. Waiting for Irakli's feedback about the implementation, and then creates a review about it. I hope he'll able to take a look soon.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Attachment #721850 - Flags: feedback?(rFobic) → feedback-
Attachment #721850 - Flags: feedback- → review?(rFobic)
Comment on attachment 721850 [details]
Pointer to Github pull request: https://github.com/mozilla/addon-sdk/pull/839

So I made some remarks regarding overall design for which I can take part of blame. Although there are no changes required to an exported API, so I think you should land this change but followup with a fixes to address comments in a pull request.

I also made comments on exported functions names (I DO NOT mean attach / detach)
that is probably better to address before landing unless you disagree with my
suggestions. If you disagree I don't have real issues with leaving names as is too.
Attachment #721850 - Flags: review?(rFobic) → review+
To be clear in previous comment I was referring to naming inconsistencies between `loadSheet` and `removeSheet`.
Commits pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/28fb7faa9d9607c1a031cd31bc809eab28baa7d7
Bug 837494 - re-implement `contentStyle*` using the new nsIDOMWindowUtils methods

- added `mod` module, with `attach`, `detach`, `attachTo`, `detachFrom` and `getWindowTarget`
- added `loadSheet` and `removeSheet` to `stylesheet/utils`
- added `Style` object in `stylesheet/style`
- replace usage of stylesheet services with `attach`/`detach` a `Style` object
- added `weak-set` module

https://github.com/mozilla/addon-sdk/commit/34df9d37472166cba40ee879fcf00bd6cd972e5e
Merge pull request #839 from ZER0/contentStyle/837494

fix Bug 837494 - re-implement `contentStyle*` using the new nsIDOMWindowUtils methods r=@gozala
Status: REOPENED → RESOLVED
Closed: 11 years ago11 years ago
Resolution: --- → FIXED
Blocks: 830121
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: