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

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

Issue 547823002: Track reasons for |Node::SetNeedsStyleRecalc| (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: reasons as tuple Created 6 years, 3 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
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) 2000 Simon Hausmann (hausmann@kde.org) 4 * (C) 2000 Simon Hausmann (hausmann@kde.org)
5 * (C) 2001 Dirk Mueller (mueller@kde.org) 5 * (C) 2001 Dirk Mueller (mueller@kde.org)
6 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserv ed.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 if (CSSParser::parseColor(color, value, !document().inQuirksMode())) { 104 if (CSSParser::parseColor(color, value, !document().inQuirksMode())) {
105 if (name == linkAttr) 105 if (name == linkAttr)
106 document().textLinkColors().setLinkColor(color); 106 document().textLinkColors().setLinkColor(color);
107 else if (name == vlinkAttr) 107 else if (name == vlinkAttr)
108 document().textLinkColors().setVisitedLinkColor(color); 108 document().textLinkColors().setVisitedLinkColor(color);
109 else 109 else
110 document().textLinkColors().setActiveLinkColor(color); 110 document().textLinkColors().setActiveLinkColor(color);
111 } 111 }
112 } 112 }
113 113
114 setNeedsStyleRecalc(SubtreeStyleChange); 114 setNeedsStyleRecalc(StyleChangeReasonForTracing::create(StyleChangeReaso n::LinkColorChange), SubtreeStyleChange);
115 } else if (name == onloadAttr) 115 } else if (name == onloadAttr)
116 document().setWindowAttributeEventListener(EventTypeNames::load, createA ttributeEventListener(document().frame(), name, value, eventParameterName())); 116 document().setWindowAttributeEventListener(EventTypeNames::load, createA ttributeEventListener(document().frame(), name, value, eventParameterName()));
117 else if (name == onbeforeunloadAttr) 117 else if (name == onbeforeunloadAttr)
118 document().setWindowAttributeEventListener(EventTypeNames::beforeunload, createAttributeEventListener(document().frame(), name, value, eventParameterNam e())); 118 document().setWindowAttributeEventListener(EventTypeNames::beforeunload, createAttributeEventListener(document().frame(), name, value, eventParameterNam e()));
119 else if (name == onunloadAttr) 119 else if (name == onunloadAttr)
120 document().setWindowAttributeEventListener(EventTypeNames::unload, creat eAttributeEventListener(document().frame(), name, value, eventParameterName())); 120 document().setWindowAttributeEventListener(EventTypeNames::unload, creat eAttributeEventListener(document().frame(), name, value, eventParameterName()));
121 else if (name == onpagehideAttr) 121 else if (name == onpagehideAttr)
122 document().setWindowAttributeEventListener(EventTypeNames::pagehide, cre ateAttributeEventListener(document().frame(), name, value, eventParameterName()) ); 122 document().setWindowAttributeEventListener(EventTypeNames::pagehide, cre ateAttributeEventListener(document().frame(), name, value, eventParameterName()) );
123 else if (name == onpageshowAttr) 123 else if (name == onpageshowAttr)
124 document().setWindowAttributeEventListener(EventTypeNames::pageshow, cre ateAttributeEventListener(document().frame(), name, value, eventParameterName()) ); 124 document().setWindowAttributeEventListener(EventTypeNames::pageshow, cre ateAttributeEventListener(document().frame(), name, value, eventParameterName()) );
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 int HTMLBodyElement::scrollWidth() 326 int HTMLBodyElement::scrollWidth()
327 { 327 {
328 // Update the document's layout. 328 // Update the document's layout.
329 Document& document = this->document(); 329 Document& document = this->document();
330 document.updateLayoutIgnorePendingStylesheets(); 330 document.updateLayoutIgnorePendingStylesheets();
331 FrameView* view = document.view(); 331 FrameView* view = document.view();
332 return view ? adjustForZoom(view->contentsWidth(), &document) : 0; 332 return view ? adjustForZoom(view->contentsWidth(), &document) : 0;
333 } 333 }
334 334
335 } // namespace blink 335 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698