| 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 542 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 553 m_surround->margin != other.m_surround->margin) { | 553 m_surround->margin != other.m_surround->margin) { |
| 554 // Relative-positioned elements collapse their margins so need a full | 554 // Relative-positioned elements collapse their margins so need a full |
| 555 // layout. | 555 // layout. |
| 556 if (hasOutOfFlowPosition()) | 556 if (hasOutOfFlowPosition()) |
| 557 diff.setNeedsPositionedMovementLayout(); | 557 diff.setNeedsPositionedMovementLayout(); |
| 558 else | 558 else |
| 559 diff.setNeedsFullLayout(); | 559 diff.setNeedsFullLayout(); |
| 560 } | 560 } |
| 561 | 561 |
| 562 if (!diff.needsFullLayout() && position() != EPosition::kStatic && | 562 if (!diff.needsFullLayout() && position() != EPosition::kStatic && |
| 563 m_surround->offset != other.m_surround->offset) { | 563 !offsetEqual(other)) { |
| 564 // Optimize for the case where a positioned layer is moving but not changing | 564 // Optimize for the case where a positioned layer is moving but not changing |
| 565 // size. | 565 // size. |
| 566 if (dependenceOnContentHeightHasChanged(*this, other)) | 566 if (dependenceOnContentHeightHasChanged(*this, other)) |
| 567 diff.setNeedsFullLayout(); | 567 diff.setNeedsFullLayout(); |
| 568 else | 568 else |
| 569 diff.setNeedsPositionedMovementLayout(); | 569 diff.setNeedsPositionedMovementLayout(); |
| 570 } | 570 } |
| 571 | 571 |
| 572 if (diffNeedsPaintInvalidationSubtree(other)) | 572 if (diffNeedsPaintInvalidationSubtree(other)) |
| 573 diff.setNeedsPaintInvalidationSubtree(); | 573 diff.setNeedsPaintInvalidationSubtree(); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 602 if (m_box->width() != other.m_box->width() || | 602 if (m_box->width() != other.m_box->width() || |
| 603 m_box->minWidth() != other.m_box->minWidth() || | 603 m_box->minWidth() != other.m_box->minWidth() || |
| 604 m_box->maxWidth() != other.m_box->maxWidth() || | 604 m_box->maxWidth() != other.m_box->maxWidth() || |
| 605 m_box->height() != other.m_box->height() || | 605 m_box->height() != other.m_box->height() || |
| 606 m_box->minHeight() != other.m_box->minHeight() || | 606 m_box->minHeight() != other.m_box->minHeight() || |
| 607 m_box->maxHeight() != other.m_box->maxHeight()) | 607 m_box->maxHeight() != other.m_box->maxHeight()) |
| 608 return true; | 608 return true; |
| 609 } | 609 } |
| 610 | 610 |
| 611 if (m_surround.get() != other.m_surround.get()) { | 611 if (m_surround.get() != other.m_surround.get()) { |
| 612 if (m_surround->margin != other.m_surround->margin || | 612 if (m_surround->margin != other.m_surround->margin || !offsetEqual(other) || |
| 613 m_surround->offset != other.m_surround->offset || | |
| 614 m_surround->padding != other.m_surround->padding) | 613 m_surround->padding != other.m_surround->padding) |
| 615 return true; | 614 return true; |
| 616 } | 615 } |
| 617 | 616 |
| 618 if (diff.transformChanged()) | 617 if (diff.transformChanged()) |
| 619 return true; | 618 return true; |
| 620 | 619 |
| 621 return false; | 620 return false; |
| 622 } | 621 } |
| 623 | 622 |
| (...skipping 1847 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2471 if (value < 0) | 2470 if (value < 0) |
| 2472 fvalue -= 0.5f; | 2471 fvalue -= 0.5f; |
| 2473 else | 2472 else |
| 2474 fvalue += 0.5f; | 2473 fvalue += 0.5f; |
| 2475 } | 2474 } |
| 2476 | 2475 |
| 2477 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2476 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
| 2478 } | 2477 } |
| 2479 | 2478 |
| 2480 } // namespace blink | 2479 } // namespace blink |
| OLD | NEW |