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

Side by Side Diff: Source/WebCore/inspector/InspectorStyleTextEditor.h

Issue 13646003: DevTools: Remove ENABLE(INSPECTOR) and ENABLE(JAVASCRIPT_DEBUGGER) from the code. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: comments addressed Created 7 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 14 matching lines...) Expand all
25 #ifndef InspectorStyleTextEditor_h 25 #ifndef InspectorStyleTextEditor_h
26 #define InspectorStyleTextEditor_h 26 #define InspectorStyleTextEditor_h
27 27
28 #include "CSSPropertySourceData.h" 28 #include "CSSPropertySourceData.h"
29 29
30 #include <wtf/Vector.h> 30 #include <wtf/Vector.h>
31 #include <wtf/text/WTFString.h> 31 #include <wtf/text/WTFString.h>
32 32
33 namespace WebCore { 33 namespace WebCore {
34 34
35 #if ENABLE(INSPECTOR)
36 35
37 struct InspectorStyleProperty; 36 struct InspectorStyleProperty;
38 struct SourceRange; 37 struct SourceRange;
39 38
40 typedef std::pair<String, String> NewLineAndWhitespace; 39 typedef std::pair<String, String> NewLineAndWhitespace;
41 40
42 class InspectorStyleTextEditor { 41 class InspectorStyleTextEditor {
43 public: 42 public:
44 InspectorStyleTextEditor(Vector<InspectorStyleProperty>* allProperties, Vect or<InspectorStyleProperty>* disabledProperties, const String& styleText, const N ewLineAndWhitespace& format); 43 InspectorStyleTextEditor(Vector<InspectorStyleProperty>* allProperties, Vect or<InspectorStyleProperty>* disabledProperties, const String& styleText, const N ewLineAndWhitespace& format);
45 void insertProperty(unsigned index, const String& propertyText, unsigned sty leBodyLength); 44 void insertProperty(unsigned index, const String& propertyText, unsigned sty leBodyLength);
46 void replaceProperty(unsigned index, const String& newText); 45 void replaceProperty(unsigned index, const String& newText);
47 void removeProperty(unsigned index); 46 void removeProperty(unsigned index);
48 void enableProperty(unsigned index); 47 void enableProperty(unsigned index);
49 void disableProperty(unsigned index); 48 void disableProperty(unsigned index);
50 const String& styleText() const { return m_styleText; } 49 const String& styleText() const { return m_styleText; }
51 50
52 private: 51 private:
53 unsigned disabledIndexByOrdinal(unsigned ordinal, bool canUseSubsequent); 52 unsigned disabledIndexByOrdinal(unsigned ordinal, bool canUseSubsequent);
54 void shiftDisabledProperties(unsigned fromIndex, long delta); 53 void shiftDisabledProperties(unsigned fromIndex, long delta);
55 void internalReplaceProperty(const InspectorStyleProperty&, const String& ne wText, SourceRange* removedRange, unsigned* insertedLength); 54 void internalReplaceProperty(const InspectorStyleProperty&, const String& ne wText, SourceRange* removedRange, unsigned* insertedLength);
56 55
57 Vector<InspectorStyleProperty>* m_allProperties; 56 Vector<InspectorStyleProperty>* m_allProperties;
58 Vector<InspectorStyleProperty>* m_disabledProperties; 57 Vector<InspectorStyleProperty>* m_disabledProperties;
59 String m_styleText; 58 String m_styleText;
60 const std::pair<String, String> m_format; 59 const std::pair<String, String> m_format;
61 }; 60 };
62 61
63 #endif
64 62
65 } // namespace WebCore 63 } // namespace WebCore
66 64
67 #endif // !defined(InspectorStyleTextEditor_h) 65 #endif // !defined(InspectorStyleTextEditor_h)
OLDNEW
« no previous file with comments | « Source/WebCore/inspector/InspectorStyleSheet.cpp ('k') | Source/WebCore/inspector/InspectorStyleTextEditor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698