private static void insertGeneratedContent( LayoutContext c, Element element, CalculatedStyle parentStyle, String peName, List children, ChildBoxInfo info) { CascadedStyle peStyle = c.getCss().getPseudoElementStyle(element, peName); if (peStyle != null) { PropertyDeclaration contentDecl = (PropertyDeclaration) peStyle.propertyByName(CSSName.CONTENT); PropertyDeclaration counterResetDecl = (PropertyDeclaration) peStyle.propertyByName(CSSName.COUNTER_RESET); PropertyDeclaration counterIncrDecl = (PropertyDeclaration) peStyle.propertyByName(CSSName.COUNTER_INCREMENT); CalculatedStyle calculatedStyle = null; if (contentDecl != null || counterResetDecl != null || counterIncrDecl != null) { calculatedStyle = parentStyle.deriveStyle(peStyle); if (calculatedStyle.isDisplayNone()) return; if (calculatedStyle.isIdent(CSSName.CONTENT, IdentValue.NONE)) return; if (calculatedStyle.isIdent(CSSName.CONTENT, IdentValue.NORMAL) && (peName.equals("before") || peName.equals("after"))) return; c.resolveCounters(calculatedStyle); } if (contentDecl != null) { CSSPrimitiveValue propValue = contentDecl.getValue(); children.addAll(createGeneratedContent(c, element, peName, calculatedStyle, (PropertyValue) propValue, info)); } } }
private static void insertGeneratedContent( LayoutContext c, Element element, CalculatedStyle parentStyle, String peName, List children, ChildBoxInfo info) { CascadedStyle peStyle = c.getCss().getPseudoElementStyle(element, peName); if (peStyle != null) { PropertyDeclaration contentDecl = peStyle.propertyByName(CSSName.CONTENT); PropertyDeclaration counterResetDecl = peStyle.propertyByName(CSSName.COUNTER_RESET); PropertyDeclaration counterIncrDecl = peStyle.propertyByName(CSSName.COUNTER_INCREMENT); CalculatedStyle calculatedStyle = null; if (contentDecl != null || counterResetDecl != null || counterIncrDecl != null) { calculatedStyle = parentStyle.deriveStyle(peStyle); if (calculatedStyle.isDisplayNone()) return; if (calculatedStyle.isIdent(CSSName.CONTENT, IdentValue.NONE)) return; if (calculatedStyle.isIdent(CSSName.CONTENT, IdentValue.NORMAL) && (peName.equals("before") || peName.equals("after"))) return; c.resolveCounters(calculatedStyle); } if (contentDecl != null) { CSSPrimitiveValue propValue = contentDecl.getValue(); children.addAll(createGeneratedContent(c, element, peName, calculatedStyle, (PropertyValue) propValue, info)); } } }
Element currentlyHovered = getHoveredElement(c.getCss(), box);
Element currentlyHovered = getHoveredElement(c.getCss(), box);
if (e != null) { style = c.getSharedContext().getStyle(e, true); style = style.deriveStyle(c.getCss().getPseudoElementStyle(e, pe)); } else { BlockBox container = (BlockBox)getParent().getParent(); e = container.getElement(); style = c.getSharedContext().getStyle(e, true); style = style.deriveStyle(c.getCss().getPseudoElementStyle(e, pe)); style = style.createAnonymousStyle(IdentValue.INLINE);
if (e != null) { style = c.getSharedContext().getStyle(e, true); style = style.deriveStyle(c.getCss().getPseudoElementStyle(e, pe)); } else { BlockBox container = (BlockBox)getParent().getParent(); e = container.getElement(); style = c.getSharedContext().getStyle(e, true); style = style.deriveStyle(c.getCss().getPseudoElementStyle(e, pe)); style = style.createAnonymousStyle(IdentValue.INLINE);
Element current = getHoveredElement(c.getCss(), box); if (previous == current) { return;