Changeset 190800 in webkit
- Timestamp:
- Oct 9, 2015 8:18:42 AM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r190780 r190800 1 2015-10-08 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Backgrounds bleed out of natively rendered text fields 4 https://bugs.webkit.org/show_bug.cgi?id=149843 5 <rdar://problem/22896977> 6 7 Reviewed by Darin Adler. 8 9 Add a layout test to check that the background of a natively rendered text field 10 cell does not bleed. 11 12 * TestExpectations: 13 * fast/forms/hidpi-textfield-background-bleeding-expected.html: Added. 14 * fast/forms/hidpi-textfield-background-bleeding.html: Added. 15 1 16 2015-10-08 Nikita Vasilyev <nvasilyev@apple.com> 2 17 -
trunk/LayoutTests/platform/ios-simulator/TestExpectations
r190659 r190800 1715 1715 fast/forms/focus-selection-input.html [ Failure ] 1716 1716 fast/forms/hidpi-textarea-on-subpixel-position.html [ ImageOnlyFailure ] 1717 fast/forms/hidpi-textfield-background-bleeding.html [ ImageOnlyFailure ] 1717 1718 fast/forms/implicit-submission.html [ Failure ] 1718 1719 fast/forms/input-baseline.html [ Failure ] -
trunk/LayoutTests/platform/mac/TestExpectations
r190777 r190800 728 728 729 729 webkit.org/b/147254 media/restore-from-page-cache.html [ Pass Failure ] 730 731 # After Mavericks, native text fields are rendered slightly smaller, causing backgrounds to bleed on platforms. 732 [ Mavericks ] fast/forms/hidpi-textfield-background-bleeding.html [ ImageOnlyFailure ] 730 733 731 734 # These fast/forms/select tests open a pop-up menu (visible on screen even when using run-webkit-tests), and get stuck in its nested event loop. -
trunk/Source/WebCore/ChangeLog
r190794 r190800 1 2015-10-08 Wenson Hsieh <wenson_hsieh@apple.com> 2 3 Backgrounds bleed out of natively rendered text fields 4 https://bugs.webkit.org/show_bug.cgi?id=149843 5 <rdar://problem/22896977> 6 7 Reviewed by Darin Adler. 8 9 When natively rendering a text field with a background on Mac, the background bleeds out 10 of the text field's border when the graphics context is scaled (as a result of a retina 11 display or zoom/scale effects). This is because when we render the text field in bezeled 12 style within a certain frame, AppKit adds 1 device pixel insets on all sides of the frame, 13 which renders a text field that is slightly smaller than the frame. To adjust for this, we 14 inflate the paint rect. 15 16 Test: fast/forms/hidpi-textfield-background-bleeding.html 17 18 * rendering/RenderThemeMac.mm: 19 (WebCore::RenderThemeMac::paintTextField): 20 1 21 2015-10-09 Xabier Rodriguez Calvar <calvaris@igalia.com> and Youenn Fablet <youenn.fablet@crf.canon.fr> 2 22 -
trunk/Source/WebCore/rendering/RenderThemeMac.mm
r190627 r190800 854 854 LocalCurrentGraphicsContext localContext(paintInfo.context()); 855 855 856 // <rdar://problem/22896977> We adjust the paint rect here to account for how AppKit draws the text 857 // field cell slightly smaller than the rect we pass to drawWithFrame. 858 FloatRect adjustedPaintRect(r); 859 AffineTransform transform = paintInfo.context().getCTM(); 860 if (transform.xScale() > 1 || transform.yScale() > 1) { 861 adjustedPaintRect.inflateX(1 / transform.xScale()); 862 adjustedPaintRect.inflateY(1 / transform.yScale()); 863 } 856 864 NSTextFieldCell *textField = this->textField(); 857 865 … … 859 867 860 868 [textField setEnabled:(isEnabled(o) && !isReadOnlyControl(o))]; 861 [textField drawWithFrame:NSRect( r) inView:documentViewFor(o)];869 [textField drawWithFrame:NSRect(adjustedPaintRect) inView:documentViewFor(o)]; 862 870 863 871 [textField setControlView:nil];
Note: See TracChangeset
for help on using the changeset viewer.