Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp

Issue 2005093002: Remove non-standard 'results' attribute of INPUT element. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp
diff --git a/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp b/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp
index 2bde7848091374972321d5ff258f185c13388efb..8fc7a58df884f63646d1f1a3db3eafd9a3a498a7 100644
--- a/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp
+++ b/third_party/WebKit/Source/core/paint/ThemePainterDefault.cpp
@@ -398,31 +398,4 @@ bool ThemePainterDefault::paintSearchFieldCancelButton(const LayoutObject& cance
return false;
}
-bool ThemePainterDefault::paintSearchFieldResultsDecoration(const LayoutObject& magnifierObject, const PaintInfo& paintInfo, const IntRect& r)
-{
- // Get the layoutObject of <input> element.
- if (!magnifierObject.node())
- return false;
- Node* input = magnifierObject.node()->shadowHost();
- const LayoutObject& baseLayoutObject = input ? *input->layoutObject() : magnifierObject;
- if (!baseLayoutObject.isBox())
- return false;
- const LayoutBox& inputLayoutBox = toLayoutBox(baseLayoutObject);
- LayoutRect inputContentBox = inputLayoutBox.contentBoxRect();
-
- // Make sure the scaled decoration stays square and will fit in its parent's box.
- LayoutUnit magnifierSize = std::min(inputContentBox.width(), std::min(inputContentBox.height(), LayoutUnit(r.height())));
- // Calculate decoration's coordinates relative to the input element.
- // Center the decoration vertically. Round up though, so if it has to be one pixel off-center, it will
- // be one pixel closer to the bottom of the field. This tends to look better with the text.
- LayoutRect magnifierRect(magnifierObject.offsetFromAncestorContainer(&inputLayoutBox).width(),
- inputContentBox.y() + (inputContentBox.height() - magnifierSize + 1) / 2,
- magnifierSize, magnifierSize);
- IntRect paintingRect = convertToPaintingRect(inputLayoutBox, magnifierObject, magnifierRect, r);
-
- DEFINE_STATIC_REF(Image, magnifierImage, (Image::loadPlatformResource("searchMagnifier")));
- paintInfo.context.drawImage(magnifierImage, paintingRect);
- return false;
-}
-
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/paint/ThemePainterDefault.h ('k') | third_party/WebKit/Source/core/paint/ThemePainterMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698