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

Side by Side Diff: third_party/WebKit/Source/core/layout/LayoutState.cpp

Issue 2079603002: Handle nested theads correctly when paginated (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: bug 620456 Created 4 years, 5 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. All rights reserved. 2 * Copyright (C) 2007 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 m_flowThread = nullptr; 57 m_flowThread = nullptr;
58 layoutObject.view()->pushLayoutState(*this); 58 layoutObject.view()->pushLayoutState(*this);
59 bool fixed = layoutObject.isOutOfFlowPositioned() && layoutObject.style()->p osition() == FixedPosition; 59 bool fixed = layoutObject.isOutOfFlowPositioned() && layoutObject.style()->p osition() == FixedPosition;
60 if (fixed) { 60 if (fixed) {
61 // FIXME: This doesn't work correctly with transforms. 61 // FIXME: This doesn't work correctly with transforms.
62 FloatPoint fixedOffset = layoutObject.view()->localToAbsolute(FloatPoint (), IsFixed); 62 FloatPoint fixedOffset = layoutObject.view()->localToAbsolute(FloatPoint (), IsFixed);
63 m_layoutOffset = LayoutSize(fixedOffset.x(), fixedOffset.y()) + offset; 63 m_layoutOffset = LayoutSize(fixedOffset.x(), fixedOffset.y()) + offset;
64 } else { 64 } else {
65 m_layoutOffset = m_next->m_layoutOffset + offset; 65 m_layoutOffset = m_next->m_layoutOffset + offset;
66 } 66 }
67 m_heightOffsetForTableHeaders = m_next->heightOffsetForTableHeaders();
67 68
68 if (layoutObject.isOutOfFlowPositioned() && !fixed) { 69 if (layoutObject.isOutOfFlowPositioned() && !fixed) {
69 if (LayoutObject* container = layoutObject.container()) { 70 if (LayoutObject* container = layoutObject.container()) {
70 if (container->style()->hasInFlowPosition() && container->isLayoutIn line()) 71 if (container->style()->hasInFlowPosition() && container->isLayoutIn line())
71 m_layoutOffset += toLayoutInline(container)->offsetForInFlowPosi tionedInline(layoutObject); 72 m_layoutOffset += toLayoutInline(container)->offsetForInFlowPosi tionedInline(layoutObject);
72 } 73 }
73 } 74 }
74 // If we establish a new page height, then cache the offset to the top of th e first page. 75 // If we establish a new page height, then cache the offset to the top of th e first page.
75 // We can compare this later on to figure out what part of the page we're ac tually on, 76 // We can compare this later on to figure out what part of the page we're ac tually on,
76 if (pageLogicalHeight || layoutObject.isLayoutFlowThread()) { 77 if (pageLogicalHeight || layoutObject.isLayoutFlowThread()) {
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 } 135 }
135 136
136 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn it& childLogicalOffset) const 137 LayoutUnit LayoutState::pageLogicalOffset(const LayoutBox& child, const LayoutUn it& childLogicalOffset) const
137 { 138 {
138 if (child.isHorizontalWritingMode()) 139 if (child.isHorizontalWritingMode())
139 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh t(); 140 return m_layoutOffset.height() + childLogicalOffset - m_pageOffset.heigh t();
140 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width(); 141 return m_layoutOffset.width() + childLogicalOffset - m_pageOffset.width();
141 } 142 }
142 143
143 } // namespace blink 144 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/layout/LayoutState.h ('k') | third_party/WebKit/Source/core/layout/LayoutTable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698