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 SetOriginalDisplay(other.OriginalDisplay()); | |
348 SetVerticalAlign(other.VerticalAlign()); | 347 SetVerticalAlign(other.VerticalAlign()); |
349 SetHasViewportUnits(other.HasViewportUnits()); | 348 SetHasViewportUnits(other.HasViewportUnits()); |
350 SetHasRemUnitsInternal(other.HasRemUnits()); | 349 SetHasRemUnitsInternal(other.HasRemUnits()); |
351 | 350 |
352 // Correctly set during selector matching: | 351 // Correctly set during selector matching: |
353 // m_styleType | 352 // m_styleType |
354 // m_pseudoBits | 353 // m_pseudoBits |
355 | 354 |
356 // Set correctly while computing style for children: | 355 // Set correctly while computing style for children: |
357 // m_explicitInheritance | 356 // m_explicitInheritance |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 rare_inherited_data_ == other.rare_inherited_data_; | 470 rare_inherited_data_ == other.rare_inherited_data_; |
472 } | 471 } |
473 | 472 |
474 bool ComputedStyle::LoadingCustomFontsEqual(const ComputedStyle& other) const { | 473 bool ComputedStyle::LoadingCustomFontsEqual(const ComputedStyle& other) const { |
475 return GetFont().LoadingCustomFonts() == other.GetFont().LoadingCustomFonts(); | 474 return GetFont().LoadingCustomFonts() == other.GetFont().LoadingCustomFonts(); |
476 } | 475 } |
477 | 476 |
478 bool ComputedStyle::NonInheritedEqual(const ComputedStyle& other) const { | 477 bool ComputedStyle::NonInheritedEqual(const ComputedStyle& other) const { |
479 // compare everything except the pseudoStyle pointer | 478 // compare everything except the pseudoStyle pointer |
480 return ComputedStyleBase::NonInheritedEqual(other) && | 479 return ComputedStyleBase::NonInheritedEqual(other) && |
481 OriginalDisplay() == | |
482 other.OriginalDisplay() && // Not generated in ComputedStyleBase | |
483 VerticalAlign() == other.VerticalAlign() && // Not generated in | 480 VerticalAlign() == other.VerticalAlign() && // Not generated in |
484 // ComputedStyleBase | 481 // ComputedStyleBase |
485 box_ == other.box_ && | 482 box_ == other.box_ && |
486 visual_ == other.visual_ && background_ == other.background_ && | 483 visual_ == other.visual_ && background_ == other.background_ && |
487 surround_ == other.surround_ && | 484 surround_ == other.surround_ && |
488 rare_non_inherited_data_ == other.rare_non_inherited_data_ && | 485 rare_non_inherited_data_ == other.rare_non_inherited_data_ && |
489 svg_style_->NonInheritedEqual(*other.svg_style_); | 486 svg_style_->NonInheritedEqual(*other.svg_style_); |
490 } | 487 } |
491 | 488 |
492 bool ComputedStyle::InheritedDataShared(const ComputedStyle& other) const { | 489 bool ComputedStyle::InheritedDataShared(const ComputedStyle& other) const { |
(...skipping 2011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2504 if (value < 0) | 2501 if (value < 0) |
2505 fvalue -= 0.5f; | 2502 fvalue -= 0.5f; |
2506 else | 2503 else |
2507 fvalue += 0.5f; | 2504 fvalue += 0.5f; |
2508 } | 2505 } |
2509 | 2506 |
2510 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); | 2507 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); |
2511 } | 2508 } |
2512 | 2509 |
2513 } // namespace blink | 2510 } // namespace blink |
OLD | NEW |