Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(209)

Side by Side Diff: Source/core/rendering/RenderBox.cpp

Issue 17471008: Rework compositor touch hit testing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: CR feedback - accumulate LayoutRects instead of IntRects, disable when page isn't composited. Also… Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | Source/core/rendering/RenderBoxModelObject.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 562 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 573
574 return box; 574 return box;
575 } 575 }
576 576
577 void RenderBox::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& add itionalOffset, const RenderLayerModelObject*) 577 void RenderBox::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& add itionalOffset, const RenderLayerModelObject*)
578 { 578 {
579 if (!size().isEmpty()) 579 if (!size().isEmpty())
580 rects.append(pixelSnappedIntRect(additionalOffset, size())); 580 rects.append(pixelSnappedIntRect(additionalOffset, size()));
581 } 581 }
582 582
583 void RenderBox::addLayerHitTestRects(LayerHitTestRects& layerRects, const Render Layer* currentLayer, const LayoutPoint& layerOffset) const
584 {
585 LayoutPoint adjustedLayerOffset = layerOffset + locationOffset();
586 RenderBoxModelObject::addLayerHitTestRects(layerRects, currentLayer, adjuste dLayerOffset);
587 }
588
589 void RenderBox::computeSelfHitTestRects(Vector<LayoutRect>& rects, const LayoutP oint& layerOffset) const
590 {
591 if (!size().isEmpty())
592 rects.append(LayoutRect(layerOffset, size()));
593 }
594
583 LayoutRect RenderBox::reflectionBox() const 595 LayoutRect RenderBox::reflectionBox() const
584 { 596 {
585 LayoutRect result; 597 LayoutRect result;
586 if (!style()->boxReflect()) 598 if (!style()->boxReflect())
587 return result; 599 return result;
588 LayoutRect box = borderBoxRect(); 600 LayoutRect box = borderBoxRect();
589 result = box; 601 result = box;
590 switch (style()->boxReflect()->direction()) { 602 switch (style()->boxReflect()->direction()) {
591 case ReflectionBelow: 603 case ReflectionBelow:
592 result.move(0, box.height() + reflectionOffset()); 604 result.move(0, box.height() + reflectionOffset());
(...skipping 4035 matching lines...) Expand 10 before | Expand all | Expand 10 after
4628 } 4640 }
4629 4641
4630 if (didSplitParentAnonymousBoxes) 4642 if (didSplitParentAnonymousBoxes)
4631 markBoxForRelayoutAfterSplit(this); 4643 markBoxForRelayoutAfterSplit(this);
4632 4644
4633 ASSERT(beforeChild->parent() == this); 4645 ASSERT(beforeChild->parent() == this);
4634 return beforeChild; 4646 return beforeChild;
4635 } 4647 }
4636 4648
4637 } // namespace WebCore 4649 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderBox.h ('k') | Source/core/rendering/RenderBoxModelObject.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698