<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[193417] branches/safari-601-branch/Source/WebCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/193417">193417</a></dd>
<dt>Author</dt> <dd>matthew_hanson@apple.com</dd>
<dt>Date</dt> <dd>2015-12-04 09:10:22 -0800 (Fri, 04 Dec 2015)</dd>
</dl>
<h3>Log Message</h3>
<pre>Merge <a href="http://trac.webkit.org/projects/webkit/changeset/189427">r189427</a>. rdar://problem/23732393</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#branchessafari601branchSourceWebCoreChangeLog">branches/safari-601-branch/Source/WebCore/ChangeLog</a></li>
<li><a href="#branchessafari601branchSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp">branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp</a></li>
<li><a href="#branchessafari601branchSourceWebCorehtmlcanvasCanvasRenderingContext2Dh">branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="branchessafari601branchSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/ChangeLog (193416 => 193417)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-04 17:10:19 UTC (rev 193416)
+++ branches/safari-601-branch/Source/WebCore/ChangeLog        2015-12-04 17:10:22 UTC (rev 193417)
</span><span class="lines">@@ -1,5 +1,90 @@
</span><span class="cx"> 2015-12-03 Matthew Hanson <matthew_hanson@apple.com>
</span><span class="cx">
</span><ins>+ Merge r189427. rdar://problem/23732393
+
+ 2015-09-04 Myles C. Maxfield <mmaxfield@apple.com>
+
+ Rename members of CanvasRenderingContext2D::State
+ https://bugs.webkit.org/show_bug.cgi?id=148889
+
+ Reviewed by Tim Horton.
+
+ CanvasRenderingContext2D::State is a struct, so its members should not start with m_.
+
+ No new tests because there is no behavior change.
+
+ * html/canvas/CanvasRenderingContext2D.cpp:
+ (WebCore::CanvasRenderingContext2D::State::State):
+ (WebCore::CanvasRenderingContext2D::State::operator=):
+ (WebCore::CanvasRenderingContext2D::restore):
+ (WebCore::CanvasRenderingContext2D::setStrokeStyle):
+ (WebCore::CanvasRenderingContext2D::setFillStyle):
+ (WebCore::CanvasRenderingContext2D::lineWidth):
+ (WebCore::CanvasRenderingContext2D::setLineWidth):
+ (WebCore::CanvasRenderingContext2D::lineCap):
+ (WebCore::CanvasRenderingContext2D::setLineCap):
+ (WebCore::CanvasRenderingContext2D::lineJoin):
+ (WebCore::CanvasRenderingContext2D::setLineJoin):
+ (WebCore::CanvasRenderingContext2D::miterLimit):
+ (WebCore::CanvasRenderingContext2D::setMiterLimit):
+ (WebCore::CanvasRenderingContext2D::shadowOffsetX):
+ (WebCore::CanvasRenderingContext2D::setShadowOffsetX):
+ (WebCore::CanvasRenderingContext2D::shadowOffsetY):
+ (WebCore::CanvasRenderingContext2D::setShadowOffsetY):
+ (WebCore::CanvasRenderingContext2D::shadowBlur):
+ (WebCore::CanvasRenderingContext2D::setShadowBlur):
+ (WebCore::CanvasRenderingContext2D::shadowColor):
+ (WebCore::CanvasRenderingContext2D::setShadowColor):
+ (WebCore::CanvasRenderingContext2D::getLineDash):
+ (WebCore::CanvasRenderingContext2D::setLineDash):
+ (WebCore::CanvasRenderingContext2D::setWebkitLineDash):
+ (WebCore::CanvasRenderingContext2D::lineDashOffset):
+ (WebCore::CanvasRenderingContext2D::setLineDashOffset):
+ (WebCore::CanvasRenderingContext2D::applyLineDash):
+ (WebCore::CanvasRenderingContext2D::globalAlpha):
+ (WebCore::CanvasRenderingContext2D::setGlobalAlpha):
+ (WebCore::CanvasRenderingContext2D::globalCompositeOperation):
+ (WebCore::CanvasRenderingContext2D::setGlobalCompositeOperation):
+ (WebCore::CanvasRenderingContext2D::scale):
+ (WebCore::CanvasRenderingContext2D::rotate):
+ (WebCore::CanvasRenderingContext2D::translate):
+ (WebCore::CanvasRenderingContext2D::transform):
+ (WebCore::CanvasRenderingContext2D::setTransform):
+ (WebCore::CanvasRenderingContext2D::setStrokeColor):
+ (WebCore::CanvasRenderingContext2D::setFillColor):
+ (WebCore::CanvasRenderingContext2D::fillInternal):
+ (WebCore::CanvasRenderingContext2D::strokeInternal):
+ (WebCore::CanvasRenderingContext2D::clipInternal):
+ (WebCore::CanvasRenderingContext2D::isPointInPathInternal):
+ (WebCore::CanvasRenderingContext2D::isPointInStrokeInternal):
+ (WebCore::CanvasRenderingContext2D::clearRect):
+ (WebCore::CanvasRenderingContext2D::fillRect):
+ (WebCore::CanvasRenderingContext2D::strokeRect):
+ (WebCore::CanvasRenderingContext2D::setShadow):
+ (WebCore::CanvasRenderingContext2D::applyShadow):
+ (WebCore::CanvasRenderingContext2D::shouldDrawShadows):
+ (WebCore::CanvasRenderingContext2D::drawImage):
+ (WebCore::CanvasRenderingContext2D::transformAreaToDevice):
+ (WebCore::CanvasRenderingContext2D::rectContainsCanvas):
+ (WebCore::CanvasRenderingContext2D::compositeBuffer):
+ (WebCore::CanvasRenderingContext2D::didDraw):
+ (WebCore::CanvasRenderingContext2D::drawFocusIfNeededInternal):
+ (WebCore::CanvasRenderingContext2D::font):
+ (WebCore::CanvasRenderingContext2D::setFont):
+ (WebCore::CanvasRenderingContext2D::textAlign):
+ (WebCore::CanvasRenderingContext2D::setTextAlign):
+ (WebCore::CanvasRenderingContext2D::textBaseline):
+ (WebCore::CanvasRenderingContext2D::setTextBaseline):
+ (WebCore::CanvasRenderingContext2D::direction):
+ (WebCore::CanvasRenderingContext2D::setDirection):
+ (WebCore::CanvasRenderingContext2D::drawTextInternal):
+ (WebCore::CanvasRenderingContext2D::inflateStrokeRect):
+ (WebCore::CanvasRenderingContext2D::imageSmoothingEnabled):
+ (WebCore::CanvasRenderingContext2D::setImageSmoothingEnabled):
+ * html/canvas/CanvasRenderingContext2D.h:
+
+2015-12-03 Matthew Hanson <matthew_hanson@apple.com>
+
</ins><span class="cx"> Merge r188194. rdar://problem/23732393
</span><span class="cx">
</span><span class="cx"> 2015-08-08 Dean Jackson <dino@apple.com>
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorehtmlcanvasCanvasRenderingContext2Dcpp"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp (193416 => 193417)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2015-12-04 17:10:19 UTC (rev 193416)
+++ branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.cpp        2015-12-04 17:10:22 UTC (rev 193417)
</span><span class="lines">@@ -159,51 +159,51 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CanvasRenderingContext2D::State::State()
</span><del>- : m_strokeStyle(Color::black)
- , m_fillStyle(Color::black)
- , m_lineWidth(1)
- , m_lineCap(ButtCap)
- , m_lineJoin(MiterJoin)
- , m_miterLimit(10)
- , m_shadowBlur(0)
- , m_shadowColor(Color::transparent)
- , m_globalAlpha(1)
- , m_globalComposite(CompositeSourceOver)
- , m_globalBlend(BlendModeNormal)
- , m_hasInvertibleTransform(true)
- , m_lineDashOffset(0)
- , m_imageSmoothingEnabled(true)
- , m_textAlign(StartTextAlign)
- , m_textBaseline(AlphabeticTextBaseline)
- , m_direction(Direction::Inherit)
- , m_unparsedFont(defaultFont)
</del><ins>+ : strokeStyle(Color::black)
+ , fillStyle(Color::black)
+ , lineWidth(1)
+ , lineCap(ButtCap)
+ , lineJoin(MiterJoin)
+ , miterLimit(10)
+ , shadowBlur(0)
+ , shadowColor(Color::transparent)
+ , globalAlpha(1)
+ , globalComposite(CompositeSourceOver)
+ , globalBlend(BlendModeNormal)
+ , hasInvertibleTransform(true)
+ , lineDashOffset(0)
+ , imageSmoothingEnabled(true)
+ , textAlign(StartTextAlign)
+ , textBaseline(AlphabeticTextBaseline)
+ , direction(Direction::Inherit)
+ , unparsedFont(defaultFont)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> CanvasRenderingContext2D::State::State(const State& other)
</span><del>- : m_unparsedStrokeColor(other.m_unparsedStrokeColor)
- , m_unparsedFillColor(other.m_unparsedFillColor)
- , m_strokeStyle(other.m_strokeStyle)
- , m_fillStyle(other.m_fillStyle)
- , m_lineWidth(other.m_lineWidth)
- , m_lineCap(other.m_lineCap)
- , m_lineJoin(other.m_lineJoin)
- , m_miterLimit(other.m_miterLimit)
- , m_shadowOffset(other.m_shadowOffset)
- , m_shadowBlur(other.m_shadowBlur)
- , m_shadowColor(other.m_shadowColor)
- , m_globalAlpha(other.m_globalAlpha)
- , m_globalComposite(other.m_globalComposite)
- , m_globalBlend(other.m_globalBlend)
- , m_transform(other.m_transform)
- , m_hasInvertibleTransform(other.m_hasInvertibleTransform)
- , m_lineDashOffset(other.m_lineDashOffset)
- , m_imageSmoothingEnabled(other.m_imageSmoothingEnabled)
- , m_textAlign(other.m_textAlign)
- , m_textBaseline(other.m_textBaseline)
- , m_direction(other.m_direction)
- , m_unparsedFont(other.m_unparsedFont)
- , m_font(other.m_font)
</del><ins>+ : unparsedStrokeColor(other.unparsedStrokeColor)
+ , unparsedFillColor(other.unparsedFillColor)
+ , strokeStyle(other.strokeStyle)
+ , fillStyle(other.fillStyle)
+ , lineWidth(other.lineWidth)
+ , lineCap(other.lineCap)
+ , lineJoin(other.lineJoin)
+ , miterLimit(other.miterLimit)
+ , shadowOffset(other.shadowOffset)
+ , shadowBlur(other.shadowBlur)
+ , shadowColor(other.shadowColor)
+ , globalAlpha(other.globalAlpha)
+ , globalComposite(other.globalComposite)
+ , globalBlend(other.globalBlend)
+ , transform(other.transform)
+ , hasInvertibleTransform(other.hasInvertibleTransform)
+ , lineDashOffset(other.lineDashOffset)
+ , imageSmoothingEnabled(other.imageSmoothingEnabled)
+ , textAlign(other.textAlign)
+ , textBaseline(other.textBaseline)
+ , direction(other.direction)
+ , unparsedFont(other.unparsedFont)
+ , font(other.font)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -212,28 +212,28 @@
</span><span class="cx"> if (this == &other)
</span><span class="cx"> return *this;
</span><span class="cx">
</span><del>- m_unparsedStrokeColor = other.m_unparsedStrokeColor;
- m_unparsedFillColor = other.m_unparsedFillColor;
- m_strokeStyle = other.m_strokeStyle;
- m_fillStyle = other.m_fillStyle;
- m_lineWidth = other.m_lineWidth;
- m_lineCap = other.m_lineCap;
- m_lineJoin = other.m_lineJoin;
- m_miterLimit = other.m_miterLimit;
- m_shadowOffset = other.m_shadowOffset;
- m_shadowBlur = other.m_shadowBlur;
- m_shadowColor = other.m_shadowColor;
- m_globalAlpha = other.m_globalAlpha;
- m_globalComposite = other.m_globalComposite;
- m_globalBlend = other.m_globalBlend;
- m_transform = other.m_transform;
- m_hasInvertibleTransform = other.m_hasInvertibleTransform;
- m_imageSmoothingEnabled = other.m_imageSmoothingEnabled;
- m_textAlign = other.m_textAlign;
- m_textBaseline = other.m_textBaseline;
- m_direction = other.m_direction;
- m_unparsedFont = other.m_unparsedFont;
- m_font = other.m_font;
</del><ins>+ unparsedStrokeColor = other.unparsedStrokeColor;
+ unparsedFillColor = other.unparsedFillColor;
+ strokeStyle = other.strokeStyle;
+ fillStyle = other.fillStyle;
+ lineWidth = other.lineWidth;
+ lineCap = other.lineCap;
+ lineJoin = other.lineJoin;
+ miterLimit = other.miterLimit;
+ shadowOffset = other.shadowOffset;
+ shadowBlur = other.shadowBlur;
+ shadowColor = other.shadowColor;
+ globalAlpha = other.globalAlpha;
+ globalComposite = other.globalComposite;
+ globalBlend = other.globalBlend;
+ transform = other.transform;
+ hasInvertibleTransform = other.hasInvertibleTransform;
+ imageSmoothingEnabled = other.imageSmoothingEnabled;
+ textAlign = other.textAlign;
+ textBaseline = other.textBaseline;
+ direction = other.direction;
+ unparsedFont = other.unparsedFont;
+ font = other.font;
</ins><span class="cx">
</span><span class="cx"> return *this;
</span><span class="cx"> }
</span><span class="lines">@@ -336,9 +336,9 @@
</span><span class="cx"> ASSERT(m_stateStack.size() >= 1);
</span><span class="cx"> if (m_stateStack.size() <= 1)
</span><span class="cx"> return;
</span><del>- m_path.transform(state().m_transform);
</del><ins>+ m_path.transform(state().transform);
</ins><span class="cx"> m_stateStack.removeLast();
</span><del>- m_path.transform(state().m_transform.inverse());
</del><ins>+ m_path.transform(state().transform.inverse());
</ins><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><span class="lines">@@ -350,7 +350,7 @@
</span><span class="cx"> if (!style.isValid())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (state().m_strokeStyle.isValid() && state().m_strokeStyle.isEquivalentColor(style))
</del><ins>+ if (state().strokeStyle.isValid() && state().strokeStyle.isEquivalentColor(style))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (style.isCurrentColor()) {
</span><span class="lines">@@ -363,12 +363,12 @@
</span><span class="cx">
</span><span class="cx"> realizeSaves();
</span><span class="cx"> State& state = modifiableState();
</span><del>- state.m_strokeStyle = style;
</del><ins>+ state.strokeStyle = style;
</ins><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- state.m_strokeStyle.applyStrokeColor(c);
- state.m_unparsedStrokeColor = String();
</del><ins>+ state.strokeStyle.applyStrokeColor(c);
+ state.unparsedStrokeColor = String();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setFillStyle(CanvasStyle style)
</span><span class="lines">@@ -376,7 +376,7 @@
</span><span class="cx"> if (!style.isValid())
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (state().m_fillStyle.isValid() && state().m_fillStyle.isEquivalentColor(style))
</del><ins>+ if (state().fillStyle.isValid() && state().fillStyle.isEquivalentColor(style))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (style.isCurrentColor()) {
</span><span class="lines">@@ -389,27 +389,27 @@
</span><span class="cx">
</span><span class="cx"> realizeSaves();
</span><span class="cx"> State& state = modifiableState();
</span><del>- state.m_fillStyle = style;
</del><ins>+ state.fillStyle = style;
</ins><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- state.m_fillStyle.applyFillColor(c);
- state.m_unparsedFillColor = String();
</del><ins>+ state.fillStyle.applyFillColor(c);
+ state.unparsedFillColor = String();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> float CanvasRenderingContext2D::lineWidth() const
</span><span class="cx"> {
</span><del>- return state().m_lineWidth;
</del><ins>+ return state().lineWidth;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setLineWidth(float width)
</span><span class="cx"> {
</span><span class="cx"> if (!(std::isfinite(width) && width > 0))
</span><span class="cx"> return;
</span><del>- if (state().m_lineWidth == width)
</del><ins>+ if (state().lineWidth == width)
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_lineWidth = width;
</del><ins>+ modifiableState().lineWidth = width;
</ins><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><span class="lines">@@ -418,7 +418,7 @@
</span><span class="cx">
</span><span class="cx"> String CanvasRenderingContext2D::lineCap() const
</span><span class="cx"> {
</span><del>- return lineCapName(state().m_lineCap);
</del><ins>+ return lineCapName(state().lineCap);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setLineCap(const String& s)
</span><span class="lines">@@ -426,10 +426,10 @@
</span><span class="cx"> LineCap cap;
</span><span class="cx"> if (!parseLineCap(s, cap))
</span><span class="cx"> return;
</span><del>- if (state().m_lineCap == cap)
</del><ins>+ if (state().lineCap == cap)
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_lineCap = cap;
</del><ins>+ modifiableState().lineCap = cap;
</ins><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><span class="lines">@@ -438,7 +438,7 @@
</span><span class="cx">
</span><span class="cx"> String CanvasRenderingContext2D::lineJoin() const
</span><span class="cx"> {
</span><del>- return lineJoinName(state().m_lineJoin);
</del><ins>+ return lineJoinName(state().lineJoin);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setLineJoin(const String& s)
</span><span class="lines">@@ -446,10 +446,10 @@
</span><span class="cx"> LineJoin join;
</span><span class="cx"> if (!parseLineJoin(s, join))
</span><span class="cx"> return;
</span><del>- if (state().m_lineJoin == join)
</del><ins>+ if (state().lineJoin == join)
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_lineJoin = join;
</del><ins>+ modifiableState().lineJoin = join;
</ins><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><span class="lines">@@ -458,17 +458,17 @@
</span><span class="cx">
</span><span class="cx"> float CanvasRenderingContext2D::miterLimit() const
</span><span class="cx"> {
</span><del>- return state().m_miterLimit;
</del><ins>+ return state().miterLimit;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setMiterLimit(float limit)
</span><span class="cx"> {
</span><span class="cx"> if (!(std::isfinite(limit) && limit > 0))
</span><span class="cx"> return;
</span><del>- if (state().m_miterLimit == limit)
</del><ins>+ if (state().miterLimit == limit)
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_miterLimit = limit;
</del><ins>+ modifiableState().miterLimit = limit;
</ins><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><span class="lines">@@ -477,55 +477,55 @@
</span><span class="cx">
</span><span class="cx"> float CanvasRenderingContext2D::shadowOffsetX() const
</span><span class="cx"> {
</span><del>- return state().m_shadowOffset.width();
</del><ins>+ return state().shadowOffset.width();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setShadowOffsetX(float x)
</span><span class="cx"> {
</span><span class="cx"> if (!std::isfinite(x))
</span><span class="cx"> return;
</span><del>- if (state().m_shadowOffset.width() == x)
</del><ins>+ if (state().shadowOffset.width() == x)
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_shadowOffset.setWidth(x);
</del><ins>+ modifiableState().shadowOffset.setWidth(x);
</ins><span class="cx"> applyShadow();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> float CanvasRenderingContext2D::shadowOffsetY() const
</span><span class="cx"> {
</span><del>- return state().m_shadowOffset.height();
</del><ins>+ return state().shadowOffset.height();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setShadowOffsetY(float y)
</span><span class="cx"> {
</span><span class="cx"> if (!std::isfinite(y))
</span><span class="cx"> return;
</span><del>- if (state().m_shadowOffset.height() == y)
</del><ins>+ if (state().shadowOffset.height() == y)
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_shadowOffset.setHeight(y);
</del><ins>+ modifiableState().shadowOffset.setHeight(y);
</ins><span class="cx"> applyShadow();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> float CanvasRenderingContext2D::shadowBlur() const
</span><span class="cx"> {
</span><del>- return state().m_shadowBlur;
</del><ins>+ return state().shadowBlur;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setShadowBlur(float blur)
</span><span class="cx"> {
</span><span class="cx"> if (!(std::isfinite(blur) && blur >= 0))
</span><span class="cx"> return;
</span><del>- if (state().m_shadowBlur == blur)
</del><ins>+ if (state().shadowBlur == blur)
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_shadowBlur = blur;
</del><ins>+ modifiableState().shadowBlur = blur;
</ins><span class="cx"> applyShadow();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String CanvasRenderingContext2D::shadowColor() const
</span><span class="cx"> {
</span><del>- return Color(state().m_shadowColor).serialized();
</del><ins>+ return Color(state().shadowColor).serialized();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setShadowColor(const String& color)
</span><span class="lines">@@ -533,16 +533,16 @@
</span><span class="cx"> RGBA32 rgba;
</span><span class="cx"> if (!parseColorOrCurrentColor(rgba, color, canvas()))
</span><span class="cx"> return;
</span><del>- if (state().m_shadowColor == rgba)
</del><ins>+ if (state().shadowColor == rgba)
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_shadowColor = rgba;
</del><ins>+ modifiableState().shadowColor = rgba;
</ins><span class="cx"> applyShadow();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> const Vector<float>& CanvasRenderingContext2D::getLineDash() const
</span><span class="cx"> {
</span><del>- return state().m_lineDash;
</del><ins>+ return state().lineDash;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> static bool lineDashSequenceIsValid(const Vector<float>& dash)
</span><span class="lines">@@ -560,11 +560,11 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_lineDash = dash;
</del><ins>+ modifiableState().lineDash = dash;
</ins><span class="cx"> // Spec requires the concatenation of two copies the dash list when the
</span><span class="cx"> // number of elements is odd
</span><span class="cx"> if (dash.size() % 2)
</span><del>- modifiableState().m_lineDash.appendVector(dash);
</del><ins>+ modifiableState().lineDash.appendVector(dash);
</ins><span class="cx">
</span><span class="cx"> applyLineDash();
</span><span class="cx"> }
</span><span class="lines">@@ -575,23 +575,23 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_lineDash = dash;
</del><ins>+ modifiableState().lineDash = dash;
</ins><span class="cx">
</span><span class="cx"> applyLineDash();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> float CanvasRenderingContext2D::lineDashOffset() const
</span><span class="cx"> {
</span><del>- return state().m_lineDashOffset;
</del><ins>+ return state().lineDashOffset;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setLineDashOffset(float offset)
</span><span class="cx"> {
</span><del>- if (!std::isfinite(offset) || state().m_lineDashOffset == offset)
</del><ins>+ if (!std::isfinite(offset) || state().lineDashOffset == offset)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_lineDashOffset = offset;
</del><ins>+ modifiableState().lineDashOffset = offset;
</ins><span class="cx"> applyLineDash();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -610,25 +610,25 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- DashArray convertedLineDash(state().m_lineDash.size());
- for (size_t i = 0; i < state().m_lineDash.size(); ++i)
- convertedLineDash[i] = static_cast<DashArrayElement>(state().m_lineDash[i]);
- c->setLineDash(convertedLineDash, state().m_lineDashOffset);
</del><ins>+ DashArray convertedLineDash(state().lineDash.size());
+ for (size_t i = 0; i < state().lineDash.size(); ++i)
+ convertedLineDash[i] = static_cast<DashArrayElement>(state().lineDash[i]);
+ c->setLineDash(convertedLineDash, state().lineDashOffset);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> float CanvasRenderingContext2D::globalAlpha() const
</span><span class="cx"> {
</span><del>- return state().m_globalAlpha;
</del><ins>+ return state().globalAlpha;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setGlobalAlpha(float alpha)
</span><span class="cx"> {
</span><span class="cx"> if (!(alpha >= 0 && alpha <= 1))
</span><span class="cx"> return;
</span><del>- if (state().m_globalAlpha == alpha)
</del><ins>+ if (state().globalAlpha == alpha)
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_globalAlpha = alpha;
</del><ins>+ modifiableState().globalAlpha = alpha;
</ins><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><span class="lines">@@ -637,7 +637,7 @@
</span><span class="cx">
</span><span class="cx"> String CanvasRenderingContext2D::globalCompositeOperation() const
</span><span class="cx"> {
</span><del>- return compositeOperatorName(state().m_globalComposite, state().m_globalBlend);
</del><ins>+ return compositeOperatorName(state().globalComposite, state().globalBlend);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setGlobalCompositeOperation(const String& operation)
</span><span class="lines">@@ -646,11 +646,11 @@
</span><span class="cx"> BlendMode blendMode = BlendModeNormal;
</span><span class="cx"> if (!parseCompositeAndBlendOperator(operation, op, blendMode))
</span><span class="cx"> return;
</span><del>- if ((state().m_globalComposite == op) && (state().m_globalBlend == blendMode))
</del><ins>+ if ((state().globalComposite == op) && (state().globalBlend == blendMode))
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_globalComposite = op;
- modifiableState().m_globalBlend = blendMode;
</del><ins>+ modifiableState().globalComposite = op;
+ modifiableState().globalBlend = blendMode;
</ins><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><span class="lines">@@ -662,25 +662,25 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (!std::isfinite(sx) | !std::isfinite(sy))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- AffineTransform newTransform = state().m_transform;
</del><ins>+ AffineTransform newTransform = state().transform;
</ins><span class="cx"> newTransform.scaleNonUniform(sx, sy);
</span><del>- if (state().m_transform == newTransform)
</del><ins>+ if (state().transform == newTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> realizeSaves();
</span><span class="cx">
</span><span class="cx"> if (!newTransform.isInvertible()) {
</span><del>- modifiableState().m_hasInvertibleTransform = false;
</del><ins>+ modifiableState().hasInvertibleTransform = false;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- modifiableState().m_transform = newTransform;
</del><ins>+ modifiableState().transform = newTransform;
</ins><span class="cx"> c->scale(FloatSize(sx, sy));
</span><span class="cx"> m_path.transform(AffineTransform().scaleNonUniform(1.0 / sx, 1.0 / sy));
</span><span class="cx"> }
</span><span class="lines">@@ -690,25 +690,25 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (!std::isfinite(angleInRadians))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- AffineTransform newTransform = state().m_transform;
</del><ins>+ AffineTransform newTransform = state().transform;
</ins><span class="cx"> newTransform.rotate(angleInRadians / piDouble * 180.0);
</span><del>- if (state().m_transform == newTransform)
</del><ins>+ if (state().transform == newTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> realizeSaves();
</span><span class="cx">
</span><span class="cx"> if (!newTransform.isInvertible()) {
</span><del>- modifiableState().m_hasInvertibleTransform = false;
</del><ins>+ modifiableState().hasInvertibleTransform = false;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- modifiableState().m_transform = newTransform;
</del><ins>+ modifiableState().transform = newTransform;
</ins><span class="cx"> c->rotate(angleInRadians);
</span><span class="cx"> m_path.transform(AffineTransform().rotate(-angleInRadians / piDouble * 180.0));
</span><span class="cx"> }
</span><span class="lines">@@ -718,25 +718,25 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (!std::isfinite(tx) | !std::isfinite(ty))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- AffineTransform newTransform = state().m_transform;
</del><ins>+ AffineTransform newTransform = state().transform;
</ins><span class="cx"> newTransform.translate(tx, ty);
</span><del>- if (state().m_transform == newTransform)
</del><ins>+ if (state().transform == newTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> realizeSaves();
</span><span class="cx">
</span><span class="cx"> if (!newTransform.isInvertible()) {
</span><del>- modifiableState().m_hasInvertibleTransform = false;
</del><ins>+ modifiableState().hasInvertibleTransform = false;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- modifiableState().m_transform = newTransform;
</del><ins>+ modifiableState().transform = newTransform;
</ins><span class="cx"> c->translate(tx, ty);
</span><span class="cx"> m_path.transform(AffineTransform().translate(-tx, -ty));
</span><span class="cx"> }
</span><span class="lines">@@ -746,25 +746,25 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (!std::isfinite(m11) | !std::isfinite(m21) | !std::isfinite(dx) | !std::isfinite(m12) | !std::isfinite(m22) | !std::isfinite(dy))
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> AffineTransform transform(m11, m12, m21, m22, dx, dy);
</span><del>- AffineTransform newTransform = state().m_transform * transform;
- if (state().m_transform == newTransform)
</del><ins>+ AffineTransform newTransform = state().transform * transform;
+ if (state().transform == newTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> realizeSaves();
</span><span class="cx">
</span><span class="cx"> if (!newTransform.isInvertible()) {
</span><del>- modifiableState().m_hasInvertibleTransform = false;
</del><ins>+ modifiableState().hasInvertibleTransform = false;
</ins><span class="cx"> return;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- modifiableState().m_transform = newTransform;
</del><ins>+ modifiableState().transform = newTransform;
</ins><span class="cx"> c->concatCTM(transform);
</span><span class="cx"> m_path.transform(transform.inverse());
</span><span class="cx"> }
</span><span class="lines">@@ -778,32 +778,32 @@
</span><span class="cx"> if (!std::isfinite(m11) | !std::isfinite(m21) | !std::isfinite(dx) | !std::isfinite(m12) | !std::isfinite(m22) | !std::isfinite(dy))
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- AffineTransform ctm = state().m_transform;
</del><ins>+ AffineTransform ctm = state().transform;
</ins><span class="cx"> if (!ctm.isInvertible())
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> realizeSaves();
</span><span class="cx">
</span><span class="cx"> c->setCTM(canvas()->baseTransform());
</span><del>- modifiableState().m_transform = AffineTransform();
</del><ins>+ modifiableState().transform = AffineTransform();
</ins><span class="cx"> m_path.transform(ctm);
</span><span class="cx">
</span><del>- modifiableState().m_hasInvertibleTransform = true;
</del><ins>+ modifiableState().hasInvertibleTransform = true;
</ins><span class="cx"> transform(m11, m12, m21, m22, dx, dy);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setStrokeColor(const String& color)
</span><span class="cx"> {
</span><del>- if (color == state().m_unparsedStrokeColor)
</del><ins>+ if (color == state().unparsedStrokeColor)
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><span class="cx"> setStrokeStyle(CanvasStyle::createFromString(color, &canvas()->document()));
</span><del>- modifiableState().m_unparsedStrokeColor = color;
</del><ins>+ modifiableState().unparsedStrokeColor = color;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setStrokeColor(float grayLevel)
</span><span class="cx"> {
</span><del>- if (state().m_strokeStyle.isValid() && state().m_strokeStyle.isEquivalentRGBA(grayLevel, grayLevel, grayLevel, 1.0f))
</del><ins>+ if (state().strokeStyle.isValid() && state().strokeStyle.isEquivalentRGBA(grayLevel, grayLevel, grayLevel, 1.0f))
</ins><span class="cx"> return;
</span><span class="cx"> setStrokeStyle(CanvasStyle(grayLevel, 1.0f));
</span><span class="cx"> }
</span><span class="lines">@@ -815,37 +815,37 @@
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setStrokeColor(float grayLevel, float alpha)
</span><span class="cx"> {
</span><del>- if (state().m_strokeStyle.isValid() && state().m_strokeStyle.isEquivalentRGBA(grayLevel, grayLevel, grayLevel, alpha))
</del><ins>+ if (state().strokeStyle.isValid() && state().strokeStyle.isEquivalentRGBA(grayLevel, grayLevel, grayLevel, alpha))
</ins><span class="cx"> return;
</span><span class="cx"> setStrokeStyle(CanvasStyle(grayLevel, alpha));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setStrokeColor(float r, float g, float b, float a)
</span><span class="cx"> {
</span><del>- if (state().m_strokeStyle.isValid() && state().m_strokeStyle.isEquivalentRGBA(r, g, b, a))
</del><ins>+ if (state().strokeStyle.isValid() && state().strokeStyle.isEquivalentRGBA(r, g, b, a))
</ins><span class="cx"> return;
</span><span class="cx"> setStrokeStyle(CanvasStyle(r, g, b, a));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setStrokeColor(float c, float m, float y, float k, float a)
</span><span class="cx"> {
</span><del>- if (state().m_strokeStyle.isValid() && state().m_strokeStyle.isEquivalentCMYKA(c, m, y, k, a))
</del><ins>+ if (state().strokeStyle.isValid() && state().strokeStyle.isEquivalentCMYKA(c, m, y, k, a))
</ins><span class="cx"> return;
</span><span class="cx"> setStrokeStyle(CanvasStyle(c, m, y, k, a));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setFillColor(const String& color)
</span><span class="cx"> {
</span><del>- if (color == state().m_unparsedFillColor)
</del><ins>+ if (color == state().unparsedFillColor)
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><span class="cx"> setFillStyle(CanvasStyle::createFromString(color, &canvas()->document()));
</span><del>- modifiableState().m_unparsedFillColor = color;
</del><ins>+ modifiableState().unparsedFillColor = color;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setFillColor(float grayLevel)
</span><span class="cx"> {
</span><del>- if (state().m_fillStyle.isValid() && state().m_fillStyle.isEquivalentRGBA(grayLevel, grayLevel, grayLevel, 1.0f))
</del><ins>+ if (state().fillStyle.isValid() && state().fillStyle.isEquivalentRGBA(grayLevel, grayLevel, grayLevel, 1.0f))
</ins><span class="cx"> return;
</span><span class="cx"> setFillStyle(CanvasStyle(grayLevel, 1.0f));
</span><span class="cx"> }
</span><span class="lines">@@ -857,21 +857,21 @@
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setFillColor(float grayLevel, float alpha)
</span><span class="cx"> {
</span><del>- if (state().m_fillStyle.isValid() && state().m_fillStyle.isEquivalentRGBA(grayLevel, grayLevel, grayLevel, alpha))
</del><ins>+ if (state().fillStyle.isValid() && state().fillStyle.isEquivalentRGBA(grayLevel, grayLevel, grayLevel, alpha))
</ins><span class="cx"> return;
</span><span class="cx"> setFillStyle(CanvasStyle(grayLevel, alpha));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setFillColor(float r, float g, float b, float a)
</span><span class="cx"> {
</span><del>- if (state().m_fillStyle.isValid() && state().m_fillStyle.isEquivalentRGBA(r, g, b, a))
</del><ins>+ if (state().fillStyle.isValid() && state().fillStyle.isEquivalentRGBA(r, g, b, a))
</ins><span class="cx"> return;
</span><span class="cx"> setFillStyle(CanvasStyle(r, g, b, a));
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setFillColor(float c, float m, float y, float k, float a)
</span><span class="cx"> {
</span><del>- if (state().m_fillStyle.isValid() && state().m_fillStyle.isEquivalentCMYKA(c, m, y, k, a))
</del><ins>+ if (state().fillStyle.isValid() && state().fillStyle.isEquivalentCMYKA(c, m, y, k, a))
</ins><span class="cx"> return;
</span><span class="cx"> setFillStyle(CanvasStyle(c, m, y, k, a));
</span><span class="cx"> }
</span><span class="lines">@@ -977,7 +977,7 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // If gradient size is zero, then paint nothing.
</span><span class="lines">@@ -992,12 +992,12 @@
</span><span class="cx"> return;
</span><span class="cx"> c->setFillRule(newWindRule);
</span><span class="cx">
</span><del>- if (isFullCanvasCompositeMode(state().m_globalComposite)) {
</del><ins>+ if (isFullCanvasCompositeMode(state().globalComposite)) {
</ins><span class="cx"> beginCompositeLayer();
</span><span class="cx"> c->fillPath(path);
</span><span class="cx"> endCompositeLayer();
</span><span class="cx"> didDrawEntireCanvas();
</span><del>- } else if (state().m_globalComposite == CompositeCopy) {
</del><ins>+ } else if (state().globalComposite == CompositeCopy) {
</ins><span class="cx"> clearCanvas();
</span><span class="cx"> c->fillPath(path);
</span><span class="cx"> didDrawEntireCanvas();
</span><span class="lines">@@ -1015,7 +1015,7 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // If gradient size is zero, then paint nothing.
</span><span class="lines">@@ -1024,12 +1024,12 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (!path.isEmpty()) {
</span><del>- if (isFullCanvasCompositeMode(state().m_globalComposite)) {
</del><ins>+ if (isFullCanvasCompositeMode(state().globalComposite)) {
</ins><span class="cx"> beginCompositeLayer();
</span><span class="cx"> c->strokePath(path);
</span><span class="cx"> endCompositeLayer();
</span><span class="cx"> didDrawEntireCanvas();
</span><del>- } else if (state().m_globalComposite == CompositeCopy) {
</del><ins>+ } else if (state().globalComposite == CompositeCopy) {
</ins><span class="cx"> clearCanvas();
</span><span class="cx"> c->strokePath(path);
</span><span class="cx"> didDrawEntireCanvas();
</span><span class="lines">@@ -1047,7 +1047,7 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> WindRule newWindRule = RULE_NONZERO;
</span><span class="lines">@@ -1097,11 +1097,11 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return false;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> FloatPoint point(x, y);
</span><del>- AffineTransform ctm = state().m_transform;
</del><ins>+ AffineTransform ctm = state().transform;
</ins><span class="cx"> FloatPoint transformedPoint = ctm.inverse().mapPoint(point);
</span><span class="cx"> if (!std::isfinite(transformedPoint.x()) || !std::isfinite(transformedPoint.y()))
</span><span class="cx"> return false;
</span><span class="lines">@@ -1118,11 +1118,11 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return false;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return false;
</span><span class="cx">
</span><span class="cx"> FloatPoint point(x, y);
</span><del>- AffineTransform ctm = state().m_transform;
</del><ins>+ AffineTransform ctm = state().transform;
</ins><span class="cx"> FloatPoint transformedPoint = ctm.inverse().mapPoint(point);
</span><span class="cx"> if (!std::isfinite(transformedPoint.x()) || !std::isfinite(transformedPoint.y()))
</span><span class="cx"> return false;
</span><span class="lines">@@ -1138,7 +1138,7 @@
</span><span class="cx"> GraphicsContext* context = drawingContext();
</span><span class="cx"> if (!context)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx"> FloatRect rect(x, y, width, height);
</span><span class="cx">
</span><span class="lines">@@ -1148,14 +1148,14 @@
</span><span class="cx"> saved = true;
</span><span class="cx"> context->setLegacyShadow(FloatSize(), 0, Color::transparent, ColorSpaceDeviceRGB);
</span><span class="cx"> }
</span><del>- if (state().m_globalAlpha != 1) {
</del><ins>+ if (state().globalAlpha != 1) {
</ins><span class="cx"> if (!saved) {
</span><span class="cx"> context->save();
</span><span class="cx"> saved = true;
</span><span class="cx"> }
</span><span class="cx"> context->setAlpha(1);
</span><span class="cx"> }
</span><del>- if (state().m_globalComposite != CompositeSourceOver) {
</del><ins>+ if (state().globalComposite != CompositeSourceOver) {
</ins><span class="cx"> if (!saved) {
</span><span class="cx"> context->save();
</span><span class="cx"> saved = true;
</span><span class="lines">@@ -1176,7 +1176,7 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // from the HTML5 Canvas spec:
</span><span class="lines">@@ -1191,12 +1191,12 @@
</span><span class="cx"> if (rectContainsCanvas(rect)) {
</span><span class="cx"> c->fillRect(rect);
</span><span class="cx"> didDrawEntireCanvas();
</span><del>- } else if (isFullCanvasCompositeMode(state().m_globalComposite)) {
</del><ins>+ } else if (isFullCanvasCompositeMode(state().globalComposite)) {
</ins><span class="cx"> beginCompositeLayer();
</span><span class="cx"> c->fillRect(rect);
</span><span class="cx"> endCompositeLayer();
</span><span class="cx"> didDrawEntireCanvas();
</span><del>- } else if (state().m_globalComposite == CompositeCopy) {
</del><ins>+ } else if (state().globalComposite == CompositeCopy) {
</ins><span class="cx"> clearCanvas();
</span><span class="cx"> c->fillRect(rect);
</span><span class="cx"> didDrawEntireCanvas();
</span><span class="lines">@@ -1214,9 +1214,9 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><del>- if (!(state().m_lineWidth >= 0))
</del><ins>+ if (!(state().lineWidth >= 0))
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // If gradient size is zero, then paint nothing.
</span><span class="lines">@@ -1225,19 +1225,19 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> FloatRect rect(x, y, width, height);
</span><del>- if (isFullCanvasCompositeMode(state().m_globalComposite)) {
</del><ins>+ if (isFullCanvasCompositeMode(state().globalComposite)) {
</ins><span class="cx"> beginCompositeLayer();
</span><del>- c->strokeRect(rect, state().m_lineWidth);
</del><ins>+ c->strokeRect(rect, state().lineWidth);
</ins><span class="cx"> endCompositeLayer();
</span><span class="cx"> didDrawEntireCanvas();
</span><del>- } else if (state().m_globalComposite == CompositeCopy) {
</del><ins>+ } else if (state().globalComposite == CompositeCopy) {
</ins><span class="cx"> clearCanvas();
</span><del>- c->strokeRect(rect, state().m_lineWidth);
</del><ins>+ c->strokeRect(rect, state().lineWidth);
</ins><span class="cx"> didDrawEntireCanvas();
</span><span class="cx"> } else {
</span><span class="cx"> FloatRect boundingRect = rect;
</span><del>- boundingRect.inflate(state().m_lineWidth / 2);
- c->strokeRect(rect, state().m_lineWidth);
</del><ins>+ boundingRect.inflate(state().lineWidth / 2);
+ c->strokeRect(rect, state().lineWidth);
</ins><span class="cx"> didDraw(boundingRect);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1290,13 +1290,13 @@
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setShadow(const FloatSize& offset, float blur, RGBA32 color)
</span><span class="cx"> {
</span><del>- if (state().m_shadowOffset == offset && state().m_shadowBlur == blur && state().m_shadowColor == color)
</del><ins>+ if (state().shadowOffset == offset && state().shadowBlur == blur && state().shadowColor == color)
</ins><span class="cx"> return;
</span><span class="cx"> bool wasDrawingShadows = shouldDrawShadows();
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_shadowOffset = offset;
- modifiableState().m_shadowBlur = blur;
- modifiableState().m_shadowColor = color;
</del><ins>+ modifiableState().shadowOffset = offset;
+ modifiableState().shadowBlur = blur;
+ modifiableState().shadowColor = color;
</ins><span class="cx"> if (!wasDrawingShadows && !shouldDrawShadows())
</span><span class="cx"> return;
</span><span class="cx"> applyShadow();
</span><span class="lines">@@ -1309,16 +1309,16 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> if (shouldDrawShadows()) {
</span><del>- float width = state().m_shadowOffset.width();
- float height = state().m_shadowOffset.height();
- c->setLegacyShadow(FloatSize(width, -height), state().m_shadowBlur, state().m_shadowColor, ColorSpaceDeviceRGB);
</del><ins>+ float width = state().shadowOffset.width();
+ float height = state().shadowOffset.height();
+ c->setLegacyShadow(FloatSize(width, -height), state().shadowBlur, state().shadowColor, ColorSpaceDeviceRGB);
</ins><span class="cx"> } else
</span><span class="cx"> c->setLegacyShadow(FloatSize(), 0, Color::transparent, ColorSpaceDeviceRGB);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool CanvasRenderingContext2D::shouldDrawShadows() const
</span><span class="cx"> {
</span><del>- return alphaChannel(state().m_shadowColor) && (state().m_shadowBlur || !state().m_shadowOffset.isZero());
</del><ins>+ return alphaChannel(state().shadowColor) && (state().shadowBlur || !state().shadowOffset.isZero());
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> enum ImageSizeType {
</span><span class="lines">@@ -1385,7 +1385,7 @@
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, const FloatRect& srcRect, const FloatRect& dstRect, ExceptionCode& ec)
</span><span class="cx"> {
</span><del>- drawImage(image, srcRect, dstRect, state().m_globalComposite, state().m_globalBlend, ec);
</del><ins>+ drawImage(image, srcRect, dstRect, state().globalComposite, state().globalBlend, ec);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::drawImage(HTMLImageElement* image, const FloatRect& srcRect, const FloatRect& dstRect, const CompositeOperator& op, const BlendMode& blendMode, ExceptionCode& ec)
</span><span class="lines">@@ -1421,7 +1421,7 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> CachedImage* cachedImage = image->cachedImage();
</span><span class="lines">@@ -1492,7 +1492,7 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> // FIXME: Do this through platform-independent GraphicsContext API.
</span><span class="lines">@@ -1514,17 +1514,17 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> if (rectContainsCanvas(dstRect)) {
</span><del>- c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, ImagePaintingOptions(state().m_globalComposite, state().m_globalBlend));
</del><ins>+ c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, ImagePaintingOptions(state().globalComposite, state().globalBlend));
</ins><span class="cx"> didDrawEntireCanvas();
</span><del>- } else if (isFullCanvasCompositeMode(state().m_globalComposite)) {
- fullCanvasCompositedDrawImage(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, state().m_globalComposite);
</del><ins>+ } else if (isFullCanvasCompositeMode(state().globalComposite)) {
+ fullCanvasCompositedDrawImage(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, state().globalComposite);
</ins><span class="cx"> didDrawEntireCanvas();
</span><del>- } else if (state().m_globalComposite == CompositeCopy) {
</del><ins>+ } else if (state().globalComposite == CompositeCopy) {
</ins><span class="cx"> clearCanvas();
</span><del>- c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, ImagePaintingOptions(state().m_globalComposite, state().m_globalBlend));
</del><ins>+ c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, ImagePaintingOptions(state().globalComposite, state().globalBlend));
</ins><span class="cx"> didDrawEntireCanvas();
</span><span class="cx"> } else {
</span><del>- c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, ImagePaintingOptions(state().m_globalComposite, state().m_globalBlend));
</del><ins>+ c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, dstRect, srcRect, ImagePaintingOptions(state().globalComposite, state().globalBlend));
</ins><span class="cx"> didDraw(dstRect);
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -1583,7 +1583,7 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> checkOrigin(video);
</span><span class="lines">@@ -1650,7 +1650,7 @@
</span><span class="cx"> Path CanvasRenderingContext2D::transformAreaToDevice(const Path& path) const
</span><span class="cx"> {
</span><span class="cx"> Path transformed(path);
</span><del>- transformed.transform(state().m_transform);
</del><ins>+ transformed.transform(state().transform);
</ins><span class="cx"> transformed.transform(canvas()->baseTransform());
</span><span class="cx"> return transformed;
</span><span class="cx"> }
</span><span class="lines">@@ -1666,7 +1666,7 @@
</span><span class="cx"> {
</span><span class="cx"> FloatQuad quad(rect);
</span><span class="cx"> FloatQuad canvasQuad(FloatRect(0, 0, canvas()->width(), canvas()->height()));
</span><del>- return state().m_transform.mapQuad(quad).containsQuad(canvasQuad);
</del><ins>+ return state().transform.mapQuad(quad).containsQuad(canvasQuad);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template<class T> IntRect CanvasRenderingContext2D::calculateCompositingBufferRect(const T& area, IntSize* croppedOffset)
</span><span class="lines">@@ -1705,7 +1705,7 @@
</span><span class="cx"> c->clipOut(bufferRect);
</span><span class="cx"> c->clearRect(canvasRect);
</span><span class="cx"> c->restore();
</span><del>- c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, bufferRect.location(), state().m_globalComposite);
</del><ins>+ c->drawImageBuffer(buffer, ColorSpaceDeviceRGB, bufferRect.location(), state().globalComposite);
</ins><span class="cx"> c->restore();
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -1849,7 +1849,7 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> #if ENABLE(ACCELERATED_2D_CANVAS)
</span><span class="lines">@@ -1867,15 +1867,15 @@
</span><span class="cx">
</span><span class="cx"> FloatRect dirtyRect = r;
</span><span class="cx"> if (options & CanvasDidDrawApplyTransform) {
</span><del>- AffineTransform ctm = state().m_transform;
</del><ins>+ AffineTransform ctm = state().transform;
</ins><span class="cx"> dirtyRect = ctm.mapRect(r);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (options & CanvasDidDrawApplyShadow && alphaChannel(state().m_shadowColor)) {
</del><ins>+ if (options & CanvasDidDrawApplyShadow && alphaChannel(state().shadowColor)) {
</ins><span class="cx"> // The shadow gets applied after transformation
</span><span class="cx"> FloatRect shadowRect(dirtyRect);
</span><del>- shadowRect.move(state().m_shadowOffset);
- shadowRect.inflate(state().m_shadowBlur);
</del><ins>+ shadowRect.move(state().shadowOffset);
+ shadowRect.inflate(state().shadowBlur);
</ins><span class="cx"> dirtyRect.unite(shadowRect);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -2038,7 +2038,7 @@
</span><span class="cx"> {
</span><span class="cx"> GraphicsContext* context = drawingContext();
</span><span class="cx">
</span><del>- if (!element || !element->focused() || !state().m_hasInvertibleTransform || path.isEmpty()
</del><ins>+ if (!element || !element->focused() || !state().hasInvertibleTransform || path.isEmpty()
</ins><span class="cx"> || !element->isDescendantOf(canvas()) || !context)
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="lines">@@ -2089,11 +2089,11 @@
</span><span class="cx">
</span><span class="cx"> String CanvasRenderingContext2D::font() const
</span><span class="cx"> {
</span><del>- if (!state().m_font.realized())
</del><ins>+ if (!state().font.realized())
</ins><span class="cx"> return defaultFont;
</span><span class="cx">
</span><span class="cx"> StringBuilder serializedFont;
</span><del>- const FontDescription& fontDescription = state().m_font.fontDescription();
</del><ins>+ const FontDescription& fontDescription = state().font.fontDescription();
</ins><span class="cx">
</span><span class="cx"> if (fontDescription.italic())
</span><span class="cx"> serializedFont.appendLiteral("italic ");
</span><span class="lines">@@ -2122,7 +2122,7 @@
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setFont(const String& newFont)
</span><span class="cx"> {
</span><del>- if (newFont == state().m_unparsedFont && state().m_font.realized())
</del><ins>+ if (newFont == state().unparsedFont && state().font.realized())
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> RefPtr<MutableStyleProperties> parsedStyle = MutableStyleProperties::create();
</span><span class="lines">@@ -2140,7 +2140,7 @@
</span><span class="cx"> // The parse succeeded.
</span><span class="cx"> String newFontSafeCopy(newFont); // Create a string copy since newFont can be deleted inside realizeSaves.
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_unparsedFont = newFontSafeCopy;
</del><ins>+ modifiableState().unparsedFont = newFontSafeCopy;
</ins><span class="cx">
</span><span class="cx"> // Map the <canvas> font into the text style. If the font uses keywords like larger/smaller, these will work
</span><span class="cx"> // relative to the canvas.
</span><span class="lines">@@ -2177,12 +2177,12 @@
</span><span class="cx"> styleResolver.updateFont();
</span><span class="cx"> styleResolver.applyPropertyToCurrentStyle(CSSPropertyLineHeight, parsedStyle->getPropertyCSSValue(CSSPropertyLineHeight).get());
</span><span class="cx">
</span><del>- modifiableState().m_font.initialize(document.fontSelector(), newStyle);
</del><ins>+ modifiableState().font.initialize(document.fontSelector(), newStyle);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String CanvasRenderingContext2D::textAlign() const
</span><span class="cx"> {
</span><del>- return textAlignName(state().m_textAlign);
</del><ins>+ return textAlignName(state().textAlign);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setTextAlign(const String& s)
</span><span class="lines">@@ -2190,15 +2190,15 @@
</span><span class="cx"> TextAlign align;
</span><span class="cx"> if (!parseTextAlign(s, align))
</span><span class="cx"> return;
</span><del>- if (state().m_textAlign == align)
</del><ins>+ if (state().textAlign == align)
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_textAlign = align;
</del><ins>+ modifiableState().textAlign = align;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String CanvasRenderingContext2D::textBaseline() const
</span><span class="cx"> {
</span><del>- return textBaselineName(state().m_textBaseline);
</del><ins>+ return textBaselineName(state().textBaseline);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setTextBaseline(const String& s)
</span><span class="lines">@@ -2206,10 +2206,10 @@
</span><span class="cx"> TextBaseline baseline;
</span><span class="cx"> if (!parseTextBaseline(s, baseline))
</span><span class="cx"> return;
</span><del>- if (state().m_textBaseline == baseline)
</del><ins>+ if (state().textBaseline == baseline)
</ins><span class="cx"> return;
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_textBaseline = baseline;
</del><ins>+ modifiableState().textBaseline = baseline;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> inline TextDirection CanvasRenderingContext2D::toTextDirection(Direction direction, RenderStyle** computedStyle) const
</span><span class="lines">@@ -2231,9 +2231,9 @@
</span><span class="cx">
</span><span class="cx"> String CanvasRenderingContext2D::direction() const
</span><span class="cx"> {
</span><del>- if (state().m_direction == Direction::Inherit)
</del><ins>+ if (state().direction == Direction::Inherit)
</ins><span class="cx"> canvas()->document().updateStyleIfNeeded();
</span><del>- return toTextDirection(state().m_direction) == RTL ? ASCIILiteral("rtl") : ASCIILiteral("ltr");
</del><ins>+ return toTextDirection(state().direction) == RTL ? ASCIILiteral("rtl") : ASCIILiteral("ltr");
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setDirection(const String& directionString)
</span><span class="lines">@@ -2248,11 +2248,11 @@
</span><span class="cx"> else
</span><span class="cx"> return;
</span><span class="cx">
</span><del>- if (state().m_direction == direction)
</del><ins>+ if (state().direction == direction)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_direction = direction;
</del><ins>+ modifiableState().direction = direction;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::fillText(const String& text, float x, float y)
</span><span class="lines">@@ -2323,7 +2323,7 @@
</span><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (!c)
</span><span class="cx"> return;
</span><del>- if (!state().m_hasInvertibleTransform)
</del><ins>+ if (!state().hasInvertibleTransform)
</ins><span class="cx"> return;
</span><span class="cx"> if (!std::isfinite(x) | !std::isfinite(y))
</span><span class="cx"> return;
</span><span class="lines">@@ -2349,14 +2349,14 @@
</span><span class="cx">
</span><span class="cx"> RenderStyle* computedStyle;
</span><span class="cx"> canvas()->document().updateStyleIfNeeded();
</span><del>- TextDirection direction = toTextDirection(state().m_direction, &computedStyle);
</del><ins>+ TextDirection direction = toTextDirection(state().direction, &computedStyle);
</ins><span class="cx"> bool isRTL = direction == RTL;
</span><span class="cx"> bool override = computedStyle ? isOverride(computedStyle->unicodeBidi()) : false;
</span><span class="cx">
</span><span class="cx"> TextRun textRun(normalizedText, 0, 0, AllowTrailingExpansion, direction, override, true, TextRun::NoRounding);
</span><span class="cx"> // Draw the item text at the correct point.
</span><span class="cx"> FloatPoint location(x, y);
</span><del>- switch (state().m_textBaseline) {
</del><ins>+ switch (state().textBaseline) {
</ins><span class="cx"> case TopTextBaseline:
</span><span class="cx"> case HangingTextBaseline:
</span><span class="cx"> location.setY(y + fontMetrics.ascent());
</span><span class="lines">@@ -2379,7 +2379,7 @@
</span><span class="cx"> useMaxWidth = (useMaxWidth && maxWidth < fontWidth);
</span><span class="cx"> float width = useMaxWidth ? maxWidth : fontWidth;
</span><span class="cx">
</span><del>- TextAlign align = state().m_textAlign;
</del><ins>+ TextAlign align = state().textAlign;
</ins><span class="cx"> if (align == StartTextAlign)
</span><span class="cx"> align = isRTL ? RightTextAlign : LeftTextAlign;
</span><span class="cx"> else if (align == EndTextAlign)
</span><span class="lines">@@ -2403,7 +2403,7 @@
</span><span class="cx"> inflateStrokeRect(textRect);
</span><span class="cx">
</span><span class="cx"> #if USE(CG)
</span><del>- const CanvasStyle& drawStyle = fill ? state().m_fillStyle : state().m_strokeStyle;
</del><ins>+ const CanvasStyle& drawStyle = fill ? state().fillStyle : state().strokeStyle;
</ins><span class="cx"> if (drawStyle.canvasGradient() || drawStyle.canvasPattern()) {
</span><span class="cx">
</span><span class="cx"> IntRect maskRect = enclosingIntRect(textRect);
</span><span class="lines">@@ -2480,12 +2480,12 @@
</span><span class="cx"> location = FloatPoint();
</span><span class="cx"> }
</span><span class="cx">
</span><del>- if (isFullCanvasCompositeMode(state().m_globalComposite)) {
</del><ins>+ if (isFullCanvasCompositeMode(state().globalComposite)) {
</ins><span class="cx"> beginCompositeLayer();
</span><span class="cx"> fontProxy.drawBidiText(*c, textRun, location, FontCascade::UseFallbackIfFontNotReady);
</span><span class="cx"> endCompositeLayer();
</span><span class="cx"> didDrawEntireCanvas();
</span><del>- } else if (state().m_globalComposite == CompositeCopy) {
</del><ins>+ } else if (state().globalComposite == CompositeCopy) {
</ins><span class="cx"> clearCanvas();
</span><span class="cx"> fontProxy.drawBidiText(*c, textRun, location, FontCascade::UseFallbackIfFontNotReady);
</span><span class="cx"> didDrawEntireCanvas();
</span><span class="lines">@@ -2501,10 +2501,10 @@
</span><span class="cx"> // This yields a slightly oversized rect but is very fast
</span><span class="cx"> // compared to Path::strokeBoundingRect().
</span><span class="cx"> static const float root2 = sqrtf(2);
</span><del>- float delta = state().m_lineWidth / 2;
- if (state().m_lineJoin == MiterJoin)
- delta *= state().m_miterLimit;
- else if (state().m_lineCap == SquareCap)
</del><ins>+ float delta = state().lineWidth / 2;
+ if (state().lineJoin == MiterJoin)
+ delta *= state().miterLimit;
+ else if (state().lineCap == SquareCap)
</ins><span class="cx"> delta *= root2;
</span><span class="cx">
</span><span class="cx"> rect.inflate(delta);
</span><span class="lines">@@ -2514,9 +2514,9 @@
</span><span class="cx"> {
</span><span class="cx"> canvas()->document().updateStyleIfNeeded();
</span><span class="cx">
</span><del>- if (!state().m_font.realized())
- setFont(state().m_unparsedFont);
- return state().m_font;
</del><ins>+ if (!state().font.realized())
+ setFont(state().unparsedFont);
+ return state().font;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> #if ENABLE(ACCELERATED_2D_CANVAS)
</span><span class="lines">@@ -2528,16 +2528,16 @@
</span><span class="cx">
</span><span class="cx"> bool CanvasRenderingContext2D::imageSmoothingEnabled() const
</span><span class="cx"> {
</span><del>- return state().m_imageSmoothingEnabled;
</del><ins>+ return state().imageSmoothingEnabled;
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void CanvasRenderingContext2D::setImageSmoothingEnabled(bool enabled)
</span><span class="cx"> {
</span><del>- if (enabled == state().m_imageSmoothingEnabled)
</del><ins>+ if (enabled == state().imageSmoothingEnabled)
</ins><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> realizeSaves();
</span><del>- modifiableState().m_imageSmoothingEnabled = enabled;
</del><ins>+ modifiableState().imageSmoothingEnabled = enabled;
</ins><span class="cx"> GraphicsContext* c = drawingContext();
</span><span class="cx"> if (c)
</span><span class="cx"> c->setImageInterpolationQuality(enabled ? DefaultInterpolationQuality : InterpolationNone);
</span></span></pre></div>
<a id="branchessafari601branchSourceWebCorehtmlcanvasCanvasRenderingContext2Dh"></a>
<div class="modfile"><h4>Modified: branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.h (193416 => 193417)</h4>
<pre class="diff"><span>
<span class="info">--- branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.h        2015-12-04 17:10:19 UTC (rev 193416)
+++ branches/safari-601-branch/Source/WebCore/html/canvas/CanvasRenderingContext2D.h        2015-12-04 17:10:22 UTC (rev 193417)
</span><span class="lines">@@ -62,10 +62,10 @@
</span><span class="cx"> CanvasRenderingContext2D(HTMLCanvasElement*, bool usesCSSCompatibilityParseMode, bool usesDashboardCompatibilityMode);
</span><span class="cx"> virtual ~CanvasRenderingContext2D();
</span><span class="cx">
</span><del>- const CanvasStyle& strokeStyle() const { return state().m_strokeStyle; }
</del><ins>+ const CanvasStyle& strokeStyle() const { return state().strokeStyle; }
</ins><span class="cx"> void setStrokeStyle(CanvasStyle);
</span><span class="cx">
</span><del>- const CanvasStyle& fillStyle() const { return state().m_fillStyle; }
</del><ins>+ const CanvasStyle& fillStyle() const { return state().fillStyle; }
</ins><span class="cx"> void setFillStyle(CanvasStyle);
</span><span class="cx">
</span><span class="cx"> float lineWidth() const;
</span><span class="lines">@@ -222,8 +222,8 @@
</span><span class="cx"> void strokeText(const String& text, float x, float y, float maxWidth);
</span><span class="cx"> Ref<TextMetrics> measureText(const String& text);
</span><span class="cx">
</span><del>- LineCap getLineCap() const { return state().m_lineCap; }
- LineJoin getLineJoin() const { return state().m_lineJoin; }
</del><ins>+ LineCap getLineCap() const { return state().lineCap; }
+ LineJoin getLineJoin() const { return state().lineJoin; }
</ins><span class="cx">
</span><span class="cx"> bool imageSmoothingEnabled() const;
</span><span class="cx"> void setImageSmoothingEnabled(bool);
</span><span class="lines">@@ -262,33 +262,33 @@
</span><span class="cx"> State(const State&);
</span><span class="cx"> State& operator=(const State&);
</span><span class="cx">
</span><del>- String m_unparsedStrokeColor;
- String m_unparsedFillColor;
- CanvasStyle m_strokeStyle;
- CanvasStyle m_fillStyle;
- float m_lineWidth;
- LineCap m_lineCap;
- LineJoin m_lineJoin;
- float m_miterLimit;
- FloatSize m_shadowOffset;
- float m_shadowBlur;
- RGBA32 m_shadowColor;
- float m_globalAlpha;
- CompositeOperator m_globalComposite;
- BlendMode m_globalBlend;
- AffineTransform m_transform;
- bool m_hasInvertibleTransform;
- Vector<float> m_lineDash;
- float m_lineDashOffset;
- bool m_imageSmoothingEnabled;
</del><ins>+ String unparsedStrokeColor;
+ String unparsedFillColor;
+ CanvasStyle strokeStyle;
+ CanvasStyle fillStyle;
+ float lineWidth;
+ LineCap lineCap;
+ LineJoin lineJoin;
+ float miterLimit;
+ FloatSize shadowOffset;
+ float shadowBlur;
+ RGBA32 shadowColor;
+ float globalAlpha;
+ CompositeOperator globalComposite;
+ BlendMode globalBlend;
+ AffineTransform transform;
+ bool hasInvertibleTransform;
+ Vector<float> lineDash;
+ float lineDashOffset;
+ bool imageSmoothingEnabled;
</ins><span class="cx">
</span><span class="cx"> // Text state.
</span><del>- TextAlign m_textAlign;
- TextBaseline m_textBaseline;
- Direction m_direction;
</del><ins>+ TextAlign textAlign;
+ TextBaseline textBaseline;
+ Direction direction;
</ins><span class="cx">
</span><del>- String m_unparsedFont;
- FontProxy m_font;
</del><ins>+ String unparsedFont;
+ FontProxy font;
</ins><span class="cx"> };
</span><span class="cx">
</span><span class="cx"> enum CanvasDidDrawOption {
</span><span class="lines">@@ -366,7 +366,7 @@
</span><span class="cx"> virtual bool is2d() const override { return true; }
</span><span class="cx"> virtual bool isAccelerated() const override;
</span><span class="cx">
</span><del>- virtual bool hasInvertibleTransform() const override { return state().m_hasInvertibleTransform; }
</del><ins>+ virtual bool hasInvertibleTransform() const override { return state().hasInvertibleTransform; }
</ins><span class="cx"> TextDirection toTextDirection(Direction, RenderStyle** computedStyle = nullptr) const;
</span><span class="cx">
</span><span class="cx"> #if ENABLE(ACCELERATED_2D_CANVAS)
</span></span></pre>
</div>
</div>
</body>
</html>