| 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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 143 curr->dirtyLineBoxes(); | 143 curr->dirtyLineBoxes(); |
| 144 } | 144 } |
| 145 | 145 |
| 146 bool RenderLineBoxList::rangeIntersectsRect(RenderBoxModelObject* renderer, Layo
utUnit logicalTop, LayoutUnit logicalBottom, const LayoutRect& rect, const Layou
tPoint& offset) const | 146 bool RenderLineBoxList::rangeIntersectsRect(RenderBoxModelObject* renderer, Layo
utUnit logicalTop, LayoutUnit logicalBottom, const LayoutRect& rect, const Layou
tPoint& offset) const |
| 147 { | 147 { |
| 148 RenderBox* block; | 148 RenderBox* block; |
| 149 if (renderer->isBox()) | 149 if (renderer->isBox()) |
| 150 block = toRenderBox(renderer); | 150 block = toRenderBox(renderer); |
| 151 else | 151 else |
| 152 block = renderer->containingBlock(); | 152 block = renderer->containingBlock(); |
| 153 LayoutUnit physicalStart = block->flipForWritingMode(logicalTop); | 153 LayoutUnit physicalStart = logicalTop; |
| 154 LayoutUnit physicalEnd = block->flipForWritingMode(logicalBottom); | 154 LayoutUnit physicalEnd = logicalBottom; |
| 155 LayoutUnit physicalExtent = absoluteValue(physicalEnd - physicalStart); | 155 LayoutUnit physicalExtent = absoluteValue(physicalEnd - physicalStart); |
| 156 physicalStart = std::min(physicalStart, physicalEnd); | 156 physicalStart = std::min(physicalStart, physicalEnd); |
| 157 | 157 |
| 158 physicalStart += offset.y(); | 158 physicalStart += offset.y(); |
| 159 if (physicalStart >= rect.maxY() || physicalStart + physicalExtent <= rect.y
()) | 159 if (physicalStart >= rect.maxY() || physicalStart + physicalExtent <= rect.y
()) |
| 160 return false; | 160 return false; |
| 161 | 161 |
| 162 return true; | 162 return true; |
| 163 } | 163 } |
| 164 | 164 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 ASSERT(child->prevLineBox() == prev); | 360 ASSERT(child->prevLineBox() == prev); |
| 361 prev = child; | 361 prev = child; |
| 362 } | 362 } |
| 363 ASSERT(prev == m_lastLineBox); | 363 ASSERT(prev == m_lastLineBox); |
| 364 #endif | 364 #endif |
| 365 } | 365 } |
| 366 | 366 |
| 367 #endif | 367 #endif |
| 368 | 368 |
| 369 } | 369 } |
| OLD | NEW |