Changeset 52947 in webkit
- Timestamp:
- Jan 7, 2010 1:57:12 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 46 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r52944 r52947 1 2010-01-07 Simon Fraser <simon.fraser@apple.com> 2 3 Reviewed by Kevin Decker, Darin Adler. 4 5 https://bugs.webkit.org/show_bug.cgi?id=33338 6 Create a renderer for <object> and <embed> 7 8 Change RenderPartObject to RenderEmbeddedObject in test results. 9 10 * http/tests/misc/acid3-expected.txt: 11 * platform/mac-tiger/svg/hixie/text/003-expected.txt: 12 * platform/mac/editing/pasteboard/pasting-object-expected.txt: 13 * platform/mac/fast/block/basic/013-expected.txt: 14 * platform/mac/fast/block/float/4145535Crash-expected.txt: 15 * platform/mac/fast/dom/HTMLObjectElement/vspace-hspace-as-number-expected.txt: 16 * platform/mac/fast/dynamic/flash-replacement-test-expected.txt: 17 * platform/mac/fast/frames/001-expected.txt: 18 * platform/mac/fast/invalid/residual-style-expected.txt: 19 * platform/mac/fast/parser/001-expected.txt: 20 * platform/mac/fast/replaced/007-expected.txt: 21 * platform/mac/fast/replaced/border-radius-clip-expected.txt: 22 * platform/mac/fast/replaced/replaced-breaking-expected.txt: 23 * platform/mac/plugins/embed-attributes-style-expected.txt: 24 * platform/mac/plugins/netscape-dom-access-expected.txt: 25 * platform/mac/plugins/qt-qwidget-plugin-expected.txt: 26 * platform/mac/svg/custom/getsvgdocument-expected.txt: 27 * platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt: 28 * platform/mac/svg/hixie/text/003-expected.txt: 29 * platform/qt/editing/pasteboard/pasting-object-expected.txt: 30 * platform/qt/fast/block/basic/013-expected.txt: 31 * platform/qt/fast/block/float/4145535Crash-expected.txt: 32 * platform/qt/fast/dom/HTMLObjectElement/vspace-hspace-as-number-expected.txt: 33 * platform/qt/fast/dynamic/flash-replacement-test-expected.txt: 34 * platform/qt/fast/frames/001-expected.txt: 35 * platform/qt/fast/parser/001-expected.txt: 36 * platform/qt/fast/replaced/007-expected.txt: 37 * platform/qt/fast/replaced/replaced-breaking-expected.txt: 38 * platform/qt/plugins/embed-attributes-style-expected.txt: 39 * platform/qt/plugins/netscape-dom-access-expected.txt: 40 * platform/qt/plugins/qt-qwidget-plugin-expected.txt: 41 1 42 2010-01-07 Christian Sejersen <christian.webkit@gmail.com> 2 43 -
trunk/LayoutTests/http/tests/misc/acid3-expected.txt
r34193 r52947 227 227 text run at (0,0) width 20: "X" 228 228 layer at (130,84) size 300x150 229 Render PartObject {OBJECT} at (130,84) size 300x150229 RenderEmbeddedObject {OBJECT} at (130,84) size 300x150 230 230 layer at (0,0) size 300x150 231 231 RenderView at (0,0) size 300x150 -
trunk/LayoutTests/platform/mac-tiger/svg/hixie/text/003-expected.txt
r37212 r52947 8 8 text run at (0,0) width 608: "The following two blocks should look identical (to the pixel), and they should both say \"PASS\":" 9 9 RenderBlock {P} at (0,34) size 784x160 10 Render PartObject {OBJECT} at (0,0) size 306x156 [border: (3px inset #000080)]10 RenderEmbeddedObject {OBJECT} at (0,0) size 306x156 [border: (3px inset #000080)] 11 11 layer at (0,0) size 300x150 12 12 RenderView at (0,0) size 300x150 … … 17 17 chunk 1 text run 1 at (0.00,0.80) startOffset 0 endOffset 4 width 4.00: "PASS" 18 18 RenderBlock {P} at (0,210) size 784x160 19 Render PartObject {OBJECT} at (0,0) size 306x156 [border: (3px inset #000080)]19 RenderEmbeddedObject {OBJECT} at (0,0) size 306x156 [border: (3px inset #000080)] 20 20 layer at (0,0) size 300x150 21 21 RenderView at (0,0) size 300x150 -
trunk/LayoutTests/platform/mac/editing/pasteboard/pasting-object-expected.txt
r30635 r52947 18 18 RenderText {#text} at (0,138) size 35x18 19 19 text run at (0,138) width 35: "Hello" 20 Render PartObject {OBJECT} at (35,0) size 302x152 [border: (1px solid #AAAAAA)]20 RenderEmbeddedObject {OBJECT} at (35,0) size 302x152 [border: (1px solid #AAAAAA)] 21 21 RenderText {#text} at (337,138) size 49x18 22 22 text run at (337,138) width 49: " World!" -
trunk/LayoutTests/platform/mac/fast/block/basic/013-expected.txt
r25970 r52947 18 18 RenderText {#text} at (504,90) size 4x18 19 19 text run at (504,90) width 4: " " 20 Render PartObject {OBJECT} at (0,108) size 500x10020 RenderEmbeddedObject {OBJECT} at (0,108) size 500x100 21 21 layer at (0,0) size 500x100 22 22 RenderView at (0,0) size 500x100 -
trunk/LayoutTests/platform/mac/fast/block/float/4145535Crash-expected.txt
r25970 r52947 5 5 RenderBody {BODY} at (8,8) size 784x584 6 6 RenderBlock (anonymous) at (0,0) size 784x150 7 Render PartObject {EMBED} at (0,0) size 300x1507 RenderEmbeddedObject {EMBED} at (0,0) size 300x150 8 8 RenderTable {TABLE} at (0,150) size 0x0 9 9 RenderTableSection {TBODY} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/dom/HTMLObjectElement/vspace-hspace-as-number-expected.txt
r30635 r52947 9 9 text run at (0,18) width 719: "strings, per the DOM Level 2 HTML spec: http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-9893177" 10 10 RenderBlock (anonymous) at (0,52) size 784x170 11 Render PartObject {OBJECT} at (20,10) size 300x15011 RenderEmbeddedObject {OBJECT} at (20,10) size 300x150 12 12 RenderText {#text} at (0,0) size 0x0 13 13 RenderBlock {DIV} at (0,222) size 784x18 -
trunk/LayoutTests/platform/mac/fast/dynamic/flash-replacement-test-expected.txt
r25970 r52947 5 5 RenderBody {BODY} at (8,8) size 784x255 6 6 RenderBlock (anonymous) at (0,0) size 784x158 7 Render PartObject {OBJECT} at (0,0) size 249x1547 RenderEmbeddedObject {OBJECT} at (0,0) size 249x154 8 8 RenderText {#text} at (249,140) size 4x18 9 9 text run at (249,140) width 4: " " -
trunk/LayoutTests/platform/mac/fast/frames/001-expected.txt
r30431 r52947 15 15 RenderText {#text} at (170,174) size 4x18 16 16 text run at (170,174) width 4: " " 17 Render PartObject {OBJECT} at (174,18) size 170x170 [border: (10px solid #FF0000)]17 RenderEmbeddedObject {OBJECT} at (174,18) size 170x170 [border: (10px solid #FF0000)] 18 18 layer at (0,0) size 100x100 19 19 RenderView at (0,0) size 100x100 … … 23 23 RenderText {#text} at (344,174) size 4x18 24 24 text run at (344,174) width 4: " " 25 Render PartObject {OBJECT} at (348,18) size 170x170 [border: (10px solid #FF0000)]25 RenderEmbeddedObject {OBJECT} at (348,18) size 170x170 [border: (10px solid #FF0000)] 26 26 layer at (0,0) size 100x100 27 27 RenderView at (0,0) size 100x100 -
trunk/LayoutTests/platform/mac/fast/invalid/residual-style-expected.txt
r43007 r52947 293 293 RenderText {#text} at (0,0) size 65x18 294 294 text run at (0,0) width 65: "EMBED: " 295 Render PartObject {EMBED} at (65,14) size 0x0295 RenderEmbeddedObject {EMBED} at (65,14) size 0x0 296 296 RenderInline {FONT} at (0,0) size 171x18 [color=#008000] 297 297 RenderText {#text} at (65,0) size 171x18 -
trunk/LayoutTests/platform/mac/fast/parser/001-expected.txt
r25970 r52947 23 23 text run at (0,0) width 64: "Pre text" 24 24 text run at (64,0) width 0: " " 25 Render PartObject {OBJECT} at (0,15) size 300x300 [bgcolor=#008000]25 RenderEmbeddedObject {OBJECT} at (0,15) size 300x300 [bgcolor=#008000] 26 26 RenderText {#text} at (300,303) size 300x30 27 27 text run at (300,303) width 0: " " -
trunk/LayoutTests/platform/mac/fast/replaced/007-expected.txt
r25970 r52947 16 16 RenderText {#text} at (163,294) size 158x18 17 17 text run at (163,294) width 158: "This should be centered. " 18 Render PartObject {OBJECT} at (321,158) size 300x15018 RenderEmbeddedObject {OBJECT} at (321,158) size 300x150 19 19 layer at (0,0) size 300x150 20 20 RenderView at (0,0) size 300x150 -
trunk/LayoutTests/platform/mac/fast/replaced/border-radius-clip-expected.txt
r47590 r52947 28 28 text run at (300,520) width 4: " " 29 29 RenderBR {BR} at (0,0) size 0x0 30 Render PartObject {EMBED} at (0,538) size 556x406 [bgcolor=#00FF00] [border: (3px solid #000000)]30 RenderEmbeddedObject {EMBED} at (0,538) size 556x406 [bgcolor=#00FF00] [border: (3px solid #000000)] 31 31 RenderText {#text} at (0,0) size 0x0 32 32 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/fast/replaced/replaced-breaking-expected.txt
r43007 r52947 60 60 RenderBody {BODY} at (8,8) size 9x9 61 61 RenderText {#text} at (0,0) size 0x0 62 Render PartObject {EMBED} at (1,483) size 27x27 [border: (1px solid #000000)]63 Render PartObject {EMBED} at (1,510) size 27x27 [border: (1px solid #000000)]62 RenderEmbeddedObject {EMBED} at (1,483) size 27x27 [border: (1px solid #000000)] 63 RenderEmbeddedObject {EMBED} at (1,510) size 27x27 [border: (1px solid #000000)] 64 64 RenderText {#text} at (0,0) size 0x0 65 65 layer at (14,14) size 122x13 -
trunk/LayoutTests/platform/mac/plugins/embed-attributes-style-expected.txt
r30635 r52947 13 13 RenderBlock {DIV} at (0,62) size 784x0 14 14 RenderBlock {DIV} at (0,62) size 784x104 15 Render PartObject {EMBED} at (0,0) size 50x10015 RenderEmbeddedObject {EMBED} at (0,0) size 50x100 16 16 RenderText {#text} at (50,86) size 122x18 17 17 text run at (50,86) width 4: " " 18 18 text run at (54,86) width 118: "valign top attribute" 19 19 RenderBlock {DIV} at (0,166) size 784x104 20 Render PartObject {EMBED} at (0,0) size 50x10020 RenderEmbeddedObject {EMBED} at (0,0) size 50x100 21 21 RenderText {#text} at (50,86) size 128x18 22 22 text run at (50,86) width 4: " " 23 23 text run at (54,86) width 124: "border 5px attribute" 24 24 RenderBlock {DIV} at (0,270) size 784x106 25 Render PartObject {EMBED} at (0,0) size 52x102 [border: (1px dashed #000000)]25 RenderEmbeddedObject {EMBED} at (0,0) size 52x102 [border: (1px dashed #000000)] 26 26 RenderText {#text} at (52,88) size 102x18 27 27 text run at (52,88) width 4: " " -
trunk/LayoutTests/platform/mac/plugins/netscape-dom-access-expected.txt
r30635 r52947 9 9 text run at (508,0) width 266: "The plug-in should have a 3px red border." 10 10 RenderBlock (anonymous) at (0,34) size 784x206 11 Render PartObject {EMBED} at (0,0) size 206x206 [border: (3px solid #FF0000)]11 RenderEmbeddedObject {EMBED} at (0,0) size 206x206 [border: (3px solid #FF0000)] 12 12 RenderText {#text} at (0,0) size 0x0 13 13 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/plugins/qt-qwidget-plugin-expected.txt
r52588 r52947 15 15 RenderText {#text} at (0,16) size 111x18 16 16 text run at (0,16) width 111: "QT progress bar: " 17 Render PartObject {OBJECT} at (111,0) size 300x3017 RenderEmbeddedObject {OBJECT} at (111,0) size 300x30 18 18 RenderText {#text} at (0,0) size 0x0 19 19 RenderBlock {DIV} at (0,136) size 784x34 20 20 RenderText {#text} at (0,16) size 156x18 21 21 text run at (0,16) width 156: "You should not see this: " 22 Render PartObject {OBJECT} at (156,0) size 300x3022 RenderEmbeddedObject {OBJECT} at (156,0) size 300x30 23 23 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/mac/svg/custom/getsvgdocument-expected.txt
r38794 r52947 9 9 text run at (0,18) width 300: "should see SUCCESS printed twice below this:" 10 10 RenderBlock (anonymous) at (0,52) size 784x58 11 Render PartObject {EMBED} at (0,0) size 85x2011 RenderEmbeddedObject {EMBED} at (0,0) size 85x20 12 12 layer at (0,0) size 85x20 13 13 RenderView at (0,0) size 85x20 … … 20 20 RenderBR {BR} at (85,20) size 0x0 21 21 RenderBR {BR} at (0,20) size 0x18 22 Render PartObject {OBJECT} at (0,38) size 85x2022 RenderEmbeddedObject {OBJECT} at (0,38) size 85x20 23 23 layer at (0,0) size 85x20 24 24 RenderView at (0,0) size 85x20 -
trunk/LayoutTests/platform/mac/svg/custom/scrolling-embedded-svg-file-image-repaint-problem-expected.txt
r49567 r52947 55 55 RenderTableRow {TR} at (0,149) size 998x381 56 56 RenderTableCell {TD} at (2,149) size 496x381 [r=2 c=0 rs=1 cs=1] 57 Render PartObject {EMBED} at (8,8) size 480x36057 RenderEmbeddedObject {EMBED} at (8,8) size 480x360 58 58 layer at (0,0) size 480x360 59 59 RenderView at (0,0) size 480x360 -
trunk/LayoutTests/platform/mac/svg/hixie/text/003-expected.txt
r37202 r52947 8 8 text run at (0,0) width 608: "The following two blocks should look identical (to the pixel), and they should both say \"PASS\":" 9 9 RenderBlock {P} at (0,34) size 784x160 10 Render PartObject {OBJECT} at (0,0) size 306x156 [border: (3px inset #000080)]10 RenderEmbeddedObject {OBJECT} at (0,0) size 306x156 [border: (3px inset #000080)] 11 11 layer at (0,0) size 300x150 12 12 RenderView at (0,0) size 300x150 … … 17 17 chunk 1 text run 1 at (0.00,0.80) startOffset 0 endOffset 4 width 3.00: "PASS" 18 18 RenderBlock {P} at (0,210) size 784x160 19 Render PartObject {OBJECT} at (0,0) size 306x156 [border: (3px inset #000080)]19 RenderEmbeddedObject {OBJECT} at (0,0) size 306x156 [border: (3px inset #000080)] 20 20 layer at (0,0) size 300x150 21 21 RenderView at (0,0) size 300x150 -
trunk/LayoutTests/platform/qt/editing/pasteboard/pasting-object-expected.txt
r30635 r52947 18 18 RenderText {#text} at (0,138) size 32x19 19 19 text run at (0,138) width 32: "Hello" 20 Render PartObject {OBJECT} at (32,0) size 302x152 [border: (1px solid #AAAAAA)]20 RenderEmbeddedObject {OBJECT} at (32,0) size 302x152 [border: (1px solid #AAAAAA)] 21 21 RenderText {#text} at (334,138) size 45x19 22 22 text run at (334,138) width 45: " World!" -
trunk/LayoutTests/platform/qt/fast/block/basic/013-expected.txt
r30635 r52947 18 18 RenderText {#text} at (504,90) size 4x19 19 19 text run at (504,90) width 4: " " 20 Render PartObject {OBJECT} at (0,109) size 500x10020 RenderEmbeddedObject {OBJECT} at (0,109) size 500x100 21 21 layer at (0,0) size 500x100 22 22 RenderView at (0,0) size 500x100 -
trunk/LayoutTests/platform/qt/fast/block/float/4145535Crash-expected.txt
r30635 r52947 5 5 RenderBody {BODY} at (8,8) size 784x584 6 6 RenderBlock (anonymous) at (0,0) size 784x150 7 Render PartObject {EMBED} at (0,0) size 300x1507 RenderEmbeddedObject {EMBED} at (0,0) size 300x150 8 8 RenderTable {TABLE} at (0,150) size 0x0 9 9 RenderTableSection {TBODY} at (0,0) size 0x0 -
trunk/LayoutTests/platform/qt/fast/dom/HTMLObjectElement/vspace-hspace-as-number-expected.txt
r30635 r52947 9 9 text run at (0,19) width 697: "of strings, per the DOM Level 2 HTML spec: http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-9893177" 10 10 RenderBlock (anonymous) at (0,52) size 784x170 11 Render PartObject {OBJECT} at (20,10) size 300x15011 RenderEmbeddedObject {OBJECT} at (20,10) size 300x150 12 12 RenderText {#text} at (0,0) size 0x0 13 13 RenderBlock {DIV} at (0,222) size 784x19 -
trunk/LayoutTests/platform/qt/fast/dynamic/flash-replacement-test-expected.txt
r30635 r52947 5 5 RenderBody {BODY} at (8,8) size 784x252 6 6 RenderBlock (anonymous) at (0,0) size 784x159 7 Render PartObject {OBJECT} at (0,0) size 249x1547 RenderEmbeddedObject {OBJECT} at (0,0) size 249x154 8 8 RenderText {#text} at (249,140) size 4x19 9 9 text run at (249,140) width 4: " " -
trunk/LayoutTests/platform/qt/fast/frames/001-expected.txt
r32816 r52947 15 15 RenderText {#text} at (170,175) size 4x19 16 16 text run at (170,175) width 4: " " 17 Render PartObject {OBJECT} at (174,19) size 170x170 [border: (10px solid #FF0000)]17 RenderEmbeddedObject {OBJECT} at (174,19) size 170x170 [border: (10px solid #FF0000)] 18 18 layer at (0,0) size 100x100 19 19 RenderView at (0,0) size 100x100 … … 23 23 RenderText {#text} at (344,175) size 4x19 24 24 text run at (344,175) width 4: " " 25 Render PartObject {OBJECT} at (348,19) size 170x170 [border: (10px solid #FF0000)]25 RenderEmbeddedObject {OBJECT} at (348,19) size 170x170 [border: (10px solid #FF0000)] 26 26 layer at (0,0) size 100x100 27 27 RenderView at (0,0) size 100x100 -
trunk/LayoutTests/platform/qt/fast/parser/001-expected.txt
r32729 r52947 23 23 text run at (0,0) width 49: "Pre text" 24 24 text run at (49,0) width 0: " " 25 Render PartObject {OBJECT} at (0,19) size 300x300 [bgcolor=#008000]25 RenderEmbeddedObject {OBJECT} at (0,19) size 300x300 [bgcolor=#008000] 26 26 RenderText {#text} at (300,305) size 300x38 27 27 text run at (300,305) width 0: " " -
trunk/LayoutTests/platform/qt/fast/replaced/007-expected.txt
r30635 r52947 16 16 RenderText {#text} at (161,295) size 161x19 17 17 text run at (161,295) width 161: "This should be centered. " 18 Render PartObject {OBJECT} at (322,159) size 300x15018 RenderEmbeddedObject {OBJECT} at (322,159) size 300x150 19 19 layer at (0,0) size 300x150 20 20 RenderView at (0,0) size 300x150 -
trunk/LayoutTests/platform/qt/fast/replaced/replaced-breaking-expected.txt
r32816 r52947 60 60 RenderBody {BODY} at (8,8) size 9x9 61 61 RenderText {#text} at (0,0) size 0x0 62 Render PartObject {EMBED} at (1,597) size 27x27 [border: (1px solid #000000)]63 Render PartObject {EMBED} at (1,624) size 27x27 [border: (1px solid #000000)]62 RenderEmbeddedObject {EMBED} at (1,597) size 27x27 [border: (1px solid #000000)] 63 RenderEmbeddedObject {EMBED} at (1,624) size 27x27 [border: (1px solid #000000)] 64 64 RenderText {#text} at (0,0) size 0x0 65 65 layer at (14,14) size 162x19 -
trunk/LayoutTests/platform/qt/plugins/embed-attributes-style-expected.txt
r30635 r52947 13 13 RenderBlock {DIV} at (0,61) size 784x0 14 14 RenderBlock {DIV} at (0,61) size 784x105 15 Render PartObject {EMBED} at (0,0) size 50x10015 RenderEmbeddedObject {EMBED} at (0,0) size 50x100 16 16 RenderText {#text} at (50,86) size 121x19 17 17 text run at (50,86) width 4: " " 18 18 text run at (54,86) width 117: "valign top attribute" 19 19 RenderBlock {DIV} at (0,166) size 784x105 20 Render PartObject {EMBED} at (0,0) size 50x10020 RenderEmbeddedObject {EMBED} at (0,0) size 50x100 21 21 RenderText {#text} at (50,86) size 129x19 22 22 text run at (50,86) width 4: " " 23 23 text run at (54,86) width 125: "border 5px attribute" 24 24 RenderBlock {DIV} at (0,271) size 784x107 25 Render PartObject {EMBED} at (0,0) size 52x102 [border: (1px dashed #000000)]25 RenderEmbeddedObject {EMBED} at (0,0) size 52x102 [border: (1px dashed #000000)] 26 26 RenderText {#text} at (52,88) size 103x19 27 27 text run at (52,88) width 4: " " -
trunk/LayoutTests/platform/qt/plugins/netscape-dom-access-expected.txt
r51410 r52947 10 10 text run at (0,20) width 107: "3px red border." 11 11 RenderBlock (anonymous) at (0,56) size 784x206 12 Render PartObject {EMBED} at (0,0) size 206x206 [border: (3px solid #FF0000)] [QT: geometry: {at (8,64) size 200x200} isHidden: 0 isSelfVisible: 1 isParentVisible: 1 mask: {at (0,0) size 200x200} ]12 RenderEmbeddedObject {EMBED} at (0,0) size 206x206 [border: (3px solid #FF0000)] [QT: geometry: {at (8,64) size 200x200} isHidden: 0 isSelfVisible: 1 isParentVisible: 1 mask: {at (0,0) size 200x200} ] 13 13 RenderText {#text} at (0,0) size 0x0 14 14 RenderText {#text} at (0,0) size 0x0 -
trunk/LayoutTests/platform/qt/plugins/qt-qwidget-plugin-expected.txt
r51410 r52947 15 15 RenderText {#text} at (0,14) size 123x20 16 16 text run at (0,14) width 123: "QT progress bar: " 17 Render PartObject {OBJECT} at (123,0) size 300x30 [QT: geometry: {at (131,112) size 300x30} isHidden: 0 isSelfVisible: 1 isParentVisible: 1 mask: {at (0,0) size 300x30} ]17 RenderEmbeddedObject {OBJECT} at (123,0) size 300x30 [QT: geometry: {at (131,112) size 300x30} isHidden: 0 isSelfVisible: 1 isParentVisible: 1 mask: {at (0,0) size 300x30} ] 18 18 RenderText {#text} at (0,0) size 0x0 19 19 RenderBlock {DIV} at (0,138) size 784x34 20 20 RenderText {#text} at (0,14) size 174x20 21 21 text run at (0,14) width 174: "You should not see this: " 22 Render PartObject {OBJECT} at (174,0) size 300x30 [QT: geometry: {at (182,146) size 300x30} isHidden: 1 isSelfVisible: 0 isParentVisible: 1 mask: {at (0,0) size 300x30} ]22 RenderEmbeddedObject {OBJECT} at (174,0) size 300x30 [QT: geometry: {at (182,146) size 300x30} isHidden: 1 isSelfVisible: 0 isParentVisible: 1 mask: {at (0,0) size 300x30} ] 23 23 RenderText {#text} at (0,0) size 0x0 -
trunk/WebCore/ChangeLog
r52946 r52947 1 2010-01-07 Simon Fraser <simon.fraser@apple.com> 2 3 Reviewed by Kevin Decker, Darin Adler. 4 5 https://bugs.webkit.org/show_bug.cgi?id=33338 6 Create a renderer for <object> and <embed> 7 8 Add RenderEmbeddedObject, which derives from RenderPartObject, and is created for <object> and <embed>. 9 Instances of RenderPartObject are now only allocated for iframes. 10 11 Move object/embed-related code from RenderPartObject to RenderEmbeddedObject. 12 13 * WebCore.xcodeproj/project.pbxproj: 14 Add RenderEmbeddedObject.h/cpp 15 16 * html/HTMLEmbedElement.cpp: 17 (WebCore::HTMLEmbedElement::createRenderer): Create a RenderEmbeddedObject. 18 (WebCore::HTMLEmbedElement::updateWidget): Use toRenderEmbeddedObject() 19 20 * html/HTMLMediaElement.cpp: 21 (WebCore::HTMLMediaElement::createRenderer): Make a RenderEmbeddedObject for the plugin-proxy case. 22 (WebCore::HTMLMediaElement::finishParsingChildren): Use toRenderEmbeddedObject() in the plugin-proxy code. 23 24 * html/HTMLObjectElement.cpp: 25 (WebCore::HTMLObjectElement::createRenderer): Make a RenderEmbeddedObject 26 (WebCore::HTMLObjectElement::updateWidget): Use toRenderEmbeddedObject() 27 28 * page/FrameView.h: 29 * page/FrameView.cpp: 30 (WebCore::FrameView::addWidgetToUpdate): 31 (WebCore::FrameView::removeWidgetToUpdate): 32 (WebCore::FrameView::updateWidgets): 33 Objects in the m_widgetUpdateSet are only ever RenderEmbeddedObjects. 34 35 * rendering/RenderEmbeddedObject.cpp: Added. 36 * rendering/RenderEmbeddedObject.h: Added. 37 Most of the code moved from RenderPartObject. 38 39 * rendering/RenderObject.h: 40 (WebCore::RenderObject::isEmbeddedObject): New method. 41 42 * rendering/RenderPart.cpp: 43 (WebCore::RenderPart::RenderPart): Initialize m_hasFallbackContent here, rather than in the derived classes. 44 * rendering/RenderPart.h: Comments. 45 46 * rendering/RenderPartObject.h: 47 * rendering/RenderPartObject.cpp: 48 (WebCore::RenderPartObject::RenderPartObject): Clean up, code moved to base class, and removed object/embed-specific code. 49 (WebCore::RenderPartObject::layout): Removed object/embed-specific code. 50 1 51 2010-01-07 Simon Fraser <simon.fraser@apple.com> 2 52 -
trunk/WebCore/WebCore.xcodeproj/project.pbxproj
r52933 r52947 182 182 0F580CFF0F12DE9B0051D689 /* RenderLayerBacking.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F580CFB0F12DE9B0051D689 /* RenderLayerBacking.h */; }; 183 183 0F580D000F12DE9B0051D689 /* RenderLayerBacking.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F580CFC0F12DE9B0051D689 /* RenderLayerBacking.cpp */; }; 184 0F5B7A5410F65D7A00376302 /* RenderEmbeddedObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */; }; 185 0F5B7A5510F65D7A00376302 /* RenderEmbeddedObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */; }; 184 186 0F6ECD450F252F3700BDE271 /* CSSPropertyLonghand.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F6ECD430F252F3700BDE271 /* CSSPropertyLonghand.h */; }; 185 187 0F6ECD460F252F3700BDE271 /* CSSPropertyLonghand.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0F6ECD440F252F3700BDE271 /* CSSPropertyLonghand.cpp */; }; … … 5397 5399 0F580CFB0F12DE9B0051D689 /* RenderLayerBacking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderLayerBacking.h; sourceTree = "<group>"; }; 5398 5400 0F580CFC0F12DE9B0051D689 /* RenderLayerBacking.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderLayerBacking.cpp; sourceTree = "<group>"; }; 5401 0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = RenderEmbeddedObject.cpp; sourceTree = "<group>"; }; 5402 0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RenderEmbeddedObject.h; sourceTree = "<group>"; }; 5399 5403 0F6ECD430F252F3700BDE271 /* CSSPropertyLonghand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSPropertyLonghand.h; sourceTree = "<group>"; }; 5400 5404 0F6ECD440F252F3700BDE271 /* CSSPropertyLonghand.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CSSPropertyLonghand.cpp; sourceTree = "<group>"; }; … … 15506 15510 853CA9EE0AEEC657002372DC /* RenderPath.cpp */, 15507 15511 853CA9EF0AEEC657002372DC /* RenderPath.h */, 15512 0F5B7A5210F65D7A00376302 /* RenderEmbeddedObject.cpp */, 15513 0F5B7A5310F65D7A00376302 /* RenderEmbeddedObject.h */, 15508 15514 A871DFDE0A15376B00B12A68 /* RenderReplaced.cpp */, 15509 15515 A871DFDF0A15376B00B12A68 /* RenderReplaced.h */, … … 18314 18320 5112247A10CFB8FF008099D7 /* WorkerThreadableWebSocketChannel.h in Headers */, 18315 18321 37C28A6810F659CC008C7813 /* TypesettingFeatures.h in Headers */, 18322 0F5B7A5510F65D7A00376302 /* RenderEmbeddedObject.h in Headers */, 18316 18323 ); 18317 18324 runOnlyForDeploymentPostprocessing = 0; … … 20474 20481 5112247210CFB8C6008099D7 /* ThreadableWebSocketChannel.cpp in Sources */, 20475 20482 5112247810CFB8F4008099D7 /* WorkerThreadableWebSocketChannel.cpp in Sources */, 20483 0F5B7A5410F65D7A00376302 /* RenderEmbeddedObject.cpp in Sources */, 20476 20484 ); 20477 20485 runOnlyForDeploymentPostprocessing = 0; -
trunk/WebCore/html/HTMLEmbedElement.cpp
r47688 r52947 33 33 #include "HTMLObjectElement.h" 34 34 #include "MappedAttribute.h" 35 #include "RenderEmbeddedObject.h" 35 36 #include "RenderImage.h" 36 #include "RenderPartObject.h"37 37 #include "RenderWidget.h" 38 38 #include "ScriptController.h" … … 156 156 if (isImageType()) 157 157 return new (arena) RenderImage(this); 158 return new (arena) Render PartObject(this);158 return new (arena) RenderEmbeddedObject(this); 159 159 } 160 160 … … 184 184 document()->updateStyleIfNeeded(); 185 185 if (m_needWidgetUpdate && renderer() && !isImageType()) 186 toRender PartObject(renderer())->updateWidget(true);186 toRenderEmbeddedObject(renderer())->updateWidget(true); 187 187 } 188 188 -
trunk/WebCore/html/HTMLMediaElement.cpp
r52923 r52947 240 240 { 241 241 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) 242 return new (arena) Render PartObject(this);242 return new (arena) RenderEmbeddedObject(this); 243 243 #else 244 244 return new (arena) RenderMedia(this); … … 1766 1766 document()->updateStyleIfNeeded(); 1767 1767 if (m_needWidgetUpdate && renderer()) 1768 toRender PartObject(renderer())->updateWidget(true);1768 toRenderEmbeddedObject(renderer())->updateWidget(true); 1769 1769 } 1770 1770 -
trunk/WebCore/html/HTMLObjectElement.cpp
r52312 r52947 36 36 #include "MIMETypeRegistry.h" 37 37 #include "MappedAttribute.h" 38 #include "RenderEmbeddedObject.h" 38 39 #include "RenderImage.h" 39 #include "RenderPartObject.h"40 40 #include "RenderWidget.h" 41 41 #include "ScriptController.h" … … 141 141 if (isImageType()) 142 142 return new (arena) RenderImage(this); 143 return new (arena) Render PartObject(this);143 return new (arena) RenderEmbeddedObject(this); 144 144 } 145 145 … … 170 170 document()->updateStyleIfNeeded(); 171 171 if (m_needWidgetUpdate && renderer() && !m_useFallbackContent && !isImageType()) 172 toRender PartObject(renderer())->updateWidget(true);172 toRenderEmbeddedObject(renderer())->updateWidget(true); 173 173 } 174 174 -
trunk/WebCore/page/FrameView.cpp
r52866 r52947 47 47 #include "InspectorTimelineAgent.h" 48 48 #include "OverflowEvent.h" 49 #include "RenderEmbeddedObject.h" 49 50 #include "RenderPart.h" 50 #include "RenderPartObject.h"51 51 #include "RenderScrollbar.h" 52 52 #include "RenderScrollbarPart.h" … … 753 753 } 754 754 755 void FrameView::addWidgetToUpdate(Render PartObject* object)755 void FrameView::addWidgetToUpdate(RenderEmbeddedObject* object) 756 756 { 757 757 if (!m_widgetUpdateSet) 758 m_widgetUpdateSet.set(new HashSet<RenderPartObject*>);758 m_widgetUpdateSet.set(new RenderEmbeddedObjectSet); 759 759 760 760 m_widgetUpdateSet->add(object); 761 761 } 762 762 763 void FrameView::removeWidgetToUpdate(Render PartObject* object)763 void FrameView::removeWidgetToUpdate(RenderEmbeddedObject* object) 764 764 { 765 765 if (!m_widgetUpdateSet) … … 1347 1347 return true; 1348 1348 1349 Vector<Render PartObject*> objectVector;1349 Vector<RenderEmbeddedObject*> objectVector; 1350 1350 copyToVector(*m_widgetUpdateSet, objectVector); 1351 1351 size_t size = objectVector.size(); 1352 1352 for (size_t i = 0; i < size; ++i) { 1353 Render PartObject* object = objectVector[i];1353 RenderEmbeddedObject* object = objectVector[i]; 1354 1354 object->updateWidget(false); 1355 1355 -
trunk/WebCore/page/FrameView.h
r52499 r52947 46 46 class RenderLayer; 47 47 class RenderObject; 48 class Render PartObject;48 class RenderEmbeddedObject; 49 49 class ScheduledEvent; 50 50 class String; … … 166 166 void setWasScrolledByUser(bool); 167 167 168 void addWidgetToUpdate(Render PartObject*);169 void removeWidgetToUpdate(Render PartObject*);168 void addWidgetToUpdate(RenderEmbeddedObject*); 169 void removeWidgetToUpdate(RenderEmbeddedObject*); 170 170 171 171 virtual void paintContents(GraphicsContext*, const IntRect& damageRect); … … 257 257 IntSize m_size; 258 258 IntSize m_margins; 259 OwnPtr<HashSet<RenderPartObject*> > m_widgetUpdateSet; 259 260 typedef HashSet<RenderEmbeddedObject*> RenderEmbeddedObjectSet; 261 OwnPtr<RenderEmbeddedObjectSet> m_widgetUpdateSet; 260 262 RefPtr<Frame> m_frame; 261 263 -
trunk/WebCore/rendering/RenderEmbeddedObject.cpp
r52946 r52947 3 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> 4 4 * (C) 2000 Stefan Schimanski (1Stein@gmx.de) 5 * Copyright (C) 2004, 2005, 2006, 2008, 2009 Apple Inc. All rights reserved.5 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserved. 6 6 * 7 7 * This library is free software; you can redistribute it and/or … … 23 23 24 24 #include "config.h" 25 #include "Render PartObject.h"25 #include "RenderEmbeddedObject.h" 26 26 27 27 #include "Frame.h" … … 46 46 using namespace HTMLNames; 47 47 48 RenderPartObject::RenderPartObject(Element* element) 49 : RenderPart(element) 50 { 51 // init RenderObject attributes 52 setInline(true); 53 m_hasFallbackContent = false; 54 55 if (element->hasTagName(embedTag) || element->hasTagName(objectTag)) 56 view()->frameView()->setIsVisuallyNonEmpty(); 57 } 58 59 RenderPartObject::~RenderPartObject() 48 RenderEmbeddedObject::RenderEmbeddedObject(Element* element) 49 : RenderPartObject(element) 50 { 51 view()->frameView()->setIsVisuallyNonEmpty(); 52 } 53 54 RenderEmbeddedObject::~RenderEmbeddedObject() 60 55 { 61 56 if (frameView()) … … 125 120 } 126 121 127 void Render PartObject::updateWidget(bool onlyCreateNonNetscapePlugins)122 void RenderEmbeddedObject::updateWidget(bool onlyCreateNonNetscapePlugins) 128 123 { 129 124 String url; … … 140 135 141 136 if (node()->hasTagName(objectTag)) { 142 HTMLObjectElement* o = static_cast<HTMLObjectElement*>(node());143 144 o ->setNeedWidgetUpdate(false);145 if (!o ->isFinishedParsingChildren())137 HTMLObjectElement* objectElement = static_cast<HTMLObjectElement*>(node()); 138 139 objectElement->setNeedWidgetUpdate(false); 140 if (!objectElement->isFinishedParsingChildren()) 146 141 return; 147 142 148 143 // Check for a child EMBED tag. 149 144 HTMLEmbedElement* embed = 0; 150 for (Node* child = o ->firstChild(); child; ) {145 for (Node* child = objectElement->firstChild(); child; ) { 151 146 if (child->hasTagName(embedTag)) { 152 147 embed = static_cast<HTMLEmbedElement*>(child); 153 148 break; 154 } else if (child->hasTagName(objectTag)) 155 child = child->nextSibling(); // Don't descend into nested OBJECT tags 149 } 150 151 if (child->hasTagName(objectTag)) 152 child = child->nextSibling(); // Don't descend into nested OBJECT tags 156 153 else 157 child = child->traverseNextNode(o );// Otherwise descend (EMBEDs may be inside COMMENT tags)154 child = child->traverseNextNode(objectElement); // Otherwise descend (EMBEDs may be inside COMMENT tags) 158 155 } 159 156 160 157 // Use the attributes from the EMBED tag instead of the OBJECT tag including WIDTH and HEIGHT. 161 HTMLElement *embedOrObject;158 HTMLElement* embedOrObject; 162 159 if (embed) { 163 embedOrObject = (HTMLElement *)embed;160 embedOrObject = embed; 164 161 url = embed->url(); 165 162 serviceType = embed->serviceType(); 166 163 } else 167 embedOrObject = (HTMLElement *)o;164 embedOrObject = objectElement; 168 165 169 166 // If there was no URL or type defined in EMBED, try the OBJECT tag. 170 167 if (url.isEmpty()) 171 url = o ->url();168 url = objectElement->url(); 172 169 if (serviceType.isEmpty()) 173 serviceType = o ->serviceType();170 serviceType = objectElement->serviceType(); 174 171 175 172 HashSet<StringImpl*, CaseFoldingHash> uniqueParamNames; … … 178 175 // Get the URL and type from the params if we don't already have them. 179 176 // Get the attributes from the params if there is no EMBED tag. 180 Node *child = o->firstChild();177 Node* child = objectElement->firstChild(); 181 178 while (child && (url.isEmpty() || serviceType.isEmpty() || !embed)) { 182 179 if (child->hasTagName(paramTag)) { … … 228 225 // If we still don't have a type, try to map from a specific CLASSID to a type. 229 226 if (serviceType.isEmpty()) 230 serviceType = serviceTypeForClassId(o ->classId());227 serviceType = serviceTypeForClassId(objectElement->classId()); 231 228 232 229 if (!isURLAllowed(document(), url)) … … 235 232 // Find out if we support fallback content. 236 233 m_hasFallbackContent = false; 237 for (Node *child = o->firstChild(); child && !m_hasFallbackContent; child = child->nextSibling()) {238 if ((!child->isTextNode() && !child->hasTagName(embedTag) && !child->hasTagName(paramTag)) ||// Discount <embed> and <param>239 (child->isTextNode() && !static_cast<Text*>(child)->containsOnlyWhitespace()))234 for (Node* child = objectElement->firstChild(); child && !m_hasFallbackContent; child = child->nextSibling()) { 235 if ((!child->isTextNode() && !child->hasTagName(embedTag) && !child->hasTagName(paramTag)) // Discount <embed> and <param> 236 || (child->isTextNode() && !static_cast<Text*>(child)->containsOnlyWhitespace())) 240 237 m_hasFallbackContent = true; 241 238 } … … 250 247 } 251 248 252 bool success = o->dispatchBeforeLoadEvent(url) && 253 frame->loader()->requestObject(this, url, o->getAttribute(nameAttr), serviceType, paramNames, paramValues); 249 bool success = objectElement->dispatchBeforeLoadEvent(url) && frame->loader()->requestObject(this, url, objectElement->getAttribute(nameAttr), serviceType, paramNames, paramValues); 254 250 if (!success && m_hasFallbackContent) 255 o->renderFallbackContent(); 251 objectElement->renderFallbackContent(); 252 256 253 } else if (node()->hasTagName(embedTag)) { 257 HTMLEmbedElement *o= static_cast<HTMLEmbedElement*>(node());258 o->setNeedWidgetUpdate(false);259 url = o->url();260 serviceType = o->serviceType();254 HTMLEmbedElement* embedElement = static_cast<HTMLEmbedElement*>(node()); 255 embedElement->setNeedWidgetUpdate(false); 256 url = embedElement->url(); 257 serviceType = embedElement->serviceType(); 261 258 262 259 if (url.isEmpty() && serviceType.isEmpty()) … … 266 263 267 264 // add all attributes set on the embed object 268 NamedNodeMap* a = o->attributes();269 if (a ) {270 for (unsigned i = 0; i < a ->length(); ++i) {271 Attribute* it = a ->attributeItem(i);265 NamedNodeMap* attributes = embedElement->attributes(); 266 if (attributes) { 267 for (unsigned i = 0; i < attributes->length(); ++i) { 268 Attribute* it = attributes->attributeItem(i); 272 269 paramNames.append(it->name().localName().string()); 273 270 paramValues.append(it->value().string()); … … 282 279 if (frame->loader()->client()->objectContentType(completedURL, serviceType) == ObjectContentNetscapePlugin) 283 280 return; 284 285 } 286 287 if (o->dispatchBeforeLoadEvent(url)) 288 frame->loader()->requestObject(this, url, o->getAttribute(nameAttr), serviceType, paramNames, paramValues); 281 } 282 283 if (embedElement->dispatchBeforeLoadEvent(url)) 284 frame->loader()->requestObject(this, url, embedElement->getAttribute(nameAttr), serviceType, paramNames, paramValues); 289 285 } 290 286 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO) 291 287 else if (node()->hasTagName(videoTag) || node()->hasTagName(audioTag)) { 292 HTMLMediaElement* o= static_cast<HTMLMediaElement*>(node());293 294 o->setNeedWidgetUpdate(false);288 HTMLMediaElement* mediaElement = static_cast<HTMLMediaElement*>(node()); 289 290 mediaElement->setNeedWidgetUpdate(false); 295 291 if (node()->hasTagName(videoTag)) { 296 292 HTMLVideoElement* vid = static_cast<HTMLVideoElement*>(node()); … … 302 298 } 303 299 304 url = o->initialURL();300 url = mediaElement->initialURL(); 305 301 if (!url.isEmpty()) { 306 302 paramNames.append("_media_element_src_"); … … 310 306 serviceType = "application/x-media-element-proxy-plugin"; 311 307 312 if ( o->dispatchBeforeLoadEvent(url))308 if (mediaElement->dispatchBeforeLoadEvent(url)) 313 309 frame->loader()->requestObject(this, url, nullAtom, serviceType, paramNames, paramValues); 314 310 } … … 316 312 } 317 313 318 void Render PartObject::layout()314 void RenderEmbeddedObject::layout() 319 315 { 320 316 ASSERT(needsLayout()); … … 334 330 } 335 331 336 void RenderPartObject::viewCleared() 337 { 338 if (node() && widget() && widget()->isFrameView()) { 339 FrameView* view = static_cast<FrameView*>(widget()); 340 int marginw = -1; 341 int marginh = -1; 342 if (node()->hasTagName(iframeTag)) { 343 HTMLIFrameElement* frame = static_cast<HTMLIFrameElement*>(node()); 344 marginw = frame->getMarginWidth(); 345 marginh = frame->getMarginHeight(); 346 } 347 if (marginw != -1) 348 view->setMarginWidth(marginw); 349 if (marginh != -1) 350 view->setMarginHeight(marginh); 351 } 352 } 353 354 } 332 } -
trunk/WebCore/rendering/RenderEmbeddedObject.h
r52946 r52947 2 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 3 3 * (C) 2000 Simon Hausmann <hausmann@kde.org> 4 * Copyright (C) 200 6, 2009Apple Inc. All rights reserved.4 * Copyright (C) 2004, 2005, 2006, 2008, 2009, 2010 Apple Inc. All rights reserved. 5 5 * 6 6 * This library is free software; you can redistribute it and/or … … 21 21 */ 22 22 23 #ifndef Render PartObject_h24 #define Render PartObject_h23 #ifndef RenderEmbeddedObject_h 24 #define RenderEmbeddedObject_h 25 25 26 #include "RenderPart .h"26 #include "RenderPartObject.h" 27 27 28 28 namespace WebCore { 29 29 30 class RenderPartObject : public RenderPart { 30 // Renderer for embeds and objects. 31 class RenderEmbeddedObject : public RenderPartObject { 31 32 public: 32 Render PartObject(Element*);33 virtual ~Render PartObject();33 RenderEmbeddedObject(Element*); 34 virtual ~RenderEmbeddedObject(); 34 35 35 36 void updateWidget(bool onlyCreateNonNetscapePlugins); 36 37 37 38 private: 38 virtual const char* renderName() const { return "RenderPartObject"; } 39 virtual const char* renderName() const { return "RenderEmbeddedObject"; } 40 virtual bool isEmbeddedObject() const { return true; } 39 41 40 42 virtual void layout(); 41 42 virtual void viewCleared();43 43 }; 44 44 45 inline Render PartObject* toRenderPartObject(RenderObject* object)45 inline RenderEmbeddedObject* toRenderEmbeddedObject(RenderObject* object) 46 46 { 47 ASSERT(!object || !strcmp(object->renderName(), "Render PartObject"));48 return static_cast<Render PartObject*>(object);47 ASSERT(!object || !strcmp(object->renderName(), "RenderEmbeddedObject")); 48 return static_cast<RenderEmbeddedObject*>(object); 49 49 } 50 50 51 51 // This will catch anyone doing an unnecessary cast. 52 void toRender PartObject(const RenderPartObject*);52 void toRenderEmbeddedObject(const RenderEmbeddedObject*); 53 53 54 54 } // namespace WebCore 55 55 56 #endif // Render PartObject_h56 #endif // RenderEmbeddedObject_h -
trunk/WebCore/rendering/RenderObject.h
r52783 r52947 264 264 virtual bool isBoxModelObject() const { return false; } 265 265 virtual bool isCounter() const { return false; } 266 virtual bool isEmbeddedObject() const { return false; } 266 267 virtual bool isFieldset() const { return false; } 267 268 virtual bool isFileUploadControl() const { return false; } -
trunk/WebCore/rendering/RenderPart.cpp
r45679 r52947 32 32 RenderPart::RenderPart(Element* node) 33 33 : RenderWidget(node) 34 , m_hasFallbackContent(false) 34 35 { 35 36 // init RenderObject attributes -
trunk/WebCore/rendering/RenderPart.h
r46815 r52947 28 28 namespace WebCore { 29 29 30 // Renderer for frames via RenderPartObject, and plug-ins via RenderEmbeddedObject. 31 32 // FIXME: This class is subclassed in RenderPartObject for iframes, which is in turn 33 // subclassed in RenderEmbeddedObject for object and embed. This class itself could be removed. 30 34 class RenderPart : public RenderWidget { 31 35 public: -
trunk/WebCore/rendering/RenderPartObject.cpp
r49258 r52947 49 49 : RenderPart(element) 50 50 { 51 // init RenderObject attributes52 setInline(true);53 m_hasFallbackContent = false;54 55 if (element->hasTagName(embedTag) || element->hasTagName(objectTag))56 view()->frameView()->setIsVisuallyNonEmpty();57 }58 59 RenderPartObject::~RenderPartObject()60 {61 if (frameView())62 frameView()->removeWidgetToUpdate(this);63 }64 65 static bool isURLAllowed(Document* doc, const String& url)66 {67 if (doc->frame()->page()->frameCount() >= 200)68 return false;69 70 // We allow one level of self-reference because some sites depend on that.71 // But we don't allow more than one.72 KURL completeURL = doc->completeURL(url);73 bool foundSelfReference = false;74 for (Frame* frame = doc->frame(); frame; frame = frame->tree()->parent()) {75 if (equalIgnoringFragmentIdentifier(frame->loader()->url(), completeURL)) {76 if (foundSelfReference)77 return false;78 foundSelfReference = true;79 }80 }81 return true;82 }83 84 typedef HashMap<String, String, CaseFoldingHash> ClassIdToTypeMap;85 86 static ClassIdToTypeMap* createClassIdToTypeMap()87 {88 ClassIdToTypeMap* map = new ClassIdToTypeMap;89 map->add("clsid:D27CDB6E-AE6D-11CF-96B8-444553540000", "application/x-shockwave-flash");90 map->add("clsid:CFCDAA03-8BE4-11CF-B84B-0020AFBBCCFA", "audio/x-pn-realaudio-plugin");91 map->add("clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B", "video/quicktime");92 map->add("clsid:166B1BCA-3F9C-11CF-8075-444553540000", "application/x-director");93 map->add("clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6", "application/x-mplayer2");94 map->add("clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95", "application/x-mplayer2");95 return map;96 }97 98 static String serviceTypeForClassId(const String& classId)99 {100 // Return early if classId is empty (since we won't do anything below).101 // Furthermore, if classId is null, calling get() below will crash.102 if (classId.isEmpty())103 return String();104 105 static ClassIdToTypeMap* map = createClassIdToTypeMap();106 return map->get(classId);107 }108 109 static void mapDataParamToSrc(Vector<String>* paramNames, Vector<String>* paramValues)110 {111 // Some plugins don't understand the "data" attribute of the OBJECT tag (i.e. Real and WMP112 // require "src" attribute).113 int srcIndex = -1, dataIndex = -1;114 for (unsigned int i = 0; i < paramNames->size(); ++i) {115 if (equalIgnoringCase((*paramNames)[i], "src"))116 srcIndex = i;117 else if (equalIgnoringCase((*paramNames)[i], "data"))118 dataIndex = i;119 }120 121 if (srcIndex == -1 && dataIndex != -1) {122 paramNames->append("src");123 paramValues->append((*paramValues)[dataIndex]);124 }125 }126 127 void RenderPartObject::updateWidget(bool onlyCreateNonNetscapePlugins)128 {129 String url;130 String serviceType;131 Vector<String> paramNames;132 Vector<String> paramValues;133 Frame* frame = frameView()->frame();134 135 // The calls to FrameLoader::requestObject within this function can result in a plug-in being initialized.136 // This can run cause arbitrary JavaScript to run and may result in this RenderObject being detached from137 // the render tree and destroyed, causing a crash like <rdar://problem/6954546>. By extending our lifetime138 // artifically to ensure that we remain alive for the duration of plug-in initialization.139 RenderWidgetProtector protector(this);140 141 if (node()->hasTagName(objectTag)) {142 HTMLObjectElement* o = static_cast<HTMLObjectElement*>(node());143 144 o->setNeedWidgetUpdate(false);145 if (!o->isFinishedParsingChildren())146 return;147 148 // Check for a child EMBED tag.149 HTMLEmbedElement* embed = 0;150 for (Node* child = o->firstChild(); child; ) {151 if (child->hasTagName(embedTag)) {152 embed = static_cast<HTMLEmbedElement*>(child);153 break;154 } else if (child->hasTagName(objectTag))155 child = child->nextSibling(); // Don't descend into nested OBJECT tags156 else157 child = child->traverseNextNode(o); // Otherwise descend (EMBEDs may be inside COMMENT tags)158 }159 160 // Use the attributes from the EMBED tag instead of the OBJECT tag including WIDTH and HEIGHT.161 HTMLElement *embedOrObject;162 if (embed) {163 embedOrObject = (HTMLElement *)embed;164 url = embed->url();165 serviceType = embed->serviceType();166 } else167 embedOrObject = (HTMLElement *)o;168 169 // If there was no URL or type defined in EMBED, try the OBJECT tag.170 if (url.isEmpty())171 url = o->url();172 if (serviceType.isEmpty())173 serviceType = o->serviceType();174 175 HashSet<StringImpl*, CaseFoldingHash> uniqueParamNames;176 177 // Scan the PARAM children.178 // Get the URL and type from the params if we don't already have them.179 // Get the attributes from the params if there is no EMBED tag.180 Node *child = o->firstChild();181 while (child && (url.isEmpty() || serviceType.isEmpty() || !embed)) {182 if (child->hasTagName(paramTag)) {183 HTMLParamElement* p = static_cast<HTMLParamElement*>(child);184 String name = p->name();185 if (url.isEmpty() && (equalIgnoringCase(name, "src") || equalIgnoringCase(name, "movie") || equalIgnoringCase(name, "code") || equalIgnoringCase(name, "url")))186 url = p->value();187 if (serviceType.isEmpty() && equalIgnoringCase(name, "type")) {188 serviceType = p->value();189 int pos = serviceType.find(";");190 if (pos != -1)191 serviceType = serviceType.left(pos);192 }193 if (!embed && !name.isEmpty()) {194 uniqueParamNames.add(name.impl());195 paramNames.append(p->name());196 paramValues.append(p->value());197 }198 }199 child = child->nextSibling();200 }201 202 // When OBJECT is used for an applet via Sun's Java plugin, the CODEBASE attribute in the tag203 // points to the Java plugin itself (an ActiveX component) while the actual applet CODEBASE is204 // in a PARAM tag. See <http://java.sun.com/products/plugin/1.2/docs/tags.html>. This means205 // we have to explicitly suppress the tag's CODEBASE attribute if there is none in a PARAM,206 // else our Java plugin will misinterpret it. [4004531]207 String codebase;208 if (!embed && MIMETypeRegistry::isJavaAppletMIMEType(serviceType)) {209 codebase = "codebase";210 uniqueParamNames.add(codebase.impl()); // pretend we found it in a PARAM already211 }212 213 // Turn the attributes of either the EMBED tag or OBJECT tag into arrays, but don't override PARAM values.214 NamedNodeMap* attributes = embedOrObject->attributes();215 if (attributes) {216 for (unsigned i = 0; i < attributes->length(); ++i) {217 Attribute* it = attributes->attributeItem(i);218 const AtomicString& name = it->name().localName();219 if (embed || !uniqueParamNames.contains(name.impl())) {220 paramNames.append(name.string());221 paramValues.append(it->value().string());222 }223 }224 }225 226 mapDataParamToSrc(¶mNames, ¶mValues);227 228 // If we still don't have a type, try to map from a specific CLASSID to a type.229 if (serviceType.isEmpty())230 serviceType = serviceTypeForClassId(o->classId());231 232 if (!isURLAllowed(document(), url))233 return;234 235 // Find out if we support fallback content.236 m_hasFallbackContent = false;237 for (Node *child = o->firstChild(); child && !m_hasFallbackContent; child = child->nextSibling()) {238 if ((!child->isTextNode() && !child->hasTagName(embedTag) && !child->hasTagName(paramTag)) || // Discount <embed> and <param>239 (child->isTextNode() && !static_cast<Text*>(child)->containsOnlyWhitespace()))240 m_hasFallbackContent = true;241 }242 243 if (onlyCreateNonNetscapePlugins) {244 KURL completedURL;245 if (!url.isEmpty())246 completedURL = frame->loader()->completeURL(url);247 248 if (frame->loader()->client()->objectContentType(completedURL, serviceType) == ObjectContentNetscapePlugin)249 return;250 }251 252 bool success = o->dispatchBeforeLoadEvent(url) &&253 frame->loader()->requestObject(this, url, o->getAttribute(nameAttr), serviceType, paramNames, paramValues);254 if (!success && m_hasFallbackContent)255 o->renderFallbackContent();256 } else if (node()->hasTagName(embedTag)) {257 HTMLEmbedElement *o = static_cast<HTMLEmbedElement*>(node());258 o->setNeedWidgetUpdate(false);259 url = o->url();260 serviceType = o->serviceType();261 262 if (url.isEmpty() && serviceType.isEmpty())263 return;264 if (!isURLAllowed(document(), url))265 return;266 267 // add all attributes set on the embed object268 NamedNodeMap* a = o->attributes();269 if (a) {270 for (unsigned i = 0; i < a->length(); ++i) {271 Attribute* it = a->attributeItem(i);272 paramNames.append(it->name().localName().string());273 paramValues.append(it->value().string());274 }275 }276 277 if (onlyCreateNonNetscapePlugins) {278 KURL completedURL;279 if (!url.isEmpty())280 completedURL = frame->loader()->completeURL(url);281 282 if (frame->loader()->client()->objectContentType(completedURL, serviceType) == ObjectContentNetscapePlugin)283 return;284 285 }286 287 if (o->dispatchBeforeLoadEvent(url))288 frame->loader()->requestObject(this, url, o->getAttribute(nameAttr), serviceType, paramNames, paramValues);289 }290 #if ENABLE(PLUGIN_PROXY_FOR_VIDEO)291 else if (node()->hasTagName(videoTag) || node()->hasTagName(audioTag)) {292 HTMLMediaElement* o = static_cast<HTMLMediaElement*>(node());293 294 o->setNeedWidgetUpdate(false);295 if (node()->hasTagName(videoTag)) {296 HTMLVideoElement* vid = static_cast<HTMLVideoElement*>(node());297 String poster = vid->poster();298 if (!poster.isEmpty()) {299 paramNames.append("_media_element_poster_");300 paramValues.append(poster);301 }302 }303 304 url = o->initialURL();305 if (!url.isEmpty()) {306 paramNames.append("_media_element_src_");307 paramValues.append(url);308 }309 310 serviceType = "application/x-media-element-proxy-plugin";311 312 if (o->dispatchBeforeLoadEvent(url))313 frame->loader()->requestObject(this, url, nullAtom, serviceType, paramNames, paramValues);314 }315 #endif316 51 } 317 52 … … 327 62 m_overflow.clear(); 328 63 addShadowOverflow(); 329 330 if (!widget() && frameView())331 frameView()->addWidgetToUpdate(this);332 64 333 65 setNeedsLayout(false); -
trunk/WebCore/rendering/RenderPartObject.h
r46815 r52947 28 28 namespace WebCore { 29 29 30 // Renderer for iframes. Is subclassed in RenderEmbeddedObject for object and embed. 30 31 class RenderPartObject : public RenderPart { 31 32 public: 32 33 RenderPartObject(Element*); 33 virtual ~RenderPartObject();34 35 void updateWidget(bool onlyCreateNonNetscapePlugins);36 34 37 35 private: -
trunk/WebKitTools/ChangeLog
r52939 r52947 1 2010-01-07 Simon Fraser <simon.fraser@apple.com> 2 3 Reviewed by Darin Adler. 4 5 Add proposed rename of HTMLPlugInImageElement to HTMLEmbeddedObjectElement. 6 7 * Scripts/do-webcore-rename: 8 1 9 2010-01-07 Kim Grönholm <kim.gronholm@nomovok.com> 2 10 -
trunk/WebKitTools/Scripts/do-webcore-rename
r52457 r52947 74 74 75 75 my %renamesContemplatedForTheFuture = ( 76 "HTMLPlugInImageElement" => "HTMLEmbeddedObjectElement", 77 76 78 "DOMObject" => "JSDOMObject", 77 79
Note: See TracChangeset
for help on using the changeset viewer.