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

Side by Side Diff: Source/core/inspector/InspectorCSSAgent.cpp

Issue 17112022: Remove source line tracking from MediaList and related DevTools code (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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/css/MediaList.cpp ('k') | Source/devtools/front_end/CSSStyleModel.js » ('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) 2010, Google Inc. All rights reserved. 2 * Copyright (C) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 source = TypeBuilder::CSS::CSSMedia::Source::InlineSheet; 1209 source = TypeBuilder::CSS::CSSMedia::Source::InlineSheet;
1210 break; 1210 break;
1211 } 1211 }
1212 1212
1213 RefPtr<TypeBuilder::CSS::CSSMedia> mediaObject = TypeBuilder::CSS::CSSMedia: :create() 1213 RefPtr<TypeBuilder::CSS::CSSMedia> mediaObject = TypeBuilder::CSS::CSSMedia: :create()
1214 .setText(media->mediaText()) 1214 .setText(media->mediaText())
1215 .setSource(source); 1215 .setSource(source);
1216 1216
1217 if (!sourceURL.isEmpty()) { 1217 if (!sourceURL.isEmpty()) {
1218 mediaObject->setSourceURL(sourceURL); 1218 mediaObject->setSourceURL(sourceURL);
1219 mediaObject->setSourceLine(media->queries()->lastLine());
1220 1219
1221 CSSRule* parentRule = media->parentRule(); 1220 CSSRule* parentRule = media->parentRule();
1222 if (!parentRule) 1221 if (!parentRule)
1223 return mediaObject.release(); 1222 return mediaObject.release();
1224 InspectorStyleSheet* inspectorStyleSheet = bindStyleSheet(const_cast<CSS StyleSheet*>(parentRule->parentStyleSheet())); 1223 InspectorStyleSheet* inspectorStyleSheet = bindStyleSheet(const_cast<CSS StyleSheet*>(parentRule->parentStyleSheet()));
1225 RefPtr<TypeBuilder::CSS::SourceRange> mediaRange = inspectorStyleSheet-> ruleHeaderSourceRange(parentRule); 1224 RefPtr<TypeBuilder::CSS::SourceRange> mediaRange = inspectorStyleSheet-> ruleHeaderSourceRange(parentRule);
1226 if (mediaRange) 1225 if (mediaRange)
1227 mediaObject->setRange(mediaRange); 1226 mediaObject->setRange(mediaRange);
1228 } 1227 }
1229 return mediaObject.release(); 1228 return mediaObject.release();
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1689 documentsToChange.add(element->ownerDocument()); 1688 documentsToChange.add(element->ownerDocument());
1690 } 1689 }
1691 1690
1692 m_nodeIdToForcedPseudoState.clear(); 1691 m_nodeIdToForcedPseudoState.clear();
1693 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu mentsToChange.end(); it != end; ++it) 1692 for (HashSet<Document*>::iterator it = documentsToChange.begin(), end = docu mentsToChange.end(); it != end; ++it)
1694 (*it)->styleResolverChanged(RecalcStyleImmediately); 1693 (*it)->styleResolverChanged(RecalcStyleImmediately);
1695 } 1694 }
1696 1695
1697 } // namespace WebCore 1696 } // namespace WebCore
1698 1697
OLDNEW
« no previous file with comments | « Source/core/css/MediaList.cpp ('k') | Source/devtools/front_end/CSSStyleModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698