| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2012 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 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
| 8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
| 9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
| 10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 , m_minimumColumnHeight(0) | 44 , m_minimumColumnHeight(0) |
| 45 , m_forcedBreaksCount(0) | 45 , m_forcedBreaksCount(0) |
| 46 , m_maximumDistanceBetweenForcedBreaks(0) | 46 , m_maximumDistanceBetweenForcedBreaks(0) |
| 47 , m_forcedBreakOffset(0) | 47 , m_forcedBreakOffset(0) |
| 48 { | 48 { |
| 49 } | 49 } |
| 50 | 50 |
| 51 RenderMultiColumnSet* RenderMultiColumnSet::createAnonymous(RenderFlowThread* fl
owThread) | 51 RenderMultiColumnSet* RenderMultiColumnSet::createAnonymous(RenderFlowThread* fl
owThread) |
| 52 { | 52 { |
| 53 Document* document = flowThread->document(); | 53 Document* document = flowThread->document(); |
| 54 RenderMultiColumnSet* renderer = new (document->renderArena()) RenderMultiCo
lumnSet(flowThread); | 54 RenderMultiColumnSet* renderer = new RenderMultiColumnSet(flowThread); |
| 55 renderer->setDocumentForAnonymous(document); | 55 renderer->setDocumentForAnonymous(document); |
| 56 return renderer; | 56 return renderer; |
| 57 } | 57 } |
| 58 | 58 |
| 59 LayoutUnit RenderMultiColumnSet::pageLogicalTopForOffset(LayoutUnit offset) cons
t | 59 LayoutUnit RenderMultiColumnSet::pageLogicalTopForOffset(LayoutUnit offset) cons
t |
| 60 { | 60 { |
| 61 LayoutUnit portionLogicalTop = (isHorizontalWritingMode() ? flowThreadPortio
nRect().y() : flowThreadPortionRect().x()); | 61 LayoutUnit portionLogicalTop = (isHorizontalWritingMode() ? flowThreadPortio
nRect().y() : flowThreadPortionRect().x()); |
| 62 unsigned columnIndex = (offset - portionLogicalTop) / computedColumnHeight()
; | 62 unsigned columnIndex = (offset - portionLogicalTop) / computedColumnHeight()
; |
| 63 return portionLogicalTop + columnIndex * computedColumnHeight(); | 63 return portionLogicalTop + columnIndex * computedColumnHeight(); |
| 64 } | 64 } |
| (...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 412 fragments.append(fragment); | 412 fragments.append(fragment); |
| 413 } | 413 } |
| 414 } | 414 } |
| 415 | 415 |
| 416 const char* RenderMultiColumnSet::renderName() const | 416 const char* RenderMultiColumnSet::renderName() const |
| 417 { | 417 { |
| 418 return "RenderMultiColumnSet"; | 418 return "RenderMultiColumnSet"; |
| 419 } | 419 } |
| 420 | 420 |
| 421 } | 421 } |
| OLD | NEW |