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

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

Issue 454643002: Route selection bounds updates through WebLayerTreeView (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 6 years, 3 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
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 991 matching lines...) Expand 10 before | Expand all | Expand 10 after
1002 } 1002 }
1003 } else { 1003 } else {
1004 box->addFocusRingRects(rects, additionalOffset + box->locationOf fset(), paintContainer); 1004 box->addFocusRingRects(rects, additionalOffset + box->locationOf fset(), paintContainer);
1005 } 1005 }
1006 } else { 1006 } else {
1007 current->addFocusRingRects(rects, additionalOffset, paintContainer); 1007 current->addFocusRingRects(rects, additionalOffset, paintContainer);
1008 } 1008 }
1009 } 1009 }
1010 } 1010 }
1011 1011
1012 LayoutPoint RenderObject::positionFromPaintInvalidationContainer(const RenderLay erModelObject* paintInvalidationContainer, const PaintInvalidationState* paintIn validationState) const
1013 {
1014 ASSERT(containerForPaintInvalidation() == paintInvalidationContainer);
1015
1016 if (paintInvalidationContainer == this)
1017 return LayoutPoint();
1018
1019 return LayoutPoint(localToContainerPoint(LayoutPoint(), paintInvalidationCon tainer, 0, 0, paintInvalidationState));
1020 }
1021
1022 IntRect RenderObject::absoluteBoundingBoxRect() const 1012 IntRect RenderObject::absoluteBoundingBoxRect() const
1023 { 1013 {
1024 Vector<FloatQuad> quads; 1014 Vector<FloatQuad> quads;
1025 absoluteQuads(quads); 1015 absoluteQuads(quads);
1026 1016
1027 size_t n = quads.size(); 1017 size_t n = quads.size();
1028 if (!n) 1018 if (!n)
1029 return IntRect(); 1019 return IntRect();
1030 1020
1031 IntRect result = quads[0].enclosingBoundingBox(); 1021 IntRect result = quads[0].enclosingBoundingBox();
(...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after
2100 2090
2101 FloatPoint RenderObject::localToContainerPoint(const FloatPoint& localPoint, con st RenderLayerModelObject* paintInvalidationContainer, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const 2091 FloatPoint RenderObject::localToContainerPoint(const FloatPoint& localPoint, con st RenderLayerModelObject* paintInvalidationContainer, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const
2102 { 2092 {
2103 TransformState transformState(TransformState::ApplyTransformDirection, local Point); 2093 TransformState transformState(TransformState::ApplyTransformDirection, local Point);
2104 mapLocalToContainer(paintInvalidationContainer, transformState, mode | Apply ContainerFlip | UseTransforms, wasFixed, paintInvalidationState); 2094 mapLocalToContainer(paintInvalidationContainer, transformState, mode | Apply ContainerFlip | UseTransforms, wasFixed, paintInvalidationState);
2105 transformState.flatten(); 2095 transformState.flatten();
2106 2096
2107 return transformState.lastPlanarPoint(); 2097 return transformState.lastPlanarPoint();
2108 } 2098 }
2109 2099
2100 FloatPoint RenderObject::localToInvalidationBackingPoint(const LayoutPoint& loca lPoint, RenderLayer** backingLayer)
2101 {
2102 const RenderLayerModelObject* paintInvalidationContainer = containerForPaint Invalidation();
2103 ASSERT(paintInvalidationContainer);
2104 RenderLayer* layer = paintInvalidationContainer->layer();
2105 ASSERT(layer);
2106
2107 if (backingLayer)
2108 *backingLayer = layer;
2109 FloatPoint containerPoint = localToContainerPoint(localPoint, paintInvalidat ionContainer, TraverseDocumentBoundaries);
2110
2111 if (layer->compositingState() == NotComposited) // This can happen for Rende rFlowThread.
2112 return containerPoint;
2113
2114 RenderLayer::mapPointToPaintBackingCoordinates(paintInvalidationContainer, c ontainerPoint);
2115 return containerPoint;
2116 }
2117
2118
2110 LayoutSize RenderObject::offsetFromContainer(const RenderObject* o, const Layout Point& point, bool* offsetDependsOnPoint) const 2119 LayoutSize RenderObject::offsetFromContainer(const RenderObject* o, const Layout Point& point, bool* offsetDependsOnPoint) const
2111 { 2120 {
2112 ASSERT(o == container()); 2121 ASSERT(o == container());
2113 2122
2114 LayoutSize offset = o->columnOffset(point); 2123 LayoutSize offset = o->columnOffset(point);
2115 2124
2116 if (o->hasOverflowClip()) 2125 if (o->hasOverflowClip())
2117 offset -= toRenderBox(o)->scrolledContentOffset(); 2126 offset -= toRenderBox(o)->scrolledContentOffset();
2118 2127
2119 if (offsetDependsOnPoint) 2128 if (offsetDependsOnPoint)
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
3171 { 3180 {
3172 if (object1) { 3181 if (object1) {
3173 const blink::RenderObject* root = object1; 3182 const blink::RenderObject* root = object1;
3174 while (root->parent()) 3183 while (root->parent())
3175 root = root->parent(); 3184 root = root->parent();
3176 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3185 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3177 } 3186 }
3178 } 3187 }
3179 3188
3180 #endif 3189 #endif
OLDNEW
« no previous file with comments | « Source/core/rendering/RenderObject.h ('k') | Source/core/rendering/compositing/CompositedSelectionBound.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698