OLD | NEW |
---|---|
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 2431 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2442 | 2442 |
2443 FloatPoint RenderObject::localToContainerPoint(const FloatPoint& localPoint, con st RenderLayerModelObject* paintInvalidationContainer, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const | 2443 FloatPoint RenderObject::localToContainerPoint(const FloatPoint& localPoint, con st RenderLayerModelObject* paintInvalidationContainer, MapCoordinatesFlags mode, bool* wasFixed, const PaintInvalidationState* paintInvalidationState) const |
2444 { | 2444 { |
2445 TransformState transformState(TransformState::ApplyTransformDirection, local Point); | 2445 TransformState transformState(TransformState::ApplyTransformDirection, local Point); |
2446 mapLocalToContainer(paintInvalidationContainer, transformState, mode | Apply ContainerFlip | UseTransforms, wasFixed, paintInvalidationState); | 2446 mapLocalToContainer(paintInvalidationContainer, transformState, mode | Apply ContainerFlip | UseTransforms, wasFixed, paintInvalidationState); |
2447 transformState.flatten(); | 2447 transformState.flatten(); |
2448 | 2448 |
2449 return transformState.lastPlanarPoint(); | 2449 return transformState.lastPlanarPoint(); |
2450 } | 2450 } |
2451 | 2451 |
2452 FloatPoint RenderObject::localToInvalidationBackingPoint(const LayoutPoint& loca lPoint, RenderLayer** backingLayer) | |
chrishtr
2014/09/17 16:41:33
Why can't this be unified with positionFromPaintIn
trchen
2014/09/17 19:34:16
They do different things.
positionFromPaintInvalid
chrishtr
2014/09/18 04:06:00
Then delete the RenderObject::positionFromPaintInv
| |
2453 { | |
2454 const RenderLayerModelObject* paintInvalidationContainer = containerForPaint Invalidation(); | |
2455 ASSERT(paintInvalidationContainer); | |
2456 RenderLayer* layer = paintInvalidationContainer->layer(); | |
2457 ASSERT(layer); | |
2458 | |
2459 if (backingLayer) | |
2460 *backingLayer = layer; | |
2461 FloatPoint containerPoint = localToContainerPoint(localPoint, paintInvalidat ionContainer, TraverseDocumentBoundaries); | |
2462 | |
2463 if (layer->compositingState() == NotComposited) // This can happen for Rende rFlowThread. | |
2464 return containerPoint; | |
2465 | |
2466 RenderLayer::mapPointToPaintBackingCoordinates(paintInvalidationContainer, c ontainerPoint); | |
2467 return containerPoint; | |
2468 } | |
2469 | |
2470 | |
2452 LayoutSize RenderObject::offsetFromContainer(const RenderObject* o, const Layout Point& point, bool* offsetDependsOnPoint) const | 2471 LayoutSize RenderObject::offsetFromContainer(const RenderObject* o, const Layout Point& point, bool* offsetDependsOnPoint) const |
2453 { | 2472 { |
2454 ASSERT(o == container()); | 2473 ASSERT(o == container()); |
2455 | 2474 |
2456 LayoutSize offset = o->columnOffset(point); | 2475 LayoutSize offset = o->columnOffset(point); |
2457 | 2476 |
2458 if (o->hasOverflowClip()) | 2477 if (o->hasOverflowClip()) |
2459 offset -= toRenderBox(o)->scrolledContentOffset(); | 2478 offset -= toRenderBox(o)->scrolledContentOffset(); |
2460 | 2479 |
2461 if (offsetDependsOnPoint) | 2480 if (offsetDependsOnPoint) |
(...skipping 1027 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3489 { | 3508 { |
3490 if (object1) { | 3509 if (object1) { |
3491 const blink::RenderObject* root = object1; | 3510 const blink::RenderObject* root = object1; |
3492 while (root->parent()) | 3511 while (root->parent()) |
3493 root = root->parent(); | 3512 root = root->parent(); |
3494 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3513 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
3495 } | 3514 } |
3496 } | 3515 } |
3497 | 3516 |
3498 #endif | 3517 #endif |
OLD | NEW |