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

Side by Side Diff: Source/WebCore/rendering/InlineTextBox.cpp

Issue 13942005: Add hit testing mode which ignores pointer-events:none. (Closed) Base URL: svn://svn.chromium.org/blink/trunk/
Patch Set: Created 7 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
« no previous file with comments | « Source/WebCore/rendering/InlineFlowBox.cpp ('k') | Source/WebCore/rendering/RenderBlock.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * (C) 1999 Lars Knoll (knoll@kde.org) 2 * (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 2000 Dirk Mueller (mueller@kde.org) 3 * (C) 2000 Dirk Mueller (mueller@kde.org)
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights reserved. 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Apple Inc. All r ights 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 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 } 369 }
370 370
371 bool InlineTextBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re sult, const HitTestLocation& locationInContainer, const LayoutPoint& accumulated Offset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/) 371 bool InlineTextBox::nodeAtPoint(const HitTestRequest& request, HitTestResult& re sult, const HitTestLocation& locationInContainer, const LayoutPoint& accumulated Offset, LayoutUnit /* lineTop */, LayoutUnit /*lineBottom*/)
372 { 372 {
373 if (isLineBreak()) 373 if (isLineBreak())
374 return false; 374 return false;
375 375
376 FloatPoint boxOrigin = locationIncludingFlipping(); 376 FloatPoint boxOrigin = locationIncludingFlipping();
377 boxOrigin.moveBy(accumulatedOffset); 377 boxOrigin.moveBy(accumulatedOffset);
378 FloatRect rect(boxOrigin, size()); 378 FloatRect rect(boxOrigin, size());
379 if (m_truncation != cFullTruncation && visibleToHitTesting() && locationInCo ntainer.intersects(rect)) { 379 if (m_truncation != cFullTruncation && visibleToHitTestRequest(request) && l ocationInContainer.intersects(rect)) {
380 renderer()->updateHitTestResult(result, flipForWritingMode(locationInCon tainer.point() - toLayoutSize(accumulatedOffset))); 380 renderer()->updateHitTestResult(result, flipForWritingMode(locationInCon tainer.point() - toLayoutSize(accumulatedOffset)));
381 if (!result.addNodeToRectBasedTestResult(renderer()->node(), request, lo cationInContainer, rect)) 381 if (!result.addNodeToRectBasedTestResult(renderer()->node(), request, lo cationInContainer, rect))
382 return true; 382 return true;
383 } 383 }
384 return false; 384 return false;
385 } 385 }
386 386
387 FloatSize InlineTextBox::applyShadowToGraphicsContext(GraphicsContext* context, const ShadowData* shadow, const FloatRect& textRect, bool stroked, bool opaque, bool horizontal) 387 FloatSize InlineTextBox::applyShadowToGraphicsContext(GraphicsContext* context, const ShadowData* shadow, const FloatRect& textRect, bool stroked, bool opaque, bool horizontal)
388 { 388 {
389 if (!shadow) 389 if (!shadow)
(...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after
1629 1629
1630 void InlineTextBox::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const 1630 void InlineTextBox::reportMemoryUsage(MemoryObjectInfo* memoryObjectInfo) const
1631 { 1631 {
1632 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Rendering); 1632 MemoryClassInfo info(memoryObjectInfo, this, WebCoreMemoryTypes::Rendering);
1633 InlineBox::reportMemoryUsage(memoryObjectInfo); 1633 InlineBox::reportMemoryUsage(memoryObjectInfo);
1634 info.addMember(m_prevTextBox, "prevTextBox"); 1634 info.addMember(m_prevTextBox, "prevTextBox");
1635 info.addMember(m_nextTextBox, "nextTextBox"); 1635 info.addMember(m_nextTextBox, "nextTextBox");
1636 } 1636 }
1637 1637
1638 } // namespace WebCore 1638 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/InlineFlowBox.cpp ('k') | Source/WebCore/rendering/RenderBlock.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698