OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include "core/dom/ExecutionContextTask.h" | 48 #include "core/dom/ExecutionContextTask.h" |
49 #endif | 49 #endif |
50 | 50 |
51 using namespace std; | 51 using namespace std; |
52 | 52 |
53 namespace WebCore { | 53 namespace WebCore { |
54 | 54 |
55 #ifdef AUTOSIZING_DOM_DEBUG_INFO | 55 #ifdef AUTOSIZING_DOM_DEBUG_INFO |
56 class WriteDebugInfoTask : public ExecutionContextTask { | 56 class WriteDebugInfoTask : public ExecutionContextTask { |
57 public: | 57 public: |
58 WriteDebugInfoTask(PassRefPtr<Element> element, AtomicString value) | 58 WriteDebugInfoTask(PassRefPtrWillBeRawPtr<Element> element, AtomicString val
ue) |
59 : m_element(element) | 59 : m_element(element) |
60 , m_value(value) | 60 , m_value(value) |
61 { | 61 { |
62 } | 62 } |
63 | 63 |
64 virtual void performTask(ExecutionContext*) | 64 virtual void performTask(ExecutionContext*) |
65 { | 65 { |
66 m_element->setAttribute("data-autosizing", m_value, ASSERT_NO_EXCEPTION)
; | 66 m_element->setAttribute("data-autosizing", m_value, ASSERT_NO_EXCEPTION)
; |
67 } | 67 } |
68 | 68 |
69 private: | 69 private: |
70 RefPtr<Element> m_element; | 70 RefPtrWillBePersistent<Element> m_element; |
71 AtomicString m_value; | 71 AtomicString m_value; |
72 }; | 72 }; |
73 | 73 |
74 static void writeDebugInfo(RenderObject* renderer, const AtomicString& output) | 74 static void writeDebugInfo(RenderObject* renderer, const AtomicString& output) |
75 { | 75 { |
76 Node* node = renderer->node(); | 76 Node* node = renderer->node(); |
77 if (!node) | 77 if (!node) |
78 return; | 78 return; |
79 if (node->isDocumentNode()) | 79 if (node->isDocumentNode()) |
80 node = toDocument(node)->documentElement(); | 80 node = toDocument(node)->documentElement(); |
(...skipping 1029 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1110 FastTextAutosizer::DeferUpdatePageInfo::~DeferUpdatePageInfo() | 1110 FastTextAutosizer::DeferUpdatePageInfo::~DeferUpdatePageInfo() |
1111 { | 1111 { |
1112 if (FastTextAutosizer* textAutosizer = m_mainFrame->document()->fastTextAuto
sizer()) { | 1112 if (FastTextAutosizer* textAutosizer = m_mainFrame->document()->fastTextAuto
sizer()) { |
1113 ASSERT(textAutosizer->m_updatePageInfoDeferred); | 1113 ASSERT(textAutosizer->m_updatePageInfoDeferred); |
1114 textAutosizer->m_updatePageInfoDeferred = false; | 1114 textAutosizer->m_updatePageInfoDeferred = false; |
1115 textAutosizer->updatePageInfoInAllFrames(); | 1115 textAutosizer->updatePageInfoInAllFrames(); |
1116 } | 1116 } |
1117 } | 1117 } |
1118 | 1118 |
1119 } // namespace WebCore | 1119 } // namespace WebCore |
OLD | NEW |