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

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

Issue 2654843004: Fix shouldPaint issue when a composited floating iframe becomes non-self-painting (Closed)
Patch Set: -0 Created 3 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
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 3980 matching lines...) Expand 10 before | Expand all | Expand 10 after
3991 if (isLayoutView()) { 3991 if (isLayoutView()) {
3992 ScrollOffset offset = toLayoutView(this)->frameView()->getScrollOffset(); 3992 ScrollOffset offset = toLayoutView(this)->frameView()->getScrollOffset();
3993 adjustedLocation.move(LayoutSize(offset)); 3993 adjustedLocation.move(LayoutSize(offset));
3994 } 3994 }
3995 3995
3996 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set(); 3996 const FloatingObjectSet& floatingObjectSet = m_floatingObjects->set();
3997 FloatingObjectSetIterator begin = floatingObjectSet.begin(); 3997 FloatingObjectSetIterator begin = floatingObjectSet.begin();
3998 for (FloatingObjectSetIterator it = floatingObjectSet.end(); it != begin;) { 3998 for (FloatingObjectSetIterator it = floatingObjectSet.end(); it != begin;) {
3999 --it; 3999 --it;
4000 const FloatingObject& floatingObject = *it->get(); 4000 const FloatingObject& floatingObject = *it->get();
4001 if (floatingObject.shouldPaint()) { 4001 if (floatingObject.shouldPaint() &&
4002 !floatingObject.layoutObject()->hasSelfPaintingLayer()) {
chrishtr 2017/01/25 20:47:57 Why do you need this?
Xianzhu 2017/01/25 21:03:25 This is a part of the revert, which I didn't look
4002 LayoutUnit xOffset = xPositionForFloatIncludingMargin(floatingObject) - 4003 LayoutUnit xOffset = xPositionForFloatIncludingMargin(floatingObject) -
4003 floatingObject.layoutObject()->location().x(); 4004 floatingObject.layoutObject()->location().x();
4004 LayoutUnit yOffset = yPositionForFloatIncludingMargin(floatingObject) - 4005 LayoutUnit yOffset = yPositionForFloatIncludingMargin(floatingObject) -
4005 floatingObject.layoutObject()->location().y(); 4006 floatingObject.layoutObject()->location().y();
4006 LayoutPoint childPoint = flipFloatForWritingModeForChild( 4007 LayoutPoint childPoint = flipFloatForWritingModeForChild(
4007 floatingObject, adjustedLocation + LayoutSize(xOffset, yOffset)); 4008 floatingObject, adjustedLocation + LayoutSize(xOffset, yOffset));
4008 if (floatingObject.layoutObject()->hitTest(result, locationInContainer, 4009 if (floatingObject.layoutObject()->hitTest(result, locationInContainer,
4009 childPoint)) { 4010 childPoint)) {
4010 updateHitTestResult( 4011 updateHitTestResult(
4011 result, locationInContainer.point() - toLayoutSize(childPoint)); 4012 result, locationInContainer.point() - toLayoutSize(childPoint));
(...skipping 586 matching lines...) Expand 10 before | Expand all | Expand 10 after
4598 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState); 4599 return LayoutBlock::invalidatePaintIfNeeded(paintInvalidationState);
4599 } 4600 }
4600 4601
4601 void LayoutBlockFlow::invalidateDisplayItemClients( 4602 void LayoutBlockFlow::invalidateDisplayItemClients(
4602 PaintInvalidationReason invalidationReason) const { 4603 PaintInvalidationReason invalidationReason) const {
4603 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients( 4604 BlockFlowPaintInvalidator(*this).invalidateDisplayItemClients(
4604 invalidationReason); 4605 invalidationReason);
4605 } 4606 }
4606 4607
4607 } // namespace blink 4608 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698