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

Side by Side Diff: Source/WebCore/platform/gtk/RenderThemeGtk.cpp

Issue 7497054: Merge 92347 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/835/
Patch Set: Created 9 years, 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2007 Apple Inc. 2 * Copyright (C) 2007 Apple Inc.
3 * Copyright (C) 2007 Alp Toker <alp@atoker.com> 3 * Copyright (C) 2007 Alp Toker <alp@atoker.com>
4 * Copyright (C) 2008 Collabora Ltd. 4 * Copyright (C) 2008 Collabora Ltd.
5 * Copyright (C) 2009 Kenneth Rohde Christiansen 5 * Copyright (C) 2009 Kenneth Rohde Christiansen
6 * Copyright (C) 2010 Igalia S.L. 6 * Copyright (C) 2010 Igalia S.L.
7 * 7 *
8 * This library is free software; you can redistribute it and/or 8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public 9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either 10 * License as published by the Free Software Foundation; either
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 // definition depends on including glib.h, negating the benefit of using a forwa rd declaration. 57 // definition depends on including glib.h, negating the benefit of using a forwa rd declaration.
58 extern GRefPtr<GdkPixbuf> getStockIconForWidgetType(GType, const char* iconName, gint direction, gint state, gint iconSize); 58 extern GRefPtr<GdkPixbuf> getStockIconForWidgetType(GType, const char* iconName, gint direction, gint state, gint iconSize);
59 59
60 using namespace HTMLNames; 60 using namespace HTMLNames;
61 61
62 #if ENABLE(VIDEO) 62 #if ENABLE(VIDEO)
63 static HTMLMediaElement* getMediaElementFromRenderObject(RenderObject* o) 63 static HTMLMediaElement* getMediaElementFromRenderObject(RenderObject* o)
64 { 64 {
65 Node* node = o->node(); 65 Node* node = o->node();
66 Node* mediaNode = node ? node->shadowAncestorNode() : 0; 66 Node* mediaNode = node ? node->shadowAncestorNode() : 0;
67 if (!mediaNode || (!mediaNode->hasTagName(videoTag) && !mediaNode->hasTagNam e(audioTag))) 67 if (!mediaNode || !mediaNode->isElementNode() || !static_cast<Element*>(medi aNode)->isMediaElement())
68 return 0; 68 return 0;
69 69
70 return static_cast<HTMLMediaElement*>(mediaNode); 70 return static_cast<HTMLMediaElement*>(mediaNode);
71 } 71 }
72 72
73 static GtkIconSize getMediaButtonIconSize(int mediaIconSize) 73 static GtkIconSize getMediaButtonIconSize(int mediaIconSize)
74 { 74 {
75 GtkIconSize iconSize = gtk_icon_size_from_name("webkit-media-button-size"); 75 GtkIconSize iconSize = gtk_icon_size_from_name("webkit-media-button-size");
76 if (!iconSize) 76 if (!iconSize)
77 iconSize = gtk_icon_size_register("webkit-media-button-size", mediaIconS ize, mediaIconSize); 77 iconSize = gtk_icon_size_register("webkit-media-button-size", mediaIconS ize, mediaIconSize);
(...skipping 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
704 CString systemFilename = fileSystemRepresentation(filenames[0]); 704 CString systemFilename = fileSystemRepresentation(filenames[0]);
705 gchar* systemBasename = g_path_get_basename(systemFilename.data()); 705 gchar* systemBasename = g_path_get_basename(systemFilename.data());
706 stringByAdoptingFileSystemRepresentation(systemBasename, string); 706 stringByAdoptingFileSystemRepresentation(systemBasename, string);
707 } else if (filenames.size() > 1) 707 } else if (filenames.size() > 1)
708 return StringTruncator::rightTruncate(multipleFileUploadText(filenames.s ize()), width, font, StringTruncator::EnableRoundingHacks); 708 return StringTruncator::rightTruncate(multipleFileUploadText(filenames.s ize()), width, font, StringTruncator::EnableRoundingHacks);
709 709
710 return StringTruncator::centerTruncate(string, width, font, StringTruncator: :EnableRoundingHacks); 710 return StringTruncator::centerTruncate(string, width, font, StringTruncator: :EnableRoundingHacks);
711 } 711 }
712 712
713 } 713 }
OLDNEW
« no previous file with comments | « Source/WebCore/platform/efl/RenderThemeEfl.cpp ('k') | Source/WebCore/rendering/RenderThemeMac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698