File tree Expand file tree Collapse file tree 2 files changed +248
-244
lines changed Expand file tree Collapse file tree 2 files changed +248
-244
lines changed Original file line number Diff line number Diff line change @@ -864,10 +864,14 @@ bot.dom.appendVisibleTextLinesFromElement_ = function(elem, lines) {
864
864
// except when the previous sibling has a display: run-in.
865
865
// Also, do not run-in the previous sibling if this element is floated.
866
866
867
- var prevDisplay = ( elem . previousSibling ) ?
868
- bot . dom . getEffectiveStyle ( elem . previousSibling , 'display' ) : '' ;
869
- var runIntoThis = prevDisplay == 'run-in' &&
870
- bot . dom . getEffectiveStyle ( elem , 'float' ) == 'none' ;
867
+ var previousElementSibling = goog . dom . getPreviousElementSibling ( elem ) ;
868
+ var prevDisplay = ( previousElementSibling ) ?
869
+ bot . dom . getEffectiveStyle ( previousElementSibling , 'display' ) : '' ;
870
+ // TODO(dawagner): getEffectiveStyle should mask this for us
871
+ var thisFloat = bot . dom . getEffectiveStyle ( elem , 'float' ) ||
872
+ bot . dom . getEffectiveStyle ( elem , 'cssFloat' ) ||
873
+ bot . dom . getEffectiveStyle ( elem , 'styleFloat' ) ;
874
+ var runIntoThis = prevDisplay == 'run-in' && thisFloat == 'none' ;
871
875
if ( isBlock && ! runIntoThis && ! goog . string . isEmpty ( currLine ( ) ) ) {
872
876
lines . push ( '' ) ;
873
877
}
You can’t perform that action at this time.
0 commit comments