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 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 m_surround->margin != other.m_surround->margin) { | 535 m_surround->margin != other.m_surround->margin) { |
536 // Relative-positioned elements collapse their margins so need a full | 536 // Relative-positioned elements collapse their margins so need a full |
537 // layout. | 537 // layout. |
538 if (hasOutOfFlowPosition()) | 538 if (hasOutOfFlowPosition()) |
539 diff.setNeedsPositionedMovementLayout(); | 539 diff.setNeedsPositionedMovementLayout(); |
540 else | 540 else |
541 diff.setNeedsFullLayout(); | 541 diff.setNeedsFullLayout(); |
542 } | 542 } |
543 | 543 |
544 if (!diff.needsFullLayout() && position() != EPosition::kStatic && | 544 if (!diff.needsFullLayout() && position() != EPosition::kStatic && |
545 m_surround->offset != other.m_surround->offset) { | 545 !offsetEqual(other)) { |
546 // Optimize for the case where a positioned layer is moving but not changing | 546 // Optimize for the case where a positioned layer is moving but not changing |
547 // size. | 547 // size. |
548 if (dependenceOnContentHeightHasChanged(*this, other)) | 548 if (dependenceOnContentHeightHasChanged(*this, other)) |
549 diff.setNeedsFullLayout(); | 549 diff.setNeedsFullLayout(); |
550 else | 550 else |
551 diff.setNeedsPositionedMovementLayout(); | 551 diff.setNeedsPositionedMovementLayout(); |
552 } | 552 } |
553 | 553 |
554 if (diffNeedsPaintInvalidationSubtree(other)) | 554 if (diffNeedsPaintInvalidationSubtree(other)) |
555 diff.setNeedsPaintInvalidationSubtree(); | 555 diff.setNeedsPaintInvalidationSubtree(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
587 if (m_box->width() != other.m_box->width() || | 587 if (m_box->width() != other.m_box->width() || |
588 m_box->minWidth() != other.m_box->minWidth() || | 588 m_box->minWidth() != other.m_box->minWidth() || |
589 m_box->maxWidth() != other.m_box->maxWidth() || | 589 m_box->maxWidth() != other.m_box->maxWidth() || |
590 m_box->height() != other.m_box->height() || | 590 m_box->height() != other.m_box->height() || |
591 m_box->minHeight() != other.m_box->minHeight() || | 591 m_box->minHeight() != other.m_box->minHeight() || |
592 m_box->maxHeight() != other.m_box->maxHeight()) | 592 m_box->maxHeight() != other.m_box->maxHeight()) |
593 return true; | 593 return true; |
594 } | 594 } |
595 | 595 |
596 if (m_surround.get() != other.m_surround.get()) { | 596 if (m_surround.get() != other.m_surround.get()) { |
597 if (m_surround->margin != other.m_surround->margin || | 597 if (m_surround->margin != other.m_surround->margin || !offsetEqual(other) || |
598 m_surround->offset != other.m_surround->offset || | |
599 m_surround->padding != other.m_surround->padding) | 598 m_surround->padding != other.m_surround->padding) |
600 return true; | 599 return true; |
601 } | 600 } |
602 | 601 |
603 if (diff.transformChanged()) | 602 if (diff.transformChanged()) |
604 return true; | 603 return true; |
605 | 604 |
606 return false; | 605 return false; |
607 } | 606 } |
608 | 607 |
(...skipping 1886 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2495 if (value < 0) | 2494 if (value < 0) |
2496 fvalue -= 0.5f; | 2495 fvalue -= 0.5f; |
2497 else | 2496 else |
2498 fvalue += 0.5f; | 2497 fvalue += 0.5f; |
2499 } | 2498 } |
2500 | 2499 |
2501 return roundForImpreciseConversion<int>(fvalue / zoomFactor); | 2500 return roundForImpreciseConversion<int>(fvalue / zoomFactor); |
2502 } | 2501 } |
2503 | 2502 |
2504 } // namespace blink | 2503 } // namespace blink |
OLD | NEW |