Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: third_party/WebKit/Source/core/css/resolver/StyleResolverState.h

Issue 2567963002: Change ComputedStyle::setWritingMode() to return void instead of bool (Closed)
Patch Set: Changed to early return Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/resolver/StyleResolverState.h
diff --git a/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h b/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h
index 2518986039a1d40b44d8fedcb001b760a2a8fa48..30d3de29f62e10e3cd2348cc213d1d741d268959 100644
--- a/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h
+++ b/third_party/WebKit/Source/core/css/resolver/StyleResolverState.h
@@ -182,9 +182,12 @@ class CORE_EXPORT StyleResolverState {
if (m_style->setEffectiveZoom(f))
m_fontBuilder.didChangeEffectiveZoom();
}
- void setWritingMode(WritingMode writingMode) {
- if (m_style->setWritingMode(writingMode))
- m_fontBuilder.didChangeWritingMode();
+ void setWritingMode(WritingMode newWritingMode) {
+ const WritingMode oldWritingMode = m_style->getWritingMode();
napper 2016/12/12 03:53:33 Not sure you need the temporary here.
sashab 2016/12/12 03:58:39 Sure, thought it helped with readability. Kept the
+ if (oldWritingMode == newWritingMode)
napper 2016/12/12 03:53:33 FWIW I have a style preference for either: if (ol
sashab 2016/12/12 03:58:39 Ack, that's a really good point!! I actually thoug
+ return;
+ m_style->setWritingMode(newWritingMode);
+ m_fontBuilder.didChangeWritingMode();
}
void setTextOrientation(TextOrientation textOrientation) {
if (m_style->setTextOrientation(textOrientation))
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutObject.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698