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

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

Issue 21430003: Implement interfaces in PaintInfo and make it a class. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@getterPaintInfo01
Patch Set: Second try Created 7 years, 4 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) 2011 Adobe Systems Incorporated. All rights reserved. 2 * Copyright (C) 2011 Adobe Systems Incorporated. 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 * 7 *
8 * 1. Redistributions of source code must retain the above 8 * 1. Redistributions of source code must retain the above
9 * copyright notice, this list of conditions and the following 9 * copyright notice, this list of conditions and the following
10 * disclaimer. 10 * disclaimer.
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 { 168 {
169 if (style()->visibility() != VISIBLE) 169 if (style()->visibility() != VISIBLE)
170 return; 170 return;
171 171
172 RenderBlock::paintObject(paintInfo, paintOffset); 172 RenderBlock::paintObject(paintInfo, paintOffset);
173 173
174 // Delegate painting of content in region to RenderFlowThread. 174 // Delegate painting of content in region to RenderFlowThread.
175 // RenderFlowThread is a self painting layer (being a positioned object) who is painting its children, the collected objects. 175 // RenderFlowThread is a self painting layer (being a positioned object) who is painting its children, the collected objects.
176 // Since we do not want to paint the flow thread content multiple times (for each painting phase of the region object), 176 // Since we do not want to paint the flow thread content multiple times (for each painting phase of the region object),
177 // we allow the flow thread painting only for the selection and the foregrou nd phase. 177 // we allow the flow thread painting only for the selection and the foregrou nd phase.
178 if (!isValid() || (paintInfo.phase != PaintPhaseForeground && paintInfo.phas e != PaintPhaseSelection)) 178 if (!isValid() || (paintInfo.getPhase() != PaintPhaseForeground && paintInfo .getPhase() != PaintPhaseSelection))
179 return; 179 return;
180 180
181 setRegionObjectsRegionStyle(); 181 setRegionObjectsRegionStyle();
182 m_flowThread->paintFlowThreadPortionInRegion(paintInfo, this, flowThreadPort ionRect(), flowThreadPortionOverflowRect(), LayoutPoint(paintOffset.x() + border Left() + paddingLeft(), paintOffset.y() + borderTop() + paddingTop())); 182 m_flowThread->paintFlowThreadPortionInRegion(paintInfo, this, flowThreadPort ionRect(), flowThreadPortionOverflowRect(), LayoutPoint(paintOffset.x() + border Left() + paddingLeft(), paintOffset.y() + borderTop() + paddingTop()));
183 restoreRegionObjectsOriginalStyle(); 183 restoreRegionObjectsOriginalStyle();
184 } 184 }
185 185
186 // Hit Testing 186 // Hit Testing
187 bool RenderRegion::hitTestFlowThreadContents(const HitTestRequest& request, HitT estResult& result, const HitTestLocation& locationInContainer, const LayoutPoint & accumulatedOffset, HitTestAction action) 187 bool RenderRegion::hitTestFlowThreadContents(const HitTestRequest& request, HitT estResult& result, const HitTestLocation& locationInContainer, const LayoutPoint & accumulatedOffset, HitTestAction action)
188 { 188 {
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 if (!hasOverrideHeight()) 639 if (!hasOverrideHeight())
640 return; 640 return;
641 641
642 LayoutUnit newLogicalHeight = overrideLogicalContentHeight() + borderAndPadd ingLogicalHeight(); 642 LayoutUnit newLogicalHeight = overrideLogicalContentHeight() + borderAndPadd ingLogicalHeight();
643 ASSERT(newLogicalHeight < LayoutUnit::max() / 2); 643 ASSERT(newLogicalHeight < LayoutUnit::max() / 2);
644 if (newLogicalHeight > logicalHeight()) 644 if (newLogicalHeight > logicalHeight())
645 setLogicalHeight(newLogicalHeight); 645 setLogicalHeight(newLogicalHeight);
646 } 646 }
647 647
648 } // namespace WebCore 648 } // namespace WebCore
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698