Skip to content

Commit 79c712d

Browse files
committed
DanielWagnerHall: Cover up for IE8's weirdness. TODO: Extract this somewhere a little more useful
r17205
1 parent 484bac2 commit 79c712d

File tree

2 files changed

+248
-244
lines changed

2 files changed

+248
-244
lines changed

javascript/atoms/dom.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -864,10 +864,14 @@ bot.dom.appendVisibleTextLinesFromElement_ = function(elem, lines) {
864864
// except when the previous sibling has a display: run-in.
865865
// Also, do not run-in the previous sibling if this element is floated.
866866

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';
871875
if (isBlock && !runIntoThis && !goog.string.isEmpty(currLine())) {
872876
lines.push('');
873877
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy