| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) | 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv
ed. |
| 7 * Copyright (C) 2009 Google Inc. All rights reserved. | 7 * Copyright (C) 2009 Google Inc. All rights reserved. |
| 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
| 9 * | 9 * |
| 10 * This library is free software; you can redistribute it and/or | 10 * This library is free software; you can redistribute it and/or |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 #include "core/html/HTMLAnchorElement.h" | 46 #include "core/html/HTMLAnchorElement.h" |
| 47 #include "core/html/HTMLElement.h" | 47 #include "core/html/HTMLElement.h" |
| 48 #include "core/html/HTMLHtmlElement.h" | 48 #include "core/html/HTMLHtmlElement.h" |
| 49 #include "core/html/HTMLTableCellElement.h" | 49 #include "core/html/HTMLTableCellElement.h" |
| 50 #include "core/html/HTMLTableElement.h" | 50 #include "core/html/HTMLTableElement.h" |
| 51 #include "core/layout/HitTestResult.h" | 51 #include "core/layout/HitTestResult.h" |
| 52 #include "core/layout/Layer.h" | 52 #include "core/layout/Layer.h" |
| 53 #include "core/layout/LayoutCounter.h" | 53 #include "core/layout/LayoutCounter.h" |
| 54 #include "core/layout/LayoutFlowThread.h" | 54 #include "core/layout/LayoutFlowThread.h" |
| 55 #include "core/layout/LayoutGeometryMap.h" | 55 #include "core/layout/LayoutGeometryMap.h" |
| 56 #include "core/layout/LayoutImage.h" |
| 57 #include "core/layout/LayoutImageResourceStyleImage.h" |
| 56 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" | 58 #include "core/layout/LayoutMultiColumnSpannerPlaceholder.h" |
| 57 #include "core/layout/LayoutObjectInlines.h" | 59 #include "core/layout/LayoutObjectInlines.h" |
| 58 #include "core/layout/LayoutTableCaption.h" | 60 #include "core/layout/LayoutTableCaption.h" |
| 59 #include "core/layout/LayoutTableCell.h" | 61 #include "core/layout/LayoutTableCell.h" |
| 60 #include "core/layout/LayoutTableCol.h" | 62 #include "core/layout/LayoutTableCol.h" |
| 61 #include "core/layout/LayoutTableRow.h" | 63 #include "core/layout/LayoutTableRow.h" |
| 62 #include "core/layout/LayoutTheme.h" | 64 #include "core/layout/LayoutTheme.h" |
| 63 #include "core/layout/compositing/CompositedLayerMapping.h" | 65 #include "core/layout/compositing/CompositedLayerMapping.h" |
| 64 #include "core/layout/compositing/LayerCompositor.h" | 66 #include "core/layout/compositing/LayerCompositor.h" |
| 65 #include "core/layout/style/ContentData.h" | 67 #include "core/layout/style/ContentData.h" |
| 66 #include "core/layout/style/ShadowList.h" | 68 #include "core/layout/style/ShadowList.h" |
| 67 #include "core/page/AutoscrollController.h" | 69 #include "core/page/AutoscrollController.h" |
| 68 #include "core/page/EventHandler.h" | 70 #include "core/page/EventHandler.h" |
| 69 #include "core/page/Page.h" | 71 #include "core/page/Page.h" |
| 70 #include "core/paint/ObjectPainter.h" | 72 #include "core/paint/ObjectPainter.h" |
| 71 #include "core/rendering/RenderDeprecatedFlexibleBox.h" | 73 #include "core/rendering/RenderDeprecatedFlexibleBox.h" |
| 72 #include "core/rendering/RenderFlexibleBox.h" | 74 #include "core/rendering/RenderFlexibleBox.h" |
| 73 #include "core/rendering/RenderGrid.h" | 75 #include "core/rendering/RenderGrid.h" |
| 74 #include "core/rendering/RenderImage.h" | |
| 75 #include "core/rendering/RenderImageResourceStyleImage.h" | |
| 76 #include "core/rendering/RenderInline.h" | 76 #include "core/rendering/RenderInline.h" |
| 77 #include "core/rendering/RenderListItem.h" | 77 #include "core/rendering/RenderListItem.h" |
| 78 #include "core/rendering/RenderPart.h" | 78 #include "core/rendering/RenderPart.h" |
| 79 #include "core/rendering/RenderScrollbarPart.h" | 79 #include "core/rendering/RenderScrollbarPart.h" |
| 80 #include "core/rendering/RenderView.h" | 80 #include "core/rendering/RenderView.h" |
| 81 #include "platform/JSONValues.h" | 81 #include "platform/JSONValues.h" |
| 82 #include "platform/Partitions.h" | 82 #include "platform/Partitions.h" |
| 83 #include "platform/RuntimeEnabledFeatures.h" | 83 #include "platform/RuntimeEnabledFeatures.h" |
| 84 #include "platform/TraceEvent.h" | 84 #include "platform/TraceEvent.h" |
| 85 #include "platform/TracedValue.h" | 85 #include "platform/TracedValue.h" |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 | 154 |
| 155 LayoutObject* LayoutObject::createObject(Element* element, const LayoutStyle& st
yle) | 155 LayoutObject* LayoutObject::createObject(Element* element, const LayoutStyle& st
yle) |
| 156 { | 156 { |
| 157 ASSERT(isAllowedToModifyRenderTreeStructure(element->document())); | 157 ASSERT(isAllowedToModifyRenderTreeStructure(element->document())); |
| 158 | 158 |
| 159 // Minimal support for content properties replacing an entire element. | 159 // Minimal support for content properties replacing an entire element. |
| 160 // Works only if we have exactly one piece of content and it's a URL. | 160 // Works only if we have exactly one piece of content and it's a URL. |
| 161 // Otherwise acts as if we didn't support this feature. | 161 // Otherwise acts as if we didn't support this feature. |
| 162 const ContentData* contentData = style.contentData(); | 162 const ContentData* contentData = style.contentData(); |
| 163 if (contentData && !contentData->next() && contentData->isImage() && !elemen
t->isPseudoElement()) { | 163 if (contentData && !contentData->next() && contentData->isImage() && !elemen
t->isPseudoElement()) { |
| 164 RenderImage* image = new RenderImage(element); | 164 LayoutImage* image = new LayoutImage(element); |
| 165 // RenderImageResourceStyleImage requires a style being present on the i
mage but we don't want to | 165 // LayoutImageResourceStyleImage requires a style being present on the i
mage but we don't want to |
| 166 // trigger a style change now as the node is not fully attached. Moving
this code to style change | 166 // trigger a style change now as the node is not fully attached. Moving
this code to style change |
| 167 // doesn't make sense as it should be run once at renderer creation. | 167 // doesn't make sense as it should be run once at renderer creation. |
| 168 image->setStyleInternal(const_cast<LayoutStyle*>(&style)); | 168 image->setStyleInternal(const_cast<LayoutStyle*>(&style)); |
| 169 if (const StyleImage* styleImage = toImageContentData(contentData)->imag
e()) { | 169 if (const StyleImage* styleImage = toImageContentData(contentData)->imag
e()) { |
| 170 image->setImageResource(RenderImageResourceStyleImage::create(const_
cast<StyleImage*>(styleImage))); | 170 image->setImageResource(LayoutImageResourceStyleImage::create(const_
cast<StyleImage*>(styleImage))); |
| 171 image->setIsGeneratedContent(); | 171 image->setIsGeneratedContent(); |
| 172 } else { | 172 } else { |
| 173 image->setImageResource(RenderImageResource::create()); | 173 image->setImageResource(LayoutImageResource::create()); |
| 174 } | 174 } |
| 175 image->setStyleInternal(nullptr); | 175 image->setStyleInternal(nullptr); |
| 176 return image; | 176 return image; |
| 177 } | 177 } |
| 178 | 178 |
| 179 switch (style.display()) { | 179 switch (style.display()) { |
| 180 case NONE: | 180 case NONE: |
| 181 return 0; | 181 return 0; |
| 182 case INLINE: | 182 case INLINE: |
| 183 return new RenderInline(element); | 183 return new RenderInline(element); |
| (...skipping 3000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3184 { | 3184 { |
| 3185 if (object1) { | 3185 if (object1) { |
| 3186 const blink::LayoutObject* root = object1; | 3186 const blink::LayoutObject* root = object1; |
| 3187 while (root->parent()) | 3187 while (root->parent()) |
| 3188 root = root->parent(); | 3188 root = root->parent(); |
| 3189 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); | 3189 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); |
| 3190 } | 3190 } |
| 3191 } | 3191 } |
| 3192 | 3192 |
| 3193 #endif | 3193 #endif |
| OLD | NEW |