зеркало из https://github.com/mozilla/pjs.git
Bug 302566. Show canvas fallback content when script is disabled. r=tnikkel
This commit is contained in:
Родитель
2984aa828a
Коммит
4b34d03fa6
|
@ -3527,7 +3527,7 @@ nsCSSFrameConstructor::FindHTMLData(Element* aElement,
|
|||
SIMPLE_TAG_CREATE(frameset, NS_NewHTMLFramesetFrame),
|
||||
SIMPLE_TAG_CREATE(iframe, NS_NewSubDocumentFrame),
|
||||
COMPLEX_TAG_CREATE(button, &nsCSSFrameConstructor::ConstructButtonFrame),
|
||||
SIMPLE_TAG_CREATE(canvas, NS_NewHTMLCanvasFrame),
|
||||
SIMPLE_TAG_CHAIN(canvas, nsCSSFrameConstructor::FindCanvasData),
|
||||
#if defined(MOZ_MEDIA)
|
||||
SIMPLE_TAG_CREATE(video, NS_NewHTMLVideoFrame),
|
||||
SIMPLE_TAG_CREATE(audio, NS_NewHTMLVideoFrame),
|
||||
|
@ -3638,6 +3638,20 @@ nsCSSFrameConstructor::FindObjectData(Element* aElement,
|
|||
sObjectData, ArrayLength(sObjectData));
|
||||
}
|
||||
|
||||
/* static */
|
||||
const nsCSSFrameConstructor::FrameConstructionData*
|
||||
nsCSSFrameConstructor::FindCanvasData(Element* aElement,
|
||||
nsStyleContext* aStyleContext)
|
||||
{
|
||||
if (!aElement->OwnerDoc()->IsScriptEnabled()) {
|
||||
return nsnull;
|
||||
}
|
||||
|
||||
static const FrameConstructionData sCanvasData =
|
||||
SIMPLE_FCDATA(NS_NewHTMLCanvasFrame);
|
||||
return &sCanvasData;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsCSSFrameConstructor::ConstructFrameFromItemInternal(FrameConstructionItem& aItem,
|
||||
nsFrameConstructorState& aState,
|
||||
|
|
|
@ -1201,6 +1201,8 @@ private:
|
|||
FindInputData(Element* aElement, nsStyleContext* aStyleContext);
|
||||
static const FrameConstructionData*
|
||||
FindObjectData(Element* aElement, nsStyleContext* aStyleContext);
|
||||
static const FrameConstructionData*
|
||||
FindCanvasData(Element* aElement, nsStyleContext* aStyleContext);
|
||||
|
||||
/* Construct a frame from the given FrameConstructionItem. This function
|
||||
will handle adding the frame to frame lists, processing children, setting
|
||||
|
|
Загрузка…
Ссылка в новой задаче