mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-06 17:18:17 +02:00
tpipro, don't use dataprovider for embedded style, silently skip unavailable resources
git-svn-id: trunk@13929 -
This commit is contained in:
parent
1802d34238
commit
c8cf0b9a9f
@ -354,7 +354,12 @@ begin
|
||||
IpParseURL(URL, FileAddrRec);
|
||||
FN := NetToDosPath(FileAddrRec.Path);
|
||||
Result := TMemoryStream.Create;
|
||||
TMemoryStream(Result).LoadFromFile(FN);
|
||||
try
|
||||
TMemoryStream(Result).LoadFromFile(FN);
|
||||
except
|
||||
Result.Free;
|
||||
Result:=nil;
|
||||
end;
|
||||
Finalize(FileAddrRec);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
@ -6765,16 +6765,14 @@ procedure TIpHtml.ParseStyleSheet(Parent: TIpHtmlNode; HRef: String);
|
||||
var
|
||||
StyleStream: TStream;
|
||||
begin
|
||||
if FDataProvider = nil then begin
|
||||
//DebugLn('No dataprovider!');
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
||||
StyleStream:=nil;
|
||||
|
||||
if Parent is TIpHtmlNodeHEAD then begin
|
||||
Href := FDataProvider.BuildURL(CurURL, HRef);
|
||||
StyleStream := FDataProvider.DoGetStream(HRef);
|
||||
if FDataProvider<>nil then begin
|
||||
Href := FDataProvider.BuildURL(CurURL, HRef);
|
||||
StyleStream := FDataProvider.DoGetStream(HRef);
|
||||
end;
|
||||
end else
|
||||
if Parent is TIpHtmlNodeSTYLE then
|
||||
StyleStream := TStringStream.Create(Href);
|
||||
|
Loading…
Reference in New Issue
Block a user