Changeset 106510 in webkit


Ignore:
Timestamp:
Feb 1, 2012 3:59:59 PM (12 years ago)
Author:
commit-queue@webkit.org
Message:

Backgrounds in HTML inside foreignObject don't draw
https://bugs.webkit.org/show_bug.cgi?id=23111

Patch by Florin Malita <fmalita@google.com> on 2012-02-01
Reviewed by Eric Seidel.

Source/WebCore:

Test: svg/foreignObject/body-background.svg

  • rendering/RenderBox.cpp:

(WebCore::RenderBox::paintBackground):
Tweak the <body> background inhibiting logic to allow drawing when the element is embedded in FOs.

LayoutTests:

  • svg/foreignObject/body-background-expected.png: Added.
  • svg/foreignObject/body-background-expected.txt: Added.
  • svg/foreignObject/body-background.svg: Added.
Location:
trunk
Files:
3 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r106504 r106510  
     12012-02-01  Florin Malita  <fmalita@google.com>
     2
     3        Backgrounds in HTML inside foreignObject don't draw
     4        https://bugs.webkit.org/show_bug.cgi?id=23111
     5
     6        Reviewed by Eric Seidel.
     7
     8        * svg/foreignObject/body-background-expected.png: Added.
     9        * svg/foreignObject/body-background-expected.txt: Added.
     10        * svg/foreignObject/body-background.svg: Added.
     11
    1122012-02-01  Oliver Hunt  <oliver@apple.com>
    213
  • trunk/Source/WebCore/ChangeLog

    r106506 r106510  
     12012-02-01  Florin Malita  <fmalita@google.com>
     2
     3        Backgrounds in HTML inside foreignObject don't draw
     4        https://bugs.webkit.org/show_bug.cgi?id=23111
     5
     6        Reviewed by Eric Seidel.
     7
     8        Test: svg/foreignObject/body-background.svg
     9
     10        * rendering/RenderBox.cpp:
     11        (WebCore::RenderBox::paintBackground):
     12        Tweak the <body> background inhibiting logic to allow drawing when the element is embedded in FOs.
     13
     14
    1152012-02-01  Gustavo Lima Chaves  <glima@profusion.mobi>
    216
  • trunk/Source/WebCore/rendering/RenderBox.cpp

    r106146 r106510  
    948948    if (isRoot())
    949949        paintRootBoxFillLayers(paintInfo);
    950     else if (!isBody() || (document()->documentElement()->renderer() && document()->documentElement()->renderer()->hasBackground())) {
    951         // The <body> only paints its background if the root element has defined a background
    952         // independent of the body.
     950    else if (!isBody()
     951            || (document()->documentElement()->renderer() && document()->documentElement()->renderer()->hasBackground())
     952            || (document()->documentElement()->renderer() != parent())) {
     953        // The <body> only paints its background if the root element has defined a background independent of the body,
     954        // or if the <body>'s parent is not the document element's renderer (e.g. inside SVG foreignObject).
    953955        if (!backgroundIsObscured())
    954956            paintFillLayers(paintInfo, style()->visitedDependentColor(CSSPropertyBackgroundColor), style()->backgroundLayers(), paintRect, bleedAvoidance);
Note: See TracChangeset for help on using the changeset viewer.