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

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

Issue 1183393003: Empty LayoutObject::pushMappingToContainer(). Assert that not reached. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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) 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 2044 matching lines...) Expand 10 before | Expand all | Expand 10 after
2055 transformState.move(o->columnOffset(roundedLayoutPoint(transformState.mapped Point()))); 2055 transformState.move(o->columnOffset(roundedLayoutPoint(transformState.mapped Point())));
2056 2056
2057 if (o->hasOverflowClip()) 2057 if (o->hasOverflowClip())
2058 transformState.move(-toLayoutBox(o)->scrolledContentOffset()); 2058 transformState.move(-toLayoutBox(o)->scrolledContentOffset());
2059 2059
2060 o->mapLocalToContainer(paintInvalidationContainer, transformState, mode, was Fixed, paintInvalidationState); 2060 o->mapLocalToContainer(paintInvalidationContainer, transformState, mode, was Fixed, paintInvalidationState);
2061 } 2061 }
2062 2062
2063 const LayoutObject* LayoutObject::pushMappingToContainer(const LayoutBoxModelObj ect* ancestorToStopAt, LayoutGeometryMap& geometryMap) const 2063 const LayoutObject* LayoutObject::pushMappingToContainer(const LayoutBoxModelObj ect* ancestorToStopAt, LayoutGeometryMap& geometryMap) const
2064 { 2064 {
2065 ASSERT_UNUSED(ancestorToStopAt, ancestorToStopAt != this); 2065 ASSERT_NOT_REACHED();
2066 2066 return nullptr;
2067 LayoutObject* container = parent();
2068 if (!container)
2069 return nullptr;
2070
2071 // FIXME: this should call offsetFromContainer to share code, but I'm not su re it's ever called.
2072 LayoutSize offset;
2073 if (container->hasOverflowClip())
2074 offset = -LayoutSize(toLayoutBox(container)->scrolledContentOffset());
2075
2076 geometryMap.push(this, offset);
2077
2078 return container;
2079 } 2067 }
2080 2068
2081 void LayoutObject::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformSt ate& transformState) const 2069 void LayoutObject::mapAbsoluteToLocalPoint(MapCoordinatesFlags mode, TransformSt ate& transformState) const
2082 { 2070 {
2083 LayoutObject* o = parent(); 2071 LayoutObject* o = parent();
2084 if (o) { 2072 if (o) {
2085 o->mapAbsoluteToLocalPoint(mode, transformState); 2073 o->mapAbsoluteToLocalPoint(mode, transformState);
2086 if (o->hasOverflowClip()) 2074 if (o->hasOverflowClip())
2087 transformState.move(toLayoutBox(o)->scrolledContentOffset()); 2075 transformState.move(toLayoutBox(o)->scrolledContentOffset());
2088 } 2076 }
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after
3270 const blink::LayoutObject* root = object1; 3258 const blink::LayoutObject* root = object1;
3271 while (root->parent()) 3259 while (root->parent())
3272 root = root->parent(); 3260 root = root->parent();
3273 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); 3261 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0);
3274 } else { 3262 } else {
3275 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); 3263 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n");
3276 } 3264 }
3277 } 3265 }
3278 3266
3279 #endif 3267 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698