| 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 985 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 996 FloatPoint pos(additionalOffset); | 996 FloatPoint pos(additionalOffset); |
| 997 pos.move(box->locationOffset()); | 997 pos.move(box->locationOffset()); |
| 998 box->addFocusRingRects(rects, flooredIntPoint(pos), paintContain
er); | 998 box->addFocusRingRects(rects, flooredIntPoint(pos), paintContain
er); |
| 999 } | 999 } |
| 1000 } else { | 1000 } else { |
| 1001 current->addFocusRingRects(rects, additionalOffset, paintContainer); | 1001 current->addFocusRingRects(rects, additionalOffset, paintContainer); |
| 1002 } | 1002 } |
| 1003 } | 1003 } |
| 1004 } | 1004 } |
| 1005 | 1005 |
| 1006 LayoutPoint RenderObject::positionFromPaintInvalidationContainer(const RenderLay
erModelObject* paintInvalidationContainer, const PaintInvalidationState* paintIn
validationState) const | |
| 1007 { | |
| 1008 ASSERT(containerForPaintInvalidation() == paintInvalidationContainer); | |
| 1009 | |
| 1010 if (paintInvalidationContainer == this) | |
| 1011 return LayoutPoint(); | |
| 1012 | |
| 1013 return LayoutPoint(localToContainerPoint(LayoutPoint(), paintInvalidationCon
tainer, 0, paintInvalidationState)); | |
| 1014 } | |
| 1015 | |
| 1016 IntRect RenderObject::absoluteBoundingBoxRect() const | 1006 IntRect RenderObject::absoluteBoundingBoxRect() const |
| 1017 { | 1007 { |
| 1018 Vector<FloatQuad> quads; | 1008 Vector<FloatQuad> quads; |
| 1019 absoluteQuads(quads); | 1009 absoluteQuads(quads); |
| 1020 | 1010 |
| 1021 size_t n = quads.size(); | 1011 size_t n = quads.size(); |
| 1022 if (!n) | 1012 if (!n) |
| 1023 return IntRect(); | 1013 return IntRect(); |
| 1024 | 1014 |
| 1025 IntRect result = quads[0].enclosingBoundingBox(); | 1015 IntRect result = quads[0].enclosingBoundingBox(); |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1469 } | 1459 } |
| 1470 | 1460 |
| 1471 FloatQuad RenderObject::absoluteToLocalQuad(const FloatQuad& quad, MapCoordinate
sFlags mode) const | 1461 FloatQuad RenderObject::absoluteToLocalQuad(const FloatQuad& quad, MapCoordinate
sFlags mode) const |
| 1472 { | 1462 { |
| 1473 TransformState transformState(TransformState::UnapplyInverseTransformDirecti
on, quad.boundingBox().center(), quad); | 1463 TransformState transformState(TransformState::UnapplyInverseTransformDirecti
on, quad.boundingBox().center(), quad); |
| 1474 mapAbsoluteToLocalPoint(mode, transformState); | 1464 mapAbsoluteToLocalPoint(mode, transformState); |
| 1475 transformState.flatten(); | 1465 transformState.flatten(); |
| 1476 return transformState.lastPlanarQuad(); | 1466 return transformState.lastPlanarQuad(); |
| 1477 } | 1467 } |
| 1478 | 1468 |
| 1479 void RenderObject::mapLocalToContainer(const RenderLayerModelObject* paintInvali
dationContainer, TransformState& transformState, MapCoordinatesFlags mode, const
PaintInvalidationState* paintInvalidationState) const | 1469 void RenderObject::mapLocalToContainer(const RenderLayerModelObject* paintInvali
dationContainer, TransformState& transformState, MapCoordinatesFlags mode) const |
| 1480 { | 1470 { |
| 1481 if (paintInvalidationContainer == this) | 1471 if (paintInvalidationContainer == this) |
| 1482 return; | 1472 return; |
| 1483 | 1473 |
| 1484 RenderObject* o = parent(); | 1474 RenderObject* o = parent(); |
| 1485 if (!o) | 1475 if (!o) |
| 1486 return; | 1476 return; |
| 1487 | 1477 |
| 1488 // FIXME: this should call offsetFromContainer to share code, but I'm not su
re it's ever called. | 1478 // FIXME: this should call offsetFromContainer to share code, but I'm not su
re it's ever called. |
| 1489 if (mode & ApplyContainerFlip && o->isBox()) { | 1479 if (mode & ApplyContainerFlip && o->isBox()) { |
| 1490 mode &= ~ApplyContainerFlip; | 1480 mode &= ~ApplyContainerFlip; |
| 1491 } | 1481 } |
| 1492 | 1482 |
| 1493 if (o->hasOverflowClip()) | 1483 if (o->hasOverflowClip()) |
| 1494 transformState.move(-toRenderBox(o)->scrolledContentOffset()); | 1484 transformState.move(-toRenderBox(o)->scrolledContentOffset()); |
| 1495 | 1485 |
| 1496 o->mapLocalToContainer(paintInvalidationContainer, transformState, mode, pai
ntInvalidationState); | 1486 o->mapLocalToContainer(paintInvalidationContainer, transformState, mode); |
| 1497 } | 1487 } |
| 1498 | 1488 |
| 1499 const RenderObject* RenderObject::pushMappingToContainer(const RenderLayerModelO
bject* ancestorToStopAt, RenderGeometryMap& geometryMap) const | 1489 const RenderObject* RenderObject::pushMappingToContainer(const RenderLayerModelO
bject* ancestorToStopAt, RenderGeometryMap& geometryMap) const |
| 1500 { | 1490 { |
| 1501 ASSERT_UNUSED(ancestorToStopAt, ancestorToStopAt != this); | 1491 ASSERT_UNUSED(ancestorToStopAt, ancestorToStopAt != this); |
| 1502 | 1492 |
| 1503 RenderObject* container = parent(); | 1493 RenderObject* container = parent(); |
| 1504 if (!container) | 1494 if (!container) |
| 1505 return 0; | 1495 return 0; |
| 1506 | 1496 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1557 { | 1547 { |
| 1558 // Track the point at the center of the quad's bounding box. As mapLocalToCo
ntainer() calls offsetFromContainer(), | 1548 // Track the point at the center of the quad's bounding box. As mapLocalToCo
ntainer() calls offsetFromContainer(), |
| 1559 // it will use that point as the reference point to decide which column's tr
ansform to apply in multiple-column blocks. | 1549 // it will use that point as the reference point to decide which column's tr
ansform to apply in multiple-column blocks. |
| 1560 TransformState transformState(TransformState::ApplyTransformDirection, local
Quad.boundingBox().center(), localQuad); | 1550 TransformState transformState(TransformState::ApplyTransformDirection, local
Quad.boundingBox().center(), localQuad); |
| 1561 mapLocalToContainer(paintInvalidationContainer, transformState, mode | Apply
ContainerFlip | UseTransforms); | 1551 mapLocalToContainer(paintInvalidationContainer, transformState, mode | Apply
ContainerFlip | UseTransforms); |
| 1562 transformState.flatten(); | 1552 transformState.flatten(); |
| 1563 | 1553 |
| 1564 return transformState.lastPlanarQuad(); | 1554 return transformState.lastPlanarQuad(); |
| 1565 } | 1555 } |
| 1566 | 1556 |
| 1567 FloatPoint RenderObject::localToContainerPoint(const FloatPoint& localPoint, con
st RenderLayerModelObject* paintInvalidationContainer, MapCoordinatesFlags mode,
const PaintInvalidationState* paintInvalidationState) const | 1557 FloatPoint RenderObject::localToContainerPoint(const FloatPoint& localPoint, con
st RenderLayerModelObject* paintInvalidationContainer, MapCoordinatesFlags mode)
const |
| 1568 { | 1558 { |
| 1569 TransformState transformState(TransformState::ApplyTransformDirection, local
Point); | 1559 TransformState transformState(TransformState::ApplyTransformDirection, local
Point); |
| 1570 mapLocalToContainer(paintInvalidationContainer, transformState, mode | Apply
ContainerFlip | UseTransforms, paintInvalidationState); | 1560 mapLocalToContainer(paintInvalidationContainer, transformState, mode | Apply
ContainerFlip | UseTransforms); |
| 1571 transformState.flatten(); | 1561 transformState.flatten(); |
| 1572 | 1562 |
| 1573 return transformState.lastPlanarPoint(); | 1563 return transformState.lastPlanarPoint(); |
| 1574 } | 1564 } |
| 1575 | 1565 |
| 1576 LayoutSize RenderObject::offsetFromContainer(const RenderObject* o, const Layout
Point& point, bool* offsetDependsOnPoint) const | 1566 LayoutSize RenderObject::offsetFromContainer(const RenderObject* o, const Layout
Point& point, bool* offsetDependsOnPoint) const |
| 1577 { | 1567 { |
| 1578 ASSERT(o == container()); | 1568 ASSERT(o == container()); |
| 1579 | 1569 |
| 1580 LayoutSize offset; | 1570 LayoutSize offset; |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2132 { | 2122 { |
| 2133 if (object1) { | 2123 if (object1) { |
| 2134 const blink::RenderObject* root = object1; | 2124 const blink::RenderObject* root = object1; |
| 2135 while (root->parent()) | 2125 while (root->parent()) |
| 2136 root = root->parent(); | 2126 root = root->parent(); |
| 2137 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 2127 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 2138 } | 2128 } |
| 2139 } | 2129 } |
| 2140 | 2130 |
| 2141 #endif | 2131 #endif |
| OLD | NEW |