Changeset 58627 in webkit
- Timestamp:
- Apr 30, 2010 7:54:08 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r58622 r58627 1 2010-04-28 Joseph Pecoraro <joepeck@webkit.org> 2 3 Reviewed by Oliver Hunt. 4 5 REGRESSION(r58313): Regression evident in pixel tests: the search icon is always clipped at the bottom. 6 https://bugs.webkit.org/show_bug.cgi?id=38253 7 8 * fast/css/input-search-padding.html: Added. 9 * platform/mac/fast/css/input-search-padding-expected.checksum: Added. 10 * platform/mac/fast/css/input-search-padding-expected.png: Added. 11 * platform/mac/fast/css/input-search-padding-expected.txt: Added. 12 13 * platform/mac/fast/forms/search-zoomed-expected.checksum: Updated. 14 * platform/mac/fast/forms/search-zoomed-expected.png: Updated. 15 1 16 2010-04-30 Chris Marrin <cmarrin@apple.com> 2 17 -
trunk/LayoutTests/platform/mac/fast/forms/search-zoomed-expected.checksum
r54748 r58627 1 d7f9ad12c55272dfa8b7ee73d2133ddd 1 8560c314c6480f5f117c36da2edd6b69 -
trunk/WebCore/ChangeLog
r58625 r58627 1 2010-04-28 Joseph Pecoraro <joepeck@webkit.org> 2 3 Reviewed by Oliver Hunt. 4 5 REGRESSION(r58313): Regression evident in pixel tests: the search icon is always clipped at the bottom. 6 https://bugs.webkit.org/show_bug.cgi?id=38253 7 8 Test: fast/css/input-search-padding.html 9 10 An <input type="search"> contains an inner block, which is explicitly 11 centered in RenderTextControlSingleLine based on the height of the element. 12 However, the clipping rect was not using the set location, and instead 13 calculated off of the top border and padding alone. This also vertically 14 centers the Caps Lock indicator. 15 16 * rendering/RenderTextControl.cpp: moved controlClipRect implementation to RenderTextControlSingleLine 17 * rendering/RenderTextControl.h: allow a subclass implementation of controlClipRect, removed redundant hasControlClip implementation, and moved controlClipRect 18 * rendering/RenderTextControlSingleLine.cpp: 19 (WebCore::RenderTextControlSingleLine::paint): vertically center the Caps Lock indicator 20 (WebCore::RenderTextControlSingleLine::controlClipRect): use the set location of the anonymous inner block instead 21 * rendering/RenderTextControlSingleLine.h: allow for an implementation of controlClipRect for <input type="search"> 22 1 23 2010-04-30 Jon Honeycutt <jhoneycutt@apple.com> 2 24 -
trunk/WebCore/rendering/RenderTextControl.cpp
r58400 r58627 432 432 return; 433 433 m_innerText->defaultEventHandler(event); 434 }435 436 IntRect RenderTextControl::controlClipRect(int tx, int ty) const437 {438 IntRect clipRect = contentBoxRect();439 clipRect.move(tx, ty);440 return clipRect;441 434 } 442 435 -
trunk/WebCore/rendering/RenderTextControl.h
r58400 r58627 96 96 virtual const char* renderName() const { return "RenderTextControl"; } 97 97 virtual bool isTextControl() const { return true; } 98 virtual bool hasControlClip() const { return false; }99 virtual IntRect controlClipRect(int tx, int ty) const;100 98 virtual void calcPrefWidths(); 101 99 virtual void removeLeftoverAnonymousBlock(RenderBlock*) { } -
trunk/WebCore/rendering/RenderTextControlSingleLine.cpp
r58572 r58627 1 1 /** 2 * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.2 * Copyright (C) 2006, 2007, 2010 Apple Inc. All rights reserved. 3 3 * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/) 4 4 * … … 189 189 IntRect contentsRect = contentBoxRect(); 190 190 191 // Center vertically like the text. 192 contentsRect.setY((height() - contentsRect.height()) / 2); 193 191 194 // Convert the rect into the coords used for painting the content 192 195 contentsRect.move(tx + x(), ty + y()); … … 392 395 repaint(); 393 396 } 397 } 398 399 IntRect RenderTextControlSingleLine::controlClipRect(int tx, int ty) const 400 { 401 // This should only get called for search inputs. 402 ASSERT(hasControlClip()); 403 IntRect clipRect = IntRect(x(), y(), width(), height()); 404 clipRect.move(tx, ty); 405 return clipRect; 394 406 } 395 407 -
trunk/WebCore/rendering/RenderTextControlSingleLine.h
r58564 r58627 61 61 int preferredDecorationWidthRight() const; 62 62 virtual bool hasControlClip() const { return m_cancelButton; } 63 virtual IntRect controlClipRect(int tx, int ty) const; 63 64 virtual bool isTextField() const { return true; } 64 65
Note: See TracChangeset
for help on using the changeset viewer.