Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapting bookmarks to allow rendering blobs #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

albertopq
Copy link
Contributor

No description provided.

@albertopq albertopq force-pushed the bookmarks-sites branch 3 times, most recently from 4d9894a to b2ab864 Compare August 18, 2015 17:35
@@ -389,7 +389,8 @@ window.GaiaAppIcon = (function(exports) {
};

proto._relayout = function() {
this._size = this.clientWidth;
var bookmarkIcon = this.bookmark && this.bookmark.icon;
this._size = this.clientWidth || (bookmarkIcon && bookmarkIcon.size);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not certain this change makes sense - the component is designed to be added to the DOM before it gets refreshed so it can know its size (alternatively, a size can be set on it via style, I suppose?) - this just means we may end up with badly scaled icons when it does get added to the DOM (even if bookmarkIcon.size ends up larger than clientWidth, down-scaling can also look bad and wastes memory).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that we are not appending the element to the DOM in the case of the chrome. We just replace the backgroundImage with the one created by the component. I tried to set the size via style without adding it to the DOM and didn't seem to work for me...

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, I see - why don't we use the component instead of taking its background image? The problem is this will break that optimisation for bookmarks when the component is being used normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants