Changeset 69922 in webkit


Ignore:
Timestamp:
Oct 17, 2010 3:53:28 AM (14 years ago)
Author:
rwlbuis@webkit.org
Message:

2010-10-17 Rob Buis <rwlbuis@gmail.com>

Reviewed by Dirk Schulze.

Text under nested link dropped
https://bugs.webkit.org/show_bug.cgi?id=46460

Allow links inside of tspan and textPath elements.

  • svg/SVGTSpanElement.cpp: (WebCore::SVGTSpanElement::childShouldCreateRenderer):
  • svg/SVGTextPathElement.cpp: (WebCore::SVGTextPathElement::childShouldCreateRenderer):
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r69919 r69922  
     12010-10-17  Rob Buis  <rwlbuis@gmail.com>
     2
     3        Reviewed by Dirk Schulze.
     4
     5        Text under nested link dropped
     6        https://bugs.webkit.org/show_bug.cgi?id=46460
     7
     8        Adjust test to also check that links inside a tspan or
     9        textPath work.
     10
     11        * platform/mac-leopard/svg/custom/text-linking-expected.checksum:
     12        * platform/mac-leopard/svg/custom/text-linking-expected.png:
     13        * platform/mac/svg/custom/text-linking-expected.checksum:
     14        * platform/mac/svg/custom/text-linking-expected.png:
     15        * platform/mac/svg/custom/text-linking-expected.txt:
     16        * svg/custom/text-linking.svg:
     17
    1182010-10-14  Antonio Gomes  <agomes@rim.com>
    219
  • trunk/LayoutTests/platform/mac-leopard/svg/custom/text-linking-expected.checksum

    r69209 r69922  
    1 86085bdff3814d28f70fe45e4b8f4263
     1ac0742bf900cf26d33b69078c2f2e25c
  • trunk/LayoutTests/platform/mac/svg/custom/text-linking-expected.checksum

    r69209 r69922  
    1 4fad709f74a4510163796360884babc7
     1ac0742bf900cf26d33b69078c2f2e25c
  • trunk/LayoutTests/platform/mac/svg/custom/text-linking-expected.txt

    r69386 r69922  
    22  RenderView at (0,0) size 800x600
    33layer at (0,0) size 800x600
    4   RenderSVGRoot {svg} at (97,36) size 235x168
     4  RenderSVGRoot {svg} at (97,36) size 235x268
    55    RenderSVGHiddenContainer {defs} at (0,0) size 0x0
    66      RenderSVGText {text} at (0,-14) size 163x18 contains 1 chunk(s)
     
    88          chunk 1 text run 1 at (0.00,0.00) startOffset 0 endOffset 25 width 163.00: "Referenced character data"
    99      RenderSVGPath {path} at (100,140) size 100x10 [fill={[type=SOLID] [color=#000000]}] [data="M 100 150 L 150 140 L 200 150"]
     10      RenderSVGPath {path} at (100,240) size 200x10 [fill={[type=SOLID] [color=#000000]}] [data="M 100 250 L 150 240 L 200 250 L 250 240 L 300 250"]
    1011    RenderSVGText {text} at (100,36) size 77x18 contains 1 chunk(s)
    1112      RenderSVGInline {a} at (0,0) size 77x18
     
    4950    RenderSVGText {text}
    5051      RenderSVGInline {a} at (0,0) size 0x0
     52    RenderSVGText {text} at (100,286) size 130x18 contains 1 chunk(s)
     53      RenderSVGTSpan {tspan} at (0,0) size 130x18
     54        RenderSVGInline {a} at (0,0) size 130x18
     55          RenderSVGTSpan {tspan} at (0,0) size 130x18
     56            RenderSVGInlineText {#text} at (0,0) size 130x18
     57              chunk 1 text run 1 at (100.00,300.00) startOffset 0 endOffset 22 width 130.00: "tspan in link in tspan"
     58    RenderSVGText {text} at (97,226) size 169x29 contains 1 chunk(s)
     59      RenderSVGTextPath {textPath} at (0,0) size 169x29
     60        RenderSVGInline {a} at (0,0) size 169x29
     61          RenderSVGTextPath {textPath} at (0,0) size 169x29
     62            RenderSVGInlineText {#text} at (0,0) size 169x29
     63              chunk 1 text run 1 at (101.96,249.61) startOffset 0 endOffset 1 width 4.00: "t"
     64              chunk 1 text run 2 at (107.35,248.53) startOffset 1 endOffset 2 width 7.00: "e"
     65              chunk 1 text run 3 at (114.71,247.06) startOffset 2 endOffset 3 width 8.00: "x"
     66              chunk 1 text run 4 at (120.59,245.88) startOffset 3 endOffset 4 width 4.00: "t"
     67              chunk 1 text run 5 at (126.97,244.61) startOffset 4 endOffset 5 width 9.00: "P"
     68              chunk 1 text run 6 at (134.81,243.04) startOffset 5 endOffset 6 width 7.00: "a"
     69              chunk 1 text run 7 at (140.20,241.96) startOffset 6 endOffset 7 width 4.00: "t"
     70              chunk 1 text run 8 at (146.09,240.78) startOffset 7 endOffset 8 width 8.00: "h"
     71              chunk 1 text run 9 at (151.97,240.39) startOffset 8 endOffset 9 width 4.00: " "
     72              chunk 1 text run 10 at (155.89,241.18) startOffset 9 endOffset 10 width 4.00: "i"
     73              chunk 1 text run 11 at (161.78,242.36) startOffset 10 endOffset 11 width 8.00: "n"
     74              chunk 1 text run 12 at (167.66,243.53) startOffset 11 endOffset 12 width 4.00: " "
     75              chunk 1 text run 13 at (171.58,244.32) startOffset 12 endOffset 13 width 4.00: "l"
     76              chunk 1 text run 14 at (175.50,245.10) startOffset 13 endOffset 14 width 4.00: "i"
     77              chunk 1 text run 15 at (181.39,246.28) startOffset 14 endOffset 15 width 8.00: "n"
     78              chunk 1 text run 16 at (189.23,247.85) startOffset 15 endOffset 16 width 8.00: "k"
     79              chunk 1 text run 17 at (195.12,249.02) startOffset 16 endOffset 17 width 4.00: " "
     80              chunk 1 text run 18 at (199.04,249.81) startOffset 17 endOffset 18 width 4.00: "i"
     81              chunk 1 text run 19 at (204.92,249.02) startOffset 18 endOffset 19 width 8.00: "n"
     82              chunk 1 text run 20 at (210.81,247.84) startOffset 19 endOffset 20 width 4.00: " "
     83              chunk 1 text run 21 at (214.73,247.05) startOffset 20 endOffset 21 width 4.00: "t"
     84              chunk 1 text run 22 at (220.12,245.98) startOffset 21 endOffset 22 width 7.00: "e"
     85              chunk 1 text run 23 at (227.48,244.50) startOffset 22 endOffset 23 width 8.00: "x"
     86              chunk 1 text run 24 at (233.36,243.33) startOffset 23 endOffset 24 width 4.00: "t"
     87              chunk 1 text run 25 at (239.73,242.05) startOffset 24 endOffset 25 width 9.00: "P"
     88              chunk 1 text run 26 at (247.58,240.48) startOffset 25 endOffset 26 width 7.00: "a"
     89              chunk 1 text run 27 at (252.97,240.59) startOffset 26 endOffset 27 width 4.00: "t"
     90              chunk 1 text run 28 at (258.85,241.77) startOffset 27 endOffset 28 width 8.00: "h"
  • trunk/LayoutTests/svg/custom/text-linking.svg

    r31859 r69922  
    99    </text>
    1010    <path id="path1" d="M 100 150 L 150 140 L 200 150"/>
     11    <path id="path2" d="M 100 250 L 150 240 L 200 250 L 250 240 L 300 250"/>
    1112    <font id="Font1" horiz-adv-x="5">
    1213      <font-face font-family="HappySad" font-weight="bold" font-style="normal" units-per-em="8" cap-height="8" x-height="4" ascent="8" descent="2" alphabetic="0" mathematical="4" ideographic="-2" hanging="8"/>
     
    2324    <text x="100" y="200"><a xlink:href="http://www.webkit.org"><altGlyph xlink:href="#Asmile">A</altGlyph>ltGlyph content</a></text>
    2425    <text x="100" y="250"><a xlink:href="http://www.webkit.org"><a>This should not be rendered</a></a></text>
     26    <text x="100" y="300"><tspan><a xlink:href="http://www.webkit.org"><tspan>tspan in link in tspan</tspan></a></tspan></text>
     27    <text><textPath><a xlink:href="http://www.webkit.org"><textPath xlink:href="#path2">textPath in link in textPath</textPath></a></textPath></text>
    2528</svg>
    2629
  • trunk/WebCore/ChangeLog

    r69917 r69922  
     12010-10-17  Rob Buis  <rwlbuis@gmail.com>
     2
     3        Reviewed by Dirk Schulze.
     4
     5        Text under nested link dropped
     6        https://bugs.webkit.org/show_bug.cgi?id=46460
     7
     8        Allow links inside of tspan and textPath elements.
     9
     10        * svg/SVGTSpanElement.cpp:
     11        (WebCore::SVGTSpanElement::childShouldCreateRenderer):
     12        * svg/SVGTextPathElement.cpp:
     13        (WebCore::SVGTextPathElement::childShouldCreateRenderer):
     14
    1152010-10-16  Kwang Yul Seo  <skyul@company100.net>
    216
  • trunk/WebCore/svg/SVGTSpanElement.cpp

    r66498 r69922  
    11/*
    22 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org>
    3  * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
     3 * Copyright (C) 2004, 2005, 2006, 2010 Rob Buis <buis@kde.org>
    44 *
    55 * This library is free software; you can redistribute it and/or
     
    4646        || child->hasTagName(SVGNames::altGlyphTag)
    4747#endif
    48         || child->hasTagName(SVGNames::tspanTag) || child->hasTagName(SVGNames::trefTag) || child->hasTagName(SVGNames::textPathTag))
     48        || child->hasTagName(SVGNames::tspanTag)
     49        || child->hasTagName(SVGNames::trefTag)
     50        || child->hasTagName(SVGNames::aTag)
     51        || child->hasTagName(SVGNames::textPathTag))
    4952        return true;
    5053
  • trunk/WebCore/svg/SVGTextPathElement.cpp

    r66498 r69922  
    11/*
    22 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org>
     3 * Copyright (C) 2010 Rob Buis <rwlbuis@gmail.com>
    34 *
    45 * This library is free software; you can redistribute it and/or
     
    120121        || child->hasTagName(SVGNames::altGlyphTag)
    121122#endif
    122         || child->hasTagName(SVGNames::trefTag) || child->hasTagName(SVGNames::tspanTag) || child->hasTagName(SVGNames::textPathTag))
     123        || child->hasTagName(SVGNames::trefTag)
     124        || child->hasTagName(SVGNames::tspanTag)
     125        || child->hasTagName(SVGNames::aTag)
     126        || child->hasTagName(SVGNames::textPathTag))
    123127        return true;
    124128
Note: See TracChangeset for help on using the changeset viewer.