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

Side by Side Diff: Source/WebCore/dom/Document.cpp

Issue 9618030: Merge 109543 - REGRESSION (r104060): Page contents not painted if inserting a new stylesheet and te… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1025/
Patch Set: Created 8 years, 9 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
« no previous file with comments | « LayoutTests/fast/css/pending-stylesheet-repaint-expected.txt ('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 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011 Apple Inc. All rights reserved.
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/) 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t orchmobile.com/)
8 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved. 8 * Copyright (C) 2008, 2009, 2011 Google Inc. All rights reserved.
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved.
(...skipping 2985 matching lines...) Expand 10 before | Expand all | Expand 10 after
2996 m_styleSelector.clear(); 2996 m_styleSelector.clear();
2997 return; 2997 return;
2998 } 2998 }
2999 2999
3000 #ifdef INSTRUMENT_LAYOUT_SCHEDULING 3000 #ifdef INSTRUMENT_LAYOUT_SCHEDULING
3001 if (!ownerElement()) 3001 if (!ownerElement())
3002 printf("Beginning update of style selector at time %d.\n", elapsedTime() ); 3002 printf("Beginning update of style selector at time %d.\n", elapsedTime() );
3003 #endif 3003 #endif
3004 3004
3005 bool stylesheetChangeRequiresStyleRecalc = updateActiveStylesheets(updateFla g); 3005 bool stylesheetChangeRequiresStyleRecalc = updateActiveStylesheets(updateFla g);
3006 if (!stylesheetChangeRequiresStyleRecalc)
3007 return;
3008 3006
3009 if (updateFlag == DeferRecalcStyle) { 3007 if (updateFlag == DeferRecalcStyle) {
3010 scheduleForcedStyleRecalc(); 3008 scheduleForcedStyleRecalc();
3011 return; 3009 return;
3012 } 3010 }
3013 3011
3014 if (didLayoutWithPendingStylesheets() && m_pendingStylesheets <= 0) { 3012 if (didLayoutWithPendingStylesheets() && m_pendingStylesheets <= 0) {
3015 m_pendingSheetLayout = IgnoreLayoutWithPendingSheets; 3013 m_pendingSheetLayout = IgnoreLayoutWithPendingSheets;
3016 if (renderer()) 3014 if (renderer())
3017 renderer()->repaint(); 3015 renderer()->repaint();
3018 } 3016 }
3019 3017
3018 if (!stylesheetChangeRequiresStyleRecalc)
3019 return;
3020
3020 // This recalcStyle initiates a new recalc cycle. We need to bracket it to 3021 // This recalcStyle initiates a new recalc cycle. We need to bracket it to
3021 // make sure animations get the correct update time 3022 // make sure animations get the correct update time
3022 if (m_frame) 3023 if (m_frame)
3023 m_frame->animation()->beginAnimationUpdate(); 3024 m_frame->animation()->beginAnimationUpdate();
3024 recalcStyle(Force); 3025 recalcStyle(Force);
3025 if (m_frame) 3026 if (m_frame)
3026 m_frame->animation()->endAnimationUpdate(); 3027 m_frame->animation()->endAnimationUpdate();
3027 3028
3028 #ifdef INSTRUMENT_LAYOUT_SCHEDULING 3029 #ifdef INSTRUMENT_LAYOUT_SCHEDULING
3029 if (!ownerElement()) 3030 if (!ownerElement())
(...skipping 2373 matching lines...) Expand 10 before | Expand all | Expand 10 after
5403 5404
5404 NodeListsNodeData* data = rareData()->nodeLists(); 5405 NodeListsNodeData* data = rareData()->nodeLists();
5405 5406
5406 String localTypeNames = typeNames.isNull() ? String("http://webkit.org/micro data/undefinedItemType") : typeNames; 5407 String localTypeNames = typeNames.isNull() ? String("http://webkit.org/micro data/undefinedItemType") : typeNames;
5407 ASSERT_UNUSED(list, list == data->m_microDataItemListCache.get(localTypeName s)); 5408 ASSERT_UNUSED(list, list == data->m_microDataItemListCache.get(localTypeName s));
5408 data->m_microDataItemListCache.remove(localTypeNames); 5409 data->m_microDataItemListCache.remove(localTypeNames);
5409 } 5410 }
5410 #endif 5411 #endif
5411 5412
5412 } // namespace WebCore 5413 } // namespace WebCore
OLDNEW
« no previous file with comments | « LayoutTests/fast/css/pending-stylesheet-repaint-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698