| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 { | 180 { |
| 181 RootInlineBox& root = box->root(); | 181 RootInlineBox& root = box->root(); |
| 182 LayoutUnit logicalTop = std::min<LayoutUnit>(box->logicalTopVisualOverflow(r
oot.lineTop()), root.selectionTop()); | 182 LayoutUnit logicalTop = std::min<LayoutUnit>(box->logicalTopVisualOverflow(r
oot.lineTop()), root.selectionTop()); |
| 183 LayoutUnit logicalBottom = box->logicalBottomVisualOverflow(root.lineBottom(
)); | 183 LayoutUnit logicalBottom = box->logicalBottomVisualOverflow(root.lineBottom(
)); |
| 184 | 184 |
| 185 return rangeIntersectsRect(renderer, logicalTop, logicalBottom, paintInfo.re
ct, offset); | 185 return rangeIntersectsRect(renderer, logicalTop, logicalBottom, paintInfo.re
ct, offset); |
| 186 } | 186 } |
| 187 | 187 |
| 188 void RenderLineBoxList::paint(RenderBoxModelObject* renderer, PaintInfo& paintIn
fo, const LayoutPoint& paintOffset) const | 188 void RenderLineBoxList::paint(RenderBoxModelObject* renderer, PaintInfo& paintIn
fo, const LayoutPoint& paintOffset) const |
| 189 { | 189 { |
| 190 if (paintInfo.phase != PaintPhaseForeground | |
| 191 && paintInfo.phase != PaintPhaseSelection | |
| 192 && paintInfo.phase != PaintPhaseMask) | |
| 193 return; | |
| 194 | |
| 195 ASSERT(renderer->isRenderBlock() || (renderer->isRenderInline() && renderer-
>hasLayer())); // The only way an inline could paint like this is if it has a la
yer. | 190 ASSERT(renderer->isRenderBlock() || (renderer->isRenderInline() && renderer-
>hasLayer())); // The only way an inline could paint like this is if it has a la
yer. |
| 196 | 191 |
| 197 // If we have no lines then we have no work to do. | 192 // If we have no lines then we have no work to do. |
| 198 if (!firstLineBox()) | 193 if (!firstLineBox()) |
| 199 return; | 194 return; |
| 200 | 195 |
| 201 if (!anyLineIntersectsRect(renderer, paintInfo.rect, paintOffset)) | 196 if (!anyLineIntersectsRect(renderer, paintInfo.rect, paintOffset)) |
| 202 return; | 197 return; |
| 203 | 198 |
| 204 PaintInfo info(paintInfo); | 199 PaintInfo info(paintInfo); |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 346 ASSERT(child->prevLineBox() == prev); | 341 ASSERT(child->prevLineBox() == prev); |
| 347 prev = child; | 342 prev = child; |
| 348 } | 343 } |
| 349 ASSERT(prev == m_lastLineBox); | 344 ASSERT(prev == m_lastLineBox); |
| 350 #endif | 345 #endif |
| 351 } | 346 } |
| 352 | 347 |
| 353 #endif | 348 #endif |
| 354 | 349 |
| 355 } | 350 } |
| OLD | NEW |