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

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

Issue 2600593002: Fix touch event flag may not be updated correctly by transform which causes no layout (Closed)
Patch Set: Optimization && nit Created 3 years, 11 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) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) 4 * (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com)
5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com) 5 * (C) 2005, 2006 Samuel Weinig (sam.weinig@gmail.com)
6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. 6 * Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc.
7 * All rights reserved. 7 * All rights reserved.
8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. 8 * Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved.
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "core/layout/LayoutTableCell.h" 48 #include "core/layout/LayoutTableCell.h"
49 #include "core/layout/LayoutView.h" 49 #include "core/layout/LayoutView.h"
50 #include "core/layout/api/LayoutAPIShim.h" 50 #include "core/layout/api/LayoutAPIShim.h"
51 #include "core/layout/api/LayoutPartItem.h" 51 #include "core/layout/api/LayoutPartItem.h"
52 #include "core/layout/api/LineLayoutBlockFlow.h" 52 #include "core/layout/api/LineLayoutBlockFlow.h"
53 #include "core/layout/api/LineLayoutBox.h" 53 #include "core/layout/api/LineLayoutBox.h"
54 #include "core/layout/compositing/PaintLayerCompositor.h" 54 #include "core/layout/compositing/PaintLayerCompositor.h"
55 #include "core/layout/shapes/ShapeOutsideInfo.h" 55 #include "core/layout/shapes/ShapeOutsideInfo.h"
56 #include "core/page/AutoscrollController.h" 56 #include "core/page/AutoscrollController.h"
57 #include "core/page/Page.h" 57 #include "core/page/Page.h"
58 #include "core/page/scrolling/ScrollingCoordinator.h"
58 #include "core/page/scrolling/SnapCoordinator.h" 59 #include "core/page/scrolling/SnapCoordinator.h"
59 #include "core/paint/BackgroundImageGeometry.h" 60 #include "core/paint/BackgroundImageGeometry.h"
60 #include "core/paint/BoxPaintInvalidator.h" 61 #include "core/paint/BoxPaintInvalidator.h"
61 #include "core/paint/BoxPainter.h" 62 #include "core/paint/BoxPainter.h"
62 #include "core/paint/PaintLayer.h" 63 #include "core/paint/PaintLayer.h"
63 #include "core/style/ShadowList.h" 64 #include "core/style/ShadowList.h"
64 #include "platform/LengthFunctions.h" 65 #include "platform/LengthFunctions.h"
65 #include "platform/geometry/DoubleRect.h" 66 #include "platform/geometry/DoubleRect.h"
66 #include "platform/geometry/FloatQuad.h" 67 #include "platform/geometry/FloatQuad.h"
67 #include "platform/geometry/FloatRoundedRect.h" 68 #include "platform/geometry/FloatRoundedRect.h"
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 shouldClipOverflow()) { 329 shouldClipOverflow()) {
329 // The overflow clip paint property depends on border sizes through 330 // The overflow clip paint property depends on border sizes through
330 // overflowClipRect(), and border radii, so we update properties on 331 // overflowClipRect(), and border radii, so we update properties on
331 // border size or radii change. 332 // border size or radii change.
332 if (!oldStyle->border().sizeEquals(newStyle.border()) || 333 if (!oldStyle->border().sizeEquals(newStyle.border()) ||
333 !oldStyle->border().radiiEqual(newStyle.border())) 334 !oldStyle->border().radiiEqual(newStyle.border()))
334 setNeedsPaintPropertyUpdate(); 335 setNeedsPaintPropertyUpdate();
335 } 336 }
336 } 337 }
337 338
339 if (diff.transformChanged()) {
340 if (ScrollingCoordinator* scrollingCoordinator =
341 document().frame()->page()->scrollingCoordinator())
342 scrollingCoordinator->notifyTransformChanged(*this);
chrishtr 2017/01/09 19:12:46 Just call scrollingCoordinator->notifyGeometryChan
yigu 2017/01/09 19:22:02 It looks like notifyGeometryChanged() modifies oth
343 }
338 // Non-atomic inlines should be LayoutInline or LayoutText, not LayoutBox. 344 // Non-atomic inlines should be LayoutInline or LayoutText, not LayoutBox.
339 DCHECK(!isInline() || isAtomicInlineLevel()); 345 DCHECK(!isInline() || isAtomicInlineLevel());
340 } 346 }
341 347
342 void LayoutBox::updateBackgroundAttachmentFixedStatusAfterStyleChange() { 348 void LayoutBox::updateBackgroundAttachmentFixedStatusAfterStyleChange() {
343 if (!frameView()) 349 if (!frameView())
344 return; 350 return;
345 351
346 // On low-powered/mobile devices, preventing blitting on a scroll can cause 352 // On low-powered/mobile devices, preventing blitting on a scroll can cause
347 // noticeable delays when scrolling a page with a fixed background image. As 353 // noticeable delays when scrolling a page with a fixed background image. As
(...skipping 5348 matching lines...) Expand 10 before | Expand all | Expand 10 after
5696 block->adjustChildDebugRect(rect); 5702 block->adjustChildDebugRect(rect);
5697 5703
5698 return rect; 5704 return rect;
5699 } 5705 }
5700 5706
5701 bool LayoutBox::shouldClipOverflow() const { 5707 bool LayoutBox::shouldClipOverflow() const {
5702 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip(); 5708 return hasOverflowClip() || styleRef().containsPaint() || hasControlClip();
5703 } 5709 }
5704 5710
5705 } // namespace blink 5711 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698