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 18 matching lines...) Expand all Loading... | |
29 | 29 |
30 #include "core/HTMLNames.h" | 30 #include "core/HTMLNames.h" |
31 #include "core/css/resolver/StyleResolver.h" | 31 #include "core/css/resolver/StyleResolver.h" |
32 #include "core/dom/AXObjectCache.h" | 32 #include "core/dom/AXObjectCache.h" |
33 #include "core/dom/ElementTraversal.h" | 33 #include "core/dom/ElementTraversal.h" |
34 #include "core/dom/StyleEngine.h" | 34 #include "core/dom/StyleEngine.h" |
35 #include "core/dom/shadow/ShadowRoot.h" | 35 #include "core/dom/shadow/ShadowRoot.h" |
36 #include "core/editing/EditingBoundary.h" | 36 #include "core/editing/EditingBoundary.h" |
37 #include "core/editing/FrameSelection.h" | 37 #include "core/editing/FrameSelection.h" |
38 #include "core/editing/htmlediting.h" | 38 #include "core/editing/htmlediting.h" |
39 #include "core/events/Event.h" | |
40 #include "core/events/EventQueue.h" | |
39 #include "core/fetch/ResourceLoadPriorityOptimizer.h" | 41 #include "core/fetch/ResourceLoadPriorityOptimizer.h" |
40 #include "core/fetch/ResourceLoader.h" | 42 #include "core/fetch/ResourceLoader.h" |
41 #include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h" | 43 #include "core/frame/DeprecatedScheduleStyleRecalcDuringLayout.h" |
42 #include "core/frame/EventHandlerRegistry.h" | 44 #include "core/frame/EventHandlerRegistry.h" |
43 #include "core/frame/FrameView.h" | 45 #include "core/frame/FrameView.h" |
44 #include "core/frame/LocalFrame.h" | 46 #include "core/frame/LocalFrame.h" |
45 #include "core/frame/Settings.h" | 47 #include "core/frame/Settings.h" |
46 #include "core/frame/UseCounter.h" | 48 #include "core/frame/UseCounter.h" |
47 #include "core/html/HTMLAnchorElement.h" | 49 #include "core/html/HTMLAnchorElement.h" |
48 #include "core/html/HTMLElement.h" | 50 #include "core/html/HTMLElement.h" |
(...skipping 1766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1815 | 1817 |
1816 if (diff.transformChanged() && !needsLayout()) { | 1818 if (diff.transformChanged() && !needsLayout()) { |
1817 if (LayoutBlock* container = containingBlock()) | 1819 if (LayoutBlock* container = containingBlock()) |
1818 container->setNeedsOverflowRecalcAfterStyleChange(); | 1820 container->setNeedsOverflowRecalcAfterStyleChange(); |
1819 } | 1821 } |
1820 | 1822 |
1821 if (updatedDiff.needsPaintInvalidationLayer()) | 1823 if (updatedDiff.needsPaintInvalidationLayer()) |
1822 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); | 1824 setShouldDoFullPaintInvalidationIncludingNonCompositingDescendants(); |
1823 else if (diff.needsPaintInvalidationObject() || updatedDiff.needsPaintInvali dationObject()) | 1825 else if (diff.needsPaintInvalidationObject() || updatedDiff.needsPaintInvali dationObject()) |
1824 setShouldDoFullPaintInvalidation(); | 1826 setShouldDoFullPaintInvalidation(); |
1827 | |
1828 // Dispatch a resize event to our owning node if requested. | |
1829 if (m_bitfields.sendResizeEvent() && m_node) { | |
fs
2015/07/08 09:31:00
I think it would be better just put this mechanism
liberato (no reviews please)
2015/07/09 12:10:56
thanks! I added a call to LayoutMedia::layout() t
| |
1830 RefPtrWillBeRawPtr<Event> event = Event::create(EventTypeNames::resize); | |
1831 event->setTarget(m_node); | |
1832 LocalDOMWindow* win = document().executingWindow(); | |
1833 if (win) | |
1834 win->eventQueue()->enqueueEvent(event); | |
1835 } | |
1825 } | 1836 } |
1826 | 1837 |
1827 static inline bool layoutObjectHasBackground(const LayoutObject* layoutObject) | 1838 static inline bool layoutObjectHasBackground(const LayoutObject* layoutObject) |
1828 { | 1839 { |
1829 return layoutObject && layoutObject->hasBackground(); | 1840 return layoutObject && layoutObject->hasBackground(); |
1830 } | 1841 } |
1831 | 1842 |
1832 void LayoutObject::styleWillChange(StyleDifference diff, const ComputedStyle& ne wStyle) | 1843 void LayoutObject::styleWillChange(StyleDifference diff, const ComputedStyle& ne wStyle) |
1833 { | 1844 { |
1834 if (m_style) { | 1845 if (m_style) { |
(...skipping 1454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3289 const blink::LayoutObject* root = object1; | 3300 const blink::LayoutObject* root = object1; |
3290 while (root->parent()) | 3301 while (root->parent()) |
3291 root = root->parent(); | 3302 root = root->parent(); |
3292 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); | 3303 root->showLayoutTreeAndMark(object1, "*", object2, "-", 0); |
3293 } else { | 3304 } else { |
3294 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); | 3305 fprintf(stderr, "Cannot showLayoutTree. Root is (nil)\n"); |
3295 } | 3306 } |
3296 } | 3307 } |
3297 | 3308 |
3298 #endif | 3309 #endif |
OLD | NEW |