| 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 1599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1610 { | 1610 { |
| 1611 view()->selectionStartEnd(spos, epos); | 1611 view()->selectionStartEnd(spos, epos); |
| 1612 } | 1612 } |
| 1613 | 1613 |
| 1614 StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff) const | 1614 StyleDifference RenderObject::adjustStyleDifference(StyleDifference diff) const |
| 1615 { | 1615 { |
| 1616 // If transform changed, and the layer does not paint into its own separate
backing, then we need to invalidate paints. | 1616 // If transform changed, and the layer does not paint into its own separate
backing, then we need to invalidate paints. |
| 1617 if (diff.transformChanged()) { | 1617 if (diff.transformChanged()) { |
| 1618 // Text nodes share style with their parents but transforms don't apply
to them, | 1618 // Text nodes share style with their parents but transforms don't apply
to them, |
| 1619 // hence the !isText() check. | 1619 // hence the !isText() check. |
| 1620 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer(
)->hasStyleDeterminedDirectCompositingReasons())) | 1620 if (!isText()) |
| 1621 diff.setNeedsPaintInvalidationLayer(); | 1621 diff.setNeedsPaintInvalidationLayer(); |
| 1622 } | 1622 } |
| 1623 | 1623 |
| 1624 // If opacity or zIndex changed, and the layer does not paint into its own s
eparate backing, then we need to invalidate paints (also | 1624 // If opacity or zIndex changed, and the layer does not paint into its own s
eparate backing, then we need to invalidate paints (also |
| 1625 // ignoring text nodes) | 1625 // ignoring text nodes) |
| 1626 if (diff.opacityChanged() || diff.zIndexChanged()) { | 1626 if (diff.opacityChanged() || diff.zIndexChanged()) { |
| 1627 if (!isText() && (!hasLayer() || !toRenderLayerModelObject(this)->layer(
)->hasStyleDeterminedDirectCompositingReasons())) | 1627 if (!isText()) |
| 1628 diff.setNeedsPaintInvalidationLayer(); | 1628 diff.setNeedsPaintInvalidationLayer(); |
| 1629 } | 1629 } |
| 1630 | 1630 |
| 1631 // If filter changed, and the layer does not paint into its own separate bac
king or it paints with filters, then we need to invalidate paints. | 1631 // If filter changed, and the layer does not paint into its own separate bac
king or it paints with filters, then we need to invalidate paints. |
| 1632 if (diff.filterChanged() && hasLayer()) { | 1632 if (diff.filterChanged() && hasLayer()) { |
| 1633 RenderLayer* layer = toRenderLayerModelObject(this)->layer(); | 1633 diff.setNeedsPaintInvalidationLayer(); |
| 1634 if (!layer->hasStyleDeterminedDirectCompositingReasons() || layer->paint
sWithFilters()) | |
| 1635 diff.setNeedsPaintInvalidationLayer(); | |
| 1636 } | 1634 } |
| 1637 | 1635 |
| 1638 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation() | 1636 if (diff.textOrColorChanged() && !diff.needsPaintInvalidation() |
| 1639 && hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor()) | 1637 && hasImmediateNonWhitespaceTextChildOrPropertiesDependentOnColor()) |
| 1640 diff.setNeedsPaintInvalidationObject(); | 1638 diff.setNeedsPaintInvalidationObject(); |
| 1641 | 1639 |
| 1642 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch
ange without the actual | 1640 // The answer to layerTypeRequired() for plugins, iframes, and canvas can ch
ange without the actual |
| 1643 // style changing, since it depends on whether we decide to composite these
elements. When the | 1641 // style changing, since it depends on whether we decide to composite these
elements. When the |
| 1644 // layer status of one of these elements changes, we need to force a layout. | 1642 // layer status of one of these elements changes, we need to force a layout. |
| 1645 if (!diff.needsFullLayout() && style() && isLayerModelObject()) { | 1643 if (!diff.needsFullLayout() && style() && isLayerModelObject()) { |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2208 maskBoxImage->removeClient(this); | 2206 maskBoxImage->removeClient(this); |
| 2209 } | 2207 } |
| 2210 delete this; | 2208 delete this; |
| 2211 } | 2209 } |
| 2212 | 2210 |
| 2213 PositionWithAffinity RenderObject::positionForPoint(const LayoutPoint&) | 2211 PositionWithAffinity RenderObject::positionForPoint(const LayoutPoint&) |
| 2214 { | 2212 { |
| 2215 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); | 2213 return createPositionWithAffinity(caretMinOffset(), DOWNSTREAM); |
| 2216 } | 2214 } |
| 2217 | 2215 |
| 2218 CompositingReasons RenderObject::additionalCompositingReasons() const | |
| 2219 { | |
| 2220 return CompositingReasonNone; | |
| 2221 } | |
| 2222 | |
| 2223 bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result,
const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffse
t, HitTestFilter hitTestFilter) | 2216 bool RenderObject::hitTest(const HitTestRequest& request, HitTestResult& result,
const HitTestLocation& locationInContainer, const LayoutPoint& accumulatedOffse
t, HitTestFilter hitTestFilter) |
| 2224 { | 2217 { |
| 2225 bool inside = false; | 2218 bool inside = false; |
| 2226 if (hitTestFilter != HitTestSelf) { | 2219 if (hitTestFilter != HitTestSelf) { |
| 2227 // First test the foreground layer (lines and inlines). | 2220 // First test the foreground layer (lines and inlines). |
| 2228 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf
fset, HitTestForeground); | 2221 inside = nodeAtPoint(request, result, locationInContainer, accumulatedOf
fset, HitTestForeground); |
| 2229 | 2222 |
| 2230 // Finally test to see if the mouse is in the background (within a child
block's background). | 2223 // Finally test to see if the mouse is in the background (within a child
block's background). |
| 2231 if (!inside) | 2224 if (!inside) |
| 2232 inside = nodeAtPoint(request, result, locationInContainer, accumulat
edOffset, HitTestChildBlockBackgrounds); | 2225 inside = nodeAtPoint(request, result, locationInContainer, accumulat
edOffset, HitTestChildBlockBackgrounds); |
| (...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2561 { | 2554 { |
| 2562 if (object1) { | 2555 if (object1) { |
| 2563 const blink::RenderObject* root = object1; | 2556 const blink::RenderObject* root = object1; |
| 2564 while (root->parent()) | 2557 while (root->parent()) |
| 2565 root = root->parent(); | 2558 root = root->parent(); |
| 2566 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 2559 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 2567 } | 2560 } |
| 2568 } | 2561 } |
| 2569 | 2562 |
| 2570 #endif | 2563 #endif |
| OLD | NEW |