Chromium Code Reviews| 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 568 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 579 | 579 |
| 580 bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation( | 580 bool ComputedStyle::DiffNeedsFullLayoutAndPaintInvalidation( |
| 581 const ComputedStyle& other) const { | 581 const ComputedStyle& other) const { |
| 582 // FIXME: Not all cases in this method need both full layout and paint | 582 // FIXME: Not all cases in this method need both full layout and paint |
| 583 // invalidation. | 583 // invalidation. |
| 584 // Should move cases into DiffNeedsFullLayout() if | 584 // Should move cases into DiffNeedsFullLayout() if |
| 585 // - don't need paint invalidation at all; | 585 // - don't need paint invalidation at all; |
| 586 // - or the layoutObject knows how to exactly invalidate paints caused by the | 586 // - or the layoutObject knows how to exactly invalidate paints caused by the |
| 587 // layout change instead of forced full paint invalidation. | 587 // layout change instead of forced full paint invalidation. |
| 588 | 588 |
| 589 if (surround_data_.Get() != other.surround_data_.Get()) { | |
| 590 // If our border widths change, then we need to layout. Other changes to | |
| 591 // borders only necessitate a paint invalidation. | |
| 592 if (!(BorderWidthEquals(BorderLeftWidth(), other.BorderLeftWidth())) || | |
|
shend
2017/05/12 06:59:17
The generated code does == directly, instead of Bo
nainar
2017/05/12 07:07:47
So I checked before I landed my CL splitting borde
| |
| 593 !(BorderWidthEquals(BorderTopWidth(), other.BorderTopWidth())) || | |
| 594 !(BorderWidthEquals(BorderBottomWidth(), other.BorderBottomWidth())) || | |
| 595 !(BorderWidthEquals(BorderRightWidth(), other.BorderRightWidth()))) | |
| 596 return true; | |
| 597 } | |
| 598 | |
| 599 if (ComputedStyleBase::DiffNeedsFullLayoutAndPaintInvalidation(other)) | 589 if (ComputedStyleBase::DiffNeedsFullLayoutAndPaintInvalidation(other)) |
| 600 return true; | 590 return true; |
| 601 | 591 |
| 602 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { | 592 if (rare_non_inherited_data_.Get() != other.rare_non_inherited_data_.Get()) { |
| 603 if (rare_non_inherited_data_->appearance_ != | 593 if (rare_non_inherited_data_->appearance_ != |
| 604 other.rare_non_inherited_data_->appearance_ || | 594 other.rare_non_inherited_data_->appearance_ || |
| 605 rare_non_inherited_data_->margin_before_collapse != | 595 rare_non_inherited_data_->margin_before_collapse != |
| 606 other.rare_non_inherited_data_->margin_before_collapse || | 596 other.rare_non_inherited_data_->margin_before_collapse || |
| 607 rare_non_inherited_data_->margin_after_collapse != | 597 rare_non_inherited_data_->margin_after_collapse != |
| 608 other.rare_non_inherited_data_->margin_after_collapse || | 598 other.rare_non_inherited_data_->margin_after_collapse || |
| (...skipping 1909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2518 if (value < 0) | 2508 if (value < 0) |
| 2519 fvalue -= 0.5f; | 2509 fvalue -= 0.5f; |
| 2520 else | 2510 else |
| 2521 fvalue += 0.5f; | 2511 fvalue += 0.5f; |
| 2522 } | 2512 } |
| 2523 | 2513 |
| 2524 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); | 2514 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); |
| 2525 } | 2515 } |
| 2526 | 2516 |
| 2527 } // namespace blink | 2517 } // namespace blink |
| OLD | NEW |