From 0b873f62b217d20df5402875e98655b6a0567bd4 Mon Sep 17 00:00:00 2001 From: Duan Yao Date: Sun, 15 Mar 2015 21:47:31 +0800 Subject: [PATCH] Revert "Workaround chrome/webkit bug of word-spacing with leading spaces." This reverts commit fdf1c367441b6f43b5f66a1e8581fab5d26b0b9a. --- src/HTMLTextLine.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/HTMLTextLine.cc b/src/HTMLTextLine.cc index 7638b73..a0be286 100644 --- a/src/HTMLTextLine.cc +++ b/src/HTMLTextLine.cc @@ -247,11 +247,7 @@ void HTMLTextLine::dump_text(ostream & out) if(!(state_iter1->hash_umask & State::umask_by_id(State::WORD_SPACE_ID))) { double space_off = state_iter1->single_space_offset(); - if((std::abs(target - space_off) <= param.h_eps) - // Chrome/webkit don't apply CSS word-spacing to leading spaces, so we don't - // convert leading offsets to spaces. See also issue #412 and chromium issue #404444. - // TODO after browsers having this bug have vanished, just remove the line below. - && ((state_iter1->word_space == 0) || (cur_offset_iter->start_idx != 0))) + if(std::abs(target - space_off) <= param.h_eps) { Unicode u = ' '; writeUnicodes(out, &u, 1);