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 1926 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1937 if (LocalFrame* frame = this->frame()) { | 1937 if (LocalFrame* frame = this->frame()) { |
1938 // Cursor update scheduling is done by the local root, which is the
main frame if there | 1938 // Cursor update scheduling is done by the local root, which is the
main frame if there |
1939 // are no RemoteFrame ancestors in the frame tree. Use of localFrame
Root() is | 1939 // are no RemoteFrame ancestors in the frame tree. Use of localFrame
Root() is |
1940 // discouraged but will change when cursor update scheduling is move
d from EventHandler | 1940 // discouraged but will change when cursor update scheduling is move
d from EventHandler |
1941 // to PageEventHandler. | 1941 // to PageEventHandler. |
1942 frame->localFrameRoot()->eventHandler().scheduleCursorUpdate(); | 1942 frame->localFrameRoot()->eventHandler().scheduleCursorUpdate(); |
1943 } | 1943 } |
1944 } | 1944 } |
1945 } | 1945 } |
1946 | 1946 |
| 1947 void LayoutObject::firstLineStyleDidChange(const ComputedStyle& oldStyle, const
ComputedStyle& newStyle) |
| 1948 { |
| 1949 StyleDifference diff = oldStyle.visualInvalidationDiff(newStyle); |
| 1950 if (diff.hasDifference()) { |
| 1951 // TODO(rune@opera.com): We should use the diff to determine whether a r
epaint vs. layout |
| 1952 // is needed, but for now just assume a layout will be required. The dif
f code |
| 1953 // in LayoutObject::setStyle would need to be factored out so that it co
uld be reused. |
| 1954 setNeedsLayoutAndPrefWidthsRecalcAndFullPaintInvalidation(LayoutInvalida
tionReason::StyleChange); |
| 1955 } |
| 1956 } |
| 1957 |
1947 void LayoutObject::propagateStyleToAnonymousChildren(bool blockChildrenOnly) | 1958 void LayoutObject::propagateStyleToAnonymousChildren(bool blockChildrenOnly) |
1948 { | 1959 { |
1949 // FIXME: We could save this call when the change only affected non-inherite
d properties. | 1960 // FIXME: We could save this call when the change only affected non-inherite
d properties. |
1950 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { | 1961 for (LayoutObject* child = slowFirstChild(); child; child = child->nextSibli
ng()) { |
1951 if (!child->isAnonymous() || child->style()->styleType() != NOPSEUDO) | 1962 if (!child->isAnonymous() || child->style()->styleType() != NOPSEUDO) |
1952 continue; | 1963 continue; |
1953 | 1964 |
1954 if (blockChildrenOnly && !child->isLayoutBlock()) | 1965 if (blockChildrenOnly && !child->isLayoutBlock()) |
1955 continue; | 1966 continue; |
1956 | 1967 |
(...skipping 1297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3254 const blink::LayoutObject* root = object1; | 3265 const blink::LayoutObject* root = object1; |
3255 while (root->parent()) | 3266 while (root->parent()) |
3256 root = root->parent(); | 3267 root = root->parent(); |
3257 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3268 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3258 } else { | 3269 } else { |
3259 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3270 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3260 } | 3271 } |
3261 } | 3272 } |
3262 | 3273 |
3263 #endif | 3274 #endif |
OLD | NEW |