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

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

Issue 2776563003: Only automatically promote sticky position elements which move with scroll. (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/layout/LayoutBox.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 4992 matching lines...) Expand 10 before | Expand all | Expand 10 after
5003 5003
5004 for (const LayoutObject* layoutObject : *viewportConstrainedObjects()) { 5004 for (const LayoutObject* layoutObject : *viewportConstrainedObjects()) {
5005 DCHECK(layoutObject->isBoxModelObject() && layoutObject->hasLayer()); 5005 DCHECK(layoutObject->isBoxModelObject() && layoutObject->hasLayer());
5006 DCHECK(layoutObject->style()->position() == EPosition::kFixed || 5006 DCHECK(layoutObject->style()->position() == EPosition::kFixed ||
5007 layoutObject->style()->position() == EPosition::kSticky); 5007 layoutObject->style()->position() == EPosition::kSticky);
5008 PaintLayer* layer = toLayoutBoxModelObject(layoutObject)->layer(); 5008 PaintLayer* layer = toLayoutBoxModelObject(layoutObject)->layer();
5009 5009
5010 // Whether the Layer sticks to the viewport is a tree-depenent 5010 // Whether the Layer sticks to the viewport is a tree-depenent
5011 // property and our viewportConstrainedObjects collection is maintained 5011 // property and our viewportConstrainedObjects collection is maintained
5012 // with only LayoutObject-level information. 5012 // with only LayoutObject-level information.
5013 if (!layer->sticksToViewport()) 5013 if (!layer->fixedToViewport() && !layer->sticksToScroller())
5014 continue; 5014 continue;
5015 5015
5016 // If the whole subtree is invisible, there's no reason to scroll on 5016 // If the whole subtree is invisible, there's no reason to scroll on
5017 // the main thread because we don't need to generate invalidations 5017 // the main thread because we don't need to generate invalidations
5018 // for invisible content. 5018 // for invisible content.
5019 if (layer->subtreeIsInvisible()) 5019 if (layer->subtreeIsInvisible())
5020 continue; 5020 continue;
5021 5021
5022 // We're only smart enough to scroll viewport-constrainted objects 5022 // We're only smart enough to scroll viewport-constrainted objects
5023 // in the compositor if they have their own backing or they paint 5023 // in the compositor if they have their own backing or they paint
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
5251 void FrameView::setAnimationHost( 5251 void FrameView::setAnimationHost(
5252 std::unique_ptr<CompositorAnimationHost> host) { 5252 std::unique_ptr<CompositorAnimationHost> host) {
5253 m_animationHost = std::move(host); 5253 m_animationHost = std::move(host);
5254 } 5254 }
5255 5255
5256 LayoutUnit FrameView::caretWidth() const { 5256 LayoutUnit FrameView::caretWidth() const {
5257 return LayoutUnit(getHostWindow()->windowToViewportScalar(1)); 5257 return LayoutUnit(getHostWindow()->windowToViewportScalar(1));
5258 } 5258 }
5259 5259
5260 } // namespace blink 5260 } // namespace blink
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/layout/LayoutBox.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698