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

Side by Side Diff: Source/WebCore/html/RangeInputType.cpp

Issue 12703031: Revert 146726 "AXObjectCache gets recreated during document tear..." (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1453/
Patch Set: Created 7 years, 9 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
« no previous file with comments | « Source/WebCore/html/InputType.cpp ('k') | Source/WebCore/loader/FrameLoader.cpp » ('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 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * Copyright (C) 2011 Apple Inc. All rights reserved. 3 * Copyright (C) 2011 Apple Inc. All rights reserved.
4 * 4 *
5 * Redistribution and use in source and binary forms, with or without 5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are 6 * modification, are permitted provided that the following conditions are
7 * met: 7 * met:
8 * 8 *
9 * * Redistributions of source code must retain the above copyright 9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer. 10 * notice, this list of conditions and the following disclaimer.
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
239 else 239 else
240 return; // Did not match any key binding. 240 return; // Did not match any key binding.
241 241
242 newValue = stepRange.clampValue(newValue); 242 newValue = stepRange.clampValue(newValue);
243 243
244 if (newValue != current) { 244 if (newValue != current) {
245 EventQueueScope scope; 245 EventQueueScope scope;
246 TextFieldEventBehavior eventBehavior = DispatchChangeEvent; 246 TextFieldEventBehavior eventBehavior = DispatchChangeEvent;
247 setValueAsDecimal(newValue, eventBehavior, IGNORE_EXCEPTION); 247 setValueAsDecimal(newValue, eventBehavior, IGNORE_EXCEPTION);
248 248
249 if (AXObjectCache* cache = element()->document()->existingAXObjectCache( )) 249 if (AXObjectCache::accessibilityEnabled())
250 cache->postNotification(element(), AXObjectCache::AXValueChanged, tr ue); 250 element()->document()->axObjectCache()->postNotification(element(), AXObjectCache::AXValueChanged, true);
251 element()->dispatchFormControlChangeEvent(); 251 element()->dispatchFormControlChangeEvent();
252 } 252 }
253 253
254 event->setDefaultHandled(); 254 event->setDefaultHandled();
255 } 255 }
256 256
257 void RangeInputType::createShadowSubtree() 257 void RangeInputType::createShadowSubtree()
258 { 258 {
259 ASSERT(element()->shadow()); 259 ASSERT(element()->shadow());
260 260
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
404 } 404 }
405 const Decimal closestLeft = middle ? m_tickMarkValues[middle - 1] : Decimal: :infinity(Decimal::Negative); 405 const Decimal closestLeft = middle ? m_tickMarkValues[middle - 1] : Decimal: :infinity(Decimal::Negative);
406 const Decimal closestRight = middle != m_tickMarkValues.size() ? m_tickMarkV alues[middle] : Decimal::infinity(Decimal::Positive); 406 const Decimal closestRight = middle != m_tickMarkValues.size() ? m_tickMarkV alues[middle] : Decimal::infinity(Decimal::Positive);
407 if (closestRight - value < value - closestLeft) 407 if (closestRight - value < value - closestLeft)
408 return closestRight; 408 return closestRight;
409 return closestLeft; 409 return closestLeft;
410 } 410 }
411 #endif 411 #endif
412 412
413 } // namespace WebCore 413 } // namespace WebCore
OLDNEW
« no previous file with comments | « Source/WebCore/html/InputType.cpp ('k') | Source/WebCore/loader/FrameLoader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698