| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) | 2 * Copyright (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights |
| 4 * reserved. | 4 * reserved. |
| 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. | 5 * Copyright (C) 2011 Adobe Systems Incorporated. All rights reserved. |
| 6 * | 6 * |
| 7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
| 8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
| 9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
| 10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
| (...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 visual_ = other.visual_; | 337 visual_ = other.visual_; |
| 338 background_ = other.background_; | 338 background_ = other.background_; |
| 339 surround_ = other.surround_; | 339 surround_ = other.surround_; |
| 340 rare_non_inherited_data_ = other.rare_non_inherited_data_; | 340 rare_non_inherited_data_ = other.rare_non_inherited_data_; |
| 341 | 341 |
| 342 // The flags are copied one-by-one because they contain | 342 // The flags are copied one-by-one because they contain |
| 343 // bunch of stuff other than real style data. | 343 // bunch of stuff other than real style data. |
| 344 // See comments for each skipped flag below. | 344 // See comments for each skipped flag below. |
| 345 | 345 |
| 346 // These are not generated in ComputedStyleBase | 346 // These are not generated in ComputedStyleBase |
| 347 SetVerticalAlign(other.VerticalAlign()); | |
| 348 SetHasViewportUnits(other.HasViewportUnits()); | 347 SetHasViewportUnits(other.HasViewportUnits()); |
| 349 SetHasRemUnitsInternal(other.HasRemUnits()); | 348 SetHasRemUnitsInternal(other.HasRemUnits()); |
| 350 | 349 |
| 351 // Correctly set during selector matching: | 350 // Correctly set during selector matching: |
| 352 // m_styleType | 351 // m_styleType |
| 353 // m_pseudoBits | 352 // m_pseudoBits |
| 354 | 353 |
| 355 // Set correctly while computing style for children: | 354 // Set correctly while computing style for children: |
| 356 // m_explicitInheritance | 355 // m_explicitInheritance |
| 357 | 356 |
| (...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 470 rare_inherited_data_ == other.rare_inherited_data_; | 469 rare_inherited_data_ == other.rare_inherited_data_; |
| 471 } | 470 } |
| 472 | 471 |
| 473 bool ComputedStyle::LoadingCustomFontsEqual(const ComputedStyle& other) const { | 472 bool ComputedStyle::LoadingCustomFontsEqual(const ComputedStyle& other) const { |
| 474 return GetFont().LoadingCustomFonts() == other.GetFont().LoadingCustomFonts(); | 473 return GetFont().LoadingCustomFonts() == other.GetFont().LoadingCustomFonts(); |
| 475 } | 474 } |
| 476 | 475 |
| 477 bool ComputedStyle::NonInheritedEqual(const ComputedStyle& other) const { | 476 bool ComputedStyle::NonInheritedEqual(const ComputedStyle& other) const { |
| 478 // compare everything except the pseudoStyle pointer | 477 // compare everything except the pseudoStyle pointer |
| 479 return ComputedStyleBase::NonInheritedEqual(other) && | 478 return ComputedStyleBase::NonInheritedEqual(other) && |
| 480 VerticalAlign() == other.VerticalAlign() && // Not generated in | |
| 481 // ComputedStyleBase | |
| 482 box_ == other.box_ && | 479 box_ == other.box_ && |
| 483 visual_ == other.visual_ && background_ == other.background_ && | 480 visual_ == other.visual_ && background_ == other.background_ && |
| 484 surround_ == other.surround_ && | 481 surround_ == other.surround_ && |
| 485 rare_non_inherited_data_ == other.rare_non_inherited_data_ && | 482 rare_non_inherited_data_ == other.rare_non_inherited_data_ && |
| 486 svg_style_->NonInheritedEqual(*other.svg_style_); | 483 svg_style_->NonInheritedEqual(*other.svg_style_); |
| 487 } | 484 } |
| 488 | 485 |
| 489 bool ComputedStyle::InheritedDataShared(const ComputedStyle& other) const { | 486 bool ComputedStyle::InheritedDataShared(const ComputedStyle& other) const { |
| 490 // This is a fast check that only looks if the data structures are shared. | 487 // This is a fast check that only looks if the data structures are shared. |
| 491 // TODO(sashab): Should ComputedStyleBase have an inheritedDataShared method? | 488 // TODO(sashab): Should ComputedStyleBase have an inheritedDataShared method? |
| (...skipping 2009 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2501 if (value < 0) | 2498 if (value < 0) |
| 2502 fvalue -= 0.5f; | 2499 fvalue -= 0.5f; |
| 2503 else | 2500 else |
| 2504 fvalue += 0.5f; | 2501 fvalue += 0.5f; |
| 2505 } | 2502 } |
| 2506 | 2503 |
| 2507 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); | 2504 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); |
| 2508 } | 2505 } |
| 2509 | 2506 |
| 2510 } // namespace blink | 2507 } // namespace blink |
| OLD | NEW |