OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. | 4 * Portions are Copyright (C) 1998 Netscape Communications Corporation. |
5 * | 5 * |
6 * Other contributors: | 6 * Other contributors: |
7 * Robert O'Callahan <roc+@cs.cmu.edu> | 7 * Robert O'Callahan <roc+@cs.cmu.edu> |
8 * David Baron <dbaron@fas.harvard.edu> | 8 * David Baron <dbaron@fas.harvard.edu> |
9 * Christian Biesinger <cbiesinger@web.de> | 9 * Christian Biesinger <cbiesinger@web.de> |
10 * Randall Jesup <rjesup@wgate.com> | 10 * Randall Jesup <rjesup@wgate.com> |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
406 // Update regions, scrolling may change the clip of a particular region. | 406 // Update regions, scrolling may change the clip of a particular region. |
407 frameView->updateAnnotatedRegions(); | 407 frameView->updateAnnotatedRegions(); |
408 frameView->setNeedsUpdateWidgetPositions(); | 408 frameView->setNeedsUpdateWidgetPositions(); |
409 updateCompositingLayersAfterScroll(); | 409 updateCompositingLayersAfterScroll(); |
410 } | 410 } |
411 | 411 |
412 const LayoutBoxModelObject* paintInvalidationContainer = box().containerForP aintInvalidation(); | 412 const LayoutBoxModelObject* paintInvalidationContainer = box().containerForP aintInvalidation(); |
413 // The caret rect needs to be invalidated after scrolling | 413 // The caret rect needs to be invalidated after scrolling |
414 frame->selection().setCaretRectNeedsUpdate(); | 414 frame->selection().setCaretRectNeedsUpdate(); |
415 | 415 |
416 FloatQuad quadForFakeMouseMoveEvent = FloatQuad(layer()->layoutObject()->pre viousPaintInvalidationRect()); | 416 FloatQuad quadForFakeMouseMoveEvent = FloatQuad(layer()->layoutObject()->pre viousPaintInvalidationRectIncludingCompositedScrolling(*paintInvalidationContain er)); |
esprehn
2015/08/21 21:20:32
Is this the bug fix? Can we fix it in a separate p
| |
417 | 417 |
418 quadForFakeMouseMoveEvent = paintInvalidationContainer->localToAbsoluteQuad( quadForFakeMouseMoveEvent); | 418 quadForFakeMouseMoveEvent = paintInvalidationContainer->localToAbsoluteQuad( quadForFakeMouseMoveEvent); |
419 frame->eventHandler().dispatchFakeMouseMoveEventSoonInQuad(quadForFakeMouseM oveEvent); | 419 frame->eventHandler().dispatchFakeMouseMoveEventSoonInQuad(quadForFakeMouseM oveEvent); |
420 | 420 |
421 bool requiresPaintInvalidation = true; | 421 bool requiresPaintInvalidation = true; |
422 | 422 |
423 if (box().view()->compositor()->inCompositingMode()) { | 423 if (box().view()->compositor()->inCompositingMode()) { |
424 bool onlyScrolledCompositedLayers = scrollsOverflow() | 424 bool onlyScrolledCompositedLayers = scrollsOverflow() |
425 && !layer()->hasVisibleNonLayerContent() | 425 && !layer()->hasVisibleNonLayerContent() |
426 && !layer()->hasNonCompositedChild() | 426 && !layer()->hasNonCompositedChild() |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1109 if (!m_scrollCorner && !hasScrollbar()) | 1109 if (!m_scrollCorner && !hasScrollbar()) |
1110 return; | 1110 return; |
1111 if (!m_scrollCorner && hasOverlayScrollbars()) | 1111 if (!m_scrollCorner && hasOverlayScrollbars()) |
1112 return; | 1112 return; |
1113 | 1113 |
1114 LayoutObject* actualLayoutObject = layoutObjectForScrollbar(box()); | 1114 LayoutObject* actualLayoutObject = layoutObjectForScrollbar(box()); |
1115 RefPtr<ComputedStyle> corner = box().hasOverflowClip() ? actualLayoutObject- >getUncachedPseudoStyle(PseudoStyleRequest(SCROLLBAR_CORNER), actualLayoutObject ->style()) : PassRefPtr<ComputedStyle>(nullptr); | 1115 RefPtr<ComputedStyle> corner = box().hasOverflowClip() ? actualLayoutObject- >getUncachedPseudoStyle(PseudoStyleRequest(SCROLLBAR_CORNER), actualLayoutObject ->style()) : PassRefPtr<ComputedStyle>(nullptr); |
1116 if (corner) { | 1116 if (corner) { |
1117 if (!m_scrollCorner) { | 1117 if (!m_scrollCorner) { |
1118 m_scrollCorner = LayoutScrollbarPart::createAnonymous(&box().documen t()); | 1118 m_scrollCorner = LayoutScrollbarPart::createAnonymous(&box().documen t()); |
1119 m_scrollCorner->setParent(&box()); | 1119 LayoutObject::DangerousLayoutTreeMutator(*m_scrollCorner).setParent( &box()); |
1120 } | 1120 } |
1121 m_scrollCorner->setStyle(corner.release()); | 1121 m_scrollCorner->setStyle(corner.release()); |
1122 } else if (m_scrollCorner) { | 1122 } else if (m_scrollCorner) { |
1123 m_scrollCorner->destroy(); | 1123 m_scrollCorner->destroy(); |
1124 m_scrollCorner = nullptr; | 1124 m_scrollCorner = nullptr; |
1125 } | 1125 } |
1126 } | 1126 } |
1127 | 1127 |
1128 bool DeprecatedPaintLayerScrollableArea::hitTestOverflowControls(HitTestResult& result, const IntPoint& localPoint) | 1128 bool DeprecatedPaintLayerScrollableArea::hitTestOverflowControls(HitTestResult& result, const IntPoint& localPoint) |
1129 { | 1129 { |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1237 void DeprecatedPaintLayerScrollableArea::updateResizerStyle() | 1237 void DeprecatedPaintLayerScrollableArea::updateResizerStyle() |
1238 { | 1238 { |
1239 if (!m_resizer && !box().canResize()) | 1239 if (!m_resizer && !box().canResize()) |
1240 return; | 1240 return; |
1241 | 1241 |
1242 LayoutObject* actualLayoutObject = layoutObjectForScrollbar(box()); | 1242 LayoutObject* actualLayoutObject = layoutObjectForScrollbar(box()); |
1243 RefPtr<ComputedStyle> resizer = box().hasOverflowClip() ? actualLayoutObject ->getUncachedPseudoStyle(PseudoStyleRequest(RESIZER), actualLayoutObject->style( )) : PassRefPtr<ComputedStyle>(nullptr); | 1243 RefPtr<ComputedStyle> resizer = box().hasOverflowClip() ? actualLayoutObject ->getUncachedPseudoStyle(PseudoStyleRequest(RESIZER), actualLayoutObject->style( )) : PassRefPtr<ComputedStyle>(nullptr); |
1244 if (resizer) { | 1244 if (resizer) { |
1245 if (!m_resizer) { | 1245 if (!m_resizer) { |
1246 m_resizer = LayoutScrollbarPart::createAnonymous(&box().document()); | 1246 m_resizer = LayoutScrollbarPart::createAnonymous(&box().document()); |
1247 m_resizer->setParent(&box()); | 1247 LayoutObject::DangerousLayoutTreeMutator(*m_resizer).setParent(&box( )); |
1248 } | 1248 } |
1249 m_resizer->setStyle(resizer.release()); | 1249 m_resizer->setStyle(resizer.release()); |
1250 } else if (m_resizer) { | 1250 } else if (m_resizer) { |
1251 m_resizer->destroy(); | 1251 m_resizer->destroy(); |
1252 m_resizer = nullptr; | 1252 m_resizer = nullptr; |
1253 } | 1253 } |
1254 } | 1254 } |
1255 | 1255 |
1256 IntSize DeprecatedPaintLayerScrollableArea::offsetFromResizeCorner(const IntPoin t& absolutePoint) const | 1256 IntSize DeprecatedPaintLayerScrollableArea::offsetFromResizeCorner(const IntPoin t& absolutePoint) const |
1257 { | 1257 { |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1451 return false; | 1451 return false; |
1452 | 1452 |
1453 LocalFrame* frame = box().frame(); | 1453 LocalFrame* frame = box().frame(); |
1454 if (!frame || !frame->isMainFrame() || !frame->settings()) | 1454 if (!frame || !frame->isMainFrame() || !frame->settings()) |
1455 return false; | 1455 return false; |
1456 | 1456 |
1457 return frame->settings()->viewportMetaEnabled(); | 1457 return frame->settings()->viewportMetaEnabled(); |
1458 } | 1458 } |
1459 | 1459 |
1460 } // namespace blink | 1460 } // namespace blink |
OLD | NEW |