ext Christian Biesinger wrote:
Antônio Gomes wrote:
like imgContainer->SetHeight(height);
imgContainer->SetWidth(width);
That's right. imgContainer is just a simple container for image data.
You can't change anything.
What do you mean by "its DOM value :s"?
I meant length (height || width)
Can you answer it in terms of which property you access to check that?
I am accessing "style" property to check both "width and height" as
following:
const PRUnichar styleLiteral[] = { 's', 't', 'y', 'l', 'e', '\0'};
nsCOMPtr<nsIDOMElement> elm;
elm = do_QueryInterface(node);
nsEmbedString style_value;
gchar *v g_strdup_printf("width: %dpx; height: %dpx;", width, height);
nsEmbedCString cValue(v);
NS_CStringToUTF16(cValue, NS_CSTRING_ENCODING_UTF8, style_value);
elm->SetAttribute(nsEmbedString(styleLiteral), style_value);
g_free(v);
So, no matter changes on the height or width of a image in the DOM
Tree, imgContainer will always get me original dimensions of an
image. Is it what you mean ?
Yes.
Is there another way ?
--Antonio Gomes
_______________________________________________
dev-tech-layout mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-tech-layout