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. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. |
7 * All rights reserved. | 7 * All rights reserved. |
8 * Copyright (C) 2009 Google Inc. All rights reserved. | 8 * Copyright (C) 2009 Google Inc. All rights reserved. |
9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. | 9 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. |
10 * (http://www.torchmobile.com/) | 10 * (http://www.torchmobile.com/) |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 #include "core/layout/LayoutObject.h" | 29 #include "core/layout/LayoutObject.h" |
30 | 30 |
31 #include <algorithm> | 31 #include <algorithm> |
32 #include <memory> | 32 #include <memory> |
33 | 33 |
34 #include "core/animation/ElementAnimations.h" | 34 #include "core/animation/ElementAnimations.h" |
35 #include "core/css/resolver/StyleResolver.h" | 35 #include "core/css/resolver/StyleResolver.h" |
36 #include "core/dom/AXObjectCache.h" | 36 #include "core/dom/AXObjectCache.h" |
37 #include "core/dom/ElementTraversal.h" | 37 #include "core/dom/ElementTraversal.h" |
| 38 #include "core/dom/PseudoElement.h" |
38 #include "core/dom/StyleChangeReason.h" | 39 #include "core/dom/StyleChangeReason.h" |
39 #include "core/dom/StyleEngine.h" | 40 #include "core/dom/StyleEngine.h" |
40 #include "core/dom/shadow/ShadowRoot.h" | 41 #include "core/dom/shadow/ShadowRoot.h" |
41 #include "core/editing/EditingUtilities.h" | 42 #include "core/editing/EditingUtilities.h" |
42 #include "core/editing/FrameSelection.h" | 43 #include "core/editing/FrameSelection.h" |
43 #include "core/editing/TextAffinity.h" | 44 #include "core/editing/TextAffinity.h" |
44 #include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h" | 45 #include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h" |
45 #include "core/frame/EventHandlerRegistry.h" | 46 #include "core/frame/EventHandlerRegistry.h" |
46 #include "core/frame/FrameView.h" | 47 #include "core/frame/FrameView.h" |
47 #include "core/frame/LocalFrame.h" | 48 #include "core/frame/LocalFrame.h" |
(...skipping 1533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1581 if (isImage() || isQuote()) { | 1582 if (isImage() || isQuote()) { |
1582 RefPtr<ComputedStyle> style = ComputedStyle::create(); | 1583 RefPtr<ComputedStyle> style = ComputedStyle::create(); |
1583 style->inheritFrom(*pseudoStyle); | 1584 style->inheritFrom(*pseudoStyle); |
1584 setStyle(std::move(style)); | 1585 setStyle(std::move(style)); |
1585 return; | 1586 return; |
1586 } | 1587 } |
1587 | 1588 |
1588 setStyle(std::move(pseudoStyle)); | 1589 setStyle(std::move(pseudoStyle)); |
1589 } | 1590 } |
1590 | 1591 |
| 1592 bool LayoutObject::isPseudoElementGeneratedContentFor( |
| 1593 const PseudoElement& pseudo) const { |
| 1594 return isAnonymous() && m_node.get() == &pseudo; |
| 1595 } |
| 1596 |
1591 void LayoutObject::firstLineStyleDidChange(const ComputedStyle& oldStyle, | 1597 void LayoutObject::firstLineStyleDidChange(const ComputedStyle& oldStyle, |
1592 const ComputedStyle& newStyle) { | 1598 const ComputedStyle& newStyle) { |
1593 StyleDifference diff = oldStyle.visualInvalidationDiff(newStyle); | 1599 StyleDifference diff = oldStyle.visualInvalidationDiff(newStyle); |
1594 | 1600 |
1595 if (diff.needsFullPaintInvalidation() || | 1601 if (diff.needsFullPaintInvalidation() || |
1596 diff.textDecorationOrColorChanged()) { | 1602 diff.textDecorationOrColorChanged()) { |
1597 // We need to invalidate all inline boxes in the first line, because they | 1603 // We need to invalidate all inline boxes in the first line, because they |
1598 // need to be repainted with the new style, e.g. background, font style, | 1604 // need to be repainted with the new style, e.g. background, font style, |
1599 // etc. | 1605 // etc. |
1600 LayoutBlockFlow* firstLineContainer = nullptr; | 1606 LayoutBlockFlow* firstLineContainer = nullptr; |
(...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3674 const blink::LayoutObject* root = object1; | 3680 const blink::LayoutObject* root = object1; |
3675 while (root->parent()) | 3681 while (root->parent()) |
3676 root = root->parent(); | 3682 root = root->parent(); |
3677 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3683 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3678 } else { | 3684 } else { |
3679 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); | 3685 WTFLogAlways("%s", "Cannot showLayoutTree. Root is (nil)"); |
3680 } | 3686 } |
3681 } | 3687 } |
3682 | 3688 |
3683 #endif | 3689 #endif |
OLD | NEW |