| 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, 2010 Apple Inc. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. |
| 7 * All rights reserved. | 7 * All rights reserved. |
| 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 693 if (frame()->page()->autoscrollController().autoscrollInProgress()) | 693 if (frame()->page()->autoscrollController().autoscrollInProgress()) |
| 694 parentBox = enclosingScrollableBox(); | 694 parentBox = enclosingScrollableBox(); |
| 695 | 695 |
| 696 if (parentBox) | 696 if (parentBox) |
| 697 parentBox->scrollRectToVisible(newRect, alignX, alignY, scrollType, | 697 parentBox->scrollRectToVisible(newRect, alignX, alignY, scrollType, |
| 698 makeVisibleInVisualViewport); | 698 makeVisibleInVisualViewport); |
| 699 } | 699 } |
| 700 | 700 |
| 701 void LayoutBox::absoluteRects(Vector<IntRect>& rects, | 701 void LayoutBox::absoluteRects(Vector<IntRect>& rects, |
| 702 const LayoutPoint& accumulatedOffset) const { | 702 const LayoutPoint& accumulatedOffset) const { |
| 703 rects.append(pixelSnappedIntRect(accumulatedOffset, size())); | 703 rects.push_back(pixelSnappedIntRect(accumulatedOffset, size())); |
| 704 } | 704 } |
| 705 | 705 |
| 706 void LayoutBox::absoluteQuads(Vector<FloatQuad>& quads, | 706 void LayoutBox::absoluteQuads(Vector<FloatQuad>& quads, |
| 707 MapCoordinatesFlags mode) const { | 707 MapCoordinatesFlags mode) const { |
| 708 if (LayoutFlowThread* flowThread = flowThreadContainingBlock()) { | 708 if (LayoutFlowThread* flowThread = flowThreadContainingBlock()) { |
| 709 flowThread->absoluteQuadsForDescendant(*this, quads, mode); | 709 flowThread->absoluteQuadsForDescendant(*this, quads, mode); |
| 710 return; | 710 return; |
| 711 } | 711 } |
| 712 quads.append( | 712 quads.push_back( |
| 713 localToAbsoluteQuad(FloatRect(0, 0, m_frameRect.width().toFloat(), | 713 localToAbsoluteQuad(FloatRect(0, 0, m_frameRect.width().toFloat(), |
| 714 m_frameRect.height().toFloat()), | 714 m_frameRect.height().toFloat()), |
| 715 mode)); | 715 mode)); |
| 716 } | 716 } |
| 717 | 717 |
| 718 FloatRect LayoutBox::localBoundingBoxRectForAccessibility() const { | 718 FloatRect LayoutBox::localBoundingBoxRectForAccessibility() const { |
| 719 return FloatRect(0, 0, m_frameRect.width().toFloat(), | 719 return FloatRect(0, 0, m_frameRect.width().toFloat(), |
| 720 m_frameRect.height().toFloat()); | 720 m_frameRect.height().toFloat()); |
| 721 } | 721 } |
| 722 | 722 |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 899 break; | 899 break; |
| 900 default: | 900 default: |
| 901 break; | 901 break; |
| 902 } | 902 } |
| 903 return LayoutRect(); | 903 return LayoutRect(); |
| 904 } | 904 } |
| 905 | 905 |
| 906 void LayoutBox::addOutlineRects(Vector<LayoutRect>& rects, | 906 void LayoutBox::addOutlineRects(Vector<LayoutRect>& rects, |
| 907 const LayoutPoint& additionalOffset, | 907 const LayoutPoint& additionalOffset, |
| 908 IncludeBlockVisualOverflowOrNot) const { | 908 IncludeBlockVisualOverflowOrNot) const { |
| 909 rects.append(LayoutRect(additionalOffset, size())); | 909 rects.push_back(LayoutRect(additionalOffset, size())); |
| 910 } | 910 } |
| 911 | 911 |
| 912 bool LayoutBox::canResize() const { | 912 bool LayoutBox::canResize() const { |
| 913 // We need a special case for <iframe> because they never have | 913 // We need a special case for <iframe> because they never have |
| 914 // hasOverflowClip(). However, they do "implicitly" clip their contents, so | 914 // hasOverflowClip(). However, they do "implicitly" clip their contents, so |
| 915 // we want to allow resizing them also. | 915 // we want to allow resizing them also. |
| 916 return (hasOverflowClip() || isLayoutIFrame()) && | 916 return (hasOverflowClip() || isLayoutIFrame()) && |
| 917 style()->resize() != RESIZE_NONE; | 917 style()->resize() != RESIZE_NONE; |
| 918 } | 918 } |
| 919 | 919 |
| 920 void LayoutBox::addLayerHitTestRects(LayerHitTestRects& layerRects, | 920 void LayoutBox::addLayerHitTestRects(LayerHitTestRects& layerRects, |
| 921 const PaintLayer* currentLayer, | 921 const PaintLayer* currentLayer, |
| 922 const LayoutPoint& layerOffset, | 922 const LayoutPoint& layerOffset, |
| 923 const LayoutRect& containerRect) const { | 923 const LayoutRect& containerRect) const { |
| 924 LayoutPoint adjustedLayerOffset = layerOffset + locationOffset(); | 924 LayoutPoint adjustedLayerOffset = layerOffset + locationOffset(); |
| 925 LayoutBoxModelObject::addLayerHitTestRects( | 925 LayoutBoxModelObject::addLayerHitTestRects( |
| 926 layerRects, currentLayer, adjustedLayerOffset, containerRect); | 926 layerRects, currentLayer, adjustedLayerOffset, containerRect); |
| 927 } | 927 } |
| 928 | 928 |
| 929 void LayoutBox::computeSelfHitTestRects(Vector<LayoutRect>& rects, | 929 void LayoutBox::computeSelfHitTestRects(Vector<LayoutRect>& rects, |
| 930 const LayoutPoint& layerOffset) const { | 930 const LayoutPoint& layerOffset) const { |
| 931 if (!size().isEmpty()) | 931 if (!size().isEmpty()) |
| 932 rects.append(LayoutRect(layerOffset, size())); | 932 rects.push_back(LayoutRect(layerOffset, size())); |
| 933 } | 933 } |
| 934 | 934 |
| 935 int LayoutBox::verticalScrollbarWidth() const { | 935 int LayoutBox::verticalScrollbarWidth() const { |
| 936 if (!hasOverflowClip() || style()->overflowY() == EOverflow::Overlay) | 936 if (!hasOverflowClip() || style()->overflowY() == EOverflow::Overlay) |
| 937 return 0; | 937 return 0; |
| 938 | 938 |
| 939 return getScrollableArea()->verticalScrollbarWidth(); | 939 return getScrollableArea()->verticalScrollbarWidth(); |
| 940 } | 940 } |
| 941 | 941 |
| 942 int LayoutBox::horizontalScrollbarHeight() const { | 942 int LayoutBox::horizontalScrollbarHeight() const { |
| (...skipping 4751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5694 block->adjustChildDebugRect(rect); | 5694 block->adjustChildDebugRect(rect); |
| 5695 | 5695 |
| 5696 return rect; | 5696 return rect; |
| 5697 } | 5697 } |
| 5698 | 5698 |
| 5699 bool LayoutBox::shouldClipOverflow() const { | 5699 bool LayoutBox::shouldClipOverflow() const { |
| 5700 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); | 5700 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); |
| 5701 } | 5701 } |
| 5702 | 5702 |
| 5703 } // namespace blink | 5703 } // namespace blink |
| OLD | NEW |