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

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

Issue 28553005: Avoid parsing css text if there are identical inline style blocks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing 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/dom/StyleEngine.cpp ('k') | no next file » | 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 ASSERT(restoredSheet->isCacheable()); 386 ASSERT(restoredSheet->isCacheable());
387 ASSERT(!restoredSheet->isLoading()); 387 ASSERT(!restoredSheet->isLoading());
388 388
389 if (m_sheet) 389 if (m_sheet)
390 clearSheet(); 390 clearSheet();
391 m_sheet = CSSStyleSheet::create(restoredSheet, m_owner); 391 m_sheet = CSSStyleSheet::create(restoredSheet, m_owner);
392 m_sheet->setMediaQueries(MediaQuerySet::create(m_owner->media())); 392 m_sheet->setMediaQueries(MediaQuerySet::create(m_owner->media()));
393 m_sheet->setTitle(m_owner->title()); 393 m_sheet->setTitle(m_owner->title());
394 394
395 m_loading = false; 395 m_loading = false;
396 sheetLoaded(); 396 restoredSheet->checkLoaded();
397 notifyLoadedSheetAndAllCriticalSubresources(false);
398 return; 397 return;
399 } 398 }
400 399
401 RefPtr<StyleSheetContents> styleSheet = StyleSheetContents::create(href, par serContext); 400 RefPtr<StyleSheetContents> styleSheet = StyleSheetContents::create(href, par serContext);
402 401
403 if (m_sheet) 402 if (m_sheet)
404 clearSheet(); 403 clearSheet();
405 m_sheet = CSSStyleSheet::create(styleSheet, m_owner); 404 m_sheet = CSSStyleSheet::create(styleSheet, m_owner);
406 m_sheet->setMediaQueries(MediaQuerySet::create(m_owner->media())); 405 m_sheet->setMediaQueries(MediaQuerySet::create(m_owner->media()));
407 m_sheet->setTitle(m_owner->title()); 406 m_sheet->setTitle(m_owner->title());
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
607 void LinkStyle::ownerRemoved() 606 void LinkStyle::ownerRemoved()
608 { 607 {
609 if (m_sheet) 608 if (m_sheet)
610 clearSheet(); 609 clearSheet();
611 610
612 if (styleSheetIsLoading()) 611 if (styleSheetIsLoading())
613 removePendingSheet(RemovePendingSheetNotifyLater); 612 removePendingSheet(RemovePendingSheetNotifyLater);
614 } 613 }
615 614
616 } // namespace WebCore 615 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/dom/StyleEngine.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698