| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
| 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
| 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. |
| 7 * Copyright (C) 2010 Google Inc. All rights reserved. | 7 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 8 * | 8 * |
| 9 * This library is free software; you can redistribute it and/or | 9 * This library is free software; you can redistribute it and/or |
| 10 * modify it under the terms of the GNU Library General Public | 10 * modify it under the terms of the GNU Library General Public |
| (...skipping 424 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 435 LayoutUnit pRight = includeRightEdge ? paddingRight() : LayoutUnit(); | 435 LayoutUnit pRight = includeRightEdge ? paddingRight() : LayoutUnit(); |
| 436 | 436 |
| 437 GraphicsContextStateSaver clipWithScrollingStateSaver(*context, clippedWithL
ocalScrolling); | 437 GraphicsContextStateSaver clipWithScrollingStateSaver(*context, clippedWithL
ocalScrolling); |
| 438 LayoutRect scrolledPaintRect = rect; | 438 LayoutRect scrolledPaintRect = rect; |
| 439 if (clippedWithLocalScrolling) { | 439 if (clippedWithLocalScrolling) { |
| 440 // Clip to the overflow area. | 440 // Clip to the overflow area. |
| 441 RenderBox* thisBox = toRenderBox(this); | 441 RenderBox* thisBox = toRenderBox(this); |
| 442 context->clip(thisBox->overflowClipRect(rect.location())); | 442 context->clip(thisBox->overflowClipRect(rect.location())); |
| 443 | 443 |
| 444 // Adjust the paint rect to reflect a scrolled content box with borders
at the ends. | 444 // Adjust the paint rect to reflect a scrolled content box with borders
at the ends. |
| 445 IntSize offset = thisBox->scrolledContentOffset(); | 445 scrolledPaintRect.setWidth(bLeft + thisBox->clientWidth() + bRight); |
| 446 scrolledPaintRect.move(-offset); | 446 scrolledPaintRect.setHeight(borderTop() + thisBox->clientHeight() + bord
erBottom()); |
| 447 scrolledPaintRect.setWidth(bLeft + thisBox->scrollWidth() + bRight); | |
| 448 scrolledPaintRect.setHeight(borderTop() + thisBox->scrollHeight() + bord
erBottom()); | |
| 449 } | 447 } |
| 450 | 448 |
| 451 GraphicsContextStateSaver backgroundClipStateSaver(*context, false); | 449 GraphicsContextStateSaver backgroundClipStateSaver(*context, false); |
| 452 IntRect maskRect; | 450 IntRect maskRect; |
| 453 | 451 |
| 454 switch (bgLayer.clip()) { | 452 switch (bgLayer.clip()) { |
| 455 case PaddingFillBox: | 453 case PaddingFillBox: |
| 456 case ContentFillBox: { | 454 case ContentFillBox: { |
| 457 if (clipToBorderRadius) | 455 if (clipToBorderRadius) |
| 458 break; | 456 break; |
| (...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 725 { | 723 { |
| 726 LayoutUnit left = 0; | 724 LayoutUnit left = 0; |
| 727 LayoutUnit top = 0; | 725 LayoutUnit top = 0; |
| 728 IntSize positioningAreaSize; | 726 IntSize positioningAreaSize; |
| 729 IntRect snappedPaintRect = pixelSnappedIntRect(paintRect); | 727 IntRect snappedPaintRect = pixelSnappedIntRect(paintRect); |
| 730 | 728 |
| 731 // Determine the background positioning area and set destRect to the backgro
und painting area. | 729 // Determine the background positioning area and set destRect to the backgro
und painting area. |
| 732 // destRect will be adjusted later if the background is non-repeating. | 730 // destRect will be adjusted later if the background is non-repeating. |
| 733 // FIXME: transforms spec says that fixed backgrounds behave like scroll ins
ide transforms. | 731 // FIXME: transforms spec says that fixed backgrounds behave like scroll ins
ide transforms. |
| 734 bool fixedAttachment = fillLayer.attachment() == FixedBackgroundAttachment; | 732 bool fixedAttachment = fillLayer.attachment() == FixedBackgroundAttachment; |
| 735 | |
| 736 if (RuntimeEnabledFeatures::fastMobileScrollingEnabled()) { | |
| 737 // As a side effect of an optimization to blit on scroll, we do not hono
r the CSS | |
| 738 // property "background-attachment: fixed" because it may result in rend
ering | |
| 739 // artifacts. Note, these artifacts only appear if we are blitting on sc
roll of | |
| 740 // a page that has fixed background images. | |
| 741 fixedAttachment = false; | |
| 742 } | |
| 743 | |
| 744 if (!fixedAttachment) { | 733 if (!fixedAttachment) { |
| 745 geometry.setDestRect(snappedPaintRect); | 734 geometry.setDestRect(snappedPaintRect); |
| 746 | 735 |
| 747 LayoutUnit right = 0; | 736 LayoutUnit right = 0; |
| 748 LayoutUnit bottom = 0; | 737 LayoutUnit bottom = 0; |
| 749 // Scroll and Local. | 738 // Scroll and Local. |
| 750 if (fillLayer.origin() != BorderFillBox) { | 739 if (fillLayer.origin() != BorderFillBox) { |
| 751 left = borderLeft(); | 740 left = borderLeft(); |
| 752 right = borderRight(); | 741 right = borderRight(); |
| 753 top = borderTop(); | 742 top = borderTop(); |
| (...skipping 1724 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2478 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); | 2467 ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
| 2479 for (RenderObject* child = slowFirstChild(); child; ) { | 2468 for (RenderObject* child = slowFirstChild(); child; ) { |
| 2480 // Save our next sibling as moveChildTo will clear it. | 2469 // Save our next sibling as moveChildTo will clear it. |
| 2481 RenderObject* nextSibling = child->nextSibling(); | 2470 RenderObject* nextSibling = child->nextSibling(); |
| 2482 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); | 2471 moveChildTo(toBoxModelObject, child, beforeChild, fullRemoveInsert); |
| 2483 child = nextSibling; | 2472 child = nextSibling; |
| 2484 } | 2473 } |
| 2485 } | 2474 } |
| 2486 | 2475 |
| 2487 } // namespace blink | 2476 } // namespace blink |
| OLD | NEW |