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

Side by Side Diff: Source/core/rendering/RenderRegionSet.cpp

Issue 153233002: *** DO NOT LAND *** Remove regions support, keeping a bare minimum to support "region-based"... (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 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/core/rendering/RenderRegionSet.h ('k') | Source/core/rendering/RenderReplica.cpp » ('j') | 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) 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 17 matching lines...) Expand all
28 28
29 #include "core/rendering/RenderFlowThread.h" 29 #include "core/rendering/RenderFlowThread.h"
30 30
31 namespace WebCore { 31 namespace WebCore {
32 32
33 RenderRegionSet::RenderRegionSet(Element* element, RenderFlowThread* flowThread) 33 RenderRegionSet::RenderRegionSet(Element* element, RenderFlowThread* flowThread)
34 : RenderRegion(element, flowThread) 34 : RenderRegion(element, flowThread)
35 { 35 {
36 } 36 }
37 37
38 void RenderRegionSet::installFlowThread()
39 {
40 // We don't have to do anything, since we were able to connect the flow thre ad
41 // in the constructor.
42 }
43
44 void RenderRegionSet::expandToEncompassFlowThreadContentsIfNeeded() 38 void RenderRegionSet::expandToEncompassFlowThreadContentsIfNeeded()
45 { 39 {
46 // Whenever the last region is a set, it always expands its region rect to c onsume all 40 // Whenever the last region is a set, it always expands its region rect to c onsume all
47 // of the flow thread content. This is because it is always capable of gener ating an 41 // of the flow thread content. This is because it is always capable of gener ating an
48 // infinite number of boxes in order to hold all of the remaining content. 42 // infinite number of boxes in order to hold all of the remaining content.
49 LayoutRect rect(flowThreadPortionRect()); 43 LayoutRect rect(flowThreadPortionRect());
50 44
51 // Get the offset within the flow thread in its block progression direction. Then get the 45 // Get the offset within the flow thread in its block progression direction. Then get the
52 // flow thread's remaining logical height including its overflow and expand our rect 46 // flow thread's remaining logical height including its overflow and expand our rect
53 // to encompass that remaining height and overflow. The idea is that we will generate 47 // to encompass that remaining height and overflow. The idea is that we will generate
54 // additional columns and pages to hold that overflow, since people do write bad 48 // additional columns and pages to hold that overflow, since people do write bad
55 // content like <body style="height:0px"> in multi-column layouts. 49 // content like <body style="height:0px"> in multi-column layouts.
56 bool isHorizontal = flowThread()->isHorizontalWritingMode(); 50 bool isHorizontal = flowThread()->isHorizontalWritingMode();
57 LayoutUnit logicalTopOffset = isHorizontal ? rect.y() : rect.x(); 51 LayoutUnit logicalTopOffset = isHorizontal ? rect.y() : rect.x();
58 LayoutRect layoutRect = flowThread()->layoutOverflowRect(); 52 LayoutRect layoutRect = flowThread()->layoutOverflowRect();
59 LayoutUnit logicalHeightWithOverflow = (isHorizontal ? layoutRect.maxY() : l ayoutRect.maxX()) - logicalTopOffset; 53 LayoutUnit logicalHeightWithOverflow = (isHorizontal ? layoutRect.maxY() : l ayoutRect.maxX()) - logicalTopOffset;
60 setFlowThreadPortionRect(LayoutRect(rect.x(), rect.y(), isHorizontal ? rect. width() : logicalHeightWithOverflow, isHorizontal ? logicalHeightWithOverflow : rect.height())); 54 setFlowThreadPortionRect(LayoutRect(rect.x(), rect.y(), isHorizontal ? rect. width() : logicalHeightWithOverflow, isHorizontal ? logicalHeightWithOverflow : rect.height()));
61 } 55 }
62 56
63 } 57 }
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderRegionSet.h ('k') | Source/core/rendering/RenderReplica.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698