RESOLVED FIXED 175782
Cleanup TextPainter
https://bugs.webkit.org/show_bug.cgi?id=175782
Summary Cleanup TextPainter
Daniel Bates
Reported 2017-08-21 14:13:19 PDT
Remove redundant mention of "text" in the name of TextPainter member functions, add separate setters for selection and non-selection shadows, and do some other minor cleanups.
Attachments
Patch (20.68 KB, patch)
2017-08-21 14:23 PDT, Daniel Bates
mmaxfield: review+
Daniel Bates
Comment 1 2017-08-21 14:23:41 PDT
Build Bot
Comment 2 2017-08-21 14:26:31 PDT
Attachment 318671 [details] did not pass style-queue: ERROR: Source/WebCore/rendering/TextPainter.cpp:36: Code inside a namespace should not be indented. [whitespace/indent] [4] Total errors found: 1 in 5 files If any of these errors are false positives, please file a bug against check-webkit-style.
Myles C. Maxfield
Comment 3 2017-08-21 14:49:58 PDT
Comment on attachment 318671 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=318671&action=review > Source/WebCore/rendering/TextPainter.cpp:4 > + * Copyright (C) 2004-2017 Apple Inc. All rights reserved. Are we actually allowed to retroactively add in 2014-2016? > Source/WebCore/rendering/TextPainter.cpp:40 > + : m_context { context } > + , m_shadow { shadow } > + , m_onlyDrawsShadow { !isLastShadowIteration() || !lastShadowIterationShouldDrawText } > + , m_avoidDrawingShadow { shadowIsCompletelyCoveredByText(opaque) } > + , m_nothingToDraw { shadow && m_avoidDrawingShadow && m_onlyDrawsShadow } > + , m_didSaveContext { false } What's the reason for this change? I haven't seen this style in any other code.
Daniel Bates
Comment 4 2017-08-21 16:19:21 PDT
Comment on attachment 318671 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=318671&action=review >> Source/WebCore/rendering/TextPainter.cpp:4 >> + * Copyright (C) 2004-2017 Apple Inc. All rights reserved. > > Are we actually allowed to retroactively add in 2014-2016? Yes, Apple employees made changes throughout 2014-2016. >> Source/WebCore/rendering/TextPainter.cpp:40 >> + , m_didSaveContext { false } > > What's the reason for this change? I haven't seen this style in any other code. We should bring this up on webkit-dev to standardize. I have seen a movement towards using this style. See bug #173682, comment #4.
Daniel Bates
Comment 5 2017-08-21 16:21:29 PDT
Radar WebKit Bug Importer
Comment 6 2017-08-21 16:22:03 PDT
Note You need to log in before you can comment on or make changes to this bug.