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

Unified Diff: Source/core/rendering/RenderObject.cpp

Issue 220343002: Update touch-action hit-testing to match latest spec changes. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Move visibleForTouchAction() to cpp file 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/rendering/RenderObject.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/RenderObject.cpp
diff --git a/Source/core/rendering/RenderObject.cpp b/Source/core/rendering/RenderObject.cpp
index c475867dc0423c9ee030f604b6c1b04df7db2c6c..d0787faecea6025950d6708e40013e06aafb3ed1 100644
--- a/Source/core/rendering/RenderObject.cpp
+++ b/Source/core/rendering/RenderObject.cpp
@@ -3155,6 +3155,20 @@ bool RenderObject::isInert() const
return renderer->node()->isInert();
}
+// 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 RenderObject::visibleForTouchAction() const
+{
+ if (isInline() && !isReplaced())
+ return false;
+ if (isTableRow() || isRenderTableCol())
+ return false;
+
+ return true;
+}
+
void RenderObject::imageChanged(ImageResource* image, const IntRect* rect)
{
imageChanged(static_cast<WrappedImagePtr>(image), rect);
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/svg/RenderSVGRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698