RESOLVED FIXED 171701
[Mac] Modernize image for dragged link
https://bugs.webkit.org/show_bug.cgi?id=171701
Summary [Mac] Modernize image for dragged link
Tim Horton
Reported 2017-05-04 17:34:27 PDT
Created attachment 309118 [details] patch [Mac] Modernize image for dragged link
Attachments
patch (21.54 KB, patch)
2017-05-04 17:34 PDT, Tim Horton
simon.fraser: review+
Patch (21.66 KB, patch)
2017-05-04 18:21 PDT, Tim Horton
no flags
Patch (27.17 KB, patch)
2017-05-04 18:46 PDT, Tim Horton
no flags
Build Bot
Comment 1 2017-05-04 17:36:58 PDT
Attachment 309118 [details] did not pass style-queue: ERROR: Source/WebCore/ChangeLog:1: ChangeLog entry has no bug number [changelog/bugnumber] [5] Total errors found: 1 in 3 files If any of these errors are false positives, please file a bug against check-webkit-style.
Tim Horton
Comment 2 2017-05-04 18:21:33 PDT
Simon Fraser (smfr)
Comment 3 2017-05-04 18:25:59 PDT
Comment on attachment 309118 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=309118&action=review > Source/WebCore/platform/mac/DragImageMac.mm:161 > +const float linkImagePadding = 10; // Keep in sync with DragController::LinkDragBorderInset. > +const float linkImageDomainBaselineToTitleBaseline = 18; > +const float linkImageCornerRadius = 5; > +const float linkImageMaximumWidth = 400; > +const float linkImageFontSize = 11; Some of these should be CGFloats. > Source/WebCore/platform/mac/DragImageMac.mm:176 > + void layOutText(NSString *text, NSColor *, NSFont *, CFIndex maximumLines, CTLineTruncationType, CGFloat& maximumAvailableWidth, CGFloat& maximumUsedTextWidth, CGFloat& currentY); layOutText is hard on my eyes.
Tim Horton
Comment 4 2017-05-04 18:46:20 PDT
Simon Fraser (smfr)
Comment 5 2017-05-04 18:48:37 PDT
Comment on attachment 309126 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=309126&action=review > Source/WebCore/platform/mac/DragImageMac.mm:176 > + void addLine(CTLineRef, Vector<CGPoint>& origins, CFIndex lineIndex, CGFloat x, CGFloat& y, CGFloat& maximumUsedTextWidth, bool isLastLine); Can origins be const?
Tim Horton
Comment 6 2017-05-04 18:59:12 PDT
Sure.
Tim Horton
Comment 7 2017-05-04 19:24:27 PDT
Note You need to log in before you can comment on or make changes to this bug.