b=26282 r=vidur@netscape.com Now when using the alternate content for an

image that can't be rendered we ignore everything after one of: ; # ?
This commit is contained in:
troy%netscape.com 2000-02-11 01:00:17 +00:00
Родитель 59c456d260
Коммит f15ca67f0e
2 изменённых файлов: 20 добавлений и 4 удалений

Просмотреть файл

@ -7849,13 +7849,21 @@ nsCSSFrameConstructor::ConstructAlternateImageFrame(nsIPresShell* aPresShell,
// extension
aContent->GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::src, altText);
if (altText.Length() > 0) {
// Trim off the path part of the filename
// The path is a hierarchical structure of segments. Get the last substring
// in the path
PRInt32 offset = altText.RFindChar('/');
if (offset >= 0) {
altText.Cut(0, offset + 1);
}
// Trim off the extension
// Ignore fragment identifiers ('#' delimiter), query strings ('?'
// delimiter), and anything beginning with ';'
offset = altText.FindCharInSet("#?;");
if (offset >= 0) {
altText.Truncate(offset);
}
// Trim off any extension (including the '.')
offset = altText.RFindChar('.');
if (offset >= 0) {
altText.Truncate(offset);

Просмотреть файл

@ -7849,13 +7849,21 @@ nsCSSFrameConstructor::ConstructAlternateImageFrame(nsIPresShell* aPresShell,
// extension
aContent->GetAttribute(kNameSpaceID_HTML, nsHTMLAtoms::src, altText);
if (altText.Length() > 0) {
// Trim off the path part of the filename
// The path is a hierarchical structure of segments. Get the last substring
// in the path
PRInt32 offset = altText.RFindChar('/');
if (offset >= 0) {
altText.Cut(0, offset + 1);
}
// Trim off the extension
// Ignore fragment identifiers ('#' delimiter), query strings ('?'
// delimiter), and anything beginning with ';'
offset = altText.FindCharInSet("#?;");
if (offset >= 0) {
altText.Truncate(offset);
}
// Trim off any extension (including the '.')
offset = altText.RFindChar('.');
if (offset >= 0) {
altText.Truncate(offset);