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

Side by Side Diff: third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp

Issue 2536453002: Rename some functions about layout locations (Closed)
Patch Set: Rebase Created 4 years 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 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "core/paint/PaintPropertyTreeBuilder.h" 5 #include "core/paint/PaintPropertyTreeBuilder.h"
6 6
7 #include "core/frame/FrameView.h" 7 #include "core/frame/FrameView.h"
8 #include "core/frame/LocalFrame.h" 8 #include "core/frame/LocalFrame.h"
9 #include "core/frame/Settings.h" 9 #include "core/frame/Settings.h"
10 #include "core/layout/LayoutInline.h" 10 #include "core/layout/LayoutInline.h"
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after
845 ASSERT_NOT_REACHED(); 845 ASSERT_NOT_REACHED();
846 } 846 }
847 847
848 // SVGForeignObject needs paint offset because its viewport offset is baked 848 // SVGForeignObject needs paint offset because its viewport offset is baked
849 // into its location(), while its localSVGTransform() doesn't contain the 849 // into its location(), while its localSVGTransform() doesn't contain the
850 // offset. 850 // offset.
851 if (boxModelObject.isBox() && 851 if (boxModelObject.isBox() &&
852 (!boxModelObject.isSVG() || boxModelObject.isSVGRoot() || 852 (!boxModelObject.isSVG() || boxModelObject.isSVGRoot() ||
853 boxModelObject.isSVGForeignObject())) { 853 boxModelObject.isSVGForeignObject())) {
854 // TODO(pdr): Several calls in this function walk back up the tree to 854 // TODO(pdr): Several calls in this function walk back up the tree to
855 // calculate containers (e.g., topLeftLocation, offsetForInFlowPosition*). 855 // calculate containers (e.g., physicalLocation, offsetForInFlowPosition*).
856 // The containing block and other containers can be stored on 856 // The containing block and other containers can be stored on
857 // PaintPropertyTreeBuilderContext instead of recomputing them. 857 // PaintPropertyTreeBuilderContext instead of recomputing them.
858 context.current.paintOffset.moveBy( 858 context.current.paintOffset.moveBy(
859 toLayoutBox(boxModelObject).topLeftLocation()); 859 toLayoutBox(boxModelObject).physicalLocation());
860 // This is a weird quirk that table cells paint as children of table rows, 860 // This is a weird quirk that table cells paint as children of table rows,
861 // but their location have the row's location baked-in. 861 // but their location have the row's location baked-in.
862 // Similar adjustment is done in LayoutTableCell::offsetFromContainer(). 862 // Similar adjustment is done in LayoutTableCell::offsetFromContainer().
863 if (boxModelObject.isTableCell()) { 863 if (boxModelObject.isTableCell()) {
864 LayoutObject* parentRow = boxModelObject.parent(); 864 LayoutObject* parentRow = boxModelObject.parent();
865 DCHECK(parentRow && parentRow->isTableRow()); 865 DCHECK(parentRow && parentRow->isTableRow());
866 context.current.paintOffset.moveBy( 866 context.current.paintOffset.moveBy(
867 -toLayoutBox(parentRow)->topLeftLocation()); 867 -toLayoutBox(parentRow)->physicalLocation());
868 } 868 }
869 } 869 }
870 } 870 }
871 871
872 void PaintPropertyTreeBuilder::updatePropertiesForSelf( 872 void PaintPropertyTreeBuilder::updatePropertiesForSelf(
873 const LayoutObject& object, 873 const LayoutObject& object,
874 PaintPropertyTreeBuilderContext& context) { 874 PaintPropertyTreeBuilderContext& context) {
875 if (!object.isBoxModelObject() && !object.isSVG()) 875 if (!object.isBoxModelObject() && !object.isSVG())
876 return; 876 return;
877 877
(...skipping 22 matching lines...) Expand all
900 #endif 900 #endif
901 901
902 updateOverflowClip(object, context); 902 updateOverflowClip(object, context);
903 updatePerspective(object, context); 903 updatePerspective(object, context);
904 updateSvgLocalToBorderBoxTransform(object, context); 904 updateSvgLocalToBorderBoxTransform(object, context);
905 updateScrollAndScrollTranslation(object, context); 905 updateScrollAndScrollTranslation(object, context);
906 updateOutOfFlowContext(object, context); 906 updateOutOfFlowContext(object, context);
907 } 907 }
908 908
909 } // namespace blink 909 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/paint/PaintLayer.cpp ('k') | third_party/WebKit/Source/core/paint/SVGInlineTextBoxPainter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698