Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Side by Side Diff: Source/core/html/HTMLLinkElement.cpp

Issue 141143006: [import] Cleanup: get rid of ad-hoc state machine. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Updated to ToT Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « Source/core/html/HTMLLinkElement.h ('k') | Source/core/html/LinkImport.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2001 Dirk Mueller (mueller@kde.org) 4 * (C) 2001 Dirk Mueller (mueller@kde.org)
5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 5 * Copyright (C) 2003, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com) 6 * Copyright (C) 2009 Rob Buis (rwlbuis@gmail.com)
7 * Copyright (C) 2011 Google Inc. All rights reserved. 7 * Copyright (C) 2011 Google Inc. All rights reserved.
8 * 8 *
9 * This library is free software; you can redistribute it and/or 9 * This library is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU Library General Public 10 * modify it under the terms of the GNU Library General Public
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 void HTMLLinkElement::dispatchPendingLoadEvents() 281 void HTMLLinkElement::dispatchPendingLoadEvents()
282 { 282 {
283 linkLoadEventSender().dispatchPendingEvents(); 283 linkLoadEventSender().dispatchPendingEvents();
284 } 284 }
285 285
286 void HTMLLinkElement::dispatchPendingEvent(LinkEventSender* eventSender) 286 void HTMLLinkElement::dispatchPendingEvent(LinkEventSender* eventSender)
287 { 287 {
288 ASSERT_UNUSED(eventSender, eventSender == &linkLoadEventSender()); 288 ASSERT_UNUSED(eventSender, eventSender == &linkLoadEventSender());
289 ASSERT(m_link); 289 ASSERT(m_link);
290 dispatchEventImmediately();
291 }
292
293 void HTMLLinkElement::dispatchEventImmediately()
294 {
290 if (m_link->hasLoaded()) 295 if (m_link->hasLoaded())
291 linkLoaded(); 296 linkLoaded();
292 else 297 else
293 linkLoadingErrored(); 298 linkLoadingErrored();
294 } 299 }
295 300
296 void HTMLLinkElement::scheduleEvent() 301 void HTMLLinkElement::scheduleEvent()
297 { 302 {
298 linkLoadEventSender().dispatchEventSoon(this); 303 linkLoadEventSender().dispatchEventSoon(this);
299 } 304 }
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
601 void LinkStyle::ownerRemoved() 606 void LinkStyle::ownerRemoved()
602 { 607 {
603 if (m_sheet) 608 if (m_sheet)
604 clearSheet(); 609 clearSheet();
605 610
606 if (styleSheetIsLoading()) 611 if (styleSheetIsLoading())
607 removePendingSheet(RemovePendingSheetNotifyLater); 612 removePendingSheet(RemovePendingSheetNotifyLater);
608 } 613 }
609 614
610 } // namespace WebCore 615 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/HTMLLinkElement.h ('k') | Source/core/html/LinkImport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698