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

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: Various fixes and test additions 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
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 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 578
579 return box; 579 return box;
580 } 580 }
581 581
582 void RenderBox::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& add itionalOffset, const RenderLayerModelObject*) 582 void RenderBox::addFocusRingRects(Vector<IntRect>& rects, const LayoutPoint& add itionalOffset, const RenderLayerModelObject*)
583 { 583 {
584 if (!size().isEmpty()) 584 if (!size().isEmpty())
585 rects.append(pixelSnappedIntRect(additionalOffset, size())); 585 rects.append(pixelSnappedIntRect(additionalOffset, size()));
586 } 586 }
587 587
588 void RenderBox::addLayerHitTestRects(LayerHitTestRects& layerRects, const Render Layer* currentCompositedLayer, const LayoutPoint& layerOffset) const
589 {
590 LayoutPoint adjustedLayerOffset = layerOffset + locationOffset();
591 RenderBoxModelObject::addLayerHitTestRects(layerRects, currentCompositedLaye r, adjustedLayerOffset);
592 }
593
594 void RenderBox::computeOwnHitTestRects(Vector<IntRect>& rects, const LayoutPoint & layerOffset) const
595 {
596 if (!size().isEmpty())
597 rects.append(pixelSnappedIntRect(layerOffset, size()));
598 }
599
588 LayoutRect RenderBox::reflectionBox() const 600 LayoutRect RenderBox::reflectionBox() const
589 { 601 {
590 LayoutRect result; 602 LayoutRect result;
591 if (!style()->boxReflect()) 603 if (!style()->boxReflect())
592 return result; 604 return result;
593 LayoutRect box = borderBoxRect(); 605 LayoutRect box = borderBoxRect();
594 result = box; 606 result = box;
595 switch (style()->boxReflect()->direction()) { 607 switch (style()->boxReflect()->direction()) {
596 case ReflectionBelow: 608 case ReflectionBelow:
597 result.move(0, box.height() + reflectionOffset()); 609 result.move(0, box.height() + reflectionOffset());
(...skipping 3998 matching lines...) Expand 10 before | Expand all | Expand 10 after
4596 4608
4597 void RenderBox::reportStaticMembersMemoryUsage(MemoryInstrumentation* memoryInst rumentation) 4609 void RenderBox::reportStaticMembersMemoryUsage(MemoryInstrumentation* memoryInst rumentation)
4598 { 4610 {
4599 memoryInstrumentation->addRootObject(gOverrideHeightMap, WebCoreMemoryTypes: :RenderingStructures); 4611 memoryInstrumentation->addRootObject(gOverrideHeightMap, WebCoreMemoryTypes: :RenderingStructures);
4600 memoryInstrumentation->addRootObject(gOverrideWidthMap, WebCoreMemoryTypes:: RenderingStructures); 4612 memoryInstrumentation->addRootObject(gOverrideWidthMap, WebCoreMemoryTypes:: RenderingStructures);
4601 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalHeightMa p, WebCoreMemoryTypes::RenderingStructures); 4613 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalHeightMa p, WebCoreMemoryTypes::RenderingStructures);
4602 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalWidthMap , WebCoreMemoryTypes::RenderingStructures); 4614 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalWidthMap , WebCoreMemoryTypes::RenderingStructures);
4603 } 4615 }
4604 4616
4605 } // namespace WebCore 4617 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698