| 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 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 586 rare_non_inherited_data_->margin_after_collapse != | 586 rare_non_inherited_data_->margin_after_collapse != |
| 587 other.rare_non_inherited_data_->margin_after_collapse || | 587 other.rare_non_inherited_data_->margin_after_collapse || |
| 588 rare_non_inherited_data_->line_clamp != | 588 rare_non_inherited_data_->line_clamp != |
| 589 other.rare_non_inherited_data_->line_clamp || | 589 other.rare_non_inherited_data_->line_clamp || |
| 590 rare_non_inherited_data_->text_overflow != | 590 rare_non_inherited_data_->text_overflow != |
| 591 other.rare_non_inherited_data_->text_overflow || | 591 other.rare_non_inherited_data_->text_overflow || |
| 592 rare_non_inherited_data_->shape_margin_ != | 592 rare_non_inherited_data_->shape_margin_ != |
| 593 other.rare_non_inherited_data_->shape_margin_ || | 593 other.rare_non_inherited_data_->shape_margin_ || |
| 594 rare_non_inherited_data_->order_ != | 594 rare_non_inherited_data_->order_ != |
| 595 other.rare_non_inherited_data_->order_ || | 595 other.rare_non_inherited_data_->order_ || |
| 596 rare_non_inherited_data_->HasFilters() != | 596 HasFilters() != other.HasFilters()) |
| 597 other.rare_non_inherited_data_->HasFilters()) | |
| 598 return true; | 597 return true; |
| 599 | 598 |
| 600 if (rare_non_inherited_data_->grid_.Get() != | 599 if (rare_non_inherited_data_->grid_.Get() != |
| 601 other.rare_non_inherited_data_->grid_.Get() && | 600 other.rare_non_inherited_data_->grid_.Get() && |
| 602 *rare_non_inherited_data_->grid_.Get() != | 601 *rare_non_inherited_data_->grid_.Get() != |
| 603 *other.rare_non_inherited_data_->grid_.Get()) | 602 *other.rare_non_inherited_data_->grid_.Get()) |
| 604 return true; | 603 return true; |
| 605 | 604 |
| 606 if (rare_non_inherited_data_->grid_item_.Get() != | 605 if (rare_non_inherited_data_->grid_item_.Get() != |
| 607 other.rare_non_inherited_data_->grid_item_.Get() && | 606 other.rare_non_inherited_data_->grid_item_.Get() && |
| (...skipping 25 matching lines...) Expand all Loading... |
| 633 rare_non_inherited_data_->counter_directives_.get(); | 632 rare_non_inherited_data_->counter_directives_.get(); |
| 634 const CounterDirectiveMap* map_b = | 633 const CounterDirectiveMap* map_b = |
| 635 other.rare_non_inherited_data_->counter_directives_.get(); | 634 other.rare_non_inherited_data_->counter_directives_.get(); |
| 636 if (!(map_a == map_b || (map_a && map_b && *map_a == *map_b))) | 635 if (!(map_a == map_b || (map_a && map_b && *map_a == *map_b))) |
| 637 return true; | 636 return true; |
| 638 | 637 |
| 639 // We only need do layout for opacity changes if adding or losing opacity | 638 // We only need do layout for opacity changes if adding or losing opacity |
| 640 // could trigger a change | 639 // could trigger a change |
| 641 // in us being a stacking context. | 640 // in us being a stacking context. |
| 642 if (IsStackingContext() != other.IsStackingContext() && | 641 if (IsStackingContext() != other.IsStackingContext() && |
| 643 rare_non_inherited_data_->HasOpacity() != | 642 HasOpacity() != other.HasOpacity()) { |
| 644 other.rare_non_inherited_data_->HasOpacity()) { | |
| 645 // FIXME: We would like to use SimplifiedLayout here, but we can't quite | 643 // FIXME: We would like to use SimplifiedLayout here, but we can't quite |
| 646 // do that yet. We need to make sure SimplifiedLayout can operate | 644 // do that yet. We need to make sure SimplifiedLayout can operate |
| 647 // correctly on LayoutInlines (we will need to add a | 645 // correctly on LayoutInlines (we will need to add a |
| 648 // selfNeedsSimplifiedLayout bit in order to not get confused and taint | 646 // selfNeedsSimplifiedLayout bit in order to not get confused and taint |
| 649 // every line). In addition we need to solve the floating object issue | 647 // every line). In addition we need to solve the floating object issue |
| 650 // when layers come and go. Right now a full layout is necessary to keep | 648 // when layers come and go. Right now a full layout is necessary to keep |
| 651 // floating object lists sane. | 649 // floating object lists sane. |
| 652 return true; | 650 return true; |
| 653 } | 651 } |
| 654 } | 652 } |
| (...skipping 643 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1298 ApplyMotionPathTransform(origin_x, origin_y, bounding_box, result); | 1296 ApplyMotionPathTransform(origin_x, origin_y, bounding_box, result); |
| 1299 | 1297 |
| 1300 for (const auto& operation : Transform().Operations()) | 1298 for (const auto& operation : Transform().Operations()) |
| 1301 operation->Apply(result, box_size); | 1299 operation->Apply(result, box_size); |
| 1302 | 1300 |
| 1303 if (apply_transform_origin) { | 1301 if (apply_transform_origin) { |
| 1304 result.Translate3d(-origin_x, -origin_y, -origin_z); | 1302 result.Translate3d(-origin_x, -origin_y, -origin_z); |
| 1305 } | 1303 } |
| 1306 } | 1304 } |
| 1307 | 1305 |
| 1306 bool ComputedStyle::HasFilters() const { |
| 1307 return rare_non_inherited_data_->filter_.Get() && |
| 1308 !rare_non_inherited_data_->filter_->operations_.IsEmpty(); |
| 1309 } |
| 1310 |
| 1308 void ComputedStyle::ApplyMotionPathTransform( | 1311 void ComputedStyle::ApplyMotionPathTransform( |
| 1309 float origin_x, | 1312 float origin_x, |
| 1310 float origin_y, | 1313 float origin_y, |
| 1311 const FloatRect& bounding_box, | 1314 const FloatRect& bounding_box, |
| 1312 TransformationMatrix& transform) const { | 1315 TransformationMatrix& transform) const { |
| 1313 const StyleMotionData& motion_data = | 1316 const StyleMotionData& motion_data = |
| 1314 rare_non_inherited_data_->transform_->motion_; | 1317 rare_non_inherited_data_->transform_->motion_; |
| 1315 // TODO(ericwilligers): crbug.com/638055 Apply offset-position. | 1318 // TODO(ericwilligers): crbug.com/638055 Apply offset-position. |
| 1316 if (!motion_data.path_) { | 1319 if (!motion_data.path_) { |
| 1317 return; | 1320 return; |
| (...skipping 1176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2494 if (value < 0) | 2497 if (value < 0) |
| 2495 fvalue -= 0.5f; | 2498 fvalue -= 0.5f; |
| 2496 else | 2499 else |
| 2497 fvalue += 0.5f; | 2500 fvalue += 0.5f; |
| 2498 } | 2501 } |
| 2499 | 2502 |
| 2500 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); | 2503 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); |
| 2501 } | 2504 } |
| 2502 | 2505 |
| 2503 } // namespace blink | 2506 } // namespace blink |
| OLD | NEW |