- All Implemented Interfaces:
- ErrorHandler
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidcomputedStyleError(CSSElement element, String propertyName, CSSPropertyValueException exception) Error found in computed style declaration.voidcomputedStyleWarning(CSSElement element, String propertyName, CSSPropertyValueException exception) Error found in computed style declaration.getComputedStyleErrors(CSSElement element) getComputedStyleWarnings(CSSElement element) getHintErrors(CSSElement element) Get the error handler for the given element's inline style.Gets the owners of inline styles that have been processed through this handler.getPolicyError(Node node) Deprecated.protected abstract AbstractCSSStyleSheetFactorybooleanCheck whether this handler has processed computed style errors.booleanhasComputedStyleErrors(CSSElement element) Check whether this handler has processed computed style errors for the given element.booleanCheck whether this handler has processed computed style warnings.booleanhasComputedStyleWarnings(CSSElement element) Check whether this handler has processed computed style warnings for the given element.booleanCheck whether this handler has processed any non-transient error.protected booleanprotected booleanbooleanCheck whether this handler has processed any I/O errors.booleanCheck whether this handler has processed any media-related errors.booleanCheck whether this handler has processed any media-related warnings.booleanCheck whether this handler has processed any policy errors.booleanCheck whether this handler has processed any warnings.voidinlineStyleError(CSSElement owner, Exception e, String style) Report a problem with setting an inline style, that caused an exception to be thrown by lower-level parsing (SAC).voidioError(String uri, IOException exception) A I/O error was found when retrieving a resource while processing an attribute (usuallyhref) or a rule, generally an @import or @font-face rule.voidlinkedSheetError(Exception e, CSSStyleSheet sheet) Report an error associated to aLinkStylestyle sheet (i.e.voidlinkedStyleError(Node node, String message) Report an error related to linked style, where it was not possible to create the style sheet linked fromnodedue to an issue with the given node or other node in the document (as opposed to an issue with the linked style sheet itself).voidmediaQueryError(Node ownerNode, CSSMediaException exception) Report a media query error.voidmediaQueryWarning(Node ownerNode, CSSMediaException exception) Report a media query warning.voidpolicyError(Node node, String message) Report a policy error, including possible security issues.voidWhile computing a style, an error was found when processing the presentational hints of an element.voidreset()Reset the error handler.voidReset the error state about computed styles and presentational hints.voidresetComputedStyleErrors(CSSElement element) Reset the error state about computed styles and presentational hints for the given element.voidruleIOError(String uri, IOException exception) Deprecated.
- 
Constructor Details- 
DefaultErrorHandlerpublic DefaultErrorHandler()
 
- 
- 
Method Details- 
hasErrorspublic boolean hasErrors()Description copied from interface:ErrorHandlerCheck whether this handler has processed any non-transient error.I/O errors are not taken into account by this method. - Specified by:
- hasErrorsin interface- ErrorHandler
- Returns:
- trueif this handler processed any non-transient errors.
 
- 
linkedStyleErrorDescription copied from interface:ErrorHandlerReport an error related to linked style, where it was not possible to create the style sheet linked fromnodedue to an issue with the given node or other node in the document (as opposed to an issue with the linked style sheet itself).- Parameters:
- node- the node where the error happened.
- message- a message describing the error.
 
- 
linkedSheetErrorDescription copied from interface:ErrorHandlerReport an error associated to aLinkStylestyle sheet (i.e.LINKorSTYLEelements), that caused an exception to be thrown.- Parameters:
- e- the exception describing the problem.
- sheet- the linked or embedded style sheet.
 
- 
inlineStyleErrorDescription copied from interface:ErrorHandlerReport a problem with setting an inline style, that caused an exception to be thrown by lower-level parsing (SAC).This method is triggered only in two (unlikely) cases: - If a problem appears when instantiating a SAC parser.
- When the SAC parser throws a CSSException.
 The NSAC parser does not throw a CSSExceptionif there is an error handler set (and in this implementation there is always one), although other parsers may.- Parameters:
- owner- the element owning the inline style.
- e- the exception describing the problem.
- style- the inline style.
 
- 
resetpublic void reset()Description copied from interface:ErrorHandlerReset the error handler.After calling this method, ErrorHandler.hasErrors()andErrorHandler.hasWarnings()must return false;- Specified by:
- resetin interface- ErrorHandler
 
- 
getLinkedStyleErrors
- 
getInlineStyleErrors
- 
getLinkedSheetErrors
- 
getInlineStyleErrorHandlerDescription copied from interface:ErrorHandlerGet the error handler for the given element's inline style.- Specified by:
- getInlineStyleErrorHandlerin interface- ErrorHandler
- Parameters:
- owner- the element that owns the inline style.
- Returns:
- the style's error handler. Implementations are allowed to return
         nullif the element has no inline style.
 
- 
getInlineStyleOwnersGets the owners of inline styles that have been processed through this handler.- Returns:
- the owners of the inline styles with error handlers, or nullif this handler has not processed any inline style.
 
- 
hasInlineErrorsprotected boolean hasInlineErrors()
- 
hasInlineWarningsprotected boolean hasInlineWarnings()
- 
policyErrorDescription copied from interface:ErrorHandlerReport a policy error, including possible security issues.- Specified by:
- policyErrorin interface- ErrorHandler
- Parameters:
- node- the node that caused the policy violation, or where it was detected.
- message- a message describing the error.
 
- 
computedStyleErrorpublic void computedStyleError(CSSElement element, String propertyName, CSSPropertyValueException exception) Description copied from interface:ErrorHandlerError found in computed style declaration.This means that an error could only be found when processing the values for computing the style. - Specified by:
- computedStyleErrorin interface- ErrorHandler
- Parameters:
- element- the element for which the style was computed.
- propertyName- the name of the property involved in error.
- exception- the exception describing the error.
 
- 
mediaQueryErrorDescription copied from interface:ErrorHandlerReport a media query error.- Specified by:
- mediaQueryErrorin interface- ErrorHandler
- Parameters:
- ownerNode- the node that ultimately owns the sheet or rule where the media query appears (even if it is inside a nested sheet/rule, the node responsible is the one that owns the top-most style sheet).
- exception- the exception describing the error.
 
- 
ruleIOErrorDeprecated.Description copied from interface:ErrorHandlerA I/O error was produced when retrieving a resource while processing a rule, generally an @import or @font-face rule.- Specified by:
- ruleIOErrorin interface- ErrorHandler
- Parameters:
- uri- the uri for the resource.
- exception- the exception describing the problem.
- See Also:
 
- 
ioErrorDescription copied from interface:ErrorHandlerA I/O error was found when retrieving a resource while processing an attribute (usuallyhref) or a rule, generally an @import or @font-face rule.- Specified by:
- ioErrorin interface- ErrorHandler
- Parameters:
- uri- the uri for the resource.
- exception- the exception describing the problem.
 
- 
hasPolicyErrorspublic boolean hasPolicyErrors()Description copied from interface:ErrorHandlerCheck whether this handler has processed any policy errors.- Specified by:
- hasPolicyErrorsin interface- ErrorHandler
- Returns:
- trueif this handler processed any policy errors.
 
- 
hasIOErrorspublic boolean hasIOErrors()Description copied from interface:ErrorHandlerCheck whether this handler has processed any I/O errors.- Specified by:
- hasIOErrorsin interface- ErrorHandler
- Returns:
- trueif this handler processed any I/O errors.
 
- 
hasComputedStyleErrorspublic boolean hasComputedStyleErrors()Description copied from interface:ErrorHandlerCheck whether this handler has processed computed style errors.Presentational hint errors are included in this category, as they are found during style computation. - Specified by:
- hasComputedStyleErrorsin interface- ErrorHandler
- Returns:
- trueif this handler processed computed style errors.
 
- 
hasComputedStyleErrorsDescription copied from interface:ErrorHandlerCheck whether this handler has processed computed style errors for the given element.Presentational hint errors are included in this category, as they are found during style computation. - Specified by:
- hasComputedStyleErrorsin interface- ErrorHandler
- Parameters:
- element- the element.
- Returns:
- trueif this handler processed computed style errors.
 
- 
hasMediaErrorspublic boolean hasMediaErrors()Description copied from interface:ErrorHandlerCheck whether this handler has processed any media-related errors.- Specified by:
- hasMediaErrorsin interface- ErrorHandler
- Returns:
- trueif this handler processed any media-related errors.
 
- 
hasWarningspublic boolean hasWarnings()Description copied from interface:ErrorHandlerCheck whether this handler has processed any warnings.- Specified by:
- hasWarningsin interface- ErrorHandler
- Returns:
- trueif this handler processed any warnings.
 
- 
hasMediaWarningspublic boolean hasMediaWarnings()Description copied from interface:ErrorHandlerCheck whether this handler has processed any media-related warnings.- Specified by:
- hasMediaWarningsin interface- ErrorHandler
- Returns:
- trueif this handler processed any media-related warnings.
 
- 
hasComputedStyleWarningspublic boolean hasComputedStyleWarnings()Description copied from interface:ErrorHandlerCheck whether this handler has processed computed style warnings.- Specified by:
- hasComputedStyleWarningsin interface- ErrorHandler
- Returns:
- trueif this handler processed computed style warnings.
 
- 
hasComputedStyleWarningsDescription copied from interface:ErrorHandlerCheck whether this handler has processed computed style warnings for the given element.- Specified by:
- hasComputedStyleWarningsin interface- ErrorHandler
- Parameters:
- element- the element.
- Returns:
- trueif this handler processed computed style warnings.
 
- 
computedStyleWarningpublic void computedStyleWarning(CSSElement element, String propertyName, CSSPropertyValueException exception) Description copied from interface:ErrorHandlerError found in computed style declaration.This means that an error could only be found when processing the values for computing the style. - Specified by:
- computedStyleWarningin interface- ErrorHandler
- Parameters:
- element- the element for which the style was computed.
- propertyName- the property name.
- exception- the exception describing the error.
 
- 
mediaQueryWarningDescription copied from interface:ErrorHandlerReport a media query warning.- Specified by:
- mediaQueryWarningin interface- ErrorHandler
- Parameters:
- ownerNode- the node that ultimately owns the sheet or rule where the media query appears (even if it is inside a nested sheet/rule, the node responsible is the one that owns the top-most style sheet).
- exception- the exception describing the issue.
 
- 
getPolicyError
- 
getComputedStyleErrors
- 
getHintErrors
- 
getComputedStyleWarnings
- 
getPolicyErrors
- 
getMediaErrors
- 
getRuleIOErrorsDeprecated.
- 
getIOErrors
- 
resetComputedStyleErrorsDescription copied from interface:ErrorHandlerReset the error state about computed styles and presentational hints for the given element.- Specified by:
- resetComputedStyleErrorsin interface- ErrorHandler
 
- 
resetComputedStyleErrorspublic void resetComputedStyleErrors()Description copied from interface:ErrorHandlerReset the error state about computed styles and presentational hints.- Specified by:
- resetComputedStyleErrorsin interface- ErrorHandler
 
- 
presentationalHintErrorDescription copied from interface:ErrorHandlerWhile computing a style, an error was found when processing the presentational hints of an element.- Specified by:
- presentationalHintErrorin interface- ErrorHandler
- Parameters:
- elm- the element.
- ex- the exception describing the error found.
 
- 
getStyleSheetFactory
 
-