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

Side by Side Diff: sky/engine/core/rendering/RenderBlock.cpp

Issue 713073003: remove updateTouchEventTargetRectsIfNeeded (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: moar Created 6 years, 1 month 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) 2007 David Smith (catfish.man@gmail.com) 4 * (C) 2007 David Smith (catfish.man@gmail.com)
5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved. 5 * Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All rights reserved.
6 * Copyright (C) Research In Motion Limited 2010. All rights reserved. 6 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 2735 matching lines...) Expand 10 before | Expand all | Expand 10 after
2746 rects.append(pixelSnappedIntRect(rect)); 2746 rects.append(pixelSnappedIntRect(rect));
2747 } 2747 }
2748 2748
2749 addChildFocusRingRects(rects, additionalOffset, paintContainer); 2749 addChildFocusRingRects(rects, additionalOffset, paintContainer);
2750 } 2750 }
2751 2751
2752 if (inlineElementContinuation()) 2752 if (inlineElementContinuation())
2753 inlineElementContinuation()->addFocusRingRects(rects, flooredLayoutPoint (additionalOffset + inlineElementContinuation()->containingBlock()->location() - location()), paintContainer); 2753 inlineElementContinuation()->addFocusRingRects(rects, flooredLayoutPoint (additionalOffset + inlineElementContinuation()->containingBlock()->location() - location()), paintContainer);
2754 } 2754 }
2755 2755
2756 void RenderBlock::computeSelfHitTestRects(Vector<LayoutRect>& rects, const Layou tPoint& layerOffset) const
2757 {
2758 RenderBox::computeSelfHitTestRects(rects, layerOffset);
2759
2760 if (hasHorizontalLayoutOverflow() || hasVerticalLayoutOverflow()) {
2761 for (RootInlineBox* curr = firstRootBox(); curr; curr = curr->nextRootBo x()) {
2762 LayoutUnit top = std::max<LayoutUnit>(curr->lineTop(), curr->top());
2763 LayoutUnit bottom = std::min<LayoutUnit>(curr->lineBottom(), curr->t op() + curr->height());
2764 LayoutRect rect(layerOffset.x() + curr->x(), layerOffset.y() + top, curr->width(), bottom - top);
2765 // It's common for this rect to be entirely contained in our box, so exclude that simple case.
2766 if (!rect.isEmpty() && (rects.isEmpty() || !rects[0].contains(rect)) )
2767 rects.append(rect);
2768 }
2769 }
2770 }
2771
2772 RenderBox* RenderBlock::createAnonymousBoxWithSameTypeAs(const RenderObject* par ent) const 2756 RenderBox* RenderBlock::createAnonymousBoxWithSameTypeAs(const RenderObject* par ent) const
2773 { 2757 {
2774 return createAnonymousWithParentRendererAndDisplay(parent, style()->display( )); 2758 return createAnonymousWithParentRendererAndDisplay(parent, style()->display( ));
2775 } 2759 }
2776 2760
2777 LayoutUnit RenderBlock::marginBeforeForChild(const RenderBox* child) const 2761 LayoutUnit RenderBlock::marginBeforeForChild(const RenderBox* child) const
2778 { 2762 {
2779 // FIXME(sky): Remove 2763 // FIXME(sky): Remove
2780 return child->marginBefore(); 2764 return child->marginBefore();
2781 } 2765 }
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
2935 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const 2919 void RenderBlock::showLineTreeAndMark(const InlineBox* markedBox1, const char* m arkedLabel1, const InlineBox* markedBox2, const char* markedLabel2, const Render Object* obj) const
2936 { 2920 {
2937 showRenderObject(); 2921 showRenderObject();
2938 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box()) 2922 for (const RootInlineBox* root = firstRootBox(); root; root = root->nextRoot Box())
2939 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1); 2923 root->showLineTreeAndMark(markedBox1, markedLabel1, markedBox2, markedLa bel2, obj, 1);
2940 } 2924 }
2941 2925
2942 #endif 2926 #endif
2943 2927
2944 } // namespace blink 2928 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698