Allow PaintInfo to carry all PaintBehavior flags
authorsimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2013 20:00:52 +0000 (20:00 +0000)
committersimon.fraser@apple.com <simon.fraser@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Jan 2013 20:00:52 +0000 (20:00 +0000)
commitec3faed8503149d14cd5112b795038f8be34fe0d
tree2ead6444b3ea6cbc899a5022eb6ead64b3bf46f1
parentfa95651c8da325004d2139cc7275780cb258865d
Allow PaintInfo to carry all PaintBehavior flags
https://bugs.webkit.org/show_bug.cgi?id=106980

Reviewed by Sam Weinig.

PaintInfo has a single boolean for forceBlackText, but I'll be adding additional
paint behaviors that I'd like to access from PaintInfo, so it makes sense for
PaintInfo to just include the set of PaintBehavior flags.

Also add default values in the constructor arguments for rarely used parameters.

No behavior change, no tests.

* rendering/EllipsisBox.cpp:
(WebCore::EllipsisBox::paint): Use the forceBlackText() function.
* rendering/InlineTextBox.cpp:
(WebCore::InlineTextBox::paint): Call forceBlackText().
* rendering/PaintInfo.h:
(WebCore::PaintInfo::PaintInfo): Pass PaintBehavior rather than a forceBlackText boolean.
(WebCore::PaintInfo::forceBlackText): Return true if the behavior flags contain PaintBehaviorForceBlackText.
* rendering/RenderBoxModelObject.cpp:
(WebCore::RenderBoxModelObject::paintFillLayerExtended): Pass PaintBehaviorForceBlackText instead of 'true'
when painting for background-clip: text.
* rendering/RenderLayer.cpp:
(WebCore::RenderLayer::paintLayerContents): Pass PaintBehaviorNormal where we used to pass 'false',
and omit default 0 parameters.
* rendering/svg/SVGRenderingContext.cpp:
(WebCore::SVGRenderingContext::renderSubtreeToImageBuffer): PaintBehaviorNormal and remove default params.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/rendering/EllipsisBox.cpp
Source/WebCore/rendering/InlineTextBox.cpp
Source/WebCore/rendering/PaintInfo.h
Source/WebCore/rendering/RenderBoxModelObject.cpp
Source/WebCore/rendering/RenderLayer.cpp
Source/WebCore/rendering/svg/SVGRenderingContext.cpp