Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(243)

Side by Side Diff: Source/WebCore/rendering/RenderBox.cpp

Issue 12281016: Merge 142816 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1410/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderBox.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « Source/WebCore/rendering/RenderBox.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698