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

Unified 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: Remove comment Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | Source/core/rendering/svg/RenderSVGRoot.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/rendering/RenderBox.h
diff --git a/Source/core/rendering/RenderBox.h b/Source/core/rendering/RenderBox.h
index 6b4bd88734785e9618174434bc41ad0e9ffdd4a3..523fc0bc7a43513185c485055c7c476f337280c4 100644
--- a/Source/core/rendering/RenderBox.h
+++ b/Source/core/rendering/RenderBox.h
@@ -83,6 +83,20 @@ public:
virtual bool backgroundIsKnownToBeOpaqueInRect(const LayoutRect& localRect) const OVERRIDE;
+ // touch-action applies to all elements with both width AND height properties.
+ // According to the CSS Box Model Spec (http://dev.w3.org/csswg/css-box/#the-width-and-height-properties)
+ // width applies to all elements but non-replaced inline elements, table rows, and row groups and
+ // height applies to all elements but non-replaced inline elements, table columns, and column groups.
+ bool visibleForTouchAction() const OVERRIDE
leviw_travelin_and_unemployed 2014/04/07 18:57:43 I don't think this makes sense to live in RenderBo
+ {
+ if (isInline() && !isReplaced())
+ return false;
+ if (isTableRow() || isRenderTableCol())
+ return false;
+
+ return true;
+ }
+
// Use this with caution! No type checking is done!
RenderBox* firstChildBox() const;
RenderBox* lastChildBox() const;
« no previous file with comments | « Source/core/rendering/RenderBlock.h ('k') | Source/core/rendering/svg/RenderSVGRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698