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

Side by Side Diff: Source/core/layout/LayoutObject.cpp

Issue 1212893005: Add position: sticky as supported position value when CSSStickyPosition is enabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 5 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) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
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 1062 matching lines...) Expand 10 before | Expand all | Expand 10 after
1073 { 1073 {
1074 StringBuilder name; 1074 StringBuilder name;
1075 name.append(this->name()); 1075 name.append(this->name());
1076 1076
1077 if (isAnonymous()) 1077 if (isAnonymous())
1078 name.append(" (anonymous)"); 1078 name.append(" (anonymous)");
1079 // FIXME: Remove the special case for LayoutView here (requires rebaseline o f all tests). 1079 // FIXME: Remove the special case for LayoutView here (requires rebaseline o f all tests).
1080 if (isOutOfFlowPositioned() && !isLayoutView()) 1080 if (isOutOfFlowPositioned() && !isLayoutView())
1081 name.append(" (positioned)"); 1081 name.append(" (positioned)");
1082 if (isRelPositioned()) 1082 if (isRelPositioned())
1083 name.append(" (relative positioned)"); 1083 name.append(" (relatively positioned)");
Ian Vollick 2015/06/30 17:56:32 We seem to report "relative positioned" in our out
flackr 2015/06/30 18:44:48 Oops, didn't mean to keep this change. Originally
1084 if (isStickyPositioned())
1085 name.append(" (sticky positioned)");
1084 if (isFloating()) 1086 if (isFloating())
1085 name.append(" (floating)"); 1087 name.append(" (floating)");
1086 if (spannerPlaceholder()) 1088 if (spannerPlaceholder())
1087 name.append(" (column spanner)"); 1089 name.append(" (column spanner)");
1088 1090
1089 return name.toString(); 1091 return name.toString();
1090 } 1092 }
1091 1093
1092 String LayoutObject::debugName() const 1094 String LayoutObject::debugName() const
1093 { 1095 {
(...skipping 860 matching lines...) Expand 10 before | Expand all | Expand 10 after
1954 if (blockChildrenOnly && !child->isLayoutBlock()) 1956 if (blockChildrenOnly && !child->isLayoutBlock())
1955 continue; 1957 continue;
1956 1958
1957 if (child->isLayoutFullScreen() || child->isLayoutFullScreenPlaceholder( )) 1959 if (child->isLayoutFullScreen() || child->isLayoutFullScreenPlaceholder( ))
1958 continue; 1960 continue;
1959 1961
1960 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWith Display(styleRef(), child->style()->display()); 1962 RefPtr<ComputedStyle> newStyle = ComputedStyle::createAnonymousStyleWith Display(styleRef(), child->style()->display());
1961 1963
1962 // Preserve the position style of anonymous block continuations as they can have relative position when 1964 // Preserve the position style of anonymous block continuations as they can have relative position when
1963 // they contain block descendants of relative positioned inlines. 1965 // they contain block descendants of relative positioned inlines.
1964 if (child->isRelPositioned() && toLayoutBlock(child)->isAnonymousBlockCo ntinuation()) 1966 if (child->isInFlowPositioned() && toLayoutBlock(child)->isAnonymousBloc kContinuation())
1965 newStyle->setPosition(child->style()->position()); 1967 newStyle->setPosition(child->style()->position());
1966 1968
1967 updateAnonymousChildStyle(*child, *newStyle); 1969 updateAnonymousChildStyle(*child, *newStyle);
1968 1970
1969 child->setStyle(newStyle.release()); 1971 child->setStyle(newStyle.release());
1970 } 1972 }
1971 } 1973 }
1972 1974
1973 void LayoutObject::updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers) 1975 void LayoutObject::updateFillImages(const FillLayer* oldLayers, const FillLayer& newLayers)
1974 { 1976 {
(...skipping 1279 matching lines...) Expand 10 before | Expand all | Expand 10 after
3254 const blink::LayoutObject* root = object1; 3256 const blink::LayoutObject* root = object1;
3255 while (root->parent()) 3257 while (root->parent())
3256 root = root->parent(); 3258 root = root->parent();
3257 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3259 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3258 } else { 3260 } else {
3259 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3261 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3260 } 3262 }
3261 } 3263 }
3262 3264
3263 #endif 3265 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698