Changeset 25308 in webkit
- Timestamp:
- Aug 29, 2007, 3:46:41 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r25284 r25308 1 2007-08-29 Antti Koivisto <antti@apple.com> 2 3 Reviewed by Mitz. 4 5 Test for <rdar://problem/5425951> 6 REGRESSION: change to updateLayoutIgnorePendingStylesheets causes SAP Portal page to render wrong 7 8 * fast/dynamic/style-access-late-stylesheet-load-expected.txt: Added. 9 * fast/dynamic/style-access-late-stylesheet-load.html: Added. 10 1 11 2007-08-28 Sam Weinig <sam@webkit.org> 2 12 -
trunk/WebCore/ChangeLog
r25306 r25308 1 2007-08-29 Antti Koivisto <antti@apple.com> 2 3 Reviewed by Mitz. 4 5 Fix <rdar://problem/5425951> 6 REGRESSION: change to updateLayoutIgnorePendingStylesheets causes SAP Portal page to render wrong 7 8 If new nodes have been added or style recalc has been done with style sheets still pending, some nodes 9 may not have had their real style calculated yet. Normally this state gets cleaned when style sheets arrive 10 but in updateLayoutIgnorePendingStylesheets() we need to do full style recalc to get up-to-date style immediatly. 11 12 Added a document flag to track if there are any nodes that did not have their real style calculated due to 13 pending stylesheets. 14 15 Test: fast/dynamic/style-access-late-stylesheet-load.html 16 17 * css/CSSStyleSelector.cpp: 18 (WebCore::CSSStyleSelector::styleForElement): 19 * dom/Document.cpp: 20 (WebCore::Document::Document): 21 (WebCore::Document::recalcStyle): 22 (WebCore::Document::updateLayoutIgnorePendingStylesheets): 23 * dom/Document.h: 24 (WebCore::Document::setHasNodesWithPlaceholderStyle): 25 1 26 2007-08-29 Alice Liu <alice.liu@apple.com> 2 27 -
trunk/WebCore/css/CSSStyleSelector.cpp
r25264 r25308 794 794 } 795 795 styleNotYetAvailable->ref(); 796 e->document()->setHasNodesWithPlaceholderStyle(); 796 797 return styleNotYetAvailable; 797 798 } -
trunk/WebCore/dom/Document.cpp
r25107 r25308 319 319 m_pendingStylesheets = 0; 320 320 m_ignorePendingStylesheets = false; 321 m_hasNodesWithPlaceholderStyle = false; 321 322 m_pendingSheetLayout = NoLayoutWithPendingSheets; 322 323 … … 987 988 988 989 if (change == Force) { 990 // style selector may set this again during recalc 991 m_hasNodesWithPlaceholderStyle = false; 992 989 993 RenderStyle* oldStyle = renderer()->style(); 990 994 if (oldStyle) … … 1099 1103 m_pendingSheetLayout = DidLayoutWithPendingSheets; 1100 1104 updateStyleSelector(); 1101 } 1105 } else if (m_hasNodesWithPlaceholderStyle) 1106 // If new nodes have been added or style recalc has been done with style sheets still pending, some nodes 1107 // may not have had their real style calculated yet. Normally this gets cleaned when style sheets arrive 1108 // but here we need up-to-date style immediatly. 1109 recalcStyle(Force); 1102 1110 } 1103 1111 -
trunk/WebCore/dom/Document.h
r25107 r25308 641 641 642 642 bool didLayoutWithPendingStylesheets() const { return m_pendingSheetLayout == DidLayoutWithPendingSheets; } 643 644 void setHasNodesWithPlaceholderStyle() { m_hasNodesWithPlaceholderStyle = true; } 643 645 644 646 String iconURL(); … … 696 698 // do eventually load. 697 699 PendingSheetLayout m_pendingSheetLayout; 700 701 bool m_hasNodesWithPlaceholderStyle; 698 702 699 703 RefPtr<CSSStyleSheet> m_elemSheet;
Note:
See TracChangeset
for help on using the changeset viewer.