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

Side by Side Diff: third_party/WebKit/Source/core/frame/FrameView.cpp

Issue 2769353002: Only create sticky position constraints for constrained sticky position. (Closed)
Patch Set: Merge with master. Created 3 years, 8 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
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameViewTest.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) 1998, 1999 Torben Weis <weis@kde.org> 2 * Copyright (C) 1998, 1999 Torben Weis <weis@kde.org>
3 * 1999 Lars Knoll <knoll@kde.org> 3 * 1999 Lars Knoll <knoll@kde.org>
4 * 1999 Antti Koivisto <koivisto@kde.org> 4 * 1999 Antti Koivisto <koivisto@kde.org>
5 * 2000 Dirk Mueller <mueller@kde.org> 5 * 2000 Dirk Mueller <mueller@kde.org>
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Apple Inc. All rights reserved.
7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com) 7 * (C) 2006 Graham Dennis (graham.dennis@gmail.com)
8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com) 8 * (C) 2006 Alexey Proskuryakov (ap@nypop.com)
9 * Copyright (C) 2009 Google Inc. All rights reserved. 9 * Copyright (C) 2009 Google Inc. All rights reserved.
10 * 10 *
(...skipping 1749 matching lines...) Expand 10 before | Expand all | Expand 10 after
1760 } 1760 }
1761 return false; 1761 return false;
1762 } 1762 }
1763 1763
1764 bool FrameView::InvalidateViewportConstrainedObjects() { 1764 bool FrameView::InvalidateViewportConstrainedObjects() {
1765 bool fast_path_allowed = true; 1765 bool fast_path_allowed = true;
1766 for (const auto& viewport_constrained_object : 1766 for (const auto& viewport_constrained_object :
1767 *viewport_constrained_objects_) { 1767 *viewport_constrained_objects_) {
1768 LayoutObject* layout_object = viewport_constrained_object; 1768 LayoutObject* layout_object = viewport_constrained_object;
1769 LayoutItem layout_item = LayoutItem(layout_object); 1769 LayoutItem layout_item = LayoutItem(layout_object);
1770 ASSERT(layout_item.Style()->HasViewportConstrainedPosition()); 1770 DCHECK(layout_item.Style()->HasViewportConstrainedPosition() ||
1771 ASSERT(layout_item.HasLayer()); 1771 layout_item.Style()->HasStickyConstrainedPosition());
1772 DCHECK(layout_item.HasLayer());
1772 PaintLayer* layer = LayoutBoxModel(layout_item).Layer(); 1773 PaintLayer* layer = LayoutBoxModel(layout_item).Layer();
1773 1774
1774 if (layer->IsPaintInvalidationContainer()) 1775 if (layer->IsPaintInvalidationContainer())
1775 continue; 1776 continue;
1776 1777
1777 if (layer->SubtreeIsInvisible()) 1778 if (layer->SubtreeIsInvisible())
1778 continue; 1779 continue;
1779 1780
1780 // invalidate even if there is an ancestor with a filter that moves pixels. 1781 // invalidate even if there is an ancestor with a filter that moves pixels.
1781 layout_item 1782 layout_item
(...skipping 3549 matching lines...) Expand 10 before | Expand all | Expand 10 after
5331 void FrameView::SetAnimationHost( 5332 void FrameView::SetAnimationHost(
5332 std::unique_ptr<CompositorAnimationHost> host) { 5333 std::unique_ptr<CompositorAnimationHost> host) {
5333 animation_host_ = std::move(host); 5334 animation_host_ = std::move(host);
5334 } 5335 }
5335 5336
5336 LayoutUnit FrameView::CaretWidth() const { 5337 LayoutUnit FrameView::CaretWidth() const {
5337 return LayoutUnit(GetHostWindow()->WindowToViewportScalar(1)); 5338 return LayoutUnit(GetHostWindow()->WindowToViewportScalar(1));
5338 } 5339 }
5339 5340
5340 } // namespace blink 5341 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/frame/FrameViewTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698