Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights |
| 3 * reserved. | 3 * reserved. |
| 4 * | 4 * |
| 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 5 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
| 6 * | 6 * |
| 7 * Other contributors: | 7 * Other contributors: |
| 8 * Robert O'Callahan <roc+@cs.cmu.edu> | 8 * Robert O'Callahan <roc+@cs.cmu.edu> |
| 9 * David Baron <dbaron@fas.harvard.edu> | 9 * David Baron <dbaron@fas.harvard.edu> |
| 10 * Christian Biesinger <cbiesinger@web.de> | 10 * Christian Biesinger <cbiesinger@web.de> |
| (...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 425 void PaintLayer::updateTransform(const ComputedStyle* oldStyle, | 425 void PaintLayer::updateTransform(const ComputedStyle* oldStyle, |
| 426 const ComputedStyle& newStyle) { | 426 const ComputedStyle& newStyle) { |
| 427 if (oldStyle && newStyle.transformDataEquivalent(*oldStyle)) | 427 if (oldStyle && newStyle.transformDataEquivalent(*oldStyle)) |
| 428 return; | 428 return; |
| 429 | 429 |
| 430 // hasTransform() on the layoutObject is also true when there is | 430 // hasTransform() on the layoutObject is also true when there is |
| 431 // transform-style: preserve-3d or perspective set, so check style too. | 431 // transform-style: preserve-3d or perspective set, so check style too. |
| 432 bool hasTransform = | 432 bool hasTransform = |
| 433 layoutObject()->hasTransformRelatedProperty() && newStyle.hasTransform(); | 433 layoutObject()->hasTransformRelatedProperty() && newStyle.hasTransform(); |
| 434 bool had3DTransform = has3DTransform(); | 434 bool had3DTransform = has3DTransform(); |
| 435 | 435 |
|
majidvp
2017/01/02 21:01:11
Invalidating touch regions on every transform chan
yigu
2017/01/03 21:21:35
Done.
| |
| 436 // When transform does not cause a layout, notifyGeometryChanged() | |
| 437 // should be called to correctly update the touch event flags | |
|
majidvp
2017/01/02 21:01:11
The comment seems superfluous. It is also a bit in
yigu
2017/01/03 21:21:35
Done.
| |
| 438 if (hasTransform) { | |
|
majidvp
2017/01/02 21:01:10
hmmm, I think this check here is incorrect. You wa
yigu
2017/01/03 21:21:35
Done.
| |
| 439 if (ScrollingCoordinator* scrollingCoordinator = | |
| 440 layoutObject()->frame()->page()->scrollingCoordinator()) | |
| 441 scrollingCoordinator->notifyGeometryChanged(); | |
|
majidvp
2017/01/02 21:01:10
|notifyGeometryChanged| causes recomputation of no
yigu
2017/01/03 21:21:35
Done.
| |
| 442 } | |
| 443 | |
|
majidvp
2017/01/02 21:01:10
I rather move this logic at the bottom of the func
yigu
2017/01/03 21:21:35
Done.
| |
| 436 bool hadTransform = transform(); | 444 bool hadTransform = transform(); |
| 437 if (hasTransform != hadTransform) { | 445 if (hasTransform != hadTransform) { |
| 438 if (hasTransform) | 446 if (hasTransform) |
| 439 ensureRareData().transform = TransformationMatrix::create(); | 447 ensureRareData().transform = TransformationMatrix::create(); |
| 440 else | 448 else |
| 441 m_rareData->transform.reset(); | 449 m_rareData->transform.reset(); |
| 442 | 450 |
| 443 // PaintLayers with transforms act as clip rects roots, so clear the cached | 451 // PaintLayers with transforms act as clip rects roots, so clear the cached |
| 444 // clip rects here. | 452 // clip rects here. |
| 445 clipper().clearClipRectsIncludingDescendants(); | 453 clipper().clearClipRectsIncludingDescendants(); |
| (...skipping 2843 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3289 } | 3297 } |
| 3290 | 3298 |
| 3291 void showLayerTree(const blink::LayoutObject* layoutObject) { | 3299 void showLayerTree(const blink::LayoutObject* layoutObject) { |
| 3292 if (!layoutObject) { | 3300 if (!layoutObject) { |
| 3293 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; | 3301 LOG(INFO) << "Cannot showLayerTree. Root is (nil)"; |
| 3294 return; | 3302 return; |
| 3295 } | 3303 } |
| 3296 showLayerTree(layoutObject->enclosingLayer()); | 3304 showLayerTree(layoutObject->enclosingLayer()); |
| 3297 } | 3305 } |
| 3298 #endif | 3306 #endif |
| OLD | NEW |