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

Side by Side Diff: Source/core/html/ValidationMessage.cpp

Issue 19510005: [oilpan] Completely move HTMLFormControlElement's hierarchy to the managed heap Base URL: svn://svn.chromium.org/blink/branches/oilpan
Patch Set: Created 7 years, 5 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
« no previous file with comments | « Source/core/html/ValidationMessage.h ('k') | Source/core/html/WeekInputType.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2010, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 #include "core/page/Settings.h" 46 #include "core/page/Settings.h"
47 #include "core/page/ValidationMessageClient.h" 47 #include "core/page/ValidationMessageClient.h"
48 #include "core/rendering/RenderBlock.h" 48 #include "core/rendering/RenderBlock.h"
49 #include "core/rendering/RenderObject.h" 49 #include "core/rendering/RenderObject.h"
50 #include <wtf/PassOwnPtr.h> 50 #include <wtf/PassOwnPtr.h>
51 51
52 namespace WebCore { 52 namespace WebCore {
53 53
54 using namespace HTMLNames; 54 using namespace HTMLNames;
55 55
56 ALWAYS_INLINE ValidationMessage::ValidationMessage(HTMLFormControlElement* eleme nt) 56 ALWAYS_INLINE ValidationMessage::ValidationMessage(Handle<HTMLFormControlElement > element)
57 : m_element(element) 57 : m_element(element.raw())
58 { 58 {
59 ASSERT(m_element); 59 ASSERT(m_element);
60 } 60 }
61 61
62 ValidationMessage::~ValidationMessage() 62 ValidationMessage::~ValidationMessage()
63 { 63 {
64 if (ValidationMessageClient* client = validationMessageClient()) { 64 if (ValidationMessageClient* client = validationMessageClient()) {
65 client->hideValidationMessage(*m_element); 65 client->hideValidationMessage(*m_element);
66 return; 66 return;
67 } 67 }
68 68
69 deleteBubbleTree(); 69 deleteBubbleTree();
70 } 70 }
71 71
72 PassOwnPtr<ValidationMessage> ValidationMessage::create(HTMLFormControlElement* element) 72 PassOwnPtr<ValidationMessage> ValidationMessage::create(Handle<HTMLFormControlEl ement> element)
73 { 73 {
74 return adoptPtr(new ValidationMessage(element)); 74 return adoptPtr(new ValidationMessage(element));
75 } 75 }
76 76
77 ValidationMessageClient* ValidationMessage::validationMessageClient() const 77 ValidationMessageClient* ValidationMessage::validationMessageClient() const
78 { 78 {
79 if (Page* page = m_element->document()->page()) 79 if (Page* page = m_element->document()->page())
80 return page->validationMessageClient(); 80 return page->validationMessageClient();
81 return 0; 81 return 0;
82 } 82 }
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 } 247 }
248 248
249 bool ValidationMessage::isVisible() const 249 bool ValidationMessage::isVisible() const
250 { 250 {
251 if (ValidationMessageClient* client = validationMessageClient()) 251 if (ValidationMessageClient* client = validationMessageClient())
252 return client->isValidationMessageVisible(*m_element); 252 return client->isValidationMessageVisible(*m_element);
253 return !m_message.isEmpty(); 253 return !m_message.isEmpty();
254 } 254 }
255 255
256 } // namespace WebCore 256 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/core/html/ValidationMessage.h ('k') | Source/core/html/WeekInputType.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698