Changeset 273793 in webkit
- Timestamp:
- Mar 2, 2021, 7:08:42 PM (6 years ago)
- Location:
- branches/safari-612.1.5-branch/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
dom/Document.cpp (modified) (1 diff)
-
dom/Element.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/safari-612.1.5-branch/Source/WebCore/ChangeLog
r273792 r273793 1 2021-03-02 Alan Coon <alancoon@apple.com> 2 3 Cherry-pick r273415. rdar://problem/74953177 4 5 Move PostResolutionCallbackDisabler to resolveComputedStyle 6 https://bugs.webkit.org/show_bug.cgi?id=222350 7 8 Reviewed by Ryosuke Niwa. 9 10 It can be constructed and deleted repeatedly in styleForElementIgnoringPendingStylesheets when 11 resolveComputedStyle calls it in a loop. 12 13 * dom/Document.cpp: 14 (WebCore::Document::styleForElementIgnoringPendingStylesheets): 15 * dom/Element.cpp: 16 (WebCore::Element::resolveComputedStyle): 17 (WebCore::Element::resolvePseudoElementStyle): 18 19 20 git-svn-id: https://svn.webkit.org/repository/webkit/trunk@273415 268f45cc-cd09-0410-ab3c-d52691b4dbfc 21 22 2021-02-24 Antti Koivisto <antti@apple.com> 23 24 Move PostResolutionCallbackDisabler to resolveComputedStyle 25 https://bugs.webkit.org/show_bug.cgi?id=222350 26 27 Reviewed by Ryosuke Niwa. 28 29 It can be constructed and deleted repeatedly in styleForElementIgnoringPendingStylesheets when 30 resolveComputedStyle calls it in a loop. 31 32 * dom/Document.cpp: 33 (WebCore::Document::styleForElementIgnoringPendingStylesheets): 34 * dom/Element.cpp: 35 (WebCore::Element::resolveComputedStyle): 36 (WebCore::Element::resolvePseudoElementStyle): 37 1 38 2021-03-02 Alan Coon <alancoon@apple.com> 2 39 -
branches/safari-612.1.5-branch/Source/WebCore/dom/Document.cpp
r273220 r273793 2208 2208 ASSERT(!element.isPseudoElement() || pseudoElementSpecifier == PseudoId::None); 2209 2209 ASSERT(pseudoElementSpecifier == PseudoId::None || parentStyle); 2210 2211 // On iOS request delegates called during styleForElement may result in re-entering WebKit and killing the style resolver. 2212 Style::PostResolutionCallbackDisabler disabler(*this, Style::PostResolutionCallbackDisabler::DrainCallbacks::No); 2210 ASSERT(Style::postResolutionCallbacksAreSuspended()); 2213 2211 2214 2212 SetForScope<bool> change(m_ignorePendingStylesheets, true); -
branches/safari-612.1.5-branch/Source/WebCore/dom/Element.cpp
r272618 r273793 3356 3356 } 3357 3357 3358 // On iOS request delegates called during styleForElement may result in re-entering WebKit and killing the style resolver. 3359 Style::PostResolutionCallbackDisabler disabler(document(), Style::PostResolutionCallbackDisabler::DrainCallbacks::No); 3360 3358 3361 // Resolve and cache styles starting from the most distant ancestor. 3359 3362 for (auto& element : elementsRequiringComputedStyle) { … … 3425 3428 ASSERT(parentStyle); 3426 3429 ASSERT(!parentStyle->getCachedPseudoStyle(pseudoElementSpecifier)); 3430 3431 Style::PostResolutionCallbackDisabler disabler(document(), Style::PostResolutionCallbackDisabler::DrainCallbacks::No); 3427 3432 3428 3433 auto style = document().styleForElementIgnoringPendingStylesheets(*this, parentStyle, pseudoElementSpecifier);
Note:
See TracChangeset
for help on using the changeset viewer.