@Override public void customizeNode (@Nonnull final IHCHasChildrenMutable <?, ? super IHCNode> aParentElement, @Nonnull final IHCNode aNode, @Nonnull final EHTMLVersion eHTMLVersion) { if (aNode instanceof HCImg) { final HCImg aImg = (HCImg) aNode; final ScalableSize aExtent = aImg.getExtent (); // Workaround for IE if a CSS contains "width:auto" and/or "height:auto" // See e.g. https://github.com/twitter/bootstrap/issues/1899 if (aExtent != null) { aImg.addStyles (CCSSProperties.WIDTH.newValue (ECSSUnit.px (aExtent.getWidth ())), CCSSProperties.HEIGHT.newValue (ECSSUnit.px (aExtent.getHeight ()))); } } else if (aNode instanceof IHCControl <?>) { BootstrapHelper.markAsFormControl ((IHCControl <?>) aNode); } } }
@Nonnull public static HCSpan createEmptyAction () { return new HCSpan ().addClass (CSS_CLASS_EMPTY_ACTION) .addStyle (CCSSProperties.DISPLAY_INLINE_BLOCK) .addStyle (CCSSProperties.WIDTH.newValue (ECSSUnit.px (16))); }
@Override protected void onFinalizeNodeState (@Nonnull final IHCConversionSettingsToNode aConversionSettings, @Nonnull final IHCHasChildrenMutable <?, ? super IHCNode> aTargetNode) { super.onFinalizeNodeState (aConversionSettings, aTargetNode); /* * bug fix for IE9 table layout bug * (http://msdn.microsoft.com/en-us/library/ms531161%28v=vs.85%29.aspx) IE9 * only interprets column widths if the first row does not use colspan (i.e. * at least one row does not use colspan) */ if (m_aColGroup != null && m_aColGroup.hasColumns () && hasBodyRows () && getFirstBodyRow ().isColspanUsed ()) { // Create a dummy row with explicit widths final HCRow aRow = new HCRow (false).addClass (CSS_FORCE_COLSPAN); for (final IHCCol <?> aCol : m_aColGroup.getAllColumns ()) { final IHCCell <?> aCell = aRow.addAndReturnCell (HCEntityNode.newNBSP ()); final int nWidth = StringParser.parseInt (aCol.getWidth (), -1); if (nWidth >= 0) aCell.addStyle (CCSSProperties.WIDTH.newValue (ECSSUnit.px (nWidth))); } addBodyRowAt (0, aRow); } }