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

Side by Side Diff: sky/engine/core/rendering/RenderBlockFlow.cpp

Issue 678193005: Remove more frame-level scrolling machinery. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 | « sky/engine/core/frame/FrameView.cpp ('k') | sky/engine/core/rendering/RenderBox.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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google 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 are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 2052 matching lines...) Expand 10 before | Expand all | Expand 10 after
2063 } 2063 }
2064 2064
2065 return logicalBottom; 2065 return logicalBottom;
2066 } 2066 }
2067 2067
2068 bool RenderBlockFlow::hitTestFloats(const HitTestRequest& request, HitTestResult & result, const HitTestLocation& locationInContainer, const LayoutPoint& accumul atedOffset) 2068 bool RenderBlockFlow::hitTestFloats(const HitTestRequest& request, HitTestResult & result, const HitTestLocation& locationInContainer, const LayoutPoint& accumul atedOffset)
2069 { 2069 {
2070 if (!m_floatingObjects) 2070 if (!m_floatingObjects)
2071 return false; 2071 return false;
2072 2072
2073 LayoutPoint adjustedLocation = accumulatedOffset;
2074 if (isRenderView()) {
2075 adjustedLocation += toLayoutSize(toRenderView(this)->frameView()->scroll Position());
2076 }
2077
2078 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); 2073 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
2079 FloatingObjectSetIterator begin = floatingObjectSet.begin(); 2074 FloatingObjectSetIterator begin = floatingObjectSet.begin();
2080 for (FloatingObjectSetIterator it = floatingObjectSet.end(); it != begin;) { 2075 for (FloatingObjectSetIterator it = floatingObjectSet.end(); it != begin;) {
2081 --it; 2076 --it;
2082 FloatingObject* floatingObject = it->get(); 2077 FloatingObject* floatingObject = it->get();
2083 if (floatingObject->shouldPaint() && !floatingObject->renderer()->hasSel fPaintingLayer()) { 2078 if (floatingObject->shouldPaint() && !floatingObject->renderer()->hasSel fPaintingLayer()) {
2084 LayoutUnit xOffset = xPositionForFloatIncludingMargin(floatingObject ) - floatingObject->renderer()->x(); 2079 LayoutUnit xOffset = xPositionForFloatIncludingMargin(floatingObject ) - floatingObject->renderer()->x();
2085 LayoutUnit yOffset = yPositionForFloatIncludingMargin(floatingObject ) - floatingObject->renderer()->y(); 2080 LayoutUnit yOffset = yPositionForFloatIncludingMargin(floatingObject ) - floatingObject->renderer()->y();
2086 LayoutPoint childPoint = flipFloatForWritingModeForChild(floatingObj ect, adjustedLocation + LayoutSize(xOffset, yOffset)); 2081 LayoutPoint childPoint = flipFloatForWritingModeForChild(floatingObj ect, accumulatedOffset + LayoutSize(xOffset, yOffset));
2087 if (floatingObject->renderer()->hitTest(request, result, locationInC ontainer, childPoint)) { 2082 if (floatingObject->renderer()->hitTest(request, result, locationInC ontainer, childPoint)) {
2088 updateHitTestResult(result, locationInContainer.point() - toLayo utSize(childPoint)); 2083 updateHitTestResult(result, locationInContainer.point() - toLayo utSize(childPoint));
2089 return true; 2084 return true;
2090 } 2085 }
2091 } 2086 }
2092 } 2087 }
2093 2088
2094 return false; 2089 return false;
2095 } 2090 }
2096 2091
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
2274 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData() 2269 RenderBlockFlow::RenderBlockFlowRareData& RenderBlockFlow::ensureRareData()
2275 { 2270 {
2276 if (m_rareData) 2271 if (m_rareData)
2277 return *m_rareData; 2272 return *m_rareData;
2278 2273
2279 m_rareData = adoptPtr(new RenderBlockFlowRareData(this)); 2274 m_rareData = adoptPtr(new RenderBlockFlowRareData(this));
2280 return *m_rareData; 2275 return *m_rareData;
2281 } 2276 }
2282 2277
2283 } // namespace blink 2278 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/core/frame/FrameView.cpp ('k') | sky/engine/core/rendering/RenderBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698