| OLD | NEW |
| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 bool isEmpty() const { return m_styleSheetId.isEmpty(); } | 80 bool isEmpty() const { return m_styleSheetId.isEmpty(); } |
| 81 | 81 |
| 82 const String& styleSheetId() const { return m_styleSheetId; } | 82 const String& styleSheetId() const { return m_styleSheetId; } |
| 83 unsigned ordinal() const { return m_ordinal; } | 83 unsigned ordinal() const { return m_ordinal; } |
| 84 | 84 |
| 85 // ID type is either TypeBuilder::CSS::CSSStyleId or TypeBuilder::CSS::CSSRu
leId. | 85 // ID type is either TypeBuilder::CSS::CSSStyleId or TypeBuilder::CSS::CSSRu
leId. |
| 86 template<typename ID> | 86 template<typename ID> |
| 87 PassRefPtr<ID> asProtocolValue() const | 87 PassRefPtr<ID> asProtocolValue() const |
| 88 { | 88 { |
| 89 if (isEmpty()) | 89 if (isEmpty()) |
| 90 return 0; | 90 return nullptr; |
| 91 | 91 |
| 92 RefPtr<ID> result = ID::create() | 92 RefPtr<ID> result = ID::create() |
| 93 .setStyleSheetId(m_styleSheetId) | 93 .setStyleSheetId(m_styleSheetId) |
| 94 .setOrdinal(m_ordinal); | 94 .setOrdinal(m_ordinal); |
| 95 return result.release(); | 95 return result.release(); |
| 96 } | 96 } |
| 97 | 97 |
| 98 private: | 98 private: |
| 99 String m_styleSheetId; | 99 String m_styleSheetId; |
| 100 unsigned m_ordinal; | 100 unsigned m_ordinal; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 | 289 |
| 290 // Contains "style" attribute value. | 290 // Contains "style" attribute value. |
| 291 mutable String m_styleText; | 291 mutable String m_styleText; |
| 292 mutable bool m_isStyleTextValid; | 292 mutable bool m_isStyleTextValid; |
| 293 }; | 293 }; |
| 294 | 294 |
| 295 | 295 |
| 296 } // namespace WebCore | 296 } // namespace WebCore |
| 297 | 297 |
| 298 #endif // !defined(InspectorStyleSheet_h) | 298 #endif // !defined(InspectorStyleSheet_h) |
| OLD | NEW |