| 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 629 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 640 const ComputedStyle& other) const { | 640 const ComputedStyle& other) const { |
| 641 return ComputedStyleBase::DiffNeedsPaintInvalidationSubtree(*this, other); | 641 return ComputedStyleBase::DiffNeedsPaintInvalidationSubtree(*this, other); |
| 642 } | 642 } |
| 643 | 643 |
| 644 bool ComputedStyle::DiffNeedsPaintInvalidationObject( | 644 bool ComputedStyle::DiffNeedsPaintInvalidationObject( |
| 645 const ComputedStyle& other) const { | 645 const ComputedStyle& other) const { |
| 646 if (ComputedStyleBase::DiffNeedsPaintInvalidationObject(*this, other)) | 646 if (ComputedStyleBase::DiffNeedsPaintInvalidationObject(*this, other)) |
| 647 return true; | 647 return true; |
| 648 | 648 |
| 649 if (!BorderVisuallyEqual(other) || !RadiiEqual(other) || | 649 if (!BorderVisuallyEqual(other) || !RadiiEqual(other) || |
| 650 *background_data_ != *other.background_data_) | 650 (BackgroundInternal() != other.BackgroundInternal() || |
| 651 BackgroundColorInternal() != other.BackgroundColorInternal())) |
| 651 return true; | 652 return true; |
| 652 | 653 |
| 653 if (rare_non_inherited_data_->paint_images_) { | 654 if (rare_non_inherited_data_->paint_images_) { |
| 654 for (const auto& image : *rare_non_inherited_data_->paint_images_) { | 655 for (const auto& image : *rare_non_inherited_data_->paint_images_) { |
| 655 if (DiffNeedsPaintInvalidationObjectForPaintImage(image, other)) | 656 if (DiffNeedsPaintInvalidationObjectForPaintImage(image, other)) |
| 656 return true; | 657 return true; |
| 657 } | 658 } |
| 658 } | 659 } |
| 659 | 660 |
| 660 return false; | 661 return false; |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 diff.SetFilterChanged(); | 729 diff.SetFilterChanged(); |
| 729 | 730 |
| 730 if (ComputedStyleBase:: | 731 if (ComputedStyleBase:: |
| 731 UpdatePropertySpecificDifferencesNeedsRecomputeOverflow(*this, other)) | 732 UpdatePropertySpecificDifferencesNeedsRecomputeOverflow(*this, other)) |
| 732 diff.SetNeedsRecomputeOverflow(); | 733 diff.SetNeedsRecomputeOverflow(); |
| 733 | 734 |
| 734 if (ComputedStyleBase::UpdatePropertySpecificDifferencesBackdropFilter(*this, | 735 if (ComputedStyleBase::UpdatePropertySpecificDifferencesBackdropFilter(*this, |
| 735 other)) | 736 other)) |
| 736 diff.SetBackdropFilterChanged(); | 737 diff.SetBackdropFilterChanged(); |
| 737 | 738 |
| 738 if (!diff.NeedsFullPaintInvalidation()) { | 739 if (!diff.NeedsFullPaintInvalidation() && |
| 739 if ((inherited_data_->color_ != other.inherited_data_->color_ || | 740 ComputedStyleBase::UpdatePropertySpecificDifferencesTextDecorationOrColor( |
| 740 inherited_data_->visited_link_color_ != | 741 *this, other)) { |
| 741 other.inherited_data_->visited_link_color_ || | 742 diff.SetTextDecorationOrColorChanged(); |
| 742 HasSimpleUnderlineInternal() != other.HasSimpleUnderlineInternal() || | |
| 743 visual_data_->text_decoration_ != | |
| 744 other.visual_data_->text_decoration_) || | |
| 745 ComputedStyleBase:: | |
| 746 UpdatePropertySpecificDifferencesTextDecorationOrColor(*this, | |
| 747 other)) { | |
| 748 diff.SetTextDecorationOrColorChanged(); | |
| 749 } | |
| 750 } | 743 } |
| 751 | 744 |
| 752 bool has_clip = HasOutOfFlowPosition() && !visual_data_->has_auto_clip_; | 745 bool has_clip = HasOutOfFlowPosition() && !HasAutoClipInternal(); |
| 753 bool other_has_clip = | 746 bool other_has_clip = |
| 754 other.HasOutOfFlowPosition() && !other.visual_data_->has_auto_clip_; | 747 other.HasOutOfFlowPosition() && !other.HasAutoClipInternal(); |
| 755 if (has_clip != other_has_clip || | 748 if (has_clip != other_has_clip || |
| 756 (has_clip && visual_data_->clip_ != other.visual_data_->clip_)) | 749 (has_clip && ClipInternal() != other.ClipInternal())) |
| 757 diff.SetCSSClipChanged(); | 750 diff.SetCSSClipChanged(); |
| 758 } | 751 } |
| 759 | 752 |
| 760 void ComputedStyle::AddPaintImage(StyleImage* image) { | 753 void ComputedStyle::AddPaintImage(StyleImage* image) { |
| 761 if (!rare_non_inherited_data_.Access()->paint_images_) { | 754 if (!rare_non_inherited_data_.Access()->paint_images_) { |
| 762 rare_non_inherited_data_.Access()->paint_images_ = | 755 rare_non_inherited_data_.Access()->paint_images_ = |
| 763 WTF::MakeUnique<PaintImages>(); | 756 WTF::MakeUnique<PaintImages>(); |
| 764 } | 757 } |
| 765 rare_non_inherited_data_.Access()->paint_images_->push_back(image); | 758 rare_non_inherited_data_.Access()->paint_images_->push_back(image); |
| 766 } | 759 } |
| (...skipping 1471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2238 if (value < 0) | 2231 if (value < 0) |
| 2239 fvalue -= 0.5f; | 2232 fvalue -= 0.5f; |
| 2240 else | 2233 else |
| 2241 fvalue += 0.5f; | 2234 fvalue += 0.5f; |
| 2242 } | 2235 } |
| 2243 | 2236 |
| 2244 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); | 2237 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); |
| 2245 } | 2238 } |
| 2246 | 2239 |
| 2247 } // namespace blink | 2240 } // namespace blink |
| OLD | NEW |