| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |