| OLD | NEW |
| 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 are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 1366 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 document->updateLayout(); | 1377 document->updateLayout(); |
| 1378 } | 1378 } |
| 1379 } | 1379 } |
| 1380 | 1380 |
| 1381 bool InspectorPageAgent::applyViewportStyleOverride(StyleResolver* resolver) | 1381 bool InspectorPageAgent::applyViewportStyleOverride(StyleResolver* resolver) |
| 1382 { | 1382 { |
| 1383 if (!m_deviceMetricsOverridden || !m_emulateViewportEnabled) | 1383 if (!m_deviceMetricsOverridden || !m_emulateViewportEnabled) |
| 1384 return false; | 1384 return false; |
| 1385 | 1385 |
| 1386 RefPtrWillBeRawPtr<StyleSheetContents> styleSheet = StyleSheetContents::crea
te(CSSParserContext(UASheetMode, 0)); | 1386 RefPtrWillBeRawPtr<StyleSheetContents> styleSheet = StyleSheetContents::crea
te(CSSParserContext(UASheetMode, 0)); |
| 1387 styleSheet->parseString(String(viewportAndroidUserAgentStyleSheet, sizeof(vi
ewportAndroidUserAgentStyleSheet))); | 1387 styleSheet->parseString(String(viewportAndroidCss, sizeof(viewportAndroidCss
))); |
| 1388 OwnPtrWillBeRawPtr<RuleSet> ruleSet = RuleSet::create(); | 1388 OwnPtrWillBeRawPtr<RuleSet> ruleSet = RuleSet::create(); |
| 1389 ruleSet->addRulesFromSheet(styleSheet.get(), MediaQueryEvaluator("screen")); | 1389 ruleSet->addRulesFromSheet(styleSheet.get(), MediaQueryEvaluator("screen")); |
| 1390 resolver->viewportStyleResolver()->collectViewportRules(ruleSet.get(), Viewp
ortStyleResolver::UserAgentOrigin); | 1390 resolver->viewportStyleResolver()->collectViewportRules(ruleSet.get(), Viewp
ortStyleResolver::UserAgentOrigin); |
| 1391 return true; | 1391 return true; |
| 1392 } | 1392 } |
| 1393 | 1393 |
| 1394 void InspectorPageAgent::applyEmulatedMedia(String* media) | 1394 void InspectorPageAgent::applyEmulatedMedia(String* media) |
| 1395 { | 1395 { |
| 1396 String emulatedMedia = m_state->getString(PageAgentState::pageAgentEmulatedM
edia); | 1396 String emulatedMedia = m_state->getString(PageAgentState::pageAgentEmulatedM
edia); |
| 1397 if (!emulatedMedia.isEmpty()) | 1397 if (!emulatedMedia.isEmpty()) |
| (...skipping 29 matching lines...) Expand all Loading... |
| 1427 bool InspectorPageAgent::getEditedResourceContent(const String& url, String* con
tent) | 1427 bool InspectorPageAgent::getEditedResourceContent(const String& url, String* con
tent) |
| 1428 { | 1428 { |
| 1429 if (!m_editedResourceContent.contains(url)) | 1429 if (!m_editedResourceContent.contains(url)) |
| 1430 return false; | 1430 return false; |
| 1431 *content = m_editedResourceContent.get(url); | 1431 *content = m_editedResourceContent.get(url); |
| 1432 return true; | 1432 return true; |
| 1433 } | 1433 } |
| 1434 | 1434 |
| 1435 } // namespace WebCore | 1435 } // namespace WebCore |
| 1436 | 1436 |
| OLD | NEW |