Skip to content

Commit

Permalink
DanielWagnerHall: Cover up for IE8's weirdness. TODO: Extract this so…
Browse files Browse the repository at this point in the history
…mewhere a little more useful

r17205
  • Loading branch information
illicitonion committed Jun 19, 2012
1 parent 484bac2 commit 79c712d
Show file tree
Hide file tree
Showing 2 changed files with 248 additions and 244 deletions.
12 changes: 8 additions & 4 deletions javascript/atoms/dom.js
Original file line number Diff line number Diff line change
Expand Up @@ -864,10 +864,14 @@ bot.dom.appendVisibleTextLinesFromElement_ = function(elem, lines) {
// except when the previous sibling has a display: run-in.
// Also, do not run-in the previous sibling if this element is floated.

var prevDisplay = (elem.previousSibling) ?
bot.dom.getEffectiveStyle(elem.previousSibling, 'display') : '';
var runIntoThis = prevDisplay == 'run-in' &&
bot.dom.getEffectiveStyle(elem, 'float') == 'none';
var previousElementSibling = goog.dom.getPreviousElementSibling(elem);
var prevDisplay = (previousElementSibling) ?
bot.dom.getEffectiveStyle(previousElementSibling, 'display') : '';
// TODO(dawagner): getEffectiveStyle should mask this for us
var thisFloat = bot.dom.getEffectiveStyle(elem, 'float') ||
bot.dom.getEffectiveStyle(elem, 'cssFloat') ||
bot.dom.getEffectiveStyle(elem, 'styleFloat');
var runIntoThis = prevDisplay == 'run-in' && thisFloat == 'none';
if (isBlock && !runIntoThis && !goog.string.isEmpty(currLine())) {
lines.push('');
}
Expand Down
Loading

0 comments on commit 79c712d

Please sign in to comment.