| 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 | 520 |
| 521 if ((!diff.NeedsFullLayout() || !diff.NeedsFullPaintInvalidation()) && | 521 if ((!diff.NeedsFullLayout() || !diff.NeedsFullPaintInvalidation()) && |
| 522 DiffNeedsFullLayoutAndPaintInvalidation(other)) { | 522 DiffNeedsFullLayoutAndPaintInvalidation(other)) { |
| 523 diff.SetNeedsFullLayout(); | 523 diff.SetNeedsFullLayout(); |
| 524 diff.SetNeedsPaintInvalidationObject(); | 524 diff.SetNeedsPaintInvalidationObject(); |
| 525 } | 525 } |
| 526 | 526 |
| 527 if (!diff.NeedsFullLayout() && DiffNeedsFullLayout(other)) | 527 if (!diff.NeedsFullLayout() && DiffNeedsFullLayout(other)) |
| 528 diff.SetNeedsFullLayout(); | 528 diff.SetNeedsFullLayout(); |
| 529 | 529 |
| 530 if (!diff.NeedsFullLayout() && Margin() != other.Margin()) { | 530 if (!diff.NeedsFullLayout() && !MarginEqual(other)) { |
| 531 // Relative-positioned elements collapse their margins so need a full | 531 // Relative-positioned elements collapse their margins so need a full |
| 532 // layout. | 532 // layout. |
| 533 if (HasOutOfFlowPosition()) | 533 if (HasOutOfFlowPosition()) |
| 534 diff.SetNeedsPositionedMovementLayout(); | 534 diff.SetNeedsPositionedMovementLayout(); |
| 535 else | 535 else |
| 536 diff.SetNeedsFullLayout(); | 536 diff.SetNeedsFullLayout(); |
| 537 } | 537 } |
| 538 | 538 |
| 539 if (!diff.NeedsFullLayout() && GetPosition() != EPosition::kStatic && | 539 if (!diff.NeedsFullLayout() && GetPosition() != EPosition::kStatic && |
| 540 !OffsetEqual(other)) { | 540 !OffsetEqual(other)) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 if (box_->Width() != other.box_->Width() || | 582 if (box_->Width() != other.box_->Width() || |
| 583 box_->MinWidth() != other.box_->MinWidth() || | 583 box_->MinWidth() != other.box_->MinWidth() || |
| 584 box_->MaxWidth() != other.box_->MaxWidth() || | 584 box_->MaxWidth() != other.box_->MaxWidth() || |
| 585 box_->Height() != other.box_->Height() || | 585 box_->Height() != other.box_->Height() || |
| 586 box_->MinHeight() != other.box_->MinHeight() || | 586 box_->MinHeight() != other.box_->MinHeight() || |
| 587 box_->MaxHeight() != other.box_->MaxHeight()) | 587 box_->MaxHeight() != other.box_->MaxHeight()) |
| 588 return true; | 588 return true; |
| 589 } | 589 } |
| 590 | 590 |
| 591 if (surround_.Get() != other.surround_.Get()) { | 591 if (surround_.Get() != other.surround_.Get()) { |
| 592 if (Margin() != other.Margin() || !OffsetEqual(other) || | 592 if (!MarginEqual(other) || !OffsetEqual(other) || |
| 593 Padding() != other.Padding()) | 593 Padding() != other.Padding()) |
| 594 return true; | 594 return true; |
| 595 } | 595 } |
| 596 | 596 |
| 597 if (diff.TransformChanged()) | 597 if (diff.TransformChanged()) |
| 598 return true; | 598 return true; |
| 599 | 599 |
| 600 return false; | 600 return false; |
| 601 } | 601 } |
| 602 | 602 |
| (...skipping 1900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2503 if (value < 0) | 2503 if (value < 0) |
| 2504 fvalue -= 0.5f; | 2504 fvalue -= 0.5f; |
| 2505 else | 2505 else |
| 2506 fvalue += 0.5f; | 2506 fvalue += 0.5f; |
| 2507 } | 2507 } |
| 2508 | 2508 |
| 2509 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); | 2509 return RoundForImpreciseConversion<int>(fvalue / zoom_factor); |
| 2510 } | 2510 } |
| 2511 | 2511 |
| 2512 } // namespace blink | 2512 } // namespace blink |
| OLD | NEW |