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 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
569 return diff; | 569 return diff; |
570 } | 570 } |
571 | 571 |
572 bool ComputedStyle::ScrollAnchorDisablingPropertyChanged( | 572 bool ComputedStyle::ScrollAnchorDisablingPropertyChanged( |
573 const ComputedStyle& other, | 573 const ComputedStyle& other, |
574 const StyleDifference& diff) const { | 574 const StyleDifference& diff) const { |
575 if (GetPosition() != other.GetPosition()) | 575 if (GetPosition() != other.GetPosition()) |
576 return true; | 576 return true; |
577 | 577 |
578 if (box_data_.Get() != other.box_data_.Get()) { | 578 if (box_data_.Get() != other.box_data_.Get()) { |
579 if (box_data_->Width() != other.box_data_->Width() || | 579 if (box_data_->width_ != other.box_data_->width_ || |
580 box_data_->MinWidth() != other.box_data_->MinWidth() || | 580 box_data_->min_width_ != other.box_data_->min_width_ || |
581 box_data_->MaxWidth() != other.box_data_->MaxWidth() || | 581 box_data_->max_width_ != other.box_data_->max_width_ || |
582 box_data_->Height() != other.box_data_->Height() || | 582 box_data_->height_ != other.box_data_->height_ || |
583 box_data_->MinHeight() != other.box_data_->MinHeight() || | 583 box_data_->min_height_ != other.box_data_->min_height_ || |
584 box_data_->MaxHeight() != other.box_data_->MaxHeight()) | 584 box_data_->max_height_ != other.box_data_->max_height_) |
585 return true; | 585 return true; |
586 } | 586 } |
587 | 587 |
588 if (surround_data_.Get() != other.surround_data_.Get()) { | 588 if (surround_data_.Get() != other.surround_data_.Get()) { |
589 if (!MarginEqual(other) || !OffsetEqual(other) || !PaddingEqual(other)) | 589 if (!MarginEqual(other) || !OffsetEqual(other) || !PaddingEqual(other)) |
590 return true; | 590 return true; |
591 } | 591 } |
592 | 592 |
593 if (diff.TransformChanged()) | 593 if (diff.TransformChanged()) |
594 return true; | 594 return true; |
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
830 return true; | 830 return true; |
831 | 831 |
832 // Movement of non-static-positioned object is special cased in | 832 // Movement of non-static-positioned object is special cased in |
833 // ComputedStyle::VisualInvalidationDiff(). | 833 // ComputedStyle::VisualInvalidationDiff(). |
834 | 834 |
835 return false; | 835 return false; |
836 } | 836 } |
837 | 837 |
838 bool ComputedStyle::DiffNeedsFullLayout(const ComputedStyle& other) const { | 838 bool ComputedStyle::DiffNeedsFullLayout(const ComputedStyle& other) const { |
839 if (box_data_.Get() != other.box_data_.Get()) { | 839 if (box_data_.Get() != other.box_data_.Get()) { |
840 if (box_data_->Width() != other.box_data_->Width() || | 840 if (box_data_->width_ != other.box_data_->width_ || |
841 box_data_->MinWidth() != other.box_data_->MinWidth() || | 841 box_data_->min_width_ != other.box_data_->min_width_ || |
842 box_data_->MaxWidth() != other.box_data_->MaxWidth() || | 842 box_data_->max_width_ != other.box_data_->max_width_ || |
843 box_data_->Height() != other.box_data_->Height() || | 843 box_data_->height_ != other.box_data_->height_ || |
844 box_data_->MinHeight() != other.box_data_->MinHeight() || | 844 box_data_->min_height_ != other.box_data_->min_height_ || |
845 box_data_->MaxHeight() != other.box_data_->MaxHeight()) | 845 box_data_->max_height_ != other.box_data_->max_height_) |
846 return true; | 846 return true; |
847 | 847 |
848 if (box_data_->VerticalAlign() != other.box_data_->VerticalAlign()) | 848 if (box_data_->vertical_align_length_ != |
| 849 other.box_data_->vertical_align_length_) |
849 return true; | 850 return true; |
850 | 851 |
851 if (box_data_->BoxSizing() != other.box_data_->BoxSizing()) | 852 if (box_data_->box_sizing_ != other.box_data_->box_sizing_) |
852 return true; | 853 return true; |
853 } | 854 } |
854 | 855 |
855 if (VerticalAlign() != other.VerticalAlign() || | 856 if (VerticalAlign() != other.VerticalAlign() || |
856 GetPosition() != other.GetPosition()) | 857 GetPosition() != other.GetPosition()) |
857 return true; | 858 return true; |
858 | 859 |
859 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { | 860 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { |
860 if (rare_non_inherited_data_->align_content_ != | 861 if (rare_non_inherited_data_->align_content_ != |
861 other.rare_non_inherited_data_->align_content_ || | 862 other.rare_non_inherited_data_->align_content_ || |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1001 // Need to update visual rect of the resizer. | 1002 // Need to update visual rect of the resizer. |
1002 if (Resize() != other.Resize()) | 1003 if (Resize() != other.Resize()) |
1003 return true; | 1004 return true; |
1004 | 1005 |
1005 return false; | 1006 return false; |
1006 } | 1007 } |
1007 | 1008 |
1008 void ComputedStyle::UpdatePropertySpecificDifferences( | 1009 void ComputedStyle::UpdatePropertySpecificDifferences( |
1009 const ComputedStyle& other, | 1010 const ComputedStyle& other, |
1010 StyleDifference& diff) const { | 1011 StyleDifference& diff) const { |
1011 if (box_data_->ZIndex() != other.box_data_->ZIndex() || | 1012 if (box_data_->z_index_ != other.box_data_->z_index_ || |
1012 IsStackingContext() != other.IsStackingContext()) | 1013 IsStackingContext() != other.IsStackingContext()) |
1013 diff.SetZIndexChanged(); | 1014 diff.SetZIndexChanged(); |
1014 | 1015 |
1015 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { | 1016 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { |
1016 // It's possible for the old and new style transform data to be equivalent | 1017 // It's possible for the old and new style transform data to be equivalent |
1017 // while hasTransform() differs, as it checks a number of conditions aside | 1018 // while hasTransform() differs, as it checks a number of conditions aside |
1018 // from just the matrix, including but not limited to animation state. | 1019 // from just the matrix, including but not limited to animation state. |
1019 if (HasTransform() != other.HasTransform() || | 1020 if (HasTransform() != other.HasTransform() || |
1020 !TransformDataEquivalent(other) || | 1021 !TransformDataEquivalent(other) || |
1021 rare_non_inherited_data_->perspective_ != | 1022 rare_non_inherited_data_->perspective_ != |
(...skipping 1478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2500 if (value < 0) | 2501 if (value < 0) |
2501 fvalue -= 0.5f; | 2502 fvalue -= 0.5f; |
2502 else | 2503 else |
2503 fvalue += 0.5f; | 2504 fvalue += 0.5f; |
2504 } | 2505 } |
2505 | 2506 |
2506 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); | 2507 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); |
2507 } | 2508 } |
2508 | 2509 |
2509 } // namespace blink | 2510 } // namespace blink |
OLD | NEW |