Changeset 24550 in webkit
- Timestamp:
- Jul 23, 2007, 5:04:32 PM (18 years ago)
- Location:
- trunk/WebCore
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebCore/ChangeLog
r24549 r24550 1 2007-07-23 Timothy Hatcher <timothy@apple.com> 2 3 Reviewed by Hyatt. 4 5 <rdar://problem/5242145> REGRESSION: Clicking on symbol in documentation often doesn't scroll to symbol 6 7 A renderer for the anchor wasn't always available at the time parsing finished. So we need 8 to bail out of gotoAnchor if stylesheets are pending and remember to call gotoAnchor later 9 once all of the pending stylesheets load. 10 11 * dom/Document.cpp: 12 (WebCore::Document::Document): Initialize m_gotoAnchorNeededAfterStylesheetsLoad to false. 13 (WebCore::Document::stylesheetLoaded): If we have no more pending stylesheets, call gotoAnchor if needed. 14 * dom/Document.h: 15 (WebCore::Document::gotoAnchorNeededAfterStylesheetsLoad): New method. 16 (WebCore::Document::setGotoAnchorNeededAfterStylesheetsLoad): Ditto. 17 * loader/FrameLoader.cpp: 18 (WebCore::FrameLoader::gotoAnchor): Bail early if the document still has pending stylesheets. 19 * loader/FrameLoader.h: Make gotoAnchor() public. 20 1 21 2007-07-23 John Sullivan <sullivan@apple.com> 2 22 -
trunk/WebCore/dom/Document.cpp
r24541 r24550 309 309 m_usesFirstLineRules = false; 310 310 m_usesFirstLetterRules = false; 311 m_gotoAnchorNeededAfterStylesheetsLoad = false; 311 312 312 313 m_styleSelector = new CSSStyleSelector(this, m_usersheet, m_styleSheets.get(), !inCompatMode()); … … 1925 1926 1926 1927 updateStyleSelector(); 1928 1929 if (!m_pendingStylesheets && m_gotoAnchorNeededAfterStylesheetsLoad) 1930 m_frame->loader()->gotoAnchor(); 1927 1931 } 1928 1932 -
trunk/WebCore/dom/Document.h
r24541 r24550 272 272 void addPendingSheet() { m_pendingStylesheets++; } 273 273 274 bool gotoAnchorNeededAfterStylesheetsLoad() { return m_gotoAnchorNeededAfterStylesheetsLoad; } 275 void setGotoAnchorNeededAfterStylesheetsLoad(bool b) { m_gotoAnchorNeededAfterStylesheetsLoad = b; } 276 274 277 /** 275 278 * Called when one or more stylesheets in the document may have been added, removed or changed. … … 731 734 bool m_usesFirstLineRules; 732 735 bool m_usesFirstLetterRules; 736 bool m_gotoAnchorNeededAfterStylesheetsLoad; 733 737 734 738 String m_title; -
trunk/WebCore/loader/FrameLoader.cpp
r24490 r24550 1413 1413 ASSERT(m_frame->document()); 1414 1414 1415 if (!m_frame->document()->haveStylesheetsLoaded()) { 1416 m_frame->document()->setGotoAnchorNeededAfterStylesheetsLoad(true); 1417 return false; 1418 } 1419 1420 m_frame->document()->setGotoAnchorNeededAfterStylesheetsLoad(false); 1421 1415 1422 Node* anchorNode = m_frame->document()->getElementById(AtomicString(name)); 1416 1423 if (!anchorNode) -
trunk/WebCore/loader/FrameLoader.h
r24490 r24550 323 323 KJS::JSValue* executeScript(const String& script, bool forceUserGesture = false); 324 324 325 void gotoAnchor(); 325 326 bool gotoAnchor(const String& name); // returns true if the anchor was found 326 327 void scrollToAnchor(const KURL&); … … 473 474 void receivedFirstData(); 474 475 475 void gotoAnchor();476 477 476 void updatePolicyBaseURL(); 478 477 void setPolicyBaseURL(const String&);
Note:
See TracChangeset
for help on using the changeset viewer.