Changeset 288879 in webkit
- Timestamp:
- Feb 1, 2022 8:41:43 AM (6 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/import-removal-expected.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-cascade/import-removal.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/css/StyleRuleImport.cpp (modified) (1 diff)
-
Source/WebCore/css/StyleRuleImport.h (modified) (1 diff)
-
Source/WebCore/css/StyleSheetContents.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r288869 r288879 1 2022-02-01 Oriol Brufau <obrufau@igalia.com> 2 3 [css-cascade] Fix removal of not yet loaded CSS @import 4 https://bugs.webkit.org/show_bug.cgi?id=235930 5 6 Reviewed by Antti Koivisto. 7 8 Add new test. 9 10 * web-platform-tests/css/css-cascade/import-removal-expected.html: Added. 11 * web-platform-tests/css/css-cascade/import-removal.html: Added. 12 1 13 2022-02-01 Tim Nguyen <ntim@apple.com> 2 14 -
trunk/Source/WebCore/ChangeLog
r288874 r288879 1 2022-02-01 Oriol Brufau <obrufau@igalia.com> 2 3 [css-cascade] Fix removal of not yet loaded CSS @import 4 https://bugs.webkit.org/show_bug.cgi?id=235930 5 6 Reviewed by Antti Koivisto. 7 8 When removing a not yet loaded CSS @import, the hasPendingSheet() flag 9 was not cleared. This resulted in a completely blank page. 10 This patch makes sure to cancel the load before deleting the rule. 11 12 Test: imported/w3c/web-platform-tests/css/css-cascade/import-removal.html 13 14 * css/StyleRuleImport.cpp: 15 (WebCore::StyleRuleImport::cancelLoad): 16 * css/StyleRuleImport.h: 17 * css/StyleSheetContents.cpp: 18 (WebCore::StyleSheetContents::wrapperDeleteRule): 19 1 20 2022-02-01 Antti Koivisto <antti@apple.com> 2 21 -
trunk/Source/WebCore/css/StyleRuleImport.cpp
r288362 r288879 51 51 if (!m_mediaQueries) 52 52 m_mediaQueries = MediaQuerySet::create(String(), MediaQueryParserContext()); 53 } 54 55 void StyleRuleImport::cancelLoad() 56 { 57 if (!isLoading()) 58 return; 59 60 m_loading = false; 61 if (m_parentStyleSheet) 62 m_parentStyleSheet->checkLoaded(); 53 63 } 54 64 -
trunk/Source/WebCore/css/StyleRuleImport.h
r281928 r288879 43 43 void setParentStyleSheet(StyleSheetContents* sheet) { ASSERT(sheet); m_parentStyleSheet = sheet; } 44 44 void clearParentStyleSheet() { m_parentStyleSheet = 0; } 45 void cancelLoad(); 45 46 46 47 String href() const { return m_strHref; } -
trunk/Source/WebCore/css/StyleSheetContents.cpp
r286949 r288879 326 326 327 327 if (childVectorIndex < m_importRules.size()) { 328 m_importRules[childVectorIndex]->cancelLoad(); 328 329 m_importRules[childVectorIndex]->clearParentStyleSheet(); 329 330 m_importRules.remove(childVectorIndex);
Note: See TracChangeset
for help on using the changeset viewer.