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

Side by Side Diff: Source/core/rendering/RenderLayer.cpp

Issue 16057002: Fixed position elements should layout relative to transformed container (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: update image expectation too Created 7 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 | Annotate | Revision Log
« no previous file with comments | « LayoutTests/fast/block/positioning/fixed-position-transformed-container-expected.html ('k') | 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) 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 1864 matching lines...) Expand 10 before | Expand all | Expand 10 after
1875 ASSERT(fixedPositionContainerLayer); // We should have hit the RenderVie w's layer at least. 1875 ASSERT(fixedPositionContainerLayer); // We should have hit the RenderVie w's layer at least.
1876 1876
1877 if (fixedPositionContainerLayer != ancestorLayer) { 1877 if (fixedPositionContainerLayer != ancestorLayer) {
1878 LayoutPoint fixedContainerCoords; 1878 LayoutPoint fixedContainerCoords;
1879 layer->convertToLayerCoords(fixedPositionContainerLayer, fixedContai nerCoords); 1879 layer->convertToLayerCoords(fixedPositionContainerLayer, fixedContai nerCoords);
1880 1880
1881 LayoutPoint ancestorCoords; 1881 LayoutPoint ancestorCoords;
1882 ancestorLayer->convertToLayerCoords(fixedPositionContainerLayer, anc estorCoords); 1882 ancestorLayer->convertToLayerCoords(fixedPositionContainerLayer, anc estorCoords);
1883 1883
1884 location += (fixedContainerCoords - ancestorCoords); 1884 location += (fixedContainerCoords - ancestorCoords);
1885 return ancestorLayer; 1885 } else {
1886 location += toSize(layer->location());
1886 } 1887 }
1888 return ancestorLayer;
1887 } 1889 }
1888 1890
1889 RenderLayer* parentLayer; 1891 RenderLayer* parentLayer;
1890 if (position == AbsolutePosition || position == FixedPosition) { 1892 if (position == AbsolutePosition || position == FixedPosition) {
1891 // Do what enclosingPositionedAncestor() does, but check for ancestorLay er along the way. 1893 // Do what enclosingPositionedAncestor() does, but check for ancestorLay er along the way.
1892 parentLayer = layer->parent(); 1894 parentLayer = layer->parent();
1893 bool foundAncestorFirst = false; 1895 bool foundAncestorFirst = false;
1894 while (parentLayer) { 1896 while (parentLayer) {
1895 // RenderFlowThread is a positioned container, child of RenderView, positioned at (0,0). 1897 // RenderFlowThread is a positioned container, child of RenderView, positioned at (0,0).
1896 // This implies that, for out-of-flow positioned elements inside a R enderFlowThread, 1898 // This implies that, for out-of-flow positioned elements inside a R enderFlowThread,
(...skipping 4509 matching lines...) Expand 10 before | Expand all | Expand 10 after
6406 } 6408 }
6407 } 6409 }
6408 6410
6409 void showLayerTree(const WebCore::RenderObject* renderer) 6411 void showLayerTree(const WebCore::RenderObject* renderer)
6410 { 6412 {
6411 if (!renderer) 6413 if (!renderer)
6412 return; 6414 return;
6413 showLayerTree(renderer->enclosingLayer()); 6415 showLayerTree(renderer->enclosingLayer());
6414 } 6416 }
6415 #endif 6417 #endif
OLDNEW
« no previous file with comments | « LayoutTests/fast/block/positioning/fixed-position-transformed-container-expected.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698