| 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. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. | 7 * Copyright (C) 2013 Adobe Systems Incorporated. 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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 396 LayoutRect rect = contentBoxRect(); | 396 LayoutRect rect = contentBoxRect(); |
| 397 return localToAbsoluteQuad(FloatRect(rect)); | 397 return localToAbsoluteQuad(FloatRect(rect)); |
| 398 } | 398 } |
| 399 | 399 |
| 400 void RenderBox::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& add
itionalOffset, const RenderLayerModelObject*) const | 400 void RenderBox::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& add
itionalOffset, const RenderLayerModelObject*) const |
| 401 { | 401 { |
| 402 if (!size().isEmpty()) | 402 if (!size().isEmpty()) |
| 403 rects.append(pixelSnappedIntRect(additionalOffset, size())); | 403 rects.append(pixelSnappedIntRect(additionalOffset, size())); |
| 404 } | 404 } |
| 405 | 405 |
| 406 void RenderBox::addLayerHitTestRects(LayerHitTestRects& layerRects, const Render
Layer* currentLayer, const LayoutPoint& layerOffset, const LayoutRect& container
Rect) const | |
| 407 { | |
| 408 LayoutPoint adjustedLayerOffset = layerOffset + locationOffset(); | |
| 409 RenderBoxModelObject::addLayerHitTestRects(layerRects, currentLayer, adjuste
dLayerOffset, containerRect); | |
| 410 } | |
| 411 | |
| 412 void RenderBox::computeSelfHitTestRects(Vector<LayoutRect>& rects, const LayoutP
oint& layerOffset) const | |
| 413 { | |
| 414 if (!size().isEmpty()) | |
| 415 rects.append(LayoutRect(layerOffset, size())); | |
| 416 } | |
| 417 | |
| 418 bool RenderBox::scroll(ScrollDirection direction, ScrollGranularity granularity,
float delta) | 406 bool RenderBox::scroll(ScrollDirection direction, ScrollGranularity granularity,
float delta) |
| 419 { | 407 { |
| 420 // Presumably the same issue as in setScrollTop. See crbug.com/343132. | 408 // Presumably the same issue as in setScrollTop. See crbug.com/343132. |
| 421 DisableCompositingQueryAsserts disabler; | 409 DisableCompositingQueryAsserts disabler; |
| 422 if (!layer() || !layer()->scrollableArea()) | 410 if (!layer() || !layer()->scrollableArea()) |
| 423 return false; | 411 return false; |
| 424 return layer()->scrollableArea()->scroll(direction, granularity, delta); | 412 return layer()->scrollableArea()->scroll(direction, granularity, delta); |
| 425 } | 413 } |
| 426 | 414 |
| 427 bool RenderBox::canBeScrolledAndHasScrollableArea() const | 415 bool RenderBox::canBeScrolledAndHasScrollableArea() const |
| (...skipping 3327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3755 | 3743 |
| 3756 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) | 3744 RenderBox::BoxDecorationData::BoxDecorationData(const RenderStyle& style) |
| 3757 { | 3745 { |
| 3758 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); | 3746 backgroundColor = style.colorIncludingFallback(CSSPropertyBackgroundColor); |
| 3759 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); | 3747 hasBackground = backgroundColor.alpha() || style.hasBackgroundImage(); |
| 3760 ASSERT(hasBackground == style.hasBackground()); | 3748 ASSERT(hasBackground == style.hasBackground()); |
| 3761 hasBorder = style.hasBorder(); | 3749 hasBorder = style.hasBorder(); |
| 3762 } | 3750 } |
| 3763 | 3751 |
| 3764 } // namespace blink | 3752 } // namespace blink |
| OLD | NEW |