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

Side by Side Diff: Source/core/rendering/RenderObject.cpp

Issue 16194013: Mouse press should focus on any types of form controls. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 6 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * (C) 2000 Dirk Mueller (mueller@kde.org) 4 * (C) 2000 Dirk Mueller (mueller@kde.org)
5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com) 5 * (C) 2004 Allan Sandfeld Jensen (kde@carewolf.com)
6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2011 Apple Inc. All rights reserv ed.
7 * Copyright (C) 2009 Google Inc. All rights reserved. 7 * Copyright (C) 2009 Google Inc. All rights reserved.
8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/) 8 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo bile.com/)
9 * 9 *
10 * This library is free software; you can redistribute it and/or 10 * This library is free software; you can redistribute it and/or
(...skipping 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 { 1147 {
1148 if (!hasOutline()) 1148 if (!hasOutline())
1149 return; 1149 return;
1150 1150
1151 RenderStyle* styleToUse = style(); 1151 RenderStyle* styleToUse = style();
1152 LayoutUnit outlineWidth = styleToUse->outlineWidth(); 1152 LayoutUnit outlineWidth = styleToUse->outlineWidth();
1153 1153
1154 int outlineOffset = styleToUse->outlineOffset(); 1154 int outlineOffset = styleToUse->outlineOffset();
1155 1155
1156 if (styleToUse->outlineStyleIsAuto() || hasOutlineAnnotation()) { 1156 if (styleToUse->outlineStyleIsAuto() || hasOutlineAnnotation()) {
1157 if (!theme()->supportsFocusRing(styleToUse)) { 1157 if (theme()->shouldDrawCommonFocusRing(this)) {
1158 // Only paint the focus ring by hand if the theme isn't able to draw the focus ring. 1158 // Only paint the focus ring by hand if the theme isn't able to draw the focus ring.
1159 paintFocusRing(paintInfo, paintRect.location(), styleToUse); 1159 paintFocusRing(paintInfo, paintRect.location(), styleToUse);
1160 } 1160 }
1161 } 1161 }
1162 1162
1163 if (styleToUse->outlineStyleIsAuto() || styleToUse->outlineStyle() == BNONE) 1163 if (styleToUse->outlineStyleIsAuto() || styleToUse->outlineStyle() == BNONE)
1164 return; 1164 return;
1165 1165
1166 IntRect inner = pixelSnappedIntRect(paintRect); 1166 IntRect inner = pixelSnappedIntRect(paintRect);
1167 inner.inflate(outlineOffset); 1167 inner.inflate(outlineOffset);
(...skipping 2014 matching lines...) Expand 10 before | Expand all | Expand 10 after
3182 { 3182 {
3183 if (object1) { 3183 if (object1) {
3184 const WebCore::RenderObject* root = object1; 3184 const WebCore::RenderObject* root = object1;
3185 while (root->parent()) 3185 while (root->parent())
3186 root = root->parent(); 3186 root = root->parent();
3187 root->showRenderTreeAndMark(object1, "*", object2, "-", 0); 3187 root->showRenderTreeAndMark(object1, "*", object2, "-", 0);
3188 } 3188 }
3189 } 3189 }
3190 3190
3191 #endif 3191 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698