OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) | 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) |
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv
ed. |
7 * | 7 * |
8 * This library is free software; you can redistribute it and/or | 8 * This library is free software; you can redistribute it and/or |
9 * modify it under the terms of the GNU Library General Public | 9 * modify it under the terms of the GNU Library General Public |
10 * License as published by the Free Software Foundation; either | 10 * License as published by the Free Software Foundation; either |
(...skipping 2409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2420 shouldFlipBeforeAfter ? computedValues.m_margins.m_before :
computedValues.m_margins.m_after); | 2420 shouldFlipBeforeAfter ? computedValues.m_margins.m_before :
computedValues.m_margins.m_after); |
2421 } | 2421 } |
2422 } | 2422 } |
2423 | 2423 |
2424 // WinIE quirk: The <html> block always fills the entire canvas in quirks mo
de. The <body> always fills the | 2424 // WinIE quirk: The <html> block always fills the entire canvas in quirks mo
de. The <body> always fills the |
2425 // <html> block in quirks mode. Only apply this quirk if the block is norma
l flow and no height | 2425 // <html> block in quirks mode. Only apply this quirk if the block is norma
l flow and no height |
2426 // is specified. When we're printing, we also need this quirk if the body or
root has a percentage | 2426 // is specified. When we're printing, we also need this quirk if the body or
root has a percentage |
2427 // height since we don't set a height in RenderView when we're printing. So
without this quirk, the | 2427 // height since we don't set a height in RenderView when we're printing. So
without this quirk, the |
2428 // height has nothing to be a percentage of, and it ends up being 0. That is
bad. | 2428 // height has nothing to be a percentage of, and it ends up being 0. That is
bad. |
2429 bool paginatedContentNeedsBaseHeight = document()->printing() && h.isPercent
() | 2429 bool paginatedContentNeedsBaseHeight = document()->printing() && h.isPercent
() |
2430 && (isRoot() || (isBody() && document()->documentElement()->renderer()->
style()->logicalHeight().isPercent())); | 2430 && (isRoot() || (isBody() && document()->documentElement()->renderer()->
style()->logicalHeight().isPercent())) && !isInline(); |
2431 if (stretchesToViewport() || paginatedContentNeedsBaseHeight) { | 2431 if (stretchesToViewport() || paginatedContentNeedsBaseHeight) { |
2432 LayoutUnit margins = collapsedMarginBefore() + collapsedMarginAfter(); | 2432 LayoutUnit margins = collapsedMarginBefore() + collapsedMarginAfter(); |
2433 LayoutUnit visibleHeight = viewLogicalHeightForPercentages(); | 2433 LayoutUnit visibleHeight = viewLogicalHeightForPercentages(); |
2434 if (isRoot()) | 2434 if (isRoot()) |
2435 computedValues.m_extent = max(computedValues.m_extent, visibleHeight
- margins); | 2435 computedValues.m_extent = max(computedValues.m_extent, visibleHeight
- margins); |
2436 else { | 2436 else { |
2437 LayoutUnit marginsBordersPadding = margins + parentBox()->marginBefo
re() + parentBox()->marginAfter() + parentBox()->borderAndPaddingLogicalHeight()
; | 2437 LayoutUnit marginsBordersPadding = margins + parentBox()->marginBefo
re() + parentBox()->marginAfter() + parentBox()->borderAndPaddingLogicalHeight()
; |
2438 computedValues.m_extent = max(computedValues.m_extent, visibleHeight
- marginsBordersPadding); | 2438 computedValues.m_extent = max(computedValues.m_extent, visibleHeight
- marginsBordersPadding); |
2439 } | 2439 } |
2440 } | 2440 } |
(...skipping 2043 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4484 | 4484 |
4485 void RenderBox::reportStaticMembersMemoryUsage(MemoryInstrumentation* memoryInst
rumentation) | 4485 void RenderBox::reportStaticMembersMemoryUsage(MemoryInstrumentation* memoryInst
rumentation) |
4486 { | 4486 { |
4487 memoryInstrumentation->addRootObject(gOverrideHeightMap, WebCoreMemoryTypes:
:RenderingStructures); | 4487 memoryInstrumentation->addRootObject(gOverrideHeightMap, WebCoreMemoryTypes:
:RenderingStructures); |
4488 memoryInstrumentation->addRootObject(gOverrideWidthMap, WebCoreMemoryTypes::
RenderingStructures); | 4488 memoryInstrumentation->addRootObject(gOverrideWidthMap, WebCoreMemoryTypes::
RenderingStructures); |
4489 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalHeightMa
p, WebCoreMemoryTypes::RenderingStructures); | 4489 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalHeightMa
p, WebCoreMemoryTypes::RenderingStructures); |
4490 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalWidthMap
, WebCoreMemoryTypes::RenderingStructures); | 4490 memoryInstrumentation->addRootObject(gOverrideContainingBlockLogicalWidthMap
, WebCoreMemoryTypes::RenderingStructures); |
4491 } | 4491 } |
4492 | 4492 |
4493 } // namespace WebCore | 4493 } // namespace WebCore |
OLD | NEW |