| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 | 221 |
| 222 bool InlineBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locati
onInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, L
ayoutUnit /* lineBottom */) | 222 bool InlineBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locati
onInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, L
ayoutUnit /* lineBottom */) |
| 223 { | 223 { |
| 224 // Hit test all phases of replaced elements atomically, as though the replac
ed element established its | 224 // Hit test all phases of replaced elements atomically, as though the replac
ed element established its |
| 225 // own stacking context. (See Appendix E.2, section 6.4 on inline block/tab
le elements in the CSS2.1 | 225 // own stacking context. (See Appendix E.2, section 6.4 on inline block/tab
le elements in the CSS2.1 |
| 226 // specification.) | 226 // specification.) |
| 227 LayoutPoint childPoint = accumulatedOffset; | 227 LayoutPoint childPoint = accumulatedOffset; |
| 228 if (parent()->getLineLayoutItem().hasFlippedBlocksWritingMode()) // Faster t
han calling containingBlock(). | 228 if (parent()->getLineLayoutItem().hasFlippedBlocksWritingMode()) // Faster t
han calling containingBlock(). |
| 229 childPoint = getLineLayoutItem().containingBlock().flipForWritingModeFor
Child(LineLayoutBox(getLineLayoutItem()), childPoint); | 229 childPoint = getLineLayoutItem().containingBlock().flipForWritingModeFor
Child(LineLayoutBox(getLineLayoutItem()), childPoint); |
| 230 | 230 |
| 231 if (getLineLayoutItem().style()->hasBorderRadius()) { | |
| 232 LayoutRect borderRect = logicalFrameRect(); | |
| 233 borderRect.moveBy(accumulatedOffset); | |
| 234 FloatRoundedRect border = getLineLayoutItem().style()->getRoundedBorderF
or(borderRect); | |
| 235 if (!locationInContainer.intersects(border)) | |
| 236 return false; | |
| 237 } | |
| 238 | |
| 239 return getLineLayoutItem().hitTest(result, locationInContainer, childPoint); | 231 return getLineLayoutItem().hitTest(result, locationInContainer, childPoint); |
| 240 } | 232 } |
| 241 | 233 |
| 242 const RootInlineBox& InlineBox::root() const | 234 const RootInlineBox& InlineBox::root() const |
| 243 { | 235 { |
| 244 if (m_parent) | 236 if (m_parent) |
| 245 return m_parent->root(); | 237 return m_parent->root(); |
| 246 ASSERT(isRootInlineBox()); | 238 ASSERT(isRootInlineBox()); |
| 247 return static_cast<const RootInlineBox&>(*this); | 239 return static_cast<const RootInlineBox&>(*this); |
| 248 } | 240 } |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 | 404 |
| 413 void showLineTree(const blink::InlineBox* b) | 405 void showLineTree(const blink::InlineBox* b) |
| 414 { | 406 { |
| 415 if (b) | 407 if (b) |
| 416 b->showLineTreeForThis(); | 408 b->showLineTreeForThis(); |
| 417 else | 409 else |
| 418 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); | 410 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); |
| 419 } | 411 } |
| 420 | 412 |
| 421 #endif | 413 #endif |
| OLD | NEW |