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

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

Issue 220343002: Update touch-action hit-testing to match latest spec changes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments Created 6 years, 8 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 | Annotate | Revision Log
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 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved. 4 * Copyright (C) 2003, 2006, 2007 Apple Inc. All rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 if (isRoot() || isPositioned() || createsGroup() || hasClipPath() || has Transform() || hasHiddenBackface() || hasReflection() || style()->specifiesColum ns() || !style()->hasAutoZIndex() || style()->hasWillChangeCompositingHint() || style()->hasWillChangeGpuRasterizationHint() || shouldCompositeForActiveAnimatio ns(*this)) 76 if (isRoot() || isPositioned() || createsGroup() || hasClipPath() || has Transform() || hasHiddenBackface() || hasReflection() || style()->specifiesColum ns() || !style()->hasAutoZIndex() || style()->hasWillChangeCompositingHint() || style()->hasWillChangeGpuRasterizationHint() || shouldCompositeForActiveAnimatio ns(*this))
77 return NormalLayer; 77 return NormalLayer;
78 if (hasOverflowClip()) 78 if (hasOverflowClip())
79 return OverflowClipLayer; 79 return OverflowClipLayer;
80 80
81 return NoLayer; 81 return NoLayer;
82 } 82 }
83 83
84 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const OVERRIDE; 84 virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const OVERRIDE;
85 85
86 // touch-action applies to all elements with both width AND height propertie s.
87 // According to the CSS Box Model Spec (http://dev.w3.org/csswg/css-box/#the -width-and-height-properties)
88 // width applies to all elements but non-replaced inline elements, table row s, and row groups and
89 // height applies to all elements but non-replaced inline elements, table co lumns, and column groups.
90 bool visibleForTouchAction() const OVERRIDE
91 {
92 if (isInline() && !isReplaced())
93 return false;
94 if (isTableRow() || isRenderTableCol())
95 return false;
96
97 return true;
98 }
99
86 // Use this with caution! No type checking is done! 100 // Use this with caution! No type checking is done!
87 RenderBox* firstChildBox() const; 101 RenderBox* firstChildBox() const;
88 RenderBox* lastChildBox() const; 102 RenderBox* lastChildBox() const;
89 103
90 LayoutUnit x() const { return m_frameRect.x(); } 104 LayoutUnit x() const { return m_frameRect.x(); }
91 LayoutUnit y() const { return m_frameRect.y(); } 105 LayoutUnit y() const { return m_frameRect.y(); }
92 LayoutUnit width() const { return m_frameRect.width(); } 106 LayoutUnit width() const { return m_frameRect.width(); }
93 LayoutUnit height() const { return m_frameRect.height(); } 107 LayoutUnit height() const { return m_frameRect.height(); }
94 108
95 int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); } 109 int pixelSnappedWidth() const { return m_frameRect.pixelSnappedWidth(); }
(...skipping 681 matching lines...) Expand 10 before | Expand all | Expand 10 after
777 if (UNLIKELY(inlineBoxWrapper() != 0)) 791 if (UNLIKELY(inlineBoxWrapper() != 0))
778 deleteLineBoxWrapper(); 792 deleteLineBoxWrapper();
779 } 793 }
780 794
781 ensureRareData().m_inlineBoxWrapper = boxWrapper; 795 ensureRareData().m_inlineBoxWrapper = boxWrapper;
782 } 796 }
783 797
784 } // namespace WebCore 798 } // namespace WebCore
785 799
786 #endif // RenderBox_h 800 #endif // RenderBox_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698