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

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: revised 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 1317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1328 } 1328 }
1329 } else { 1329 } else {
1330 box->addFocusRingRects(rects, additionalOffset + box->locationOf fset(), paintContainer); 1330 box->addFocusRingRects(rects, additionalOffset + box->locationOf fset(), paintContainer);
1331 } 1331 }
1332 } else { 1332 } else {
1333 current->addFocusRingRects(rects, additionalOffset, paintContainer); 1333 current->addFocusRingRects(rects, additionalOffset, paintContainer);
1334 } 1334 }
1335 } 1335 }
1336 } 1336 }
1337 1337
1338 LayoutPoint RenderObject::positionFromPaintInvalidationContainer(const RenderLay erModelObject* paintInvalidationContainer, const PaintInvalidationState* paintIn validationState) const
1339 {
1340 ASSERT(containerForPaintInvalidation() == paintInvalidationContainer);
1341
1342 if (paintInvalidationContainer == this)
1343 return LayoutPoint();
1344
1345 return LayoutPoint(localToContainerPoint(LayoutPoint(), paintInvalidationCon tainer, 0, 0, paintInvalidationState));
1346 }
1347
1348 IntRect RenderObject::absoluteBoundingBoxRect() const 1338 IntRect RenderObject::absoluteBoundingBoxRect() const
1349 { 1339 {
1350 Vector<FloatQuad> quads; 1340 Vector<FloatQuad> quads;
1351 absoluteQuads(quads); 1341 absoluteQuads(quads);
1352 1342
1353 size_t n = quads.size(); 1343 size_t n = quads.size();
1354 if (!n) 1344 if (!n)
1355 return IntRect(); 1345 return IntRect();
1356 1346
1357 IntRect result = quads[0].enclosingBoundingBox(); 1347 IntRect result = quads[0].enclosingBoundingBox();
(...skipping 1090 matching lines...) Expand 10 before | Expand all | Expand 10 after
2448 2438
2449 FloatPoint RenderObject::localToContainerPoint(const FloatPoint& localPoint, con st RenderLayerModelObject* paintInvalidationContainer, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const 2439 FloatPoint RenderObject::localToContainerPoint(const FloatPoint& localPoint, con st RenderLayerModelObject* paintInvalidationContainer, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const
2450 { 2440 {
2451 TransformState transformState(TransformState::ApplyTransformDirection, local Point); 2441 TransformState transformState(TransformState::ApplyTransformDirection, local Point);
2452 mapLocalToContainer(paintInvalidationContainer, transformState, mode | Apply ContainerFlip | UseTransforms, wasFixed, paintInvalidationState); 2442 mapLocalToContainer(paintInvalidationContainer, transformState, mode | Apply ContainerFlip | UseTransforms, wasFixed, paintInvalidationState);
2453 transformState.flatten(); 2443 transformState.flatten();
2454 2444
2455 return transformState.lastPlanarPoint(); 2445 return transformState.lastPlanarPoint();
2456 } 2446 }
2457 2447
2448 FloatPoint RenderObject::localToInvalidationBackingPoint(const LayoutPoint& loca lPoint, RenderLayer** backingLayer)
2449 {
2450 const RenderLayerModelObject* paintInvalidationContainer = containerForPaint Invalidation();
2451 ASSERT(paintInvalidationContainer);
2452 RenderLayer* layer = paintInvalidationContainer->layer();
2453 ASSERT(layer);
2454
2455 if (backingLayer)
2456 *backingLayer = layer;
2457 FloatPoint containerPoint = localToContainerPoint(localPoint, paintInvalidat ionContainer, TraverseDocumentBoundaries);
2458
2459 if (layer->compositingState() == NotComposited) // This can happen for Rende rFlowThread.
2460 return containerPoint;
2461
2462 RenderLayer::mapPointToPaintBackingCoordinates(paintInvalidationContainer, c ontainerPoint);
2463 return containerPoint;
2464 }
2465
2466
2458 LayoutSize RenderObject::offsetFromContainer(const RenderObject* o, const Layout Point& point, bool* offsetDependsOnPoint) const 2467 LayoutSize RenderObject::offsetFromContainer(const RenderObject* o, const Layout Point& point, bool* offsetDependsOnPoint) const
2459 { 2468 {
2460 ASSERT(o == container()); 2469 ASSERT(o == container());
2461 2470
2462 LayoutSize offset = o->columnOffset(point); 2471 LayoutSize offset = o->columnOffset(point);
2463 2472
2464 if (o->hasOverflowClip()) 2473 if (o->hasOverflowClip())
2465 offset -= toRenderBox(o)->scrolledContentOffset(); 2474 offset -= toRenderBox(o)->scrolledContentOffset();
2466 2475
2467 if (offsetDependsOnPoint) 2476 if (offsetDependsOnPoint)
(...skipping 1051 matching lines...) Expand 10 before | Expand all | Expand 10 after
3519 { 3528 {
3520 if (object1) { 3529 if (object1) {
3521 const blink::RenderObject* root = object1; 3530 const blink::RenderObject* root = object1;
3522 while (root->parent()) 3531 while (root->parent())
3523 root = root->parent(); 3532 root = root->parent();
3524 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3533 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3525 } 3534 }
3526 } 3535 }
3527 3536
3528 #endif 3537 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698