stripped.addAll( pendingStylePushes ); pendingStylePushes.clear(); stripped.add( tc ); collapse = collapseNext;
    public static List stripInlineContent( Context c, List inlineContent ) {        List stripped = new LinkedList();        List pendingStylePushes = new LinkedList();        boolean collapse = false;        boolean allWhitespace = true;        for ( Iterator i = inlineContent.iterator(); i.hasNext();  ) {            Object o = i.next();            if ( o instanceof StylePush ) {                pendingStylePushes.add( o );                CascadedStyle style;                StylePush sp = (StylePush)o;                if ( sp.getPseudoElement() != null ) {                    style = c.getCss().getPseudoElementStyle( sp.getElement(), sp.getPseudoElement() );                } else {                    style = c.getCss().getCascadedStyle( sp.getElement(), false );//already done in ContentUtil                }                c.pushStyle( style );                continue;            }            if ( o instanceof TextContent ) {                TextContent tc = (TextContent)o;                CalculatedStyle style = c.getCurrentStyle();                boolean collapseNext = stripWhitespace( style, collapse, tc );                if ( !tc.isRemovableWhitespace() ) {                    allWhitespace = false;                }                stripped.addAll( pendingStylePushes );                pendingStylePushes.clear();                stripped.add( tc );                collapse = collapseNext;                continue;            }            if ( o instanceof StylePop ) {                c.popStyle();                if ( pendingStylePushes.size() != 0 ) {                    //redundant style-change                    pendingStylePushes.remove( pendingStylePushes.size() - 1 );                } else {                    stripped.add( o );                }                continue;            }            //Here we have some other object, just add it with preceding styles            if ( !( o instanceof FloatedBlockContent ) ) {                allWhitespace = false;            }            stripped.addAll( pendingStylePushes );            pendingStylePushes.clear();            stripped.add( o );            collapse = false;//no collapsing of the next one        }        //there may be relevant StylePushes pending, e.g. if this is content of AnonymousBlock        stripped.addAll( pendingStylePushes );        // Uu.p("final stripped = " + stripped);        // Uu.p("all whitespace = " + allWhitespace);        if ( allWhitespace ) {            stripWhitespaceContent( stripped );        }        return stripped;    }