* @throws IOException
*/
private void startCurrentElement()
throws NormalizationException, IOException
{
final LayoutContext layoutContext = currentElement.getLayoutContext();
final CSSValue displayRole = layoutContext.getValue(BoxStyleKeys.DISPLAY_ROLE);
if (DisplayRole.NONE.equals(displayRole))
{
// ignore that element ..
ignoreContext += 1;
// Log.debug("Ignoring element (and all childs) of " +
// layoutContext.getPseudoElement() +
// " as it has Display:NONE");
}
else if (ignoreContext > 0)
{
// keep track of our distance to the first hidden element
ignoreContext += 1;
}
// Log.debug ("Element " + layoutContext.getTagName() + " " + displayRole);
// update counters and strings ...
if (DisplayRole.LIST_ITEM.equals(displayRole))
{
currentElement.incrementCounter("list-item", 1);
}
if (ignoreContext > 0)
{
return;
}
// check, whether the element allows content at all..
// isAllowContentProcessing is false, if the 'content' property
// had been set to 'none' or 'inhibit'.
final ContentSpecification contentSpec =
currentElement.getLayoutContext().getContentSpecification();
if (contentSpec.isAllowContentProcessing() == false)
{
// Quote-the-standard:
// -------------------
// On elements, this inhibits the children of the element from
// being rendered as children of this element, as if the element
// was empty.
//
// On pseudo-elements, this inhibits the creation of the pseudo-element,
// as if 'display' computed to 'none'.
//
// In both cases, this further inhibits the creation of any
// pseudo-elements which have this pseudo-element as a superior.
if (contentSpec.isInhibitContent() &&
layoutContext.isPseudoElement())
{
// Log.debug("Starting to ignore childs of psuedo element " +
// layoutContext.getTagName() + ":" +
// layoutContext.getPseudoElement() +
// " as it inhibits content creation.");