Skip to content
  • simon.fraser@apple.com's avatar
    Allow PaintInfo to carry all PaintBehavior flags · 2bedf6f3
    simon.fraser@apple.com authored
    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: http://svn.webkit.org/repository/webkit/trunk@139908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    2bedf6f3