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 960 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
971 diff.SetTransformChanged(); | 971 diff.SetTransformChanged(); |
972 } | 972 } |
973 | 973 |
974 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { | 974 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { |
975 if (rare_non_inherited_data_->opacity != | 975 if (rare_non_inherited_data_->opacity != |
976 other.rare_non_inherited_data_->opacity) | 976 other.rare_non_inherited_data_->opacity) |
977 diff.SetOpacityChanged(); | 977 diff.SetOpacityChanged(); |
978 } | 978 } |
979 | 979 |
980 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { | 980 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { |
981 if (rare_non_inherited_data_->filter_ != | 981 if ((rare_non_inherited_data_->filter_ != |
982 other.rare_non_inherited_data_->filter_) | 982 other.rare_non_inherited_data_->filter_) || |
| 983 !rare_non_inherited_data_->ReflectionDataEquivalent( |
| 984 *other.rare_non_inherited_data_.Get())) |
983 diff.SetFilterChanged(); | 985 diff.SetFilterChanged(); |
984 } | 986 } |
985 | 987 |
986 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { | 988 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { |
987 if (!rare_non_inherited_data_->ShadowDataEquivalent( | 989 if (!rare_non_inherited_data_->ShadowDataEquivalent( |
988 *other.rare_non_inherited_data_.Get())) | 990 *other.rare_non_inherited_data_.Get()) || |
| 991 !rare_non_inherited_data_->outline_.VisuallyEqual( |
| 992 other.rare_non_inherited_data_->outline_)) |
989 diff.SetNeedsRecomputeOverflow(); | 993 diff.SetNeedsRecomputeOverflow(); |
990 } | 994 } |
991 | 995 |
| 996 if (!BorderVisualOverflowEqual(other)) |
| 997 diff.SetNeedsRecomputeOverflow(); |
| 998 |
992 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { | 999 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { |
993 if (rare_non_inherited_data_->backdrop_filter_ != | 1000 if (rare_non_inherited_data_->backdrop_filter_ != |
994 other.rare_non_inherited_data_->backdrop_filter_) | 1001 other.rare_non_inherited_data_->backdrop_filter_) |
995 diff.SetBackdropFilterChanged(); | 1002 diff.SetBackdropFilterChanged(); |
996 } | 1003 } |
997 | 1004 |
998 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { | |
999 if (!rare_non_inherited_data_->ReflectionDataEquivalent( | |
1000 *other.rare_non_inherited_data_.Get())) | |
1001 diff.SetFilterChanged(); | |
1002 } | |
1003 | |
1004 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { | |
1005 if (!rare_non_inherited_data_->outline_.VisuallyEqual( | |
1006 other.rare_non_inherited_data_->outline_)) | |
1007 diff.SetNeedsRecomputeOverflow(); | |
1008 } | |
1009 | |
1010 if (!BorderVisualOverflowEqual(other)) | |
1011 diff.SetNeedsRecomputeOverflow(); | |
1012 | |
1013 if (!diff.NeedsFullPaintInvalidation()) { | 1005 if (!diff.NeedsFullPaintInvalidation()) { |
1014 if (inherited_data_->color_ != other.inherited_data_->color_ || | 1006 if ((inherited_data_->color_ != other.inherited_data_->color_ || |
1015 inherited_data_->visited_link_color_ != | 1007 inherited_data_->visited_link_color_ != |
1016 other.inherited_data_->visited_link_color_ || | 1008 other.inherited_data_->visited_link_color_ || |
1017 HasSimpleUnderlineInternal() != other.HasSimpleUnderlineInternal() || | 1009 HasSimpleUnderlineInternal() != other.HasSimpleUnderlineInternal() || |
1018 visual_data_->text_decoration_ != | 1010 visual_data_->text_decoration_ != |
1019 other.visual_data_->text_decoration_) { | 1011 other.visual_data_->text_decoration_) || |
| 1012 (rare_non_inherited_data_.Get() != |
| 1013 other.rare_non_inherited_data_.Get() && |
| 1014 (rare_non_inherited_data_->text_decoration_style_ != |
| 1015 other.rare_non_inherited_data_->text_decoration_style_ || |
| 1016 rare_non_inherited_data_->text_decoration_color_ != |
| 1017 other.rare_non_inherited_data_->text_decoration_color_ || |
| 1018 rare_non_inherited_data_->visited_link_text_decoration_color_ != |
| 1019 other.rare_non_inherited_data_ |
| 1020 ->visited_link_text_decoration_color_)) || |
| 1021 (rare_inherited_data_.Get() != other.rare_inherited_data_.Get() && |
| 1022 (TextFillColor() != other.TextFillColor() || |
| 1023 TextStrokeColor() != other.TextStrokeColor() || |
| 1024 TextEmphasisColor() != other.TextEmphasisColor() || |
| 1025 VisitedLinkTextFillColor() != other.VisitedLinkTextFillColor() || |
| 1026 VisitedLinkTextStrokeColor() != other.VisitedLinkTextStrokeColor() || |
| 1027 VisitedLinkTextEmphasisColor() != |
| 1028 other.VisitedLinkTextEmphasisColor() || |
| 1029 rare_inherited_data_->text_emphasis_fill_ != |
| 1030 other.rare_inherited_data_->text_emphasis_fill_ || |
| 1031 rare_inherited_data_->text_underline_position_ != |
| 1032 other.rare_inherited_data_->text_underline_position_ || |
| 1033 rare_inherited_data_->text_decoration_skip_ != |
| 1034 other.rare_inherited_data_->text_decoration_skip_ || |
| 1035 rare_inherited_data_->applied_text_decorations_ != |
| 1036 other.rare_inherited_data_->applied_text_decorations_ || |
| 1037 CaretColor() != CaretColor() || |
| 1038 VisitedLinkCaretColor() != other.VisitedLinkCaretColor()))) { |
1020 diff.SetTextDecorationOrColorChanged(); | 1039 diff.SetTextDecorationOrColorChanged(); |
1021 } else { | |
1022 if (rare_non_inherited_data_.Get() != | |
1023 other.rare_non_inherited_data_.Get() && | |
1024 (rare_non_inherited_data_->text_decoration_style_ != | |
1025 other.rare_non_inherited_data_->text_decoration_style_ || | |
1026 rare_non_inherited_data_->text_decoration_color_ != | |
1027 other.rare_non_inherited_data_->text_decoration_color_ || | |
1028 rare_non_inherited_data_->visited_link_text_decoration_color_ != | |
1029 other.rare_non_inherited_data_ | |
1030 ->visited_link_text_decoration_color_)) { | |
1031 diff.SetTextDecorationOrColorChanged(); | |
1032 } else { | |
1033 if (rare_inherited_data_.Get() != other.rare_inherited_data_.Get() && | |
1034 (TextFillColor() != other.TextFillColor() || | |
1035 TextStrokeColor() != other.TextStrokeColor() || | |
1036 TextEmphasisColor() != other.TextEmphasisColor() || | |
1037 VisitedLinkTextFillColor() != other.VisitedLinkTextFillColor() || | |
1038 VisitedLinkTextStrokeColor() != | |
1039 other.VisitedLinkTextStrokeColor() || | |
1040 VisitedLinkTextEmphasisColor() != | |
1041 other.VisitedLinkTextEmphasisColor() || | |
1042 rare_inherited_data_->text_emphasis_fill_ != | |
1043 other.rare_inherited_data_->text_emphasis_fill_ || | |
1044 rare_inherited_data_->text_underline_position_ != | |
1045 other.rare_inherited_data_->text_underline_position_ || | |
1046 rare_inherited_data_->text_decoration_skip_ != | |
1047 other.rare_inherited_data_->text_decoration_skip_ || | |
1048 rare_inherited_data_->applied_text_decorations_ != | |
1049 other.rare_inherited_data_->applied_text_decorations_ || | |
1050 CaretColor() != CaretColor() || | |
1051 VisitedLinkCaretColor() != other.VisitedLinkCaretColor())) { | |
1052 diff.SetTextDecorationOrColorChanged(); | |
1053 } | |
1054 } | |
1055 } | 1040 } |
1056 } | 1041 } |
1057 | 1042 |
1058 bool has_clip = HasOutOfFlowPosition() && !visual_data_->has_auto_clip_; | 1043 bool has_clip = HasOutOfFlowPosition() && !visual_data_->has_auto_clip_; |
1059 bool other_has_clip = | 1044 bool other_has_clip = |
1060 other.HasOutOfFlowPosition() && !other.visual_data_->has_auto_clip_; | 1045 other.HasOutOfFlowPosition() && !other.visual_data_->has_auto_clip_; |
1061 if (has_clip != other_has_clip || | 1046 if (has_clip != other_has_clip || |
1062 (has_clip && visual_data_->clip_ != other.visual_data_->clip_)) | 1047 (has_clip && visual_data_->clip_ != other.visual_data_->clip_)) |
1063 diff.SetCSSClipChanged(); | 1048 diff.SetCSSClipChanged(); |
1064 } | 1049 } |
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2483 if (value < 0) | 2468 if (value < 0) |
2484 fvalue -= 0.5f; | 2469 fvalue -= 0.5f; |
2485 else | 2470 else |
2486 fvalue += 0.5f; | 2471 fvalue += 0.5f; |
2487 } | 2472 } |
2488 | 2473 |
2489 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); | 2474 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); |
2490 } | 2475 } |
2491 | 2476 |
2492 } // namespace blink | 2477 } // namespace blink |
OLD | NEW |