Commit a78283e7 authored by mitz@apple.com's avatar mitz@apple.com

<rdar://problem/7577604> Drag and Drop: background elements are bleeding through

https://bugs.webkit.org/show_bug.cgi?id=34546

Reviewed by Simon Fraser.

* manual-tests/drag-image-table-part-decorations.html: Added.
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintBoxDecorations): Bail out if this object shouldn’t
paint within the current painting root.
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintBoxDecorations): Ditto.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBackgroundsBehindCell): Ditto.
(WebCore::RenderTableCell::paintBoxDecorations): Ditto.



git-svn-id: svn://svn.chromium.org/blink/trunk@54311 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5ec81a74
2010-02-03 Dan Bernstein <mitz@apple.com>
Reviewed by Simon Fraser.
<rdar://problem/7577604> Drag and Drop: background elements are bleeding through
https://bugs.webkit.org/show_bug.cgi?id=34546
* manual-tests/drag-image-table-part-decorations.html: Added.
* rendering/RenderFieldset.cpp:
(WebCore::RenderFieldset::paintBoxDecorations): Bail out if this object shouldn’t
paint within the current painting root.
* rendering/RenderTable.cpp:
(WebCore::RenderTable::paintBoxDecorations): Ditto.
* rendering/RenderTableCell.cpp:
(WebCore::RenderTableCell::paintBackgroundsBehindCell): Ditto.
(WebCore::RenderTableCell::paintBoxDecorations): Ditto.
2010-02-03 Nate Chapin <japhet@chromium.org>
Unreviewed, Chromium mac build fix.
......
<!DOCTYPE HTML>
<p>
When dragging each of the black squares below, the drag image should include
only the hollow black square, and no blue background.
</p>
<div style="background-color: blue; display: table; height: 100px; width: 100px;"></div>
<div style="width: 94px; height: 94px; border: solid; -webkit-user-drag: element; margin-top: -50px; margin-bottom: 10px;"></div>
<div style="background-color: blue; display: table-row; height: 100px;"><div style="width: 100px"></div></div>
<div style="width: 94px; height: 94px; border: solid; -webkit-user-drag: element; margin-top: -50px; margin-bottom: 10px;"></div>
<div style="background-color: blue; display: table-cell; height: 100px; width: 100px;"></div>
<div style="width: 94px; height: 94px; border: solid; -webkit-user-drag: element; margin-top: -50px; margin-bottom: 10px;"></div>
<fieldset style="background-color: blue; border: none; height: 100px; width: 100px;"><legend></legend></fieldset>
<div style="width: 94px; height: 94px; border: solid; -webkit-user-drag: element; margin-top: -50px; "></div>
......@@ -119,6 +119,9 @@ RenderBox* RenderFieldset::findLegend() const
void RenderFieldset::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
{
if (!shouldPaintWithinRoot(paintInfo))
return;
int w = width();
int h = height();
RenderBox* legend = findLegend();
......
......@@ -485,6 +485,9 @@ void RenderTable::paintObject(PaintInfo& paintInfo, int tx, int ty)
void RenderTable::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
{
if (!shouldPaintWithinRoot(paintInfo))
return;
int w = width();
int h = height();
......
......@@ -787,6 +787,9 @@ void RenderTableCell::paintCollapsedBorder(GraphicsContext* graphicsContext, int
void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, int tx, int ty, RenderObject* backgroundObject)
{
if (!shouldPaintWithinRoot(paintInfo))
return;
if (!backgroundObject)
return;
......@@ -826,6 +829,9 @@ void RenderTableCell::paintBackgroundsBehindCell(PaintInfo& paintInfo, int tx, i
void RenderTableCell::paintBoxDecorations(PaintInfo& paintInfo, int tx, int ty)
{
if (!shouldPaintWithinRoot(paintInfo))
return;
RenderTable* tableElt = table();
if (!tableElt->collapseBorders() && style()->emptyCells() == HIDE && !firstChild())
return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment