| 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 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 220 |
| 221 bool InlineBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locati
onInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, L
ayoutUnit /* lineBottom */) | 221 bool InlineBox::nodeAtPoint(HitTestResult& result, const HitTestLocation& locati
onInContainer, const LayoutPoint& accumulatedOffset, LayoutUnit /* lineTop */, L
ayoutUnit /* lineBottom */) |
| 222 { | 222 { |
| 223 // Hit test all phases of replaced elements atomically, as though the replac
ed element established its | 223 // Hit test all phases of replaced elements atomically, as though the replac
ed element established its |
| 224 // own stacking context. (See Appendix E.2, section 6.4 on inline block/tab
le elements in the CSS2.1 | 224 // own stacking context. (See Appendix E.2, section 6.4 on inline block/tab
le elements in the CSS2.1 |
| 225 // specification.) | 225 // specification.) |
| 226 LayoutPoint childPoint = accumulatedOffset; | 226 LayoutPoint childPoint = accumulatedOffset; |
| 227 if (parent()->lineLayoutItem().hasFlippedBlocksWritingMode()) // Faster than
calling containingBlock(). | 227 if (parent()->lineLayoutItem().hasFlippedBlocksWritingMode()) // Faster than
calling containingBlock(). |
| 228 childPoint = layoutObject().containingBlock()->flipForWritingModeForChil
d(&toLayoutBox(layoutObject()), childPoint); | 228 childPoint = layoutObject().containingBlock()->flipForWritingModeForChil
d(&toLayoutBox(layoutObject()), childPoint); |
| 229 | 229 |
| 230 if (lineLayoutItem().style()->hasBorderRadius()) { | |
| 231 LayoutRect borderRect = logicalFrameRect(); | |
| 232 borderRect.moveBy(accumulatedOffset); | |
| 233 FloatRoundedRect border = lineLayoutItem().style()->getRoundedBorderFor(
borderRect); | |
| 234 if (!locationInContainer.intersects(border)) | |
| 235 return false; | |
| 236 } | |
| 237 | |
| 238 return lineLayoutItem().hitTest(result, locationInContainer, childPoint); | 230 return lineLayoutItem().hitTest(result, locationInContainer, childPoint); |
| 239 } | 231 } |
| 240 | 232 |
| 241 const RootInlineBox& InlineBox::root() const | 233 const RootInlineBox& InlineBox::root() const |
| 242 { | 234 { |
| 243 if (m_parent) | 235 if (m_parent) |
| 244 return m_parent->root(); | 236 return m_parent->root(); |
| 245 ASSERT(isRootInlineBox()); | 237 ASSERT(isRootInlineBox()); |
| 246 return static_cast<const RootInlineBox&>(*this); | 238 return static_cast<const RootInlineBox&>(*this); |
| 247 } | 239 } |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 411 | 403 |
| 412 void showLineTree(const blink::InlineBox* b) | 404 void showLineTree(const blink::InlineBox* b) |
| 413 { | 405 { |
| 414 if (b) | 406 if (b) |
| 415 b->showLineTreeForThis(); | 407 b->showLineTreeForThis(); |
| 416 else | 408 else |
| 417 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); | 409 fprintf(stderr, "Cannot showLineTree for (nil) InlineBox.\n"); |
| 418 } | 410 } |
| 419 | 411 |
| 420 #endif | 412 #endif |
| OLD | NEW |