| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2006, 2007 Apple Inc. All rights reserved. |
| 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> | 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> |
| 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. | 4 * Copyright (C) 2010 Torch Mobile (Beijing) Co. Ltd. All rights reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions | 7 * modification, are permitted provided that the following conditions |
| 8 * are met: | 8 * are met: |
| 9 * 1. Redistributions of source code must retain the above copyright | 9 * 1. Redistributions of source code must retain the above copyright |
| 10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
| (...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 130 #endif | 130 #endif |
| 131 } | 131 } |
| 132 | 132 |
| 133 void HTMLCanvasElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) | 133 void HTMLCanvasElement::parseAttribute(const QualifiedName& name, const AtomicSt
ring& value) |
| 134 { | 134 { |
| 135 if (name == widthAttr || name == heightAttr) | 135 if (name == widthAttr || name == heightAttr) |
| 136 reset(); | 136 reset(); |
| 137 HTMLElement::parseAttribute(name, value); | 137 HTMLElement::parseAttribute(name, value); |
| 138 } | 138 } |
| 139 | 139 |
| 140 RenderObject* HTMLCanvasElement::createRenderer(RenderStyle* style) | 140 RenderObject* HTMLCanvasElement::createRenderer(const RenderStyle* style) |
| 141 { | 141 { |
| 142 LocalFrame* frame = document().frame(); | 142 LocalFrame* frame = document().frame(); |
| 143 if (frame && frame->script().canExecuteScripts(NotAboutToExecuteScript)) | 143 if (frame && frame->script().canExecuteScripts(NotAboutToExecuteScript)) |
| 144 return new RenderHTMLCanvas(this); | 144 return new RenderHTMLCanvas(this); |
| 145 return HTMLElement::createRenderer(style); | 145 return HTMLElement::createRenderer(style); |
| 146 } | 146 } |
| 147 | 147 |
| 148 void HTMLCanvasElement::didRecalcStyle(StyleRecalcChange) | 148 void HTMLCanvasElement::didRecalcStyle(StyleRecalcChange) |
| 149 { | 149 { |
| 150 SkPaint::FilterLevel filterLevel = computedStyle()->imageRendering() == Imag
eRenderingPixelated ? SkPaint::kNone_FilterLevel : SkPaint::kLow_FilterLevel; | 150 SkPaint::FilterLevel filterLevel = computedStyle()->imageRendering() == Imag
eRenderingPixelated ? SkPaint::kNone_FilterLevel : SkPaint::kLow_FilterLevel; |
| (...skipping 686 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 837 { | 837 { |
| 838 return !originClean(); | 838 return !originClean(); |
| 839 } | 839 } |
| 840 | 840 |
| 841 FloatSize HTMLCanvasElement::sourceSize() const | 841 FloatSize HTMLCanvasElement::sourceSize() const |
| 842 { | 842 { |
| 843 return FloatSize(width(), height()); | 843 return FloatSize(width(), height()); |
| 844 } | 844 } |
| 845 | 845 |
| 846 } | 846 } |
| OLD | NEW |