diff --git a/components/translate/core/browser/translate_prefs.cc b/components/translate/core/browser/translate_prefs.cc index ab49ae55..4ebf62e 100644 --- a/components/translate/core/browser/translate_prefs.cc +++ b/components/translate/core/browser/translate_prefs.cc
@@ -186,16 +186,10 @@ ClearBlockedLanguages(); ClearBlacklistedSites(); ClearWhitelistedLanguagePairs(); + prefs_->ClearPref(kPrefTranslateDeniedCount); + prefs_->ClearPref(kPrefTranslateIgnoredCount); + prefs_->ClearPref(kPrefTranslateAcceptedCount); - std::vector<std::string> languages; - GetLanguageList(&languages); - for (std::vector<std::string>::const_iterator it = languages.begin(); - it != languages.end(); ++it) { - const std::string& language = *it; - ResetTranslationAcceptedCount(language); - ResetTranslationDeniedCount(language); - ResetTranslationIgnoredCount(language); - } #if defined(OS_ANDROID) prefs_->ClearPref(kPrefTranslateAutoAlwaysCount); prefs_->ClearPref(kPrefTranslateAutoNeverCount);
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc index 739502db..6a04416 100644 --- a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc +++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.cc
@@ -457,6 +457,10 @@ borders.inline_start + paddings.inline_start; position_ += item_result->inline_size; + // While the spec defines "non-zero margins, padding, or borders" prevents + // line boxes to be zero-height, tests indicate that only inline direction + // of them do so. See should_create_line_box_. + // Force to create a box, because such inline boxes affect line heights. item_result->needs_box_when_empty = item_result->inline_size || item_result->margins.inline_start; if (item_result->needs_box_when_empty && !should_create_line_box_)
diff --git a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.h b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.h index ac43b1c..780f7a0 100644 --- a/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.h +++ b/third_party/WebKit/Source/core/layout/ng/inline/ng_line_breaker.h
@@ -105,7 +105,14 @@ ShapeResultSpacing<String> spacing_; bool auto_wrap_; + + // We don't create "certain zero-height line boxes". + // https://drafts.csswg.org/css2/visuren.html#phantom-line-box + // Such line boxes do not prevent two margins being "adjoining", and thus + // collapsing. + // https://drafts.csswg.org/css2/box.html#collapsing-margins bool should_create_line_box_; + bool is_after_forced_break_; };