Changeset 273415 in webkit
- Timestamp:
- Feb 24, 2021, 11:43:35 AM (6 years ago)
- Location:
- trunk/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
-
trunk/Source/WebCore/ChangeLog
r273407 r273415 1 2021-02-24 Antti Koivisto <antti@apple.com> 2 3 Move PostResolutionCallbackDisabler to resolveComputedStyle 4 https://bugs.webkit.org/show_bug.cgi?id=222350 5 6 Reviewed by Ryosuke Niwa. 7 8 It can be constructed and deleted repeatedly in styleForElementIgnoringPendingStylesheets when 9 resolveComputedStyle calls it in a loop. 10 11 * dom/Document.cpp: 12 (WebCore::Document::styleForElementIgnoringPendingStylesheets): 13 * dom/Element.cpp: 14 (WebCore::Element::resolveComputedStyle): 15 (WebCore::Element::resolvePseudoElementStyle): 16 1 17 2021-02-24 Said Abou-Hallawa <said@apple.com> 2 18 -
trunk/Source/WebCore/dom/Document.cpp
r273374 r273415 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); -
trunk/Source/WebCore/dom/Element.cpp
r272618 r273415 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.