| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 float smallestDimension = | 62 float smallestDimension = |
| 63 std::min(videoSize.height().toFloat(), videoSize.width().toFloat()); | 63 std::min(videoSize.height().toFloat(), videoSize.width().toFloat()); |
| 64 | 64 |
| 65 float fontSize = smallestDimension * 0.05f; | 65 float fontSize = smallestDimension * 0.05f; |
| 66 | 66 |
| 67 // Avoid excessive FP precision issue. | 67 // Avoid excessive FP precision issue. |
| 68 // C11 5.2.4.2.2:9 requires assignment and cast to remove extra precision, but | 68 // C11 5.2.4.2.2:9 requires assignment and cast to remove extra precision, but |
| 69 // the behavior is currently not portable. fontSize may have precision higher | 69 // the behavior is currently not portable. fontSize may have precision higher |
| 70 // than m_fontSize thus straight comparison can fail despite they cast to the | 70 // than m_fontSize thus straight comparison can fail despite they cast to the |
| 71 // same float value. | 71 // same float value. |
| 72 volatile float& m_fontSize = this->m_fontSize; | 72 volatile float& current_font_size = this->font_size_; |
| 73 float oldFontSize = m_fontSize; | 73 float old_font_size = current_font_size; |
| 74 m_fontSize = fontSize; | 74 current_font_size = font_size; |
| 75 return m_fontSize != oldFontSize; | 75 return current_font_size != old_font_size; |
| 76 } | 76 } |
| 77 | 77 |
| 78 } // namespace blink | 78 } // namespace blink |
| OLD | NEW |