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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutTextTrackContainer.cpp

Issue 2370673002: Changed EDisplay to an enum class and renamed its members to be keywords (Closed)
Patch Set: Comment Created 4 years, 2 months 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
3 * Copyright (C) 2012 Google Inc. 3 * Copyright (C) 2012 Google Inc.
4 * All rights reserved. 4 * All rights reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 23 matching lines...) Expand all
34 34
35 LayoutTextTrackContainer::LayoutTextTrackContainer(Element* element) 35 LayoutTextTrackContainer::LayoutTextTrackContainer(Element* element)
36 : LayoutBlockFlow(element) 36 : LayoutBlockFlow(element)
37 , m_fontSize(0) 37 , m_fontSize(0)
38 { 38 {
39 } 39 }
40 40
41 void LayoutTextTrackContainer::layout() 41 void LayoutTextTrackContainer::layout()
42 { 42 {
43 LayoutBlockFlow::layout(); 43 LayoutBlockFlow::layout();
44 if (style()->display() == NONE) 44 if (style()->display() == EDisplay::None)
45 return; 45 return;
46 46
47 DeprecatedScheduleStyleRecalcDuringLayout marker(node()->document().lifecycl e()); 47 DeprecatedScheduleStyleRecalcDuringLayout marker(node()->document().lifecycl e());
48 48
49 LayoutObject* mediaLayoutObject = parent(); 49 LayoutObject* mediaLayoutObject = parent();
50 if (!mediaLayoutObject || !mediaLayoutObject->isVideo()) 50 if (!mediaLayoutObject || !mediaLayoutObject->isVideo())
51 return; 51 return;
52 if (updateSizes(toLayoutVideo(*mediaLayoutObject))) 52 if (updateSizes(toLayoutVideo(*mediaLayoutObject)))
53 toElement(node())->setInlineStyleProperty(CSSPropertyFontSize, m_fontSiz e, CSSPrimitiveValue::UnitType::Pixels); 53 toElement(node())->setInlineStyleProperty(CSSPropertyFontSize, m_fontSiz e, CSSPrimitiveValue::UnitType::Pixels);
54 } 54 }
(...skipping 14 matching lines...) Expand all
69 // C11 5.2.4.2.2:9 requires assignment and cast to remove extra precision, b ut the behavior 69 // C11 5.2.4.2.2:9 requires assignment and cast to remove extra precision, b ut the behavior
70 // is currently not portable. fontSize may have precision higher than m_font Size thus 70 // is currently not portable. fontSize may have precision higher than m_font Size thus
71 // straight comparison can fail despite they cast to the same float value. 71 // straight comparison can fail despite they cast to the same float value.
72 volatile float& m_fontSize = this->m_fontSize; 72 volatile float& m_fontSize = this->m_fontSize;
73 float oldFontSize = m_fontSize; 73 float oldFontSize = m_fontSize;
74 m_fontSize = fontSize; 74 m_fontSize = fontSize;
75 return m_fontSize != oldFontSize; 75 return m_fontSize != oldFontSize;
76 } 76 }
77 77
78 } // namespace blink 78 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698