| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008 Apple Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
| 6 * are met: | 6 * are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright | 8 * 1. Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright | 10 * 2. Redistributions in binary form must reproduce the above copyright |
| (...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 // them. Note that boxes can easily overlap, so we can't make any assumptio
ns | 202 // them. Note that boxes can easily overlap, so we can't make any assumptio
ns |
| 203 // based off positions of our first line box or our last line box. | 203 // based off positions of our first line box or our last line box. |
| 204 for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox())
{ | 204 for (InlineFlowBox* curr = firstLineBox(); curr; curr = curr->nextLineBox())
{ |
| 205 if (lineIntersectsDirtyRect(renderer, curr, info, paintOffset)) { | 205 if (lineIntersectsDirtyRect(renderer, curr, info, paintOffset)) { |
| 206 RootInlineBox& root = curr->root(); | 206 RootInlineBox& root = curr->root(); |
| 207 curr->paint(info, paintOffset, root.lineTop(), root.lineBottom(), la
yers); | 207 curr->paint(info, paintOffset, root.lineTop(), root.lineBottom(), la
yers); |
| 208 } | 208 } |
| 209 } | 209 } |
| 210 } | 210 } |
| 211 | 211 |
| 212 bool RenderLineBoxList::hitTest(RenderBoxModelObject* renderer, const HitTestReq
uest& request, HitTestResult& result, const HitTestLocation& locationInContainer
, const LayoutPoint& accumulatedOffset, HitTestAction hitTestAction) const | 212 bool RenderLineBoxList::hitTest(RenderBoxModelObject* renderer, const HitTestReq
uest& request, HitTestResult& result, const HitTestLocation& locationInContainer
, const LayoutPoint& accumulatedOffset) const |
| 213 { | 213 { |
| 214 if (hitTestAction != HitTestForeground) | |
| 215 return false; | |
| 216 | |
| 217 ASSERT(renderer->isRenderBlock() || (renderer->isRenderInline() && renderer-
>hasLayer())); // The only way an inline could hit test like this is if it has a
layer. | 214 ASSERT(renderer->isRenderBlock() || (renderer->isRenderInline() && renderer-
>hasLayer())); // The only way an inline could hit test like this is if it has a
layer. |
| 218 | 215 |
| 219 // If we have no lines then we have no work to do. | 216 // If we have no lines then we have no work to do. |
| 220 if (!firstLineBox()) | 217 if (!firstLineBox()) |
| 221 return false; | 218 return false; |
| 222 | 219 |
| 223 LayoutPoint point = locationInContainer.point(); | 220 LayoutPoint point = locationInContainer.point(); |
| 224 LayoutRect rect = IntRect(point.x(), point.y() - locationInContainer.topPadd
ing(), 1, locationInContainer.topPadding() + locationInContainer.bottomPadding()
+ 1); | 221 LayoutRect rect = IntRect(point.x(), point.y() - locationInContainer.topPadd
ing(), 1, locationInContainer.topPadding() + locationInContainer.bottomPadding()
+ 1); |
| 225 | 222 |
| 226 if (!anyLineIntersectsRect(renderer, rect, accumulatedOffset)) | 223 if (!anyLineIntersectsRect(renderer, rect, accumulatedOffset)) |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 ASSERT(child->prevLineBox() == prev); | 338 ASSERT(child->prevLineBox() == prev); |
| 342 prev = child; | 339 prev = child; |
| 343 } | 340 } |
| 344 ASSERT(prev == m_lastLineBox); | 341 ASSERT(prev == m_lastLineBox); |
| 345 #endif | 342 #endif |
| 346 } | 343 } |
| 347 | 344 |
| 348 #endif | 345 #endif |
| 349 | 346 |
| 350 } | 347 } |
| OLD | NEW |