Summary: | Update positioning/drawing of the image controls button | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brady Eidson <beidson> | ||||
Component: | WebCore Misc. | Assignee: | Brady Eidson <beidson> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | commit-queue, esprehn+autocc, glenn, gyuyoung.kim, kondapallykalyan, thorton | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Mac | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Brady Eidson
2014-05-13 13:24:15 PDT
Created attachment 231404 [details]
Patch v1
Comment on attachment 231404 [details] Patch v1 View in context: https://bugs.webkit.org/attachment.cgi?id=231404&action=review > Source/WebCore/html/shadow/mac/ImageControlsButtonElementMac.cpp:101 > + button->setAttribute(HTMLNames::styleAttr, String::format("right: %ipx; top: %ipx", positionOffset.width(), positionOffset.height())); Is this the normal way to set style attributes? I think you should be using setInlineStyleProperty for efficiency. See my use in PDFPluginTextAnnotation. > Source/WebCore/html/shadow/mac/imageControlsMac.css:-32 > - right: 18px; /* FIXME: Why is right: 0px off the right edge of the parent? */ we should keep a comment about this nonsense, because it's still wrong. just... above. (In reply to comment #2) > (From update of attachment 231404 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=231404&action=review > > > Source/WebCore/html/shadow/mac/ImageControlsButtonElementMac.cpp:101 > > + button->setAttribute(HTMLNames::styleAttr, String::format("right: %ipx; top: %ipx", positionOffset.width(), positionOffset.height())); > > Is this the normal way to set style attributes? I think you should be using setInlineStyleProperty for efficiency. See my use in PDFPluginTextAnnotation. > > > Source/WebCore/html/shadow/mac/imageControlsMac.css:-32 > > - right: 18px; /* FIXME: Why is right: 0px off the right edge of the parent? */ > > we should keep a comment about this nonsense, because it's still wrong. just... above. I meant, to avoid String::formats :D setInlineStyleProperty(CSSPropertyTop, positionOffset.height(), CSS_PX); etc. Followed up in https://trac.webkit.org/changeset/168742 |