1 2009-07-27 Jian Li <jianli@chromium.org>
3 Reviewed by David Levin.
5 [V8] Implement EventListener::reportError for V8 event listeners in worker context.
6 https://bugs.webkit.org/show_bug.cgi?id=27731
8 * bindings/v8/V8WorkerContextEventListener.cpp:
9 (WebCore::V8WorkerContextEventListener::reportError):
10 * bindings/v8/V8WorkerContextEventListener.h:
12 2009-07-27 Stephen White <senorblanco@chromium.org>
14 Reviewed by Eric Seidel and David Levin.
16 Re-apply chromium/skia border fix (originally landed in r46157,
17 reverted in r46363), since it was not the cause of the reliability
20 http://bugs.webkit.org/show_bug.cgi?id=27388
22 * platform/graphics/skia/GraphicsContextSkia.cpp:
23 (WebCore::GraphicsContext::drawLine):
24 * platform/graphics/skia/PlatformContextSkia.cpp:
25 (PlatformContextSkia::setupPaintForStroking):
27 2009-07-27 Ryosuke Niwa <rniwa@webkit.org>
29 Reviewed by Justin Garcia.
31 createMarkup does not handle CSS properly
32 https://bugs.webkit.org/show_bug.cgi?id=27660
34 This patch isolates code that creates markup for styles in addStyleMarkup
35 It also makes all presentational elements (u, s, strike, i, em, b, strong) special ancestor in createMarkup
36 so that we can assume no text decoration style is passed to addStyleMarkup.
39 (WebCore::propertyMissingOrEqualToNone): Changed the first argument from CSSMutableStyleDecleration to CSSStyleDeclaration
40 (WebCore::isElementPresentational): Used to be elementHasTextDecorationProperty, now supports presentational tags
41 (WebCore::addStyleMarkup): Adds markup for style span and div
42 (WebCore::createMarkup): Uses isElementPresentational and addStyleMarkup
44 2009-07-27 Eric Seidel <eric@webkit.org>
46 Reviewed by Adam Barth.
48 fix more obvious global object lookups
49 https://bugs.webkit.org/show_bug.cgi?id=27745
51 No new tests for these changes. I believe in many cases
52 testing to be impossible. Lack of testing justification next to
53 each change below. The remaining pieces of bug 27634 will all
56 * bindings/js/JSDOMWindowBase.cpp:
57 (WebCore::JSDOMWindowBase::updateDocument): not testable.
58 * bindings/js/JSDataGridColumnListCustom.cpp:
59 (WebCore::JSDataGridColumnList::nameGetter): no testing for this incomplete feature.
60 * bindings/js/JSEventListener.cpp:
61 (WebCore::JSEventListener::handleEvent): would require outer frame to trigger an event in the inner frame
62 * bindings/js/JSEventTarget.cpp:
63 (WebCore::toJS): covered by other tests, always correct to pass the globalObject through.
64 * bindings/js/JSHTMLElementCustom.cpp:
65 (WebCore::JSHTMLElement::pushEventHandlerScope): unclear when this could be triggered.
66 * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
67 (WebCore::JSHTMLOptionsCollection::remove): toJS seems superfluous here to begin with.
68 * bindings/js/JSLazyEventListener.cpp:
69 (WebCore::JSLazyEventListener::parseCode): would require outer frame to trigger inner frame event.
70 * bindings/js/ScriptController.cpp:
71 (WebCore::ScriptController::jsObjectForPluginElement): only used for NPAPI binding, unclear how to test.
72 * bindings/js/ScriptEventListener.cpp:
73 (WebCore::createAttributeEventListener): unclear how to test.
74 * bindings/js/ScriptObject.cpp:
75 (WebCore::ScriptGlobalObject::set): unclear how to test/inspector only.
76 * bindings/js/ScriptObjectQuarantine.cpp:
77 (WebCore::getQuarantinedScriptObject): unclear how to test.
78 * bindings/objc/DOMInternal.mm:
79 (-[WebScriptObject _initializeScriptDOMNodeImp]): unclear how to test.
81 2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
83 Reviewed by George Staikos.
85 [WML] 'title' attribute handling not correct for <a> / <anchor> elements
86 https://bugs.webkit.org/show_bug.cgi?id=27720
88 Unify title() implementation in WMLElement instead of several copies of the same logic.
89 We forgot WMLAnchorElement/WMLAElement, that lead to bugs. Fixes hovering links in the
90 WML manual-test suite.
92 * wml/WMLCardElement.cpp:
93 * wml/WMLCardElement.h:
95 (WebCore::WMLElement::title):
97 * wml/WMLOptGroupElement.cpp:
98 * wml/WMLOptGroupElement.h:
99 * wml/WMLSelectElement.cpp:
100 * wml/WMLSelectElement.h:
102 2009-07-27 Adam Treat <adam.treat@torchmobile.com>
104 Speculative build fix for Windows and WinCE.
106 * plugins/win/PluginPackageWin.cpp:
107 (WebCore::PluginPackage::load):
109 2009-07-27 Ojan Vafai <ojan@chromium.org>
111 Reviewed by Darin Adler.
113 https://bugs.webkit.org/show_bug.cgi?id=27474
114 Fixes crashes due to renderer getting destroyed in updateLayout.
115 We need to call updateLayout before we call into the renderer.
116 Removed the updateLayout call from RenderTextControl and moved it
117 into the calling sites.
119 Also changes updateLayout to updateLayoutIgnorePendingStylesheets so
120 this works with pending stylesheets. Unfortunately, this seems to be
121 untestable. Loading an external stylesheet and then having an inline
122 script hit this code did not result in an pending stylesheets.
124 The are other cases of this bug in the rendering code. I'll file a
125 followup bug to audit the calls to updateLayout.
127 Test: fast/dom/text-control-crash-on-select.html
130 (WebCore::Document::inStyleRecalc): Added so the ASSERTs in updateFocusAppearance
131 and setSelectionRange could deal with cases of reentrancy into updateLayout
132 calls. This happens in a couple layout tests.
133 * dom/InputElement.cpp:
134 (WebCore::InputElement::updateSelectionRange):
135 * html/HTMLInputElement.cpp:
136 (WebCore::isTextFieldWithRendererAfterUpdateLayout):
137 (WebCore::HTMLInputElement::setSelectionStart):
138 (WebCore::HTMLInputElement::setSelectionEnd):
139 (WebCore::HTMLInputElement::select):
140 * html/HTMLTextAreaElement.cpp:
141 (WebCore::rendererAfterUpdateLayout):
142 (WebCore::HTMLTextAreaElement::setSelectionStart):
143 (WebCore::HTMLTextAreaElement::setSelectionEnd):
144 (WebCore::HTMLTextAreaElement::select):
145 (WebCore::HTMLTextAreaElement::setSelectionRange):
146 (WebCore::HTMLTextAreaElement::updateFocusAppearance):
147 * rendering/RenderTextControl.cpp:
148 (WebCore::RenderTextControl::setSelectionRange):
150 2009-07-27 Dimitri Glazkov <dglazkov@chromium.org>
152 Reviewed by Dave Levin.
154 [V8] Remove parameterless frame/window retrieval methods from V8Proxy.
155 https://bugs.webkit.org/show_bug.cgi?id=27737
157 Refactoring, no new behavior, covered by existing tests.
159 * bindings/v8/ScriptCallStack.cpp:
160 (WebCore::ScriptCallStack::ScriptCallStack):
161 * bindings/v8/V8NPUtils.cpp:
162 (convertV8ObjectToNPVariant): Ditto.
163 * bindings/v8/V8Proxy.cpp:
164 (WebCore::V8Proxy::retrieve): Ditto.
165 (WebCore::V8Proxy::canAccessPrivate): Ditto.
166 * bindings/v8/V8Proxy.h: Removed parameterless retrieveWindow/retrieveProxy decls.
167 * bindings/v8/custom/V8DatabaseCustom.cpp:
168 (WebCore::CALLBACK_FUNC_DECL): Changed to use V8Proxy::retrieveFrameForCurrentContext().
169 * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp:
170 (WebCore::CALLBACK_FUNC_DECL): Ditto.
171 * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
172 (WebCore::CALLBACK_FUNC_DECL): Ditto.
173 * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp:
174 (WebCore::CALLBACK_FUNC_DECL): Ditto.
175 * bindings/v8/custom/V8MessageChannelConstructor.cpp:
176 (WebCore::CALLBACK_FUNC_DECL): Ditto.
177 * bindings/v8/custom/V8SQLTransactionCustom.cpp:
178 (WebCore::CALLBACK_FUNC_DECL): Ditto.
179 * bindings/v8/custom/V8WorkerCustom.cpp:
180 (WebCore::CALLBACK_FUNC_DECL): Ditto.
181 * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
182 (WebCore::CALLBACK_FUNC_DECL): Ditto.
184 2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
186 Reviewed by George Staikos.
188 [WML] 'onpick' intrinsic event handling missing
189 https://bugs.webkit.org/show_bug.cgi?id=27723
191 Trigger 'onpick' intrinsic events from WMLOptionElement::setSelectedState().
192 All was in place, just forgot to enable the relevant code.
194 Fixes manual-tests/wml/select-onpick-event.wml
195 Test: wml/option-element-onpick.html
197 * wml/WMLOptionElement.cpp:
198 (WebCore::WMLOptionElement::setSelectedState):
200 2009-07-27 Alexey Proskuryakov <ap@webkit.org>
202 Reviewed by Darin Adler.
204 https://bugs.webkit.org/show_bug.cgi?id=27735
205 Give a helpful name to JSLock constructor argument
207 * bindings/js/GCController.cpp:
209 (WebCore::GCController::gcTimerFired):
210 (WebCore::GCController::garbageCollectNow):
211 * bindings/js/JSCustomPositionCallback.cpp:
212 (WebCore::JSCustomPositionCallback::handleEvent):
213 * bindings/js/JSCustomPositionErrorCallback.cpp:
214 (WebCore::JSCustomPositionErrorCallback::handleEvent):
215 * bindings/js/JSCustomSQLStatementCallback.cpp:
216 (WebCore::JSCustomSQLStatementCallback::handleEvent):
217 * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
218 (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
219 * bindings/js/JSCustomSQLTransactionCallback.cpp:
220 (WebCore::JSCustomSQLTransactionCallback::handleEvent):
221 * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
222 (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
223 * bindings/js/JSCustomVoidCallback.cpp:
224 (WebCore::JSCustomVoidCallback::handleEvent):
225 * bindings/js/JSCustomXPathNSResolver.cpp:
226 (WebCore::JSCustomXPathNSResolver::lookupNamespaceURI):
227 * bindings/js/JSEventCustom.cpp:
229 * bindings/js/JSEventListener.cpp:
230 (WebCore::JSEventListener::handleEvent):
231 * bindings/js/JSInspectorBackendCustom.cpp:
232 (WebCore::JSInspectorBackend::currentCallFrame):
233 (WebCore::JSInspectorBackend::profiles):
234 * bindings/js/JSNodeFilterCondition.cpp:
235 (WebCore::JSNodeFilterCondition::acceptNode):
236 * bindings/js/ScheduledAction.cpp:
237 (WebCore::ScheduledAction::executeFunctionInContext):
238 * bindings/js/ScriptArray.cpp:
239 (WebCore::ScriptArray::set):
240 (WebCore::ScriptArray::createNew):
241 * bindings/js/ScriptCachedFrameData.cpp:
242 (WebCore::ScriptCachedFrameData::ScriptCachedFrameData):
243 (WebCore::ScriptCachedFrameData::restore):
244 (WebCore::ScriptCachedFrameData::clear):
245 * bindings/js/ScriptController.cpp:
246 (WebCore::ScriptController::evaluate):
247 (WebCore::ScriptController::clearWindowShell):
248 (WebCore::ScriptController::initScript):
249 (WebCore::ScriptController::updateDocument):
250 (WebCore::ScriptController::bindingRootObject):
251 (WebCore::ScriptController::windowScriptNPObject):
252 (WebCore::ScriptController::jsObjectForPluginElement):
253 (WebCore::ScriptController::clearScriptObjects):
254 * bindings/js/ScriptControllerMac.mm:
255 (WebCore::ScriptController::windowScriptObject):
256 * bindings/js/ScriptEventListener.cpp:
257 (WebCore::createAttributeEventListener):
258 * bindings/js/ScriptFunctionCall.cpp:
259 (WebCore::ScriptFunctionCall::appendArgument):
260 (WebCore::ScriptFunctionCall::call):
261 (WebCore::ScriptFunctionCall::construct):
262 * bindings/js/ScriptObject.cpp:
263 (WebCore::ScriptObject::set):
264 (WebCore::ScriptObject::createNew):
265 (WebCore::ScriptGlobalObject::set):
266 (WebCore::ScriptGlobalObject::get):
267 (WebCore::ScriptGlobalObject::remove):
268 * bindings/js/ScriptObjectQuarantine.cpp:
269 (WebCore::quarantineValue):
270 (WebCore::getQuarantinedScriptObject):
271 * bindings/js/ScriptValue.cpp:
272 (WebCore::ScriptValue::getString):
273 * bindings/js/WorkerScriptController.cpp:
274 (WebCore::WorkerScriptController::initScript):
275 (WebCore::WorkerScriptController::evaluate):
276 * bindings/objc/WebScriptObject.mm:
277 (-[WebScriptObject callWebScriptMethod:withArguments:]):
278 (-[WebScriptObject evaluateWebScript:]):
279 (-[WebScriptObject setValue:forKey:]):
280 (-[WebScriptObject valueForKey:]):
281 (-[WebScriptObject removeWebScriptKey:]):
282 (-[WebScriptObject stringRepresentation]):
283 (-[WebScriptObject webScriptValueAtIndex:]):
284 (-[WebScriptObject setWebScriptValueAtIndex:value:]):
285 (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
286 * bridge/NP_jsobject.cpp:
287 (_NPN_InvokeDefault):
292 (_NPN_RemoveProperty):
297 * bridge/c/c_class.cpp:
298 (JSC::Bindings::CClass::~CClass):
299 (JSC::Bindings::CClass::methodsNamed):
300 (JSC::Bindings::CClass::fieldNamed):
301 * bridge/c/c_instance.cpp:
302 (JSC::Bindings::CInstance::moveGlobalExceptionToExecState):
303 (JSC::Bindings::CInstance::invokeMethod):
304 (JSC::Bindings::CInstance::invokeDefaultMethod):
305 (JSC::Bindings::CInstance::invokeConstruct):
306 (JSC::Bindings::CInstance::getPropertyNames):
307 * bridge/c/c_runtime.cpp:
308 (JSC::Bindings::CField::valueFromInstance):
309 (JSC::Bindings::CField::setValueToInstance):
310 * bridge/c/c_utility.cpp:
311 (JSC::Bindings::convertValueToNPVariant):
312 (JSC::Bindings::convertNPVariantToValue):
313 * bridge/jni/jni_class.cpp:
314 (JavaClass::JavaClass):
315 (JavaClass::~JavaClass):
316 * bridge/jni/jni_instance.cpp:
317 (JavaInstance::stringValue):
318 * bridge/jni/jni_jsobject.mm:
319 (JavaJSObject::call):
320 (JavaJSObject::eval):
321 (JavaJSObject::getMember):
322 (JavaJSObject::setMember):
323 (JavaJSObject::removeMember):
324 (JavaJSObject::getSlot):
325 (JavaJSObject::setSlot):
326 (JavaJSObject::toString):
327 (JavaJSObject::convertValueToJObject):
328 (JavaJSObject::convertJObjectToValue):
329 * bridge/jni/jni_objc.mm:
330 (JSC::Bindings::dispatchJNICall):
331 * bridge/jni/jni_runtime.cpp:
332 (JavaMethod::signature):
333 * bridge/jni/jni_runtime.h:
334 (JSC::Bindings::JavaString::JavaString):
335 (JSC::Bindings::JavaString::_commonInit):
336 (JSC::Bindings::JavaString::~JavaString):
337 (JSC::Bindings::JavaString::UTF8String):
338 * bridge/jni/jni_utility.cpp:
339 (JSC::Bindings::convertValueToJValue):
340 * bridge/objc/objc_instance.mm:
341 (ObjcInstance::moveGlobalExceptionToExecState):
342 (ObjcInstance::invokeMethod):
343 (ObjcInstance::invokeDefaultMethod):
344 (ObjcInstance::setValueOfUndefinedField):
345 (ObjcInstance::getValueOfUndefinedField):
346 * bridge/objc/objc_runtime.mm:
347 (JSC::Bindings::ObjcField::valueFromInstance):
348 (JSC::Bindings::ObjcField::setValueToInstance):
349 * bridge/objc/objc_utility.mm:
350 (JSC::Bindings::convertValueToObjcValue):
351 (JSC::Bindings::convertNSStringToString):
352 (JSC::Bindings::convertObjcValueToValue):
353 * bridge/qt/qt_instance.cpp:
354 (JSC::Bindings::QtRuntimeObjectImp::removeFromCache):
355 (JSC::Bindings::QtInstance::~QtInstance):
356 (JSC::Bindings::QtInstance::getQtInstance):
357 (JSC::Bindings::QtInstance::createRuntimeObject):
358 * bridge/qt/qt_runtime.cpp:
359 (JSC::Bindings::convertValueToQVariant):
360 (JSC::Bindings::convertQVariantToValue):
361 (JSC::Bindings::QtRuntimeMetaMethod::call):
362 (JSC::Bindings::QtRuntimeConnectionMethod::call):
363 (JSC::Bindings::QtConnectionObject::execute):
364 * bridge/runtime.cpp:
365 (JSC::Bindings::Instance::createRuntimeObject):
366 * inspector/InspectorController.cpp:
367 (WebCore::InspectorController::addScriptProfile):
368 * inspector/JavaScriptCallFrame.cpp:
369 (WebCore::JavaScriptCallFrame::evaluate):
370 * inspector/JavaScriptDebugServer.cpp:
371 (WebCore::JavaScriptDebugServer::recompileAllJSFunctions):
372 * inspector/JavaScriptProfileNode.cpp:
373 (WebCore::getTotalTime):
374 (WebCore::getSelfTime):
375 (WebCore::getTotalPercent):
376 (WebCore::getSelfPercent):
377 (WebCore::getNumberOfCalls):
378 (WebCore::getChildren):
379 (WebCore::getParent):
381 (WebCore::getVisible):
382 (WebCore::getCallUID):
383 * plugins/PluginView.cpp:
384 (WebCore::PluginView::start):
385 (WebCore::getString):
386 (WebCore::PluginView::performRequest):
387 (WebCore::PluginView::bindingInstance):
388 * plugins/gtk/PluginViewGtk.cpp:
389 (WebCore::PluginView::dispatchNPEvent):
390 (WebCore::PluginView::handleKeyboardEvent):
391 (WebCore::PluginView::handleMouseEvent):
392 (WebCore::PluginView::setNPWindowIfNeeded):
393 (WebCore::PluginView::stop):
394 (WebCore::PluginView::init):
395 * plugins/mac/PluginViewMac.cpp:
396 (WebCore::PluginView::stop):
397 (WebCore::PluginView::setNPWindowIfNeeded):
398 (WebCore::PluginView::dispatchNPEvent):
399 * plugins/qt/PluginViewQt.cpp:
400 (WebCore::PluginView::setNPWindowIfNeeded):
401 (WebCore::PluginView::stop):
402 (WebCore::PluginView::init):
403 * plugins/win/PluginViewWin.cpp:
404 (WebCore::PluginView::dispatchNPEvent):
405 (WebCore::PluginView::handleKeyboardEvent):
406 (WebCore::PluginView::handleMouseEvent):
407 (WebCore::PluginView::setNPWindowRect):
408 (WebCore::PluginView::stop):
410 2009-07-27 Yong Li <yong.li@torchmobile.com>
412 Reviewed by George Staikos.
414 WINCE PORT: Make plugin work for WINCE
415 https://bugs.webkit.org/show_bug.cgi?id=27713
417 * plugins/win/PluginDatabaseWin.cpp:
419 (PathRemoveFileSpec):
420 (WebCore::addWindowsMediaPlayerPluginDirectory):
421 (WebCore::addMacromediaPluginDirectories):
422 * plugins/win/PluginPackageWin.cpp:
423 (WebCore::PluginPackage::load):
424 * plugins/win/PluginViewWin.cpp:
425 (WebCore::registerPluginView):
426 (WebCore::PluginView::wndProc):
427 (WebCore::PluginView::updatePluginWidget):
428 (WebCore::PluginView::paintWindowedPluginIntoContext):
429 (WebCore::PluginView::paint):
430 (WebCore::PluginView::handleMouseEvent):
431 (WebCore::PluginView::setParent):
432 (WebCore::PluginView::setNPWindowRect):
433 (WebCore::PluginView::stop):
434 (WebCore::PluginView::init):
436 2009-07-27 Joseph Pecoraro <joepeck02@gmail.com>
438 Inspector: Tab Through Element Attributes and CSS Properties When Editing
440 https://bugs.webkit.org/show_bug.cgi?id=27673
442 Reviewed by Timothy Hatcher.
444 * inspector/front-end/ElementsTreeOutline.js:
445 (WebInspector.ElementsTreeElement):
446 (WebInspector.ElementsTreeElement.prototype._startEditing): refactored parameter
447 (WebInspector.ElementsTreeElement.prototype._addNewAttribute): refactored to remove excess
448 (WebInspector.ElementsTreeElement.prototype._triggerEditAttribute): provide an attribute name and this will start editing it
449 (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted.moveToNextAttributeIfNeeded): move between attributes
450 (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
451 * inspector/front-end/StylesSidebarPane.js:
452 (WebInspector.StylePropertiesSection.prototype.onpopulate):
453 (WebInspector.StylePropertiesSection.prototype.findTreeElementWithName): search through treeElements for a style property name
454 (WebInspector.StylePropertiesSection.prototype.addNewBlankProperty): initialize a blank property for adding new properties
455 (WebInspector.StylePropertyTreeElement.prototype.updateTitle): add references to the name and value elements
456 (WebInspector.StylePropertyTreeElement.prototype.):
457 (WebInspector.StylePropertyTreeElement.prototype):
458 * inspector/front-end/inspector.js:
459 (WebInspector.startEditing.editingCommitted): include the move direction as a parameter to the commit callback
460 (WebInspector.startEditing.element.handleKeyEvent): handle the tab key to specify the move direction
461 (WebInspector.startEditing):
463 2009-07-27 Mike Fenton <mike.fenton@torchmobile.com>
465 Reviewed by Adam Treat.
467 Add mapping FontWeight to QFont::Weight values as requested via FIXME.
468 https://bugs.webkit.org/show_bug.cgi?id=27663
470 * platform/graphics/qt/FontCacheQt.cpp:
471 (WebCore::FontPlatformDataCacheKey::FontPlatformDataCacheKey):
472 * platform/graphics/qt/FontPlatformData.h:
473 (WebCore::FontPlatformData::toQFontWeight):
474 * platform/graphics/qt/FontPlatformDataQt.cpp:
475 (WebCore::FontPlatformData::FontPlatformData):
477 2009-07-27 Jakub Wieczorek <faw217@gmail.com>
479 Reviewed by Adam Treat.
481 When clearing the plugin database, clear also the timestamp map.
483 https://bugs.webkit.org/show_bug.cgi?id=27651
485 Currently, if we clear the database, it will still think that it is up
486 to date with the plugin directories so refreshing the database again
487 after changing the search paths may not work.
489 * plugins/PluginDatabase.cpp:
490 (WebCore::PluginDatabase::clear):
492 2009-07-27 Albert J. Wong <ajwong@chromium.org>
494 Reviewed by David Levin.
496 Add in trivial implementation of FontPlatformData::description() for
497 linux to fix build bustage in chromium.
499 Fix chromium linux build by adding missing function implementation.
500 https://bugs.webkit.org/show_bug.cgi?id=27732
502 Tested with a build of chromium on linux.
504 * platform/graphics/chromium/FontPlatformDataLinux.cpp:
505 (WebCore::FontPlatformData::description):
506 * platform/graphics/chromium/FontPlatformDataLinux.h:
508 2009-07-27 Brent Fulgham <bfulgham@webkit.org>
510 Build correct, no review.
512 Final correction for WinCairo builds.
513 CoreServices only exists in Apple builds, but
514 some of its internal includes (e.g., <windows.h>) are needed
515 for other Windows targets.
517 * WebCorePrefix.h: When building for WinCairo, make sure
518 to include <windows.h>, <stdio.h>, and <ConditionalMacros.h>
520 2009-07-27 Michelangelo De Simone <micdesim@gmail.com>
522 Reviewed by Darin Adler.
524 https://bugs.webkit.org/show_bug.cgi?id=25552
525 Added new "pattern" attribute to HTMLInputElement and validation code
526 (validity.patternMismatch) as per HTML5 specs.
527 http://www.whatwg.org/specs/web-apps/current-work/multipage/forms.html#attr-input-pattern
529 Tests: fast/forms/ValidityState-002.html
530 fast/forms/ValidityState-patternMismatch-001.html
531 fast/forms/ValidityState-patternMismatch-002.html
532 fast/forms/ValidityState-patternMismatch-003.html
533 fast/forms/ValidityState-patternMismatch-004.html
534 fast/forms/ValidityState-patternMismatch-005.html
535 fast/forms/ValidityState-patternMismatch-006.html
536 fast/forms/ValidityState-patternMismatch-007.html
537 fast/forms/pattern-attribute-001.html
538 fast/forms/pattern-attribute-002.html
539 fast/forms/pattern-attribute-003.html
541 * html/HTMLAttributeNames.in: pattern attribute
542 * html/HTMLFormControlElement.h:
543 (WebCore::HTMLFormControlElement::patternMismatch): method definition
544 * html/HTMLInputElement.cpp:
545 (WebCore::HTMLInputElement::patternMismatch): validation method
546 * html/HTMLInputElement.h:
547 * html/HTMLInputElement.idl:
548 * html/ValidityState.h:
549 (WebCore::ValidityState::patternMismatch): validation flag
551 2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
553 Reviewed by George Staikos.
555 [WML] Manual WML tests aren't properly working
556 https://bugs.webkit.org/show_bug.cgi?id=27718
558 Fix file paths in the manual WML layout tests, remove unneeded tests (already covered by DRT tests).
559 Add missing resources directory and test image. Reformat all testcases to a common style.
560 Add new StartTests.wml file, which should be used as starting point to crawl through the manual tests.
562 Filing bugs soon for all tests exposing bugs (7 in total).
564 * manual-tests/wml/StartTests.wml: Added.
565 * manual-tests/wml/a-br-element.wml:
566 * manual-tests/wml/a-element.wml:
567 * manual-tests/wml/a-img-element.wml:
568 * manual-tests/wml/access-target.wml:
569 * manual-tests/wml/anchor-br-element.wml:
570 * manual-tests/wml/anchor-element.wml:
571 * manual-tests/wml/anchor-img-element.wml:
572 * manual-tests/wml/card-newcontext-attr.wml:
573 * manual-tests/wml/card-onenterbackward.wml:
574 * manual-tests/wml/card-onenterforward.wml:
575 * manual-tests/wml/card-ontimer.wml:
576 * manual-tests/wml/card-title-attr.wml: Removed.
577 * manual-tests/wml/deck-access-control.wml:
578 * manual-tests/wml/go-element.wml: Removed.
579 * manual-tests/wml/input-emptyok.wml: Removed.
580 * manual-tests/wml/input-format.wml:
581 * manual-tests/wml/onevent-go.wml:
582 * manual-tests/wml/onevent-noop.wml:
583 * manual-tests/wml/onevent-prev.wml:
584 * manual-tests/wml/onevent-refresh.wml:
585 * manual-tests/wml/onevent-shadow.wml:
586 * manual-tests/wml/postfield-get.wml: Removed.
587 * manual-tests/wml/postfield-post.wml: Removed.
588 * manual-tests/wml/resources: Added.
589 * manual-tests/wml/resources/smiley.png: Added.
590 * manual-tests/wml/select-element.wml:
591 * manual-tests/wml/select-onpick-event.wml:
592 * manual-tests/wml/setvar-element.wml:
593 * manual-tests/wml/targetdeck.wml:
594 * manual-tests/wml/task-go-in-anchor.wml:
595 * manual-tests/wml/task-noop-in-do.wml:
596 * manual-tests/wml/task-noop-in-onevent.wml: Removed.
597 * manual-tests/wml/task-prev-in-anchor.wml:
598 * manual-tests/wml/task-refresh-in-anchor.wml:
599 * manual-tests/wml/template-go.wml:
600 * manual-tests/wml/template-onevent.wml: Removed.
601 * manual-tests/wml/template-ontimer.wml:
602 * manual-tests/wml/timer.wml:
603 * manual-tests/wml/variable-substitution.wml:
605 2009-07-27 Nate Chapin <japhet@chromium.org>
607 Reviewed by Dimitri Glazkov.
609 Fix a regression introduced in r42671, which caused the js event
610 object to be hidden (some websites depend on being able to access it).
612 https://bugs.webkit.org/show_bug.cgi?id=27719
614 * bindings/v8/V8AbstractEventListener.cpp:
615 (WebCore::V8AbstractEventListener::invokeEventHandler): Make the event object visible to javascript, instead of hidden.
617 2009-07-27 Dumitru Daniliuc <dumi@chromium.org>
619 Reviewed by Dimitri Glazkov.
621 Removing a no-op block of code in DatabaseTracker.cpp that
622 should've been removed in the patch for bug 26054.
624 https://bugs.webkit.org/show_bug.cgi?id=27666
626 All tests in WebCore/storage pass.
628 * storage/DatabaseTracker.cpp:
629 (WebCore::DatabaseTracker::fullPathForDatabase): Removed a no-op
630 block of code that was moved to SQLiteFileSystem.cpp and should
631 have been removed from DatabaseTracker.cpp
633 2009-07-27 Jian Li <jianli@chromium.org>
635 Reviewed by David Levin.
637 Fix error handling in dedicated worker and worker context.
638 https://bugs.webkit.org/show_bug.cgi?id=27525
640 The following problems have been fixed:
641 1) The uncaught runtime script error is not reported using the
642 WorkerGlobalScope object's onerror attribute.
643 2) If the error is still not handled afterwards (onerror attribute
644 is not defined as a function or it returns true), the error should
645 be reported back to the associated Worker object by firing an
647 3) If the error is still not handled by the associated Worker
648 object, the error should be reported to the user.
650 Test: fast/workers/worker-script-error.html
652 * bindings/js/JSEventListener.cpp:
653 (WebCore::JSEventListener::reportError):
654 * bindings/js/JSEventListener.h:
655 * dom/EventListener.h:
656 (WebCore::EventListener::reportError): adds a function to call
657 EventListener as a function with 3 arguments to report an error.
658 * workers/AbstractWorker.cpp:
659 (WebCore::AbstractWorker::dispatchScriptErrorEvent):
660 * workers/AbstractWorker.h:
661 * workers/DedicatedWorkerContext.cpp:
662 (WebCore::DedicatedWorkerContext::reportException):
663 * workers/WorkerContext.cpp:
664 (WebCore::WorkerContext::reportException):
665 * workers/WorkerContext.h:
666 * workers/WorkerMessagingProxy.cpp:
667 (WebCore::WorkerExceptionTask::performTask):
668 * workers/WorkerMessagingProxy.h:
670 2009-07-27 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
672 Reviewed by George Staikos.
674 [WML] History handling / page cache / loading is buggy and depends on several hacks
675 https://bugs.webkit.org/show_bug.cgi?id=27707
677 Redesign WML history/loading handling. In detail:
679 - Remove FrameLoader::setForceReloadWmlDeck(). WML used to force a special loading behaviour
680 by calling this method from WMLGoElement & friends - instead teach FrameLoader to detect
683 WML content is usually a standalone WML document (isWMLDocument()=true) or as special case
684 an XHTML document which embeds a WML document (that's the way the WML layout tests work).
685 Force WML loading behaviour even for XHTML document which embed WML documents. This only
686 applies to our layout tests, not for any real world site. Though it gives us a perfect
687 way to test the WML loading code even when we're not operating on a standalone WML document.
689 Whenever a WMLCardElement is inserted into the document it will check wheter it's inserted
690 in a standalone WML document or wheter the main frame document is different. If it differs
691 the main frame documents' "containsWMLContent" property is set to true.
693 -> Make FrameLoader::shouldReload() use the new frameContainsWMLContent() method, which
694 checks if the associated frame document is a WML document or wheter it contains WML content.
696 - Change FrameLoader::loadItem() to use the new frameContainsWMLContent() method for 'shouldScroll'
697 detection. WML documents (or those containing WML content) always want new loads even for in-page
698 navigation. No "scroll to anchor" mechanism should apply.
700 - Modify FrameLoader::canCachePageContainingThisFrame() to check for !frameContainsWMLContent().
701 WML pages should never be cached, potential security problem due the use of variables (per spec).
703 Add two new WML tests which were broken before, testing onenterforward/onenterbackward event handling
704 and history navigation (<prev/> task).
706 Tests: wml/enter-card-with-events.html
707 wml/enter-first-card-with-events.html
709 * dom/Document.cpp: Initialize new 'm_containsWMLContent' property.
710 (WebCore::Document::Document):
711 * dom/Document.h: Add new helper methods and 'm_containsWMLContent" variable (explained above).
712 (WebCore::Document::setContainsWMLContent):
713 (WebCore::Document::containsWMLContent):
714 * history/BackForwardList.cpp:
715 (WebCore::BackForwardList::clearWMLPageHistory): Renamed from clearWmlPageHistory() & slight cleanup.
716 * history/BackForwardList.h:
717 * loader/FrameLoader.cpp: Rework WML loading behaviour (explained above).
718 (WebCore::FrameLoader::FrameLoader):
719 (WebCore::frameContainsWMLContent):
720 (WebCore::FrameLoader::canCachePageContainingThisFrame):
721 (WebCore::FrameLoader::shouldReload):
722 (WebCore::FrameLoader::loadItem):
723 * loader/FrameLoader.h:
724 * wml/WMLCardElement.cpp:
725 (WebCore::WMLCardElement::handleIntrinsicEventIfNeeded): No need anymore to manually track history length.
726 (WebCore::WMLCardElement::insertedIntoDocument): Handle setting containsWMLContent on the main frame document.
727 * wml/WMLGoElement.cpp:
728 (WebCore::WMLGoElement::executeTask): Remove call to FrameLoader::setForceReloadWmlDeck()
729 * wml/WMLPageState.cpp: Remove 'm_historyLength' - no need anymore to track history length on our own.
730 (WebCore::WMLPageState::WMLPageState):
731 (WebCore::WMLPageState::dump):
732 (WebCore::WMLPageState::reset):
733 * wml/WMLPageState.h:
735 2009-07-27 Pavel Feldman <pfeldman@chromium.org>
737 Reviewed by Adam Roben.
739 Fix Chromium build breakage introduced in 46388.
741 https://bugs.webkit.org/show_bug.cgi?id=27705
743 * platform/graphics/chromium/FontPlatformDataChromiumWin.cpp:
744 (WebCore::FontPlatformData::description):
745 * platform/graphics/chromium/FontPlatformDataChromiumWin.h:
747 2009-07-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
749 Reviewed by Simon Hausmann.
751 Add some more debug logging to PluginViewMac.
753 * plugins/mac/PluginViewMac.cpp:
755 2009-07-27 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
757 Reviewed by Jan Michael Alonzo.
759 Remove dead code from the GTK NPAPI implementation.
761 * plugins/gtk/PluginViewGtk.cpp:
763 2009-07-27 Csaba Osztrogonac <oszi@inf.u-szeged.hu>
765 Reviewed by Simon Hausmann.
767 [Qt] Buildfix on Windows.
768 https://bugs.webkit.org/show_bug.cgi?id=27702
770 * plugins/win/PluginViewWin.cpp:
771 (WebCore::PluginView::hookedEndPaint):
772 Constraint of (*endPaint) operand modified from "g" to "m" (memory) in inline
773 assembly, because with "g" constraint, wrong assembly code generated.
775 2009-07-27 Pavel Feldman <pfeldman@chromium.org>
777 Reviewed by Timothy Hatcher.
779 WebCore bindings: Implement ScriptArray bindings.
781 https://bugs.webkit.org/show_bug.cgi?id=27691
786 * WebCore.vcproj/WebCore.vcproj:
787 * WebCore.xcodeproj/project.pbxproj:
788 * bindings/js/ScriptArray.cpp: Added.
789 (WebCore::ScriptArray::ScriptArray):
790 (WebCore::handleException):
791 (WebCore::ScriptArray::set):
793 (WebCore::ScriptArray::createNew):
794 * bindings/js/ScriptArray.h: Added.
795 (WebCore::ScriptArray::ScriptArray):
796 (WebCore::ScriptArray::jsArray):
797 * bindings/v8/ScriptArray.cpp: Added.
798 (WebCore::ScriptArray::ScriptArray):
799 (WebCore::ScriptArray::set):
800 (WebCore::ScriptArray::length):
801 (WebCore::ScriptArray::createNew):
802 * bindings/v8/ScriptArray.h: Added.
803 (WebCore::ScriptArray::ScriptArray):
804 (WebCore::ScriptArray::~ScriptArray):
806 2009-07-27 Brent Fulgham <bfulgham@webkit.org>
808 Build correct, no review.
810 Change in r46407 broke Apple Windows build.
811 Switch to WinCairo-only test, to avoid any
812 other platform break.
816 2009-07-26 Brent Fulgham <bfulgham@webkit.org>
818 Build correct, no review.
820 Change in r46407 broke Apple Windows build.
822 * WebCorePrefix.h: Use WTF_PLATFORM_CG to decide if
823 CoreServices.h should be included.
825 2009-07-26 Brent Fulgham <bfulgham@webkit.org>
827 Build correction, no review.
829 Change in r46195 broke WinCairo build.
831 * WebCorePrefix.h: CoreServices should be ignored
834 2009-07-26 Pavel Feldman <pfeldman@chromium.org>
836 Reviewed by Timothy Hatcher.
838 Web Inspector: Implement the breakpoints sidebar pane.
839 This change adds simple UI support into the existing
840 BreakpointSidebarPane.
842 https://bugs.webkit.org/show_bug.cgi?id=11175
844 * inspector/front-end/Breakpoint.js:
845 (WebInspector.Breakpoint.prototype.set enabled):
846 (WebInspector.Breakpoint.prototype.get label):
847 (WebInspector.Breakpoint.prototype.get id):
848 * inspector/front-end/BreakpointsSidebarPane.js:
849 (WebInspector.BreakpointsSidebarPane):
850 (WebInspector.BreakpointsSidebarPane.prototype.addBreakpoint):
851 (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement):
852 (WebInspector.BreakpointsSidebarPane.prototype._appendBreakpointElement.labelClicked):
853 (WebInspector.BreakpointsSidebarPane.prototype.removeBreakpoint):
854 (WebInspector.BreakpointsSidebarPane.prototype._breakpointEnableChanged):
855 * inspector/front-end/ScriptsPanel.js:
856 (WebInspector.ScriptsPanel):
857 (WebInspector.ScriptsPanel.prototype.scriptOrResourceForID):
858 * inspector/front-end/inspector.css:
860 2009-07-16 Shinichiro Hamaji <hamaji@chromium.org>
862 Reviewed by Oliver Hunt.
864 Canvas: rotation of 'no-repeat' pattern still has small error
865 https://bugs.webkit.org/show_bug.cgi?id=26749
867 Use 1<<22 as steps of no-repeat pattern to make the error less
868 than 0.5. The previous value may cause 1 pixel errors.
870 Add another test to show this bug clearly.
871 Also add png expected image which was missing in the previous patch.
873 Test: fast/canvas/image-pattern-rotate.html
875 * platform/graphics/cg/PatternCG.cpp:
876 (WebCore::Pattern::createPlatformPattern):
878 2009-07-25 Kwang Yul Seo <skyul@company100.net>
880 Reviewed by Darin Adler.
882 Windows build break due to warning C4819
883 https://bugs.webkit.org/show_bug.cgi?id=27416
885 Disable C4819 warning to fix build.
887 * WebCore.vcproj/QTMovieWin.vcproj:
888 * WebCore.vcproj/WebCore.vcproj:
890 2009-07-25 Joseph Pecoraro <joepeck02@gmail.com>
892 Reviewed by Kevin McCullough.
894 Inspector: Keyboard Shortcuts to Switch Panels
895 https://bugs.webkit.org/show_bug.cgi?id=27286
897 * inspector/front-end/inspector.js:
898 (WebInspector.loaded): save a list of the order of the panels
899 (WebInspector.documentKeyDown): handle the keyboard shortcuts to traverse the panels
901 2009-07-25 Laszlo Gombos <laszlo.1.gombos@nokia.com>
903 Reviewed by George Staikos.
905 [Qt] Fix build break after r46369
906 https://bugs.webkit.org/show_bug.cgi?id=27680
910 2009-07-25 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
912 Reviewed by George Staikos.
914 [WML] Variable substitution is buggy
915 https://bugs.webkit.org/show_bug.cgi?id=27677
917 Substitute variables upon attach() time instead of insertedIntoDocument(). Otherwhise variable substitution
918 won't work during inter-deck jumps (same URL, different fragment). Covered by new test fast/wml/newcontext-same-deck.html.
921 (WebCore::Text::attach):
924 2009-07-25 Nikolas Zimmermann <nikolas.zimmermann@torchmobile.com>
926 Reviewed by George Staikos.
928 [WML] WMLDoElement doesn't update its RenderButton object upon attach()
929 https://bugs.webkit.org/show_bug.cgi?id=27676
931 WMLDoElement needs to implement attach() and call updateFromElement() on its associated RenderButton.
932 Mimics HTMLButtonElement/HTMLFormControlElement behaviour and fixes several painting/styling issues covered by existing tests in fast/wml.
934 * wml/WMLDoElement.cpp:
935 (WebCore::WMLDoElement::attach):
936 * wml/WMLDoElement.h:
938 2009-07-25 Pavel Feldman <pfeldman@chromium.org>
940 Fix Windows build breakage introduced in 46390.
942 * WebCore.vcproj/WebCore.vcproj:
944 2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
946 Reviewed by Oliver Hunt.
948 Inspector: Properties Should be Sorted more Naturally
949 https://bugs.webkit.org/show_bug.cgi?id=27329
951 * inspector/front-end/ObjectPropertiesSection.js:
952 (WebInspector.ObjectPropertiesSection.prototype.update): use the displaySort when showing properties
953 (WebInspector.ObjectPropertiesSection.prototype._displaySort): alphaNumerical sort
954 (WebInspector.ObjectPropertyTreeElement.prototype.onpopulate): use the displaySort when showing properties
955 * inspector/front-end/utilities.js:
956 (Object.sortedProperties): allow for an optional sorting function in Object.sortedProperties
958 2009-07-24 Pavel Feldman <pfeldman@chromium.org>
960 Reviewed by Timothy Hatcher.
962 Web Inspector: Split InspectorController into InspectorController
963 and InspectorBackend. Everything frontend needs from InspectorController
964 will slowly migrate into the InspectorBackend.
966 https://bugs.webkit.org/show_bug.cgi?id=27541
968 * DerivedSources.make:
972 * WebCore.xcodeproj/project.pbxproj:
973 * WebCoreSources.bkl:
974 * bindings/js/JSInspectorBackendCustom.cpp: Added.
975 (WebCore::JSInspectorBackend::highlightDOMNode):
976 (WebCore::JSInspectorBackend::search):
977 (WebCore::JSInspectorBackend::databaseTableNames):
978 (WebCore::JSInspectorBackend::inspectedWindow):
979 (WebCore::JSInspectorBackend::setting):
980 (WebCore::JSInspectorBackend::setSetting):
981 (WebCore::JSInspectorBackend::wrapCallback):
982 (WebCore::JSInspectorBackend::currentCallFrame):
983 (WebCore::JSInspectorBackend::profiles):
984 * bindings/v8/custom/V8InspectorBackendCustom.cpp: Added.
985 (WebCore::CALLBACK_FUNC_DECL):
986 * bindings/js/JSInspectorControllerCustom.cpp: Removed.
987 * bindings/js/ScriptObject.cpp:
988 (WebCore::ScriptGlobalObject::set):
989 * bindings/js/ScriptObject.h:
990 * bindings/v8/DOMObjectsInclude.h:
991 * bindings/v8/DerivedSourcesAllInOne.cpp:
992 * bindings/v8/ScriptObject.cpp:
993 (WebCore::ScriptGlobalObject::set):
994 * bindings/v8/ScriptObject.h:
995 * bindings/v8/V8Index.cpp:
996 * bindings/v8/V8Index.h:
997 * bindings/v8/custom/V8CustomBinding.h:
998 * bindings/v8/custom/V8InspectorControllerCustom.cpp: Removed.
999 * inspector/InspectorController.cpp:
1000 (WebCore::InspectorController::InspectorController):
1001 (WebCore::InspectorController::windowScriptObjectAvailable):
1002 * inspector/InspectorController.h:
1003 (WebCore::InspectorController::inspectorBackend):
1004 * inspector/InspectorBackend.cpp: Added.
1005 * inspector/InspectorBackend.h: Added.
1006 (WebCore::InspectorBackend::create):
1007 (WebCore::InspectorBackend::inspectorController):
1008 * inspector/InspectorBackend.idl: Added.
1009 * inspector/InspectorController.idl: Removed.
1010 * inspector/front-end/Resource.js:
1012 (WebCore::Page::Page):
1015 2009-07-25 Mike Fenton <mike.fenton@torchmobile.com>
1017 Reviewed by George Staikos.
1019 Update WebCore/page/Frame.cpp/h to conform to WebKit
1020 Style Guidelines as identified by cpplint.py.
1021 https://bugs.webkit.org/show_bug.cgi?id=27654
1024 (WebCore::Frame::Frame):
1025 (WebCore::Frame::~Frame):
1026 (WebCore::Frame::setDocument):
1027 (WebCore::Frame::firstRectForRange):
1028 (WebCore::createRegExpForLabels):
1029 (WebCore::Frame::searchForLabelsBeforeElement):
1030 (WebCore::Frame::matchLabelsAgainstElement):
1031 (WebCore::Frame::selectionLayoutChanged):
1032 (WebCore::Frame::setZoomFactor):
1033 (WebCore::Frame::reapplyStyles):
1034 (WebCore::Frame::isContentEditable):
1035 (WebCore::Frame::computeAndSetTypingStyle):
1036 (WebCore::Frame::selectionStartStylePropertyValue):
1037 (WebCore::Frame::selectionComputedStyle):
1038 (WebCore::Frame::applyEditingStyleToBodyElement):
1039 (WebCore::Frame::removeEditingStyleFromBodyElement):
1040 (WebCore::Frame::applyEditingStyleToElement):
1041 (WebCore::Frame::selectionBounds):
1042 (WebCore::Frame::currentForm):
1043 (WebCore::Frame::revealSelection):
1044 (WebCore::Frame::styleForSelectionStart):
1045 (WebCore::Frame::setSelectionFromNone):
1046 (WebCore::Frame::findString):
1047 (WebCore::Frame::markAllMatchesForText):
1048 (WebCore::Frame::setMarkedTextMatchesAreHighlighted):
1049 (WebCore::Frame::clearFormerDOMWindow):
1050 (WebCore::Frame::unfocusWindow):
1051 (WebCore::Frame::respondToChangedSelection):
1052 (WebCore::Frame::documentAtPoint):
1054 (WebCore::Frame::create):
1055 (WebCore::Frame::displayStringModifiedByEncoding):
1056 (WebCore::Frame::pageZoomFactor):
1057 (WebCore::Frame::textZoomFactor):
1059 2009-07-24 Dan Bernstein <mitz@apple.com>
1061 Reviewed by Darin Adler.
1063 Add functions to print the glyph page trees for debugging
1064 https://bugs.webkit.org/show_bug.cgi?id=27671
1066 * platform/graphics/FontData.h: Defined a description() method.
1068 * platform/graphics/GlyphPageTreeNode.cpp:
1069 (WebCore::GlyphPageTreeNode::showSubtree): Added. Prints the node and
1071 (showGlyphPageTrees): Added. Prints all glyph page trees.
1072 (showGlyphPageTree): Added. Prints the glyph page tree for a given page.
1073 * platform/graphics/GlyphPageTreeNode.h:
1075 * platform/graphics/SegmentedFontData.cpp:
1076 (WebCore::SegmentedFontData::description): Added.
1078 * platform/graphics/SegmentedFontData.h:
1079 * platform/graphics/SimpleFontData.cpp:
1080 (WebCore::SimpleFontData::description): Added. Uses the platform data
1081 as the description for non-svg, non-custom fonts.
1082 * platform/graphics/SimpleFontData.h:
1084 * platform/graphics/gtk/FontPlatformData.h:
1085 * platform/graphics/gtk/FontPlatformDataGtk.cpp:
1086 (WebCore::FontPlatformData::description): Added. Returns a null string.
1087 * platform/graphics/gtk/FontPlatformDataPango.cpp:
1088 (WebCore::FontPlatformData::description): Added. Returns a null string.
1090 * platform/graphics/mac/FontPlatformData.h:
1091 * platform/graphics/mac/FontPlatformDataMac.mm:
1092 (WebCore::FontPlatformData::description): Added. Returns the
1093 description of the CGFont, the size and the synthetic style flags,
1096 * platform/graphics/qt/FontPlatformData.h:
1097 * platform/graphics/qt/FontPlatformDataQt.cpp:
1098 (WebCore::FontPlatformData::description): Added. Returns a null string.
1100 * platform/graphics/win/FontPlatformData.h:
1101 * platform/graphics/win/FontPlatformDataWin.cpp:
1102 (WebCore::FontPlatformData::description): Added. Returns a null string.
1104 * platform/graphics/wince/FontPlatformData.cpp:
1105 (WebCore::FontPlatformData::description): Added. Returns a null string.
1106 * platform/graphics/wince/FontPlatformData.h:
1108 * platform/graphics/wx/FontPlatformData.h:
1109 * platform/graphics/wx/FontPlatformDataWx.cpp:
1110 (WebCore::FontPlatformData::description): Added. Returns a null string.
1112 2009-07-24 Mads Ager <ager@chromium.org>
1114 Reviewed by Adam Barth.
1116 SVG and XPath memory leaks in V8 bindings
1117 https://bugs.webkit.org/show_bug.cgi?id=27488
1119 Add proper 'create' methods to SVGPodTypeWrappers and
1120 XPathNSResolvers in the V8 bindings to avoid memory leaks.
1122 Introduce convertToV8Object methods that accept PassRefPtrs and
1123 clean up the use of get() and release() on RefPtrs.
1125 * bindings/scripts/CodeGeneratorV8.pm:
1126 * bindings/v8/V8DOMWrapper.h:
1127 (WebCore::V8DOMWrapper::convertNodeToV8Object):
1128 (WebCore::V8DOMWrapper::convertEventToV8Object):
1129 (WebCore::V8DOMWrapper::convertEventTargetToV8Object):
1130 (WebCore::V8DOMWrapper::convertEventListenerToV8Object):
1131 * bindings/v8/V8SVGPODTypeWrapper.h:
1132 (WebCore::V8SVGPODTypeWrapperCreatorForList::create):
1133 (WebCore::V8SVGPODTypeWrapperCreatorForList::V8SVGPODTypeWrapperCreatorForList):
1134 (WebCore::V8SVGStaticPODTypeWrapper::create):
1135 (WebCore::V8SVGStaticPODTypeWrapper::V8SVGStaticPODTypeWrapper):
1136 (WebCore::V8SVGStaticPODTypeWrapperWithPODTypeParent::create):
1137 (WebCore::V8SVGStaticPODTypeWrapperWithPODTypeParent::V8SVGStaticPODTypeWrapperWithPODTypeParent):
1138 (WebCore::V8SVGStaticPODTypeWrapperWithParent::create):
1139 (WebCore::V8SVGStaticPODTypeWrapperWithParent::V8SVGStaticPODTypeWrapperWithParent):
1140 (WebCore::V8SVGDynamicPODTypeWrapper::create):
1141 (WebCore::V8SVGDynamicPODTypeWrapper::V8SVGDynamicPODTypeWrapper):
1142 (WebCore::V8SVGDynamicPODTypeWrapperCache::lookupOrCreateWrapper):
1143 * bindings/v8/custom/V8CanvasRenderingContext2DCustom.cpp:
1144 (WebCore::CALLBACK_FUNC_DECL):
1145 * bindings/v8/custom/V8ClientRectListCustom.cpp:
1146 (WebCore::INDEXED_PROPERTY_GETTER):
1147 * bindings/v8/custom/V8CustomXPathNSResolver.cpp:
1148 (WebCore::V8CustomXPathNSResolver::create):
1149 * bindings/v8/custom/V8CustomXPathNSResolver.h:
1150 * bindings/v8/custom/V8DOMWindowCustom.cpp:
1151 (WebCore::NAMED_PROPERTY_GETTER):
1152 * bindings/v8/custom/V8DocumentCustom.cpp:
1153 (WebCore::CALLBACK_FUNC_DECL):
1154 * bindings/v8/custom/V8ElementCustom.cpp:
1155 (WebCore::CALLBACK_FUNC_DECL):
1156 * bindings/v8/custom/V8HTMLCollectionCustom.cpp:
1157 (WebCore::getNamedItems):
1159 * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1160 (WebCore::NAMED_PROPERTY_GETTER):
1161 (WebCore::ACCESSOR_GETTER):
1162 * bindings/v8/custom/V8HTMLFormElementCustom.cpp:
1163 (WebCore::INDEXED_PROPERTY_GETTER):
1164 (WebCore::NAMED_PROPERTY_GETTER):
1165 * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
1166 (WebCore::INDEXED_PROPERTY_GETTER):
1167 * bindings/v8/custom/V8HTMLSelectElementCollectionCustom.cpp:
1168 (WebCore::NAMED_PROPERTY_GETTER):
1169 * bindings/v8/custom/V8InspectorControllerCustom.cpp:
1170 (WebCore::CALLBACK_FUNC_DECL):
1171 * bindings/v8/custom/V8NamedNodeMapCustom.cpp:
1172 (WebCore::INDEXED_PROPERTY_GETTER):
1173 (WebCore::NAMED_PROPERTY_GETTER):
1174 * bindings/v8/custom/V8NodeIteratorCustom.cpp:
1176 * bindings/v8/custom/V8NodeListCustom.cpp:
1177 (WebCore::NAMED_PROPERTY_GETTER):
1178 * bindings/v8/custom/V8SVGMatrixCustom.cpp:
1179 (WebCore::CALLBACK_FUNC_DECL):
1180 * bindings/v8/custom/V8TreeWalkerCustom.cpp:
1182 * bindings/v8/custom/V8XSLTProcessorCustom.cpp:
1183 (WebCore::CALLBACK_FUNC_DECL):
1185 2009-07-24 Brian Weinstein <bweinstein@apple.com>
1187 Reviewed by Jon Honeycutt.
1189 Fix of <rdar://6310538> Middle-click panning should be springloaded while dragging
1190 https://bugs.webkit.org/show_bug.cgi?id=21794
1192 Create two new booleans to determine whether we have done a springloaded pan scroll, and update
1193 the name of setPanScrollCursor to updatePanScrollState to more accurately describe what the function
1196 * page/EventHandler.cpp:
1197 (WebCore::EventHandler::EventHandler): Initialized two new booleans.
1198 (WebCore::EventHandler::autoscrollTimerFired):
1199 (WebCore::EventHandler::updatePanScrollState): Renamed from setPanScrollCursor.
1200 (WebCore::EventHandler::stopAutoscrollTimer): Clear the pan scrolling in progress flag.
1201 (WebCore::EventHandler::handleMouseReleaseEvent): Clear the pan scrolling button pressed flag.
1202 * page/EventHandler.h:
1204 2009-07-24 Yong Li <yong.li@torchmobile.com>
1206 Reviewed by George Staikos.
1208 https://bugs.webkit.org/show_bug.cgi?id=27657
1209 Add more wince port files to WebCore
1211 Written by Yong Li <yong.li@torchmobile.com> and Lyon Chen <lyon.chen@torchmobile.com>
1213 * loader/icon/wince/IconDatabaseWince.cpp: Added.
1214 * rendering/RenderThemeWince.cpp: Added.
1215 * rendering/RenderThemeWince.h: Added.
1216 * storage/wince/DatabaseThreadWince.cpp: Added.
1217 * storage/wince/DatabaseThreadWince.h: Added.
1218 * storage/wince/LocalStorageThreadWince.cpp: Added.
1219 * storage/wince/LocalStorageThreadWince.h: Added.
1220 * svg/graphics/wince/SVGResourceFilterWince.cpp: Added.
1222 2009-07-24 Ryosuke Niwa <rniwa@webkit.org>
1224 Reviewed by Justin Garcia.
1226 execCommand('underline') can modify DOM outside of the contentEditable area
1227 https://bugs.webkit.org/show_bug.cgi?id=24333
1229 highestAncestorWithTextDecoration stops at the closest unsplittable element so that if text-decoration is applied
1230 outside of it, we don't accidently modify the style attribute.
1232 Tests: editing/style/textdecoration-outside-of-rooteditable.html
1233 editing/style/textdecoration-outside-of-unsplittable-element.html
1235 * editing/ApplyStyleCommand.cpp:
1236 (WebCore::StyleChange::init):
1237 (WebCore::highestAncestorWithTextDecoration):
1239 2009-07-24 Daniel Bates <dbates@intudata.com>
1241 Reviewed by Adam Barth.
1243 https://bugs.webkit.org/show_bug.cgi?id=27639
1245 Fixes false positives when evaluating certain strings that only contain
1246 non-canonical characters.
1248 Test: http/tests/security/xssAuditor/script-tag-safe.html
1250 * page/XSSAuditor.cpp:
1251 (WebCore::isNonCanonicalCharacter):
1252 (WebCore::XSSAuditor::findInRequest):
1254 2009-07-24 Drew Wilson <atwilson@google.com>
1256 Reviewed by David Levin.
1258 Changed WorkerContext destructor to not access possibly-freed WorkerThread.
1260 Failed assertion in WorkerContext::~WorkerContext().
1261 https://bugs.webkit.org/show_bug.cgi?id=27665
1263 * workers/DedicatedWorkerContext.cpp:
1264 (WebCore::DedicatedWorkerContext::~DedicatedWorkerContext):
1265 * workers/WorkerContext.cpp:
1266 (WebCore::WorkerContext::~WorkerContext):
1267 Removed assertion that relies on WorkerThread still being alive (moved to DedicatedWorkerContext destructor).
1269 2009-07-24 Drew Wilson <atwilson@google.com>
1271 Reviewed by Adam Barth.
1273 Updated code generator to properly generate bindings for WorkerContext exposed functions.
1275 Storing a reference to WorkerContext.postMessage() and calling it later yields a TypeError
1276 https://bugs.webkit.org/show_bug.cgi?id=27419
1278 Test: fast/workers/worker-call.html
1280 * bindings/js/JSWorkerContextBase.cpp:
1281 (WebCore::toJSDedicatedWorkerContext):
1282 (WebCore::toJSWorkerContext):
1283 Functions that convert from JSValue to the appropriate WorkerContext/DedicatedWorkerContext object.
1284 * bindings/js/JSWorkerContextBase.h:
1285 Added toJS*WorkerContext APIs.
1286 * bindings/scripts/CodeGeneratorJS.pm:
1287 Added code to appropriately check the passed-in this object when invoking functions at global scope.
1289 2009-07-24 Drew Wilson <atwilson@google.com>
1291 Reviewed by Adam Barth.
1293 Refactor WorkerContext to move DedicatedWorker-specific APIs into DedicatedWorkerContext
1294 https://bugs.webkit.org/show_bug.cgi?id=27420
1296 No new tests as the existing tests already provide sufficient coverage (this is just a refactoring with no new functionality).
1298 * DerivedSources.cpp:
1299 Added JSDerivedWorkerContext.cpp
1300 * DerivedSources.make:
1301 Added DerivedWorkerContext files
1303 Added DerivedWorkerContext files
1305 Added DerivedWorkerContext files
1307 Added DerivedWorkerContext files
1308 * WebCore.vcproj/WebCore.vcproj:
1309 Added DerivedWorkerContext files
1310 * WebCore.xcodeproj/project.pbxproj:
1311 Added DerivedWorkerContext files
1312 * bindings/js/JSDedicatedWorkerContextCustom.cpp: Added.
1313 (WebCore::JSDedicatedWorkerContext::mark):
1314 Custom mark function for onmessage event handler.
1315 * bindings/js/JSEventTarget.cpp:
1317 Supports conversion to JSDedicatedWorkerContext.
1318 (WebCore::toEventTarget):
1319 * bindings/js/JSWorkerContextCustom.cpp:
1320 (WebCore::JSWorkerContext::mark):
1321 Moved onmessage mark handling into DedicatedWorkerContext.
1322 * bindings/js/WorkerScriptController.cpp:
1323 Added appropriate casts to DedicatedWorkerContext for postMessage().
1324 (WebCore::WorkerScriptController::initScript):
1325 Manually sets up the prototype chain for the worker context.
1326 * bindings/scripts/CodeGeneratorJS.pm:
1327 Changed special case code for WorkerContext to be triggered by new IsWorkerContext attribute.
1328 * bindings/scripts/CodeGeneratorV8.pm:
1329 Changed hard-coded tests for WorkerContext to support DedicatedWorkerContext.
1330 * bindings/v8/DOMObjectsInclude.h:
1331 Added DedicatedWorkerContext.h
1332 * bindings/v8/DerivedSourcesAllInOne.cpp:
1333 Added V8DedicatedWorkerContext.cpp
1334 * bindings/v8/V8DOMWrapper.cpp:
1335 (WebCore::V8DOMWrapper::getTemplate):
1336 Added code to reserve extra fields for V8DedicatedWorkerContext.
1337 * bindings/v8/V8Index.cpp:
1338 Now includes V8DedicatedWorkerContext.h in addition to V8WorkerContext.h
1339 * bindings/v8/V8Index.h:
1340 Added DedicatedWorkerContext as a non-node wrapper type.
1341 Removed WORKERCONTEXT as a valid template type.
1342 * bindings/v8/WorkerContextExecutionProxy.cpp:
1343 (WebCore::WorkerContextExecutionProxy::initContextIfNeeded):
1344 Creates DedicatedWorkerContext instead of WorkerContext.
1345 (WebCore::WorkerContextExecutionProxy::EventTargetToV8Object):
1346 Returns DedicatedWorkerContext instead of WorkerContext.
1347 (WebCore::WorkerContextExecutionProxy::retrieve):
1348 Refactored to deal with DedicatedWorkerContext.
1349 * bindings/v8/custom/V8AbstractWorkerCustom.cpp:
1350 * bindings/v8/custom/V8CustomBinding.h:
1351 * bindings/v8/custom/V8DedicatedWorkerContextCustom.cpp: Added.
1352 Moved onmessage code from V8WorkerContextCustom.cpp
1353 (WebCore::ACCESSOR_GETTER):
1354 (WebCore::ACCESSOR_SETTER):
1355 * bindings/v8/custom/V8WorkerContextCustom.cpp:
1356 Moved onmessage code to V8DedicatedWorkerContextCustom.cpp
1357 * dom/EventTarget.cpp:
1358 (WebCore::EventTarget::toDedicatedWorkerContext):
1359 * dom/EventTarget.h:
1360 * workers/DedicatedWorkerContext.cpp: Added.
1361 Moved DedicatedWorker-only APIs from WorkerContext.
1362 (WebCore::DedicatedWorkerContext::DedicatedWorkerContext):
1363 (WebCore::DedicatedWorkerContext::~DedicatedWorkerContext):
1364 (WebCore::DedicatedWorkerContext::reportException):
1365 (WebCore::DedicatedWorkerContext::postMessage):
1366 (WebCore::DedicatedWorkerContext::dispatchMessage):
1367 * workers/DedicatedWorkerContext.h: Added.
1368 Moved DedicatedWorker-only APIs from WorkerContext.
1369 (WebCore::DedicatedWorkerContext::create):
1370 (WebCore::DedicatedWorkerContext::toDedicatedWorkerContext):
1371 (WebCore::DedicatedWorkerContext::setOnmessage):
1372 (WebCore::DedicatedWorkerContext::onmessage):
1373 * workers/DedicatedWorkerContext.idl: Added.
1374 * workers/WorkerContext.cpp:
1375 (WebCore::WorkerContext::~WorkerContext):
1376 Moved code that notifies parent that worker is closing down into DedicatedWorkerContext.
1377 * workers/WorkerContext.h:
1378 (WebCore::WorkerContext::isClosing):
1379 Exposed closing flag as an API so derived classes can access it.
1380 * workers/WorkerContext.idl:
1381 * workers/WorkerMessagingProxy.cpp:
1382 (WebCore::MessageWorkerContextTask::performTask):
1383 Calls into DedicatedWorkerContext to handle message.
1384 * workers/WorkerThread.cpp:
1385 (WebCore::WorkerThread::workerThread):
1386 Creates a DedicatedWorkerContext when the thread starts up.
1388 2009-07-24 Eric Seidel <eric@webkit.org>
1390 Reviewed by Adam Barth.
1392 Move more callers to using 3 argument toJS
1393 https://bugs.webkit.org/show_bug.cgi?id=27661
1395 No functional changes, thus no tests.
1396 These are all the places where we can't yet pass the
1397 correct globalObject because we don't have or don't know the right one.
1399 * bindings/js/JSCustomPositionCallback.cpp:
1400 (WebCore::JSCustomPositionCallback::handleEvent):
1401 * bindings/js/JSCustomPositionErrorCallback.cpp:
1402 (WebCore::JSCustomPositionErrorCallback::handleEvent):
1403 * bindings/js/JSCustomSQLStatementCallback.cpp:
1404 (WebCore::JSCustomSQLStatementCallback::handleEvent):
1405 * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
1406 (WebCore::JSCustomSQLStatementErrorCallback::handleEvent):
1407 * bindings/js/JSCustomSQLTransactionCallback.cpp:
1408 (WebCore::JSCustomSQLTransactionCallback::handleEvent):
1409 * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
1410 (WebCore::JSCustomSQLTransactionErrorCallback::handleEvent):
1411 * bindings/js/JSNodeFilterCondition.cpp:
1412 (WebCore::JSNodeFilterCondition::acceptNode):
1414 2009-07-24 Eric Seidel <eric@webkit.org>
1416 Reviewed by Adam Barth.
1418 Fix the last of the x-frame constructor calls to have the right prototype chains
1419 https://bugs.webkit.org/show_bug.cgi?id=27645
1421 Fix the last few constructors to use their stored globalObject pointer when
1422 constructing objects instead of the lexicalGlobalObject().
1424 * bindings/js/JSAudioConstructor.cpp:
1425 (WebCore::constructAudio):
1426 * bindings/js/JSImageConstructor.cpp:
1427 (WebCore::constructImage):
1428 * bindings/js/JSMessageChannelConstructor.cpp:
1429 (WebCore::JSMessageChannelConstructor::construct):
1430 * bindings/js/JSOptionConstructor.cpp:
1431 (WebCore::constructHTMLOptionElement):
1432 * bindings/js/JSWebKitPointConstructor.cpp:
1433 (WebCore::constructWebKitPoint):
1434 * bindings/js/JSWorkerConstructor.cpp:
1435 (WebCore::constructWorker):
1437 2009-07-24 Jian Li <jianli@chromium.org>
1439 Reviewed by Adam Barth.
1441 [V8] Cleanup exception handling in worker evaluation code.
1442 https://bugs.webkit.org/show_bug.cgi?id=27282
1444 * bindings/v8/WorkerContextExecutionProxy.cpp:
1445 (WebCore::WorkerContextExecutionProxy::evaluate):
1446 * bindings/v8/WorkerContextExecutionProxy.h:
1447 (WebCore::WorkerContextExecutionState::WorkerContextExecutionState):
1448 * bindings/v8/WorkerScriptController.cpp:
1449 (WebCore::WorkerScriptController::evaluate):
1450 (WebCore::WorkerScriptController::setException):
1452 2009-07-24 Stephen White <senorblanco@chromium.org>
1454 Reviewed by David Levin.
1456 Reverting r46157, since it may be causing problems with Chromium
1457 reliability (see http://crbug.com/17569).
1459 https://bugs.webkit.org/show_bug.cgi?id=27388
1461 * platform/graphics/skia/GraphicsContextSkia.cpp:
1462 (WebCore::GraphicsContext::drawLine):
1463 * platform/graphics/skia/PlatformContextSkia.cpp:
1464 (PlatformContextSkia::setupPaintForStroking):
1466 2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
1468 Reviewed by Timothy Hatcher.
1470 REGRESSION: inspector seems broken in ToT WebKit
1471 https://bugs.webkit.org/show_bug.cgi?id=27646
1473 * inspector/front-end/Console.js:
1474 (WebInspector.Console.prototype._ensureCommandLineAPIInstalled):
1476 2009-07-24 Dan Bernstein <mitz@apple.com>
1478 Reviewed by Anders Carlsson.
1480 Add the shadow style member to the ShadowData constructor and ==
1483 * rendering/style/ShadowData.cpp:
1484 (WebCore::ShadowData::ShadowData):
1485 (WebCore::ShadowData::operator==):
1487 2009-07-24 Jian Li <jianli@chromium.org>
1489 Reviewed by Eric Seidel.
1491 [V8] More V8 bindings changes to use ErrorEvent.
1492 https://bugs.webkit.org/show_bug.cgi?id=27630
1494 * bindings/v8/DOMObjectsInclude.h:
1495 * bindings/v8/DerivedSourcesAllInOne.cpp:
1496 * bindings/v8/V8DOMWrapper.cpp:
1497 (WebCore::V8DOMWrapper::convertEventToV8Object):
1498 * bindings/v8/V8Index.cpp:
1499 * bindings/v8/V8Index.h:
1501 2009-07-24 Brent Fulgham <bfulgham@webkit.org>
1503 Reviewed by Dave Hyatt.
1505 Clean up dependencies on Apple support libraries for non-Apple build.
1506 http://bugs.webkit.org/show_bug.cgi?id=27532.
1508 * platform/graphics/win/SimpleFontDataWin.cpp: Conditionalize references
1509 to ApplicationServices.h and WebKitSystemInterface.h
1511 2009-07-24 Dan Bernstein <mitz@apple.com>
1513 Another attempted build fix
1515 * bindings/js/JSAbstractWorkerCustom.cpp:
1517 2009-07-24 Dan Bernstein <mitz@apple.com>
1521 * bindings/js/JSAbstractWorkerCustom.cpp:
1524 2009-07-24 Kenneth Rohde Christiansen <kenneth@webkit.org>
1526 Build fix for 64 bit Linux.
1528 int64_t is long on Linux 64 bit and not long long, thus
1529 getFileSize with a int64_t out value fails to build.
1531 Use a temporary to work around the problem.
1533 * loader/appcache/ApplicationCacheStorage.cpp:
1534 (WebCore::ApplicationCacheStorage::spaceNeeded):
1536 2009-07-24 Eric Seidel <eric@webkit.org>
1538 Reviewed by Adam Barth.
1540 Update all CREATE_DOM_*_WRAPPER callers to pass globalObject
1541 https://bugs.webkit.org/show_bug.cgi?id=27644
1543 This is another attempt at making the change for bug 27634 smaller.
1544 I included the changes to make_names.pl as well as any file which
1545 used CREATE_DOM_*_WRAPPER macros.
1547 The changes to the construct* functions are what fix the cases in
1548 fast/dom/constructed-objects-prototypes.html
1550 The changes to passing globalObject through CREATE_* are what fix
1551 fast/dom/prototype-inheritance-2.html
1553 * bindings/js/JSCDATASectionCustom.cpp:
1554 (WebCore::toJSNewlyCreated): pass globalObject.
1555 * bindings/js/JSCSSRuleCustom.cpp:
1556 (WebCore::toJS): pass globalObject.
1557 * bindings/js/JSCSSValueCustom.cpp:
1558 (WebCore::toJS): pass globalObject.
1559 * bindings/js/JSDOMBinding.h: updated macros to pass globalObject.
1560 * bindings/js/JSDocumentCustom.cpp:
1561 (WebCore::toJS): pass globalObject.
1562 * bindings/js/JSElementCustom.cpp:
1563 (WebCore::JSElement::setAttributeNode): use globalObject() for wrapping return value.
1564 (WebCore::JSElement::setAttributeNodeNS): use globalObject() for wrapping return value.
1565 (WebCore::toJSNewlyCreated): pass globalObject.
1566 * bindings/js/JSEventCustom.cpp:
1567 (WebCore::JSEvent::clipboardData): pass globalObject.
1568 (WebCore::toJS): pass globalObject.
1569 * bindings/js/JSHTMLCollectionCustom.cpp:
1570 (WebCore::getNamedItems): use globalObject() for wrapping returned collection items.
1571 (WebCore::callHTMLCollection): use globalObject() for wrapping returned collection items.
1572 (WebCore::JSHTMLCollection::item): use globalObject() for wrapping returned collection items.
1573 (WebCore::toJS): pass globalObject.
1574 * bindings/js/JSImageDataCustom.cpp:
1575 (WebCore::toJS): pass globalObject.
1576 * bindings/js/JSNodeCustom.cpp:
1577 (WebCore::createWrapper): pass globalObject.
1578 * bindings/js/JSSVGPathSegCustom.cpp:
1579 (WebCore::toJS): pass globalObject.
1580 * bindings/js/JSStyleSheetCustom.cpp:
1581 (WebCore::toJS): pass globalObject.
1582 * bindings/js/JSTextCustom.cpp:
1583 (WebCore::toJSNewlyCreated): pass globalObject.
1584 * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
1585 (WebCore::constructWebKitCSSMatrix): use constructors globalObject when constructing
1586 * bindings/js/JSXMLHttpRequestConstructor.cpp:
1587 (WebCore::constructXMLHttpRequest): use constructors globalObject when constructing
1588 * bindings/js/JSXSLTProcessorConstructor.cpp:
1589 (WebCore::constructXSLTProcessor): use constructors globalObject when constructing
1590 * dom/make_names.pl:
1591 Pass globalObject through CREATE_* macros and various support functions.
1593 2009-07-24 Eric Seidel <eric@webkit.org>
1595 Reviewed by Adam Barth.
1597 Update CodeGeneratorJS.pm to support passing JSDOMGlobalObject* to toJS calls
1598 https://bugs.webkit.org/show_bug.cgi?id=27643
1600 This is an attempt to make this change as small as possible.
1601 I started by including all changes to CodeGeneratorJS.pm from bug 27634,
1602 and then made the minimal amount of other changes needed to support that change.
1604 Most toJS implementations ignore their passed JSDOMGlobalObject.
1605 There are stub 2-argument toJS, toJSNewlyCreated implementations to help compiling.
1606 All places where it is not clear what we should pass as the global object
1607 (or where the global object is simply not available, like for some SVG bindings)
1608 we pass deprecatedGlobalObjectForPrototype instead.
1610 * bindings/js/JSCDATASectionCustom.cpp:
1611 (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject*
1612 * bindings/js/JSCSSRuleCustom.cpp:
1613 (WebCore::toJS): add ignored JSDOMGlobalObject*
1614 * bindings/js/JSCSSValueCustom.cpp:
1615 (WebCore::toJS): add ignored JSDOMGlobalObject*
1616 * bindings/js/JSDOMBinding.cpp:
1617 (WebCore::setDOMException): pass the wrong globalObject for now
1618 * bindings/js/JSDOMBinding.h:
1619 Pass the wrong global object to the CREATE_ macros for now.
1620 In the next change we'll come back and pass the correct one.
1621 That will require changes to make_names.pl.
1622 (WebCore::DOMObjectWithGlobalPointer::scriptExecutionContext):
1623 (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
1624 (WebCore::DOMObjectWithGlobalPointer::~DOMObjectWithGlobalPointer):
1625 (WebCore::createDOMObjectWrapper):
1626 (WebCore::getDOMObjectWrapper):
1627 (WebCore::createDOMNodeWrapper):
1628 (WebCore::getDOMNodeWrapper):
1629 (WebCore::toJS): added to convert 2 arg calls to 3 arg calls to limit the scope of this change.
1630 (WebCore::toJSNewlyCreated):
1631 * bindings/js/JSDOMWindowBase.cpp:
1632 (WebCore::toJS): DOMWindow always uses its own prototype chain.
1633 * bindings/js/JSDOMWindowBase.h:
1634 * bindings/js/JSDocumentCustom.cpp:
1635 (WebCore::toJS): add ignored JSDOMGlobalObject*
1636 * bindings/js/JSElementCustom.cpp:
1637 (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject*
1638 * bindings/js/JSEventCustom.cpp:
1639 (WebCore::toJS): add ignored JSDOMGlobalObject*
1640 * bindings/js/JSEventTarget.cpp:
1641 (WebCore::toJS): add ignored JSDOMGlobalObject*
1642 * bindings/js/JSEventTarget.h:
1643 * bindings/js/JSHTMLCollectionCustom.cpp:
1644 (WebCore::toJS): add ignored JSDOMGlobalObject*
1645 * bindings/js/JSImageDataCustom.cpp:
1646 (WebCore::toJS): add ignored JSDOMGlobalObject*
1647 * bindings/js/JSNodeCustom.cpp:
1648 (WebCore::createWrapper): pass globalObject to toJS(Document*) to avoid recursion
1649 (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject*
1650 (WebCore::toJS): add ignored JSDOMGlobalObject*
1651 * bindings/js/JSSVGElementInstanceCustom.cpp:
1652 (WebCore::toJS): pass globalObject along
1653 * bindings/js/JSSVGMatrixCustom.cpp:
1654 (WebCore::JSSVGMatrix::inverse): pass wrong globalObject for now.
1655 (WebCore::JSSVGMatrix::rotateFromVector): pass wrong globalObject for now.
1656 * bindings/js/JSSVGPathSegCustom.cpp:
1658 * bindings/js/JSSVGPathSegListCustom.cpp:
1659 All of these methods need a globalObject, but most SVG binding don't have
1660 space for one, so we just pass the lexicalGlobalObject for now.
1661 (WebCore::JSSVGPathSegList::initialize):
1662 (WebCore::JSSVGPathSegList::getItem):
1663 (WebCore::JSSVGPathSegList::insertItemBefore):
1664 (WebCore::JSSVGPathSegList::replaceItem):
1665 (WebCore::JSSVGPathSegList::removeItem):
1666 (WebCore::JSSVGPathSegList::appendItem):
1667 * bindings/js/JSSVGPointListCustom.cpp:
1668 (WebCore::finishGetter): pass wrong globalObject for now.
1669 (WebCore::finishSetter):
1670 (WebCore::finishSetterReadOnlyResult):
1671 * bindings/js/JSSVGTransformListCustom.cpp:
1672 (WebCore::finishGetter): pass wrong globalObject for now.
1673 (WebCore::finishSetter):
1674 (WebCore::finishSetterReadOnlyResult):
1675 * bindings/js/JSStyleSheetCustom.cpp:
1676 (WebCore::toJS): add ignored JSDOMGlobalObject*
1677 * bindings/js/JSTextCustom.cpp:
1678 (WebCore::toJSNewlyCreated): add ignored JSDOMGlobalObject*
1679 * bindings/js/JSWorkerContextBase.cpp:
1680 (WebCore::toJS): WorkerContext always uses its own prototype chain since it's a GlobalObject subclass.
1681 * bindings/js/JSWorkerContextBase.h:
1682 * bindings/scripts/CodeGeneratorJS.pm:
1683 All generated toJS calls now pass a globalObject.
1684 All generated toJS implementations now expect a globalObject.
1685 Simplified all the slot casts by using a "castedThis" local.
1686 SVG bindings which don't have a globalObject() accessor pass the deprecated lexicalGlobalObject instead.
1687 Simplified printing of constructor objects using a $constructorClassName variable.
1688 All generated constructor functions follow the construct$className form to match the custom constructors.
1690 2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
1692 Reviewed by Timothy Hatcher.
1694 typing "document.__proto__" in inspector throws exception
1695 https://bugs.webkit.org/show_bug.cgi?id=27169
1697 * inspector/front-end/utilities.js:
1700 2009-07-24 Andrei Popescu <andreip@google.com>
1702 Reviewed by Anders Carlsson.
1704 ApplicationCache should have size limit
1705 https://bugs.webkit.org/show_bug.cgi?id=22700
1707 https://lists.webkit.org/pipermail/webkit-dev/2009-May/007560.html
1709 This change implements a mechanism for limiting the maximum size of
1710 the application cache file. When this size is reached, a ChromeClient
1711 callback is invoked asynchronously and the saving of the last (failed)
1712 cache is retried automatically.
1714 This change also extends the ApplicationCacheStorage API by allowing
1715 a client to query or modify the application cache without having to
1716 load any resources into memory.
1718 Test: http/tests/appcache/max-size.html
1721 Exports the symbols required by the DumpRenderTree test application.
1722 * loader/EmptyClients.h:
1723 Adds empty implementation of the new ChromeClient methods.
1724 * loader/appcache/ApplicationCache.cpp:
1725 * loader/appcache/ApplicationCache.h:
1726 Adds the ability to calculate the approximate size of an ApplicationCache object.
1727 * loader/appcache/ApplicationCacheGroup.cpp:
1728 * loader/appcache/ApplicationCacheGroup.h:
1729 Invokes the ChromeClient callback when the storage layer runs out of space.
1730 After the callback is invoked, we re-attempt to store the newest cache,
1731 in case the ChromeClient has freed some space.
1732 * loader/appcache/ApplicationCacheResource.cpp:
1733 * loader/appcache/ApplicationCacheResource.h:
1734 Adds the ability to calculate the approximate size of an ApplicationCacheResource object.
1735 * loader/appcache/ApplicationCacheStorage.cpp:
1736 * loader/appcache/ApplicationCacheStorage.h:
1737 Enforces a maximum size for the application cache file.
1738 * page/ChromeClient.h:
1739 Adds a new callback, invoked when the ApplicationCacheStorage reports that it has
1740 reached the maximum size for its database file.
1741 * platform/sql/SQLiteDatabase.cpp:
1742 * platform/sql/SQLiteDatabase.h:
1743 Adds a new method that allows querying for the amount of unused space inside the
1744 application cache database file.
1746 2009-07-24 Xan Lopez <xlopez@igalia.com>
1748 Reviewed by Jan Alonzo.
1750 https://bugs.webkit.org/show_bug.cgi?id=25415
1751 [GTK][ATK] Please implement support for get_text_at_offset
1753 Use TextEncoding facilities to convert between UTF16 and UTF8
1754 instead of rolling our own solution.
1756 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1757 (convertUniCharToUTF8):
1759 2009-07-24 Xan Lopez <xlopez@igalia.com>
1761 Reviewed by Jan Alonzo.
1763 https://bugs.webkit.org/show_bug.cgi?id=25415
1764 [GTK][ATK] Please implement support for get_text_at_offset
1766 Fix confusion in g_substr between length in bytes and length in
1767 characters. Was causing crashes in some situations when dealing
1768 with non-ASCII text encoded as UTF8.
1770 * accessibility/gtk/AccessibilityObjectWrapperAtk.cpp:
1773 2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
1775 Reviewed by Timothy Hatcher.
1777 Inspector: Impossible to add an attribute to a node without attributes
1778 https://bugs.webkit.org/show_bug.cgi?id=21108
1780 * inspector/front-end/ElementsTreeOutline.js:
1781 (WebInspector.ElementsTreeElement):
1782 (WebInspector.ElementsTreeElement.prototype.set hovered):
1783 (WebInspector.ElementsTreeElement.prototype.toggleNewButton):
1784 (WebInspector.ElementsTreeElement.prototype.ondblclick):
1785 (WebInspector.ElementsTreeElement.prototype._startEditing):
1786 (WebInspector.ElementsTreeElement.prototype._addNewAttribute):
1787 (WebInspector.ElementsTreeElement.prototype._attributeEditingCommitted):
1788 * inspector/front-end/inspector.css:
1790 2009-07-24 Keishi Hattori <casey.hattori@gmail.com>
1792 Reviewed by Timothy Hatcher.
1794 Web Inspector: Adds support for Firebug's magic $0 variable to access inspected node
1795 https://bugs.webkit.org/show_bug.cgi?id=17907
1797 * inspector/front-end/Console.js:
1798 (WebInspector.Console.prototype._ensureCommandLineAPIInstalled): Added _inspectorCommandLineAPI.{
1799 _inspectedNodes, _addInspectedNode, $0, $1, $n}
1800 * inspector/front-end/ElementsPanel.js:
1801 (WebInspector.ElementsPanel.this.treeOutline.focusedNodeChanged): Stores the inspected node history
1802 in _inspectorCommandLineAPI._inspectedNodes
1803 (WebInspector.ElementsPanel):
1805 2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
1807 Reviewed by Timothy Hatcher.
1809 Dragging a resource in the sidebar should drag it's URL
1810 https://bugs.webkit.org/show_bug.cgi?id=14410
1812 * inspector/front-end/ResourcesPanel.js:
1813 (WebInspector.ResourceSidebarTreeElement.prototype.onattach):
1815 2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
1817 Reviewed by Timothy Hatcher.
1819 Double click on a resource in the sidebar should open that resource in Safari
1820 https://bugs.webkit.org/show_bug.cgi?id=14409
1822 * inspector/front-end/ResourcesPanel.js:
1823 (WebInspector.ResourceSidebarTreeElement.prototype.ondblclick): open a resource url
1825 2009-07-24 Jan Michael Alonzo <jmalonzo@webkit.org>
1827 Reviewed by Xan Lopez.
1829 Bump pango version requirement to 1.12 and remove unnecessary #ifdefs.
1831 * platform/graphics/gtk/FontGtk.cpp:
1832 (WebCore::getDefaultPangoLayout):
1833 * platform/graphics/gtk/FontPlatformDataPango.cpp:
1834 (WebCore::FontPlatformData::FontPlatformData):
1835 * platform/gtk/Language.cpp:
1837 2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
1839 Reviewed by Timothy Hatcher.
1841 Inspector: Missing UIString and other localizedString.js fixes
1842 https://bugs.webkit.org/show_bug.cgi?id=27288
1844 * English.lproj/localizedStrings.js:
1846 2009-07-24 Joseph Pecoraro <joepeck02@gmail.com>
1848 Reviewed by Timothy Hatcher.
1850 Inspector: Should Syntax Highlight JSON
1851 https://bugs.webkit.org/show_bug.cgi?id=27503
1853 * inspector/front-end/SourceView.js:
1854 (WebInspector.SourceView.prototype._contentLoaded):
1856 2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
1858 Reviewed by Eric Seidel.
1860 Update WebCore/page/DOMTimer.cpp/h to conform to WebKit
1861 Style Guidelines as identified by cpplint.py.
1862 https://bugs.webkit.org/show_bug.cgi?id=27624
1864 * page/DragController.cpp:
1865 (WebCore::DragController::~DragController):
1866 (WebCore::documentFragmentFromDragData):
1867 (WebCore::DragController::dragEnded):
1868 (WebCore::DragController::dragEntered):
1869 (WebCore::DragController::dragExited):
1870 (WebCore::DragController::dragUpdated):
1871 (WebCore::DragController::performDrag):
1872 (WebCore::asFileInput):
1873 (WebCore::DragController::tryDocumentDrag):
1874 (WebCore::DragController::delegateDragSourceAction):
1875 (WebCore::DragController::concludeEditDrag):
1876 (WebCore::DragController::canProcessDrag):
1877 (WebCore::DragController::tryDHTMLDrag):
1878 (WebCore::DragController::mayStartDragAtEventLocation):
1879 (WebCore::getCachedImage):
1880 (WebCore::getImage):
1881 (WebCore::prepareClipboardForImageDrag):
1882 (WebCore::dragLocForDHTMLDrag):
1883 (WebCore::DragController::startDrag):
1884 (WebCore::DragController::doImageDrag):
1885 (WebCore::DragController::doSystemDrag):
1886 (WebCore::DragController::placeDragCaret):
1888 2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
1890 Reviewed by Eric Seidel.
1892 Update WebCore/page/Chrome.cpp to conform to WebKit
1893 Style Guidelines as identified by cpplint.py.
1894 https://bugs.webkit.org/show_bug.cgi?id=27608
1897 (WebCore::Chrome::runBeforeUnloadConfirmPanel):
1898 (WebCore::Chrome::runJavaScriptAlert):
1899 (WebCore::Chrome::runJavaScriptConfirm):
1900 (WebCore::Chrome::runJavaScriptPrompt):
1901 (WebCore::Chrome::shouldInterruptJavaScript):
1902 (WebCore::Chrome::setToolTip):
1903 (WebCore::Chrome::requestGeolocationPermissionForFrame):
1904 (WebCore::ChromeClient::generateReplacementFile):
1905 (WebCore::ChromeClient::paintCustomScrollbar):
1907 2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
1909 Reviewed by Eric Seidel.
1911 Update WebCore/page/Coordinates.cpp to conform to WebKit
1912 Style Guidelines as identified by cpplint.py.
1913 https://bugs.webkit.org/show_bug.cgi?id=27614
1915 * page/Coordinates.cpp:
1916 (WebCore::Coordinates::toString):
1918 2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
1920 Reviewed by Eric Seidel.
1922 Update WebCore/page/DOMSelection.cpp/h to conform to WebKit
1923 Style Guidelines as identified by cpplint.py.
1924 https://bugs.webkit.org/show_bug.cgi?id=27614
1926 * page/DOMSelection.cpp:
1927 (WebCore::DOMSelection::setBaseAndExtent):
1928 (WebCore::DOMSelection::modify):
1929 (WebCore::DOMSelection::addRange):
1930 (WebCore::DOMSelection::deleteFromDocument):
1931 * page/DOMSelection.h:
1933 2009-07-24 Mike Fenton <mike.fenton@torchmobile.com>
1935 Reviewed by Eric Seidel.
1937 Update WebCore/page/DOMTimer.cpp/h to conform to WebKit
1938 Style Guidelines as identified by cpplint.py.
1939 https://bugs.webkit.org/show_bug.cgi?id=27618
1941 * page/DOMTimer.cpp:
1942 (WebCore::DOMTimer::DOMTimer):
1943 (WebCore::DOMTimer::~DOMTimer):
1944 (WebCore::DOMTimer::fired):
1945 (WebCore::DOMTimer::suspend):
1946 (WebCore::DOMTimer::resume):
1947 (WebCore::DOMTimer::canSuspend):
1949 (WebCore::DOMTimer::minTimerInterval):
1950 (WebCore::DOMTimer::setMinTimerInterval):
1952 2009-07-24 Eric Seidel <eric@webkit.org>
1954 Reviewed by Adam Barth.
1956 Classes call DOMObject::mark() explicitly, should call DOMObjectWithGlobal::mark() instead
1957 https://bugs.webkit.org/show_bug.cgi?id=27641
1959 Nothing uses globalObject() yet, but this was causing crashes
1960 in the patch for bug 27634. This is covered by fast/dom/gc-6.html.
1962 I decided to change these to Base:: instead of DOMObjectWithGlobal::
1963 for future-proofing. All autogenerated classes use a typedef Base
1964 to avoid bugs like these. Sadly C++ does not have a built-in super:: we could use.
1966 * WebCore.xcodeproj/project.pbxproj:
1967 * bindings/js/JSAbstractWorkerCustom.cpp:
1968 (WebCore::JSAbstractWorker::mark):
1969 * bindings/js/JSDOMApplicationCacheCustom.cpp:
1970 (WebCore::JSDOMApplicationCache::mark):
1971 * bindings/js/JSMessageChannelCustom.cpp:
1972 (WebCore::JSMessageChannel::mark):
1973 * bindings/js/JSMessagePortCustom.cpp:
1974 (WebCore::JSMessagePort::mark):
1975 * bindings/js/JSNamedNodesCollection.cpp:
1976 (WebCore::JSNamedNodesCollection::getOwnPropertySlot):
1977 * bindings/js/JSNodeCustom.cpp:
1978 (WebCore::JSNode::mark):
1979 * bindings/js/JSNodeFilterCustom.cpp:
1980 (WebCore::JSNodeFilter::mark):
1981 * bindings/js/JSNodeIteratorCustom.cpp:
1982 (WebCore::JSNodeIterator::mark):
1983 * bindings/js/JSSVGElementInstanceCustom.cpp:
1984 (WebCore::JSSVGElementInstance::mark):
1985 * bindings/js/JSTreeWalkerCustom.cpp:
1986 (WebCore::JSTreeWalker::mark):
1988 2009-07-22 Eric Seidel <eric@webkit.org>
1990 Reviewed by Adam Barth.
1992 Make most DOMObjects hold onto a JSDOMGlobalObject*
1993 https://bugs.webkit.org/show_bug.cgi?id=27588
1995 This change is almost entirely plumbing. Only one functional
1996 change as part of this all (window.document.constructor has the correct prototype)
1997 Changes are detailed below.
1999 inner.document.constructor is fixed because all properties on the window
2000 object are created with the correct globalObject (instead of the lexical one).
2001 Since all objects now carry a globalObject pointer, when document creates
2002 HTMLDocumentConstructor it now has the right globalObject to use.
2005 fast/dom/prototype-inheritance.html
2006 fast/dom/prototype-inheritance-2.html
2008 * bindings/js/DOMObjectWithSVGContext.h:
2009 (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
2010 Update the comment and add an ignored globalObject argument.
2011 * bindings/js/JSDOMBinding.h:
2012 Pass a globalObject to all DOMObjects during creation. Currently it's the wrong global object.
2013 Once toJS is passed a globalObject it will be the right one.
2014 (WebCore::createDOMObjectWrapper):
2015 (WebCore::createDOMNodeWrapper):
2016 * bindings/js/JSDOMGlobalObject.h:
2017 (WebCore::JSDOMGlobalObject::globalObject): Makes binding generation easier.
2018 * bindings/js/JSDOMWindowCustom.cpp:
2019 (WebCore::JSDOMWindow::history): JSHistory is now passed a globalObject, but since it has no custom constructor it doesn't use it.
2020 (WebCore::JSDOMWindow::location): JSLocation is now passed a globalObject, but since it has no custom constructor it doesn't use it.
2021 * bindings/js/JSDocumentCustom.cpp:
2022 (WebCore::JSDocument::location): JSLocation is now passed a globalObject, but since it has no custom constructor it doesn't use it.
2023 * bindings/js/JSHTMLAllCollection.h:
2024 (WebCore::JSHTMLAllCollection::JSHTMLAllCollection):
2025 * bindings/js/JSHTMLCollectionCustom.cpp: Re-factoring needed to pass globalObject to JSNamedNodesCollection constructor.
2026 (WebCore::getNamedItems):
2027 (WebCore::callHTMLCollection):
2028 (WebCore::JSHTMLCollection::canGetItemsForName):
2029 (WebCore::JSHTMLCollection::nameGetter):
2030 (WebCore::JSHTMLCollection::item):
2031 (WebCore::JSHTMLCollection::namedItem):
2032 * bindings/js/JSHTMLFormElementCustom.cpp:
2033 (WebCore::JSHTMLFormElement::nameGetter):
2034 * bindings/js/JSNamedNodesCollection.cpp:
2035 Now passed globalObject. This is tested by inner.document.forms.testForm.
2036 The passed globalObject is still wrong until toJS is fixed.
2037 (WebCore::JSNamedNodesCollection::JSNamedNodesCollection):
2038 * bindings/js/JSNamedNodesCollection.h:
2039 * bindings/js/JSSharedWorkerConstructor.cpp:
2040 Add DOMConstructorObject missed by http://trac.webkit.org/changeset/45938
2041 This class is not compiled by default, so not testable.
2042 (WebCore::JSSharedWorkerConstructor::JSSharedWorkerConstructor):
2043 * bindings/js/JSSharedWorkerConstructor.h:
2044 * bindings/scripts/CodeGeneratorJS.pm:
2045 Make all bindings objects carry a globalObject pointer using DOMObjectWithGlobalPointer.
2046 SVG bindings which need a context() pointer do not have enough space for globalObject() too.
2047 WorkerContext does not need a globalObject (it is one), so special case it.
2048 Make all .constructor calls use the stored globalObject(). This is what fixes window.document.constructor.
2049 Make all constructors inherit from DOMConstructorObject for consistency. Since the auto-bound constructors
2050 override createStructure anyway, there is no functional change here. Just completing work started in r45938.
2052 2009-07-23 Brady Eidson <beidson@apple.com>
2054 Reviewed by Geoff Garen.
2056 WebCore has a few places that don't gracefully handle a null request returned from willSendRequest.
2057 https://bugs.webkit.org/show_bug.cgi?id=27595
2059 Test: http/tests/misc/will-send-request-returns-null-on-redirect.html
2061 * inspector/InspectorController.cpp:
2062 (WebCore::InspectorController::removeResource): Null-check the request URL.
2064 * platform/network/cf/ResourceHandleCFNet.cpp: Ditto, and return null instead of creating an empty one.
2065 (WebCore::willSendRequest):
2067 2009-07-23 Chris Fleizach <cfleizach@apple.com>
2069 Reviewed by Darin Adler.
2071 Bug 27633 - AXLoadComplete can be fired off to frequently
2072 https://bugs.webkit.org/show_bug.cgi?id=27633
2074 An integration issue left out some curly braces.
2077 (WebCore::Document::implicitClose):
2079 2009-07-23 Darin Adler <darin@apple.com>
2081 Reviewed by Brady Eidson.
2083 URL appears in back/forward button menu instead of title for items with custom representation
2084 https://bugs.webkit.org/show_bug.cgi?id=27586
2085 rdar://problem/5060337
2087 * WebCore.base.exp: Exported DocumentLoader::setTitle for use by Mac WebKit.
2088 * loader/FrameLoader.cpp:
2089 (WebCore::FrameLoader::didChangeTitle): Tightened code to check if the document
2090 loader is the correct one; previously this would never happen because we'd
2091 commit the load before any title changes could be registered, but now we can
2092 encounter a case where we get a title during a provisional load.
2094 2009-07-23 Dan Bernstein <mitz@apple.com>
2096 Reviewed by Dave Hyatt.
2098 [CSS3 Backgrounds and Borders] Add support for inset box shadows
2099 https://bugs.webkit.org/show_bug.cgi?id=27582
2101 Test: fast/box-shadow/inset.html
2103 * css/CSSComputedStyleDeclaration.cpp:
2104 (WebCore::valueForShadow): Set the ShadowValue’s shadow style to 'inset'
2107 * css/CSSParser.cpp:
2108 (WebCore::ShadowParseContext::ShadowParseContext): Added style and allowStyle
2109 members. Initialize the allowStyle member.
2110 (WebCore::ShadowParseContext::commitValue): Pass the style value to the
2111 ShadowValue constructor. Reset allowStyle.
2112 (WebCore::ShadowParseContext::commitLength): Update allowStyle.
2113 (WebCore::ShadowParseContext::commitColor): Ditto.
2114 (WebCore::ShadowParseContext::commitStyle): Added. Sets the style member and
2116 (WebCore::CSSParser::parseShadow): Parse the 'inset' keyword.
2118 * css/CSSStyleSelector.cpp:
2119 (WebCore::CSSStyleSelector::applyProperty): Get the style value from the
2120 shadow value and pass it to the ShadowData constructor.
2122 * css/ShadowValue.cpp:
2123 (WebCore::ShadowValue::ShadowValue): Added style.
2124 (WebCore::ShadowValue::cssText): Added style.
2126 * css/ShadowValue.h:
2127 (WebCore::ShadowValue::create): Added style.
2129 * page/animation/AnimationBase.cpp:
2130 (WebCore::blendFunc): Added a blend function for shadow styles. When blending
2131 between normal and inset shadows, all intermediate values map to normal.
2132 (WebCore::PropertyWrapperShadow::blend): Added normal style to the default
2135 * rendering/InlineFlowBox.cpp:
2136 (WebCore::InlineFlowBox::paintBoxShadow): Added a shadow style parameter,
2137 which is passed through to RenderBoxModelObject::paintBoxShadow().
2139 (WebCore::InlineFlowBox::paintBoxDecorations): Paint inset shadows on top of
2142 * rendering/InlineFlowBox.h:
2144 * rendering/RenderBox.cpp:
2145 (WebCore::RenderBox::paintBoxDecorations): Paint inset shadows on top of the
2148 * rendering/RenderBoxModelObject.cpp:
2149 (WebCore::RenderBoxModelObject::paintBoxShadow): Added a shadow style
2150 parameter, and code to paint inset shadows.
2152 * rendering/RenderBoxModelObject.h:
2154 * rendering/RenderFieldset.cpp:
2155 (WebCore::RenderFieldset::paintBoxDecorations): Paint inset shadows on top of
2158 * rendering/RenderTable.cpp:
2159 (WebCore::RenderTable::paintBoxDecorations): Ditto.
2161 * rendering/RenderTableCell.cpp:
2162 (WebCore::RenderTableCell::paintBoxDecorations): Ditto.
2164 * rendering/style/ShadowData.h:
2165 Added a ShadowStyle enum.
2166 (WebCore::ShadowData::ShadowData): Add and initialize a style member.
2168 2009-07-23 Simon Fraser <simon.fraser@apple.com>
2170 Fix the build with UNUSED_PARAM(frame) for when ENABLE(3D_RENDERING) is not defined.
2172 * css/MediaQueryEvaluator.cpp:
2173 (WebCore::transform_3dMediaFeatureEval):
2175 2009-07-23 Simon Fraser <simon.fraser@apple.com>
2177 Reviewed by Adele Peterson.
2179 3d-transforms media query needs to look check that accelerated compositing is enabled
2180 https://bugs.webkit.org/show_bug.cgi?id=27621
2182 When evaluating a media query with '-webkit-transform-3d', we need to check the
2183 runtime switch that toggles accererated compositing, and therefore 3D.
2185 No test because we can't disable the pref dynamically in DRT.
2187 * css/MediaQueryEvaluator.cpp:
2188 (WebCore::transform_3dMediaFeatureEval):
2190 2009-07-22 Ryosuke Niwa <rniwa@webkit.org>
2192 Reviewed by Eric Seidel.
2194 execCommand('underline') can't remove <U> underlines
2195 https://bugs.webkit.org/show_bug.cgi?id=20215
2197 This patch adds support for u, s, and strike to implicitlyStyledElementShouldBeRemovedWhenApplyingStyle so that
2198 WebKit can remove those presentational tags when necessary.
2199 It also modifies StyleChange::init not to add "text-decoration: none". Not only is this style meaningless
2200 (does not override inherited styles) but it was also causing WebKit to generate extra spans with this style.
2202 * css/CSSValueList.cpp:
2203 (WebCore::CSSValueList::hasValue): True if the property contains the specified value
2204 * css/CSSValueList.h: Updated prototype
2205 * editing/ApplyStyleCommand.cpp:
2206 (WebCore::StyleChange::init): No longer adds "text-decoration: none"
2207 (WebCore::ApplyStyleCommand::implicitlyStyledElementShouldBeRemovedWhenApplyingStyle): Supports text-decoration-related elements
2209 2009-07-23 Jessie Berlin <jberlin@apple.com>
2211 Reviewed by Dan Bernstein.
2213 https://bugs.webkit.org/show_bug.cgi?id=27554
2214 Expose the value of text-overflow in getComputedStyle.
2216 Test: fast/css/getComputedStyle/getComputedStyle-text-overflow.html
2218 * css/CSSComputedStyleDeclaration.cpp:
2220 Add text-overflow to the list of computedProperties.
2221 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2222 Return the value of the text-overflow property.
2224 2009-07-23 Yongjun Zhang <yongjun.zhang@nokia.com>
2226 Reviewed by Simon Hausmann.
2228 https://bugs.webkit.org/show_bug.cgi?id=27510
2230 [S60 QtWebKit] Don't put some intermediate generated files into the final mmp project
2231 file for linking. This is a temporary workaround for qmake bug in Symbian port, should
2232 be reverted after qmake is fixed.
2236 2009-07-23 Jian Li <jianli@chromium.org>
2238 Reviewed by David Levin.
2240 [V8] Fix an assert in running workers in Chrome.
2241 https://bugs.webkit.org/show_bug.cgi?id=27620
2243 The fix is to change V8DOMMap::removeAllDOMObjectsInCurrentThreadHelper
2244 to do not call removeObjectsFromWrapperMap for certain types of DOM
2245 objects that exist only in main thread.
2247 * bindings/v8/V8DOMMap.cpp:
2248 (WebCore::removeAllDOMObjectsInCurrentThreadHelper):
2250 2009-07-23 David Hyatt <hyatt@apple.com>
2252 Reviewed by Dan Bernstein.
2254 https://bugs.webkit.org/show_bug.cgi?id=27572
2255 Implement support for background-attachment:local.
2257 Added new test fast/overflow/overflow-with-local-attachment.html.
2259 * css/CSSComputedStyleDeclaration.cpp:
2260 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2261 * css/CSSParser.cpp:
2262 (WebCore::CSSParser::parseFillProperty):
2263 * css/CSSPrimitiveValueMappings.h:
2264 (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
2265 (WebCore::CSSPrimitiveValue::operator EFillAttachment):
2266 * css/CSSStyleSelector.cpp:
2267 (WebCore::CSSStyleSelector::mapFillAttachment):
2268 * css/CSSValueKeywords.in:
2269 * rendering/RenderBoxModelObject.cpp:
2270 (WebCore::RenderBoxModelObject::paintFillLayerExtended):
2271 (WebCore::RenderBoxModelObject::calculateBackgroundImageGeometry):
2272 * rendering/style/FillLayer.h:
2273 (WebCore::FillLayer::attachment):
2274 (WebCore::FillLayer::setAttachment):
2275 (WebCore::FillLayer::hasFixedImage):
2276 (WebCore::FillLayer::initialFillAttachment):
2277 * rendering/style/RenderStyle.h:
2278 (WebCore::InheritedFlags::backgroundAttachment):
2279 (WebCore::InheritedFlags::maskAttachment):
2280 * rendering/style/RenderStyleConstants.h:
2283 2009-07-23 Ryosuke Niwa <rniwa@webkit.org>
2285 Reviewed by Eric Seidel.
2287 copyInheritableProperties and removeComputedInheritablePropertiesFrom should be deprecated
2288 https://bugs.webkit.org/show_bug.cgi?id=27325
2290 This patch deprecates copyInheritableProperties because it has been used for two different purposes:
2291 1. Calculating the typing style.
2292 2. Moving HTML subtrees and seeking to remove redundant styles.
2293 These tasks should be broken out into two separate functions. New code should not use this function.
2295 It deletes removeComputedInheritablePropertiesFrom because it hasn't been used anywhere.
2297 There is no test since the patch does not change any behavior.
2299 * css/CSSComputedStyleDeclaration.cpp: removeComputedInheritablePropertiesFrom has been removed
2300 (WebCore::CSSComputedStyleDeclaration::deprecatedCopyInheritableProperties): has been renamed from copyInheritableProperties
2301 * css/CSSComputedStyleDeclaration.h: ditto
2302 * editing/DeleteSelectionCommand.cpp: ditto
2303 (WebCore::removeEnclosingAnchorStyle): ditto
2304 (WebCore::DeleteSelectionCommand::saveTypingStyleState): ditto
2305 * editing/EditCommand.cpp: ditto
2306 (WebCore::EditCommand::styleAtPosition): ditto
2307 * editing/RemoveFormatCommand.cpp: ditto
2308 (WebCore::RemoveFormatCommand::doApply): ditto
2309 * editing/ReplaceSelectionCommand.cpp: ditto
2310 (WebCore::handleStyleSpansBeforeInsertion): ditto
2311 (WebCore::ReplaceSelectionCommand::handleStyleSpans): ditto
2312 * editing/markup.cpp: ditto
2313 (WebCore::removeEnclosingMailBlockquoteStyle): ditto
2314 (WebCore::removeDefaultStyles): ditto
2315 (WebCore::createMarkup): ditto
2317 2009-07-22 Pierre d'Herbemont <pdherbemont@apple.com>
2319 Reviewed by Simon Fraser.
2321 Audio element at default width shouldn't have time field.
2322 https://bugs.webkit.org/show_bug.cgi?id=27589
2324 * rendering/MediaControlElements.cpp:
2325 (WebCore::MediaControlTimeDisplayElement::setVisible): Make sure we don't
2326 forget to remember the visibility if there is no renderer.
2328 2009-07-23 Beth Dakin <bdakin@apple.com>
2330 Reviewed by Darin Adler.
2332 Fix for https://bugs.webkit.org/show_bug.cgi?id=27598 Clean up the
2333 AccessibilityObject class
2335 Mostly this is just moving empty stubs into the header rather than
2336 muddying the cpp file with them. A few functions were made pure
2339 * accessibility/AccessibilityObject.cpp:
2340 (WebCore::AccessibilityObject::isARIAControl):
2341 (WebCore::AccessibilityObject::clickPoint):
2342 (WebCore::AccessibilityObject::documentFrameView):
2343 (WebCore::AccessibilityObject::actionVerb):
2344 * accessibility/AccessibilityObject.h:
2345 (WebCore::AccessibilityObject::intValue):
2346 (WebCore::AccessibilityObject::layoutCount):
2347 (WebCore::AccessibilityObject::doAccessibilityHitTest):
2348 (WebCore::AccessibilityObject::focusedUIElement):
2349 (WebCore::AccessibilityObject::firstChild):
2350 (WebCore::AccessibilityObject::lastChild):
2351 (WebCore::AccessibilityObject::previousSibling):
2352 (WebCore::AccessibilityObject::nextSibling):
2353 (WebCore::AccessibilityObject::parentObjectIfExists):
2354 (WebCore::AccessibilityObject::observableObject):
2355 (WebCore::AccessibilityObject::linkedUIElements):
2356 (WebCore::AccessibilityObject::titleUIElement):
2357 (WebCore::AccessibilityObject::ariaRoleAttribute):
2358 (WebCore::AccessibilityObject::isPresentationalChildOfAriaRole):
2359 (WebCore::AccessibilityObject::ariaRoleHasPresentationalChildren):
2360 (WebCore::AccessibilityObject::roleValue):
2361 (WebCore::AccessibilityObject::ariaAccessiblityName):
2362 (WebCore::AccessibilityObject::ariaLabeledByAttribute):
2363 (WebCore::AccessibilityObject::ariaDescribedByAttribute):
2364 (WebCore::AccessibilityObject::accessibilityDescription):
2365 (WebCore::AccessibilityObject::ariaSelectedTextDOMRange):
2366 (WebCore::AccessibilityObject::axObjectCache):
2367 (WebCore::AccessibilityObject::axObjectID):
2368 (WebCore::AccessibilityObject::setAXObjectID):
2369 (WebCore::AccessibilityObject::anchorElement):
2370 (WebCore::AccessibilityObject::actionElement):
2371 (WebCore::AccessibilityObject::boundingBoxRect):
2372 (WebCore::AccessibilityObject::selectedTextRange):
2373 (WebCore::AccessibilityObject::selectionStart):
2374 (WebCore::AccessibilityObject::selectionEnd):
2375 (WebCore::AccessibilityObject::url):
2376 (WebCore::AccessibilityObject::selection):
2377 (WebCore::AccessibilityObject::stringValue):
2378 (WebCore::AccessibilityObject::title):
2379 (WebCore::AccessibilityObject::helpText):
2380 (WebCore::AccessibilityObject::textUnderElement):
2381 (WebCore::AccessibilityObject::text):
2382 (WebCore::AccessibilityObject::textLength):
2383 (WebCore::AccessibilityObject::selectedText):
2384 (WebCore::AccessibilityObject::accessKey):
2385 (WebCore::AccessibilityObject::widget):
2386 (WebCore::AccessibilityObject::widgetForAttachmentView):
2387 (WebCore::AccessibilityObject::setFocused):
2388 (WebCore::AccessibilityObject::setSelectedText):
2389 (WebCore::AccessibilityObject::setSelectedTextRange):
2390 (WebCore::AccessibilityObject::setValue):
2391 (WebCore::AccessibilityObject::setSelected):
2392 (WebCore::AccessibilityObject::makeRangeVisible):
2393 (WebCore::AccessibilityObject::childrenChanged):
2394 (WebCore::AccessibilityObject::addChildren):
2395 (WebCore::AccessibilityObject::hasChildren):
2396 (WebCore::AccessibilityObject::selectedChildren):
2397 (WebCore::AccessibilityObject::visibleChildren):
2398 (WebCore::AccessibilityObject::visiblePositionRange):
2399 (WebCore::AccessibilityObject::visiblePositionRangeForLine):
2400 (WebCore::AccessibilityObject::boundsForVisiblePositionRange):
2401 (WebCore::AccessibilityObject::setSelectedVisiblePositionRange):
2402 (WebCore::AccessibilityObject::visiblePositionForPoint):
2403 (WebCore::AccessibilityObject::nextVisiblePosition):
2404 (WebCore::AccessibilityObject::previousVisiblePosition):
2405 (WebCore::AccessibilityObject::visiblePositionForIndex):
2406 (WebCore::AccessibilityObject::indexForVisiblePosition):
2407 (WebCore::AccessibilityObject::index):
2408 (WebCore::AccessibilityObject::doAXRangeForLine):
2409 (WebCore::AccessibilityObject::doAXRangeForIndex):
2410 (WebCore::AccessibilityObject::doAXStringForRange):
2411 (WebCore::AccessibilityObject::doAXBoundsForRange):
2412 (WebCore::AccessibilityObject::updateBackingStore):
2414 2009-07-23 Brian Weinstein <bweinstein@apple.com>
2416 Reviewed by David Hyatt.
2418 Fix of <rdar://4877658> Dragging from the area between the horizontal/vertical scrollbars when status bar is showing starts a selection and autoscroll.
2420 * page/EventHandler.cpp:
2421 (WebCore::EventHandler::handleMousePressEvent):
2422 * platform/ScrollView.cpp:
2423 (WebCore::ScrollView::wheelEvent):
2424 * platform/ScrollView.h:
2426 2009-07-23 David Hyatt <hyatt@apple.com>
2428 Reviewed by Dan Bernstein.
2430 https://bugs.webkit.org/show_bug.cgi?id=27581
2431 Drop the prefix from the box-shadow property.
2433 * css/CSSComputedStyleDeclaration.cpp:
2435 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2436 * css/CSSParser.cpp:
2437 (WebCore::CSSParser::parseValue):
2438 (WebCore::ShadowParseContext::commitLength):
2439 (WebCore::cssPropertyID):
2440 * css/CSSPropertyNames.in:
2441 * css/CSSStyleSelector.cpp:
2442 (WebCore::CSSStyleSelector::applyProperty):
2443 * page/animation/AnimationBase.cpp:
2444 (WebCore::ensurePropertyMap):
2446 2009-07-22 Viet-Trung Luu <viettrungluu@gmail.com>
2448 Reviewed by David Hyatt.
2450 https://bugs.webkit.org/show_bug.cgi?id=27289
2451 When a mouse click occurs on a scrollbar without a preceding mouse move
2452 onto it, the release isn't handled correctly (since
2453 EventHandler::m_lastScrollbarUnderMouse isn't set on mouse down, but
2454 only on mouse move). (Side comment: That scrollbar-handling code
2455 in EventHandler is ugly. It should be fixed properly.)
2457 Tests: scrollbars/scrollbar-miss-mousemove.html
2458 scrollbars/scrollbar-miss-mousemove-disabled.html
2460 * page/EventHandler.cpp:
2461 (WebCore::EventHandler::handleMousePressEvent):
2462 (WebCore::EventHandler::handleMouseMoveEvent):
2463 (WebCore::EventHandler::updateLastScrollbarUnderMouse):
2464 * page/EventHandler.h:
2466 2009-07-23 Mike Fenton <mike.fenton@torchmobile.com>
2468 Reviewed by David Levin.
2470 Update WebCore/page/BarInfo.cpp to conform to WebKit
2471 Style Guidelines as identified by cpplint.py.
2472 https://bugs.webkit.org/show_bug.cgi?id=27606
2475 (WebCore::BarInfo::visible):
2477 2009-07-23 Mike Fenton <mike.fenton@torchmobile.com>
2479 Reviewed by David Levin.
2481 Update WebCore/page/Console.cpp to conform to WebKit
2482 Style Guidelines as identified by cpplint.py.
2483 https://bugs.webkit.org/show_bug.cgi?id=27606
2486 (WebCore::printMessageSourceAndLevelPrefix):
2487 (WebCore::Console::profile):
2488 (WebCore::Console::time):
2490 2009-07-23 Simon Hausmann <simon.hausmann@nokia.com>
2492 Reviewed by Holger Freyther.
2494 Fix crashes with the QObject bindings after garbage collection.
2496 There is one QtInstance per wrapped QObject, and that QtInstance keeps
2497 references to cached JSObjects for slots. When those objects get
2498 deleted due to GC, then they becoming dangling pointers.
2500 When a cached member dies, it is now removed from the QtInstance's
2503 As we cannot track the lifetime of the children, we have to remove
2504 them from QtInstance alltogether. They are not cached and were
2505 only used for mark(), but we _want_ them to be subject to gc.
2507 * bridge/qt/qt_instance.cpp:
2508 (JSC::Bindings::QtInstance::~QtInstance): Minor coding style cleanup,
2510 (JSC::Bindings::QtInstance::removeCachedMethod): New function, to
2511 clean m_methods and m_defaultMethod.
2512 (JSC::Bindings::QtInstance::mark): Avoid marking already marked objects.
2513 (JSC::Bindings::QtField::valueFromInstance): Don't save children for
2515 * bridge/qt/qt_instance.h: Declare removeCachedMethod.
2516 * bridge/qt/qt_runtime.cpp:
2517 (JSC::Bindings::QtRuntimeMethod::~QtRuntimeMethod): Call removeCachedMethod
2518 with this on the instance.
2520 2009-07-23 Xan Lopez <xlopez@igalia.com>
2522 Reviewed by Mark Rowe.
2524 https://bugs.webkit.org/show_bug.cgi?id=27599
2525 'const unsigned' in return value
2527 Remove const modifier from unsigned return value, as it does not
2532 2009-07-22 Jens Alfke <snej@chromium.org>
2534 Reviewed by David Levin.
2536 Bug 22784: Improve keyboard navigation of Select elements.
2537 Home/End and PageUp/PageDn buttons do not do anything in drop down lists,
2538 on non-Mac platforms.
2539 https://bugs.webkit.org/show_bug.cgi?id=22784
2540 http://code.google.com/p/chromium/issues/detail?id=4576
2542 New test: LayoutTests/fast/forms/select-popup-pagekeys.html
2544 * dom/SelectElement.cpp:
2545 (WebCore::nextValidIndex):
2546 New utility fn for traversing items of a select's list.
2547 (WebCore::SelectElement::menuListDefaultEventHandler):
2548 Added code to handle Home/End and PageUp/PageDn when ARROW_KEYS_POP_MENU is false.
2550 2009-07-23 Xan Lopez <xlopez@igalia.com>
2552 Reviewed by Mark Rowe.
2554 Fix a couple of compiler warnings.
2556 * platform/graphics/cairo/ImageBufferCairo.cpp:
2558 * platform/graphics/gtk/SimpleFontDataGtk.cpp:
2559 (WebCore::SimpleFontData::containsCharacters):
2561 2009-07-22 Simon Hausmann <simon.hausmann@nokia.com>
2563 Rubber-stamped by David Levin.
2565 Enable HTML5 Datagrid defines for the Qt build.
2569 2009-07-22 Adam Barth <abarth@webkit.org>
2571 Reviewed by David Levin.
2573 [V8] Make Node wrappers go fast
2574 https://bugs.webkit.org/show_bug.cgi?id=27597
2576 Profiles indicate we're spending a lot of time asking whether we're on
2577 the main thread when looking up DOM wrappers for Nodes, but there isn't
2578 much point in doing that work because Nodes only exist on the main
2579 thread. I've also added an assert to keep us honest in this regard.
2581 * bindings/v8/V8DOMMap.cpp:
2583 (WebCore::getDOMNodeMap):
2584 (WebCore::DOMData::getCurrent):
2585 (WebCore::DOMData::getCurrentMainThread):
2587 2009-07-22 Adam Barth <abarth@webkit.org>
2589 Reviewed by Alexey Proskuryakov.
2591 Remove unneeded virtual destructor from ScriptSourceProvider
2592 https://bugs.webkit.org/show_bug.cgi?id=27563
2594 * bindings/js/ScriptSourceProvider.h:
2596 2009-07-22 Ryosuke Niwa <rniwa@webkit.org>
2598 Reviewed by Eric Seidel.
2600 execCommand('underline' / 'strikeThrough') doesn't work properly with multiple styles in text-decoration
2601 https://bugs.webkit.org/show_bug.cgi?id=27476
2603 executeStrikethrough and executeUnderline were toggling between "line-through" / "underline" and "none".
2604 This patch adds executeToggleStyleInList that toggles a style in CSSValueList instead of toggling the entire value.
2605 It modifies CSSComputedStyleDeclaration to return CSSValueList instead of CSSPrimitiveValue for text decorations,
2606 and adds removeAll member function to CSSValueList.
2608 Tests: editing/execCommand/toggle-text-decorations.html
2609 fast/css/getComputedStyle/getComputedStyle-text-decoration.html
2611 * css/CSSComputedStyleDeclaration.cpp:
2612 (WebCore::renderTextDecorationFlagsToCSSValue): Creates a CSSValueList
2613 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Returns a CSSValueList instead of CSSValue
2614 * css/CSSParser.cpp:
2615 (WebCore::CSSParser::parseValue): Text decorations are space separated instead of comma separated
2616 * css/CSSValueList.cpp:
2617 (WebCore::CSSValueList::removeAll): Removes all values that match the specified value
2618 * css/CSSValueList.h:
2619 * editing/EditorCommand.cpp:
2620 (WebCore::applyCommandToFrame): Apply style to a frame using specified command
2621 (WebCore::executeApplyStyle): Uses applyCommandToFrame
2622 (WebCore::executeToggleStyleInList): Uses applyCommandToFrame
2623 (WebCore::executeToggleStyle): Toggles a style in CSSValueList
2624 (WebCore::executeStrikethrough): Uses executeToggleStyleInList
2625 (WebCore::executeUnderline): Uses executeToggleStyleInList
2627 2009-07-22 Daniel Bates <dbates@intudata.com>
2629 Reviewed by Adam Barth.
2631 https://bugs.webkit.org/show_bug.cgi?id=27174
2633 https://bugs.webkit.org/show_bug.cgi?id=26938
2635 Code cleanup. Implements support for detecting attacks transformed by
2636 PHP Magic Quotes/PHP addslashes().
2638 Tests: http/tests/security/xssAuditor/script-tag-addslashes-backslash.html
2639 http/tests/security/xssAuditor/script-tag-addslashes-double-quote.html
2640 http/tests/security/xssAuditor/script-tag-addslashes-null-char.html
2641 http/tests/security/xssAuditor/script-tag-addslashes-single-quote.html
2643 * page/XSSAuditor.cpp:
2644 (WebCore::isInvalidCharacter):
2645 (WebCore::XSSAuditor::canEvaluate):
2646 (WebCore::XSSAuditor::canEvaluateJavaScriptURL):
2647 (WebCore::XSSAuditor::canLoadObject):
2648 (WebCore::XSSAuditor::normalize): Decodes HTML entities, removes backslashes,
2649 and removes control characters that could otherwise cause a discrepancy between
2650 the source code of a script and the outgoing HTTP parameters.
2651 (WebCore::XSSAuditor::decodeURL):
2652 (WebCore::XSSAuditor::decodeHTMLEntities):
2653 (WebCore::XSSAuditor::findInRequest):
2654 * page/XSSAuditor.h:
2656 2009-07-22 Oliver Hunt <oliver@apple.com>
2658 Reviewed by Adele Peterson.
2660 Null deref in JSObject::mark due to null xhr wrapper
2661 https://bugs.webkit.org/show_bug.cgi?id=27565
2663 Make event target binding for appcache and xhr behave in the same way as
2664 it does for all other events.
2666 No test as I couldn't make a testcase which was remotely reliable.
2668 * bindings/js/JSEventTarget.cpp:
2671 2009-07-22 Mads Ager <ager@chromium.org>
2673 Reviewed by David Levin.
2675 Inform V8 of the amount of WebCore string memory it is keeping alive.
2676 https://bugs.webkit.org/show_bug.cgi?id=27537
2678 V8 uses external strings that are backed by WebCore strings. Since
2679 the external strings themselves are small, V8 has no way of
2680 knowing how much memory it is actually holding on to. With this
2681 change, we inform V8 of the amount of WebCore string data it is
2682 holding on to with external strings.
2684 * bindings/v8/V8Binding.cpp:
2685 (WebCore::WebCoreStringResource::WebCoreStringResource):
2686 (WebCore::WebCoreStringResource::~WebCoreStringResource):
2688 2009-07-22 David Hyatt <hyatt@apple.com>
2690 Reviewed by Beth Dakin.
2692 https://bugs.webkit.org/show_bug.cgi?id=27562
2693 Add the finalized versions of background-clip and background-origin. Remove background-clip from
2694 the background shorthand and have it be auto-set based off background-origin's value.
2696 Three new tests added in fast/backgrounds/size
2698 * css/CSSComputedStyleDeclaration.cpp:
2700 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2701 * css/CSSMutableStyleDeclaration.cpp:
2702 (WebCore::CSSMutableStyleDeclaration::getPropertyValue):
2703 * css/CSSParser.cpp:
2704 (WebCore::CSSParser::parseValue):
2705 (WebCore::CSSParser::parseFillShorthand):
2706 (WebCore::CSSParser::parseFillProperty):
2707 * css/CSSPropertyLonghand.cpp:
2708 (WebCore::initShorthandMap):
2709 * css/CSSPropertyNames.in:
2710 * css/CSSStyleSelector.cpp:
2711 (WebCore::CSSStyleSelector::applyProperty):
2712 * css/CSSValueKeywords.in:
2714 2009-07-22 Jens Alfke <snej@chromium.org>
2716 Reviewed by Darin Fisher.
2718 Hook up V8 bindings for DataGrid elements.
2719 https://bugs.webkit.org/show_bug.cgi?id=27383
2720 http://code.google.com/p/chromium/issues/detail?id=16730
2722 Tests: Enhanced LayoutTests/fast/dom/HTMLDataGridElement/*
2723 to handle exceptions, check appropriate JS prototypes, and
2724 test column-list's item() method as well as array-indexing.
2726 * WebCore.gypi: Added new source files.
2727 * bindings/scripts/CodeGeneratorV8.pm: Made GenerateBatchedAttributeData put #if's around conditional attributes.
2728 * bindings/v8/DOMObjectsInclude.h: #include DataGrid headers.
2729 * bindings/v8/V8DOMWrapper.cpp: Add bindings from HTML tags to datagrid templates.
2730 (WebCore::V8DOMWrapper::getTemplate): Customize datagrid template.
2731 * bindings/v8/V8DataGridDataSource.cpp: Added. (Based on JSDataGridDataSource)
2732 (WebCore::V8DataGridDataSource::V8DataGridDataSource):
2733 (WebCore::V8DataGridDataSource::~V8DataGridDataSource):
2734 * bindings/v8/V8DataGridDataSource.h: Added. (Based on JSDataGridDataSource)
2735 (WebCore::V8DataGridDataSource::create):
2736 (WebCore::V8DataGridDataSource::isJSDataGridDataSource):
2737 (WebCore::V8DataGridDataSource::jsDataSource):
2738 (WebCore::asV8DataGridDataSource):
2739 * bindings/v8/V8GCController.h: Added new handle type "DATASOURCE".
2740 * bindings/v8/V8Index.h: Conditionalize datagrid stuff.
2741 * bindings/v8/custom/V8CustomBinding.h: Declare more accessors. Conditionalize.
2742 * bindings/v8/custom/V8DataGridColumnListCustom.cpp: Added.
2743 * bindings/v8/custom/V8HTMLDataGridElementCustom.cpp: Fill in dataSource accessors.
2744 (WebCore::ACCESSOR_GETTER):
2745 (WebCore::ACCESSOR_SETTER):
2747 2009-07-22 Ryosuke Niwa <rniwa@webkit.org>
2749 Reviewed by Eric Seidel.
2751 pushDownTextDecorationStyleAroundNode needs clean up
2752 https://bugs.webkit.org/show_bug.cgi?id=27556
2754 Cleaned up. pushDownTextDecorationStyleAroundNode traverses tree vertically from highestAncestor to targetNode
2755 While traversing, it will apply the specified style to all nodes but targetNode.
2756 i.e. the style is applies to all ancestor nodes and their siblings of targetNode.
2758 * editing/ApplyStyleCommand.cpp:
2759 (WebCore::ApplyStyleCommand::pushDownTextDecorationStyleAroundNode): Cleaned up and added comments
2760 * editing/ApplyStyleCommand.h: Updated prototype
2762 2009-07-22 Peter Kasting <pkasting@google.com>
2764 Reviewed by David Kilzer.
2766 https://bugs.webkit.org/show_bug.cgi?id=27323
2767 Handle any type of line endings in WebCore/css/*CSSPropertyNames.in.
2769 * DerivedSources.make:
2771 * css/makevalues.pl:
2773 2009-07-22 Paul Godavari <paul@chromium.org>
2775 Reviewed by Darin Fisher.
2777 Chromium has a build break after removal of JSRGBColor bindings
2778 https://bugs.webkit.org/show_bug.cgi?id=27548
2780 Fix a build break in Chromium V8 after the JSRGBColor bindings change:
2781 https://bugs.webkit.org/show_bug.cgi?id=27242
2783 * bindings/scripts/CodeGeneratorV8.pm:
2785 2009-07-22 Adam Langley <agl@google.com>
2787 Reviewed by Darin Fisher.
2789 Chromium Linux: add static functions to FontPlatformData which allow
2790 for setting the global font rendering preferences.
2792 https://bugs.webkit.org/show_bug.cgi?id=27513
2793 http://code.google.com/p/chromium/issues/detail?id=12179
2795 This should not affect any layout tests.
2797 * platform/graphics/chromium/FontPlatformDataLinux.cpp:
2798 (WebCore::FontPlatformData::setHinting):
2799 (WebCore::FontPlatformData::setAntiAlias):
2800 (WebCore::FontPlatformData::setSubpixelGlyphs):
2801 (WebCore::FontPlatformData::setupPaint):
2802 * platform/graphics/chromium/FontPlatformDataLinux.h:
2804 2009-07-22 Mikhail Naganov <mnaganov@chromium.org>
2806 Reviewed by Timothy Hatcher.
2808 Move Inspector panels creation into a function to make possible introducing
2811 * inspector/front-end/inspector.js:
2812 (WebInspector._createPanels):
2813 (WebInspector.loaded):
2815 2009-07-22 Pavel Feldman <pfeldman@chromium.org>
2817 Reviewed by Timothy Hatcher.
2819 WebInspector: Print console command message upon evaluate
2820 selection request; Handle errors in evaluation request
2823 https://bugs.webkit.org/show_bug.cgi?id=27535
2825 * inspector/front-end/ScriptsPanel.js:
2826 (WebInspector.ScriptsPanel.prototype.evaluateInSelectedCallFrame):
2827 * inspector/front-end/SourceFrame.js:
2828 (WebInspector.SourceFrame.prototype._evalSelectionInCallFrame):
2830 2009-07-22 Xan Lopez <xlopez@igalia.com>
2832 Attempt to fix the GTK+ build.
2836 2009-07-21 Simon Hausmann <simon.hausmann@nokia.com>
2840 * WebCore.pro: Add RGBColor.cpp to the build, remove JSRGBColor.
2842 2009-07-21 Daniel Bates <dbates@intudata.com>
2844 Reviewed by Adam Barth.
2846 https://bugs.webkit.org/show_bug.cgi?id=27494
2848 Fixes an issue that can cause a crash or unexpected behavior when calling
2849 WebCore::ScriptSourceCode::source on a cached script.
2854 * WebCore.vcproj/WebCore.vcproj:
2855 * WebCore.xcodeproj/project.pbxproj:
2856 * bindings/js/CachedScriptSourceProvider.h: Modified to inherit from
2857 WebCore::ScriptSourceCode.
2858 (WebCore::CachedScriptSourceProvider::source):
2859 (WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
2860 * bindings/js/ScriptSourceCode.h:
2861 (WebCore::ScriptSourceCode::ScriptSourceCode): Separated out source provider and
2862 rewrote to use WebCore::ScriptSourceProvider.
2863 (WebCore::ScriptSourceCode::source):
2864 * bindings/js/ScriptSourceProvider.h: Added.
2865 (WebCore::ScriptSourceProvider::ScriptSourceProvider):
2866 (WebCore::ScriptSourceProvider::~ScriptSourceProvider):
2867 * bindings/js/StringSourceProvider.h: Modified to inherit from
2868 WebCore::ScriptSourceCode.
2869 (WebCore::StringSourceProvider::StringSourceProvider):
2871 2009-07-21 Sam Weinig <sam@webkit.org>
2873 Another attempt to fix the Windows build.
2875 * WebCore.vcproj/WebCore.vcproj:
2877 2009-07-21 Sam Weinig <sam@webkit.org>
2879 Attempt to fix the Windows build.
2881 * DerivedSources.cpp:
2883 2009-07-21 Sam Weinig <sam@webkit.org>
2885 Attempt to fix the GTK build.
2889 2009-07-21 Sam Weinig <sam@webkit.org>
2891 Reviewed by Dan Bernstein.
2893 Autogenerate Objective-C binding implementation for RGBColor.
2895 No functionality change.
2897 * WebCore.xcodeproj/project.pbxproj:
2898 * bindings/objc/DOMRGBColor.mm: Removed.
2899 * bindings/scripts/CodeGeneratorObjC.pm: Add logic to convert from
2900 WebCore::Color to NSColor*.
2903 2009-07-21 Sam Weinig <sam@webkit.org>
2905 Reviewed by Dan Bernstein.
2907 Fix for https://bugs.webkit.org/show_bug.cgi?id=27242
2908 JSC bindings should use an auto-bound RGBColor class instead of hand-rolled JSRGBColor
2910 Move the JSC and Objective-C bindings onto using the RGBColor object instead
2911 of just an unsigned int. The JSC bindings are now completely autogenerated for
2912 this class. (Also removes the last lut from WebCore).
2914 * DerivedSources.make:
2917 * WebCore.vcproj/WebCore.vcproj:
2918 * WebCore.xcodeproj/project.pbxproj:
2919 * WebCoreSources.bkl:
2920 * bindings/js/JSRGBColor.cpp: Removed.
2921 * bindings/js/JSRGBColor.h: Removed.
2922 * bindings/objc/DOM.mm:
2923 (-[DOMRGBColor _color]):
2924 * bindings/objc/DOMRGBColor.mm:
2925 (-[DOMRGBColor dealloc]):
2926 (-[DOMRGBColor finalize]):
2927 (-[DOMRGBColor red]):
2928 (-[DOMRGBColor green]):
2929 (-[DOMRGBColor blue]):
2930 (-[DOMRGBColor alpha]):
2931 (-[DOMRGBColor color]):
2932 * bindings/scripts/CodeGenerator.pm:
2933 * bindings/scripts/CodeGeneratorJS.pm:
2934 * bindings/scripts/CodeGeneratorObjC.pm:
2935 * css/CSSParser.cpp:
2936 (WebCore::CSSParser::parseColor):
2937 * css/CSSPrimitiveValue.cpp:
2938 (WebCore::CSSPrimitiveValue::getRGBColorValue):
2939 * css/CSSPrimitiveValue.h:
2940 (WebCore::CSSPrimitiveValue::getRGBA32Value):
2941 * css/CSSStyleSelector.cpp:
2942 (WebCore::CSSStyleSelector::getColorFromPrimitiveValue):
2944 (WebCore::RGBColor::alpha):
2946 (WebCore::RGBColor::color):
2947 (WebCore::RGBColor::RGBColor):
2949 * page/DOMWindow.idl:
2951 (WebCore::SVGColor::rgbColor):
2954 2009-07-21 Jian Li <jianli@chromium.org>
2956 Reviewed by David Levin.
2958 Implement AbstractWorker::dispatchScriptErrorEvent by generating an ErrorEvent.
2959 https://bugs.webkit.org/show_bug.cgi?id=27515
2961 * workers/AbstractWorker.cpp:
2962 (WebCore::AbstractWorker::dispatchScriptErrorEvent):
2964 2009-07-21 Eric Seidel <eric@webkit.org>
2966 Reviewed by Adam Barth.
2968 Move m_context out of generator into a superclass
2969 https://bugs.webkit.org/show_bug.cgi?id=27521
2971 Mostly this is removing code from CodeGeneratorJS
2972 and instead using a DOMObjectWithSVGContext superclass in JSDOMBinding.h.
2974 DOMObjectWithSVGContext.h is its own file so that WebKit doesn't need to
2975 know about SVGElement.h (WebKit includes JSDOMBinding.h for some reason).
2977 I also removed context pointer from SVGZoomEvent since it was never used.
2981 * WebCore.vcproj/WebCore.vcproj:
2982 * WebCore.xcodeproj/project.pbxproj:
2983 * bindings/js/DOMObjectWithSVGContext.h: Added.
2984 (WebCore::DOMObjectWithSVGContext::context):
2985 (WebCore::DOMObjectWithSVGContext::DOMObjectWithSVGContext):
2986 * bindings/js/JSDOMBinding.h:
2987 * bindings/js/JSEventCustom.cpp:
2989 * bindings/scripts/CodeGeneratorJS.pm:
2991 2009-07-21 Ryosuke Niwa <rniwa@webkit.org>
2993 Reviewed by Eric Seidel.
2995 REGRESSION (r46142): editing/execCommand/19087.html & editing/execCommand/19653-1.html fail in Windows build
2996 https://bugs.webkit.org/show_bug.cgi?id=27480
2998 Because m_anchorType : 2 is treated as a signed integer by cl.exe, anchorType() wasn't returning the correct value.
2999 We made m_anchorType unsigned so that anchorType() returns the correct value.
3002 (WebCore::Position::anchorType): statically cast to AnchorType
3004 2009-07-21 Jian Li <jianli@chromium.org>
3006 Reviewed by David Levin.
3008 [V8] Add V8 bindings for onerror in WorkerContext.
3009 https://bugs.webkit.org/show_bug.cgi?id=27518
3011 * bindings/v8/custom/V8CustomBinding.h:
3012 * bindings/v8/custom/V8WorkerContextCustom.cpp:
3013 (WebCore::ACCESSOR_GETTER):
3014 (WebCore::ACCESSOR_SETTER):
3016 2009-07-21 Jian Li <jianli@chromium.org>
3018 Fix the incorrect patch being landed for bug 27516 that has already been reviewed.
3019 https://bugs.webkit.org/show_bug.cgi?id=27516
3021 * workers/WorkerContext.h:
3022 (WebCore::WorkerContext::setOnerror):
3023 (WebCore::WorkerContext::onerror):
3024 * workers/WorkerContext.idl:
3026 2009-07-21 Jian Li <jianli@chromium.org>
3028 Reviewed by David Levin.
3030 Add onerror to WorkerContext.
3031 https://bugs.webkit.org/show_bug.cgi?id=27516
3033 * bindings/js/JSWorkerContextCustom.cpp:
3034 (WebCore::JSWorkerContext::mark):
3035 * workers/WorkerContext.h:
3036 (WebCore::WorkerContext::setOnerror):
3037 (WebCore::WorkerContext::onerror):
3038 * workers/WorkerContext.idl:
3040 2009-07-21 Yong Li <yong.li@torchmobile.com>
3042 Reviewed by George Staikos.
3044 https://bugs.webkit.org/show_bug.cgi?id=27509
3045 Add font-related files for the WinCE port.
3047 Written by Yong Li <yong.li@torchmobile.com>
3049 * platform/graphics/wince/FontCacheWince.cpp: Added.
3050 * platform/graphics/wince/FontCustomPlatformData.cpp: Added.
3051 * platform/graphics/wince/FontCustomPlatformData.h: Added.
3052 * platform/graphics/wince/FontPlatformData.cpp: Added.
3053 * platform/graphics/wince/FontPlatformData.h: Added.
3054 * platform/graphics/wince/FontWince.cpp: Added.
3055 * platform/graphics/wince/GlyphPageTreeNodeWince.cpp: Added.
3056 * platform/graphics/wince/SimpleFontDataWince.cpp: Added.
3058 2009-07-21 Kevin Ollivier <kevino@theolliviers.com>
3060 Fix the Windows build, and update the comment on top now that wx uses WebCorePrefix.h too.
3064 2009-07-21 Kevin Ollivier <kevino@theolliviers.com>
3066 WebCorePrefix.h build fixes for non-Mac and wx / CURL builds.
3070 2009-07-21 Eric Seidel <eric@webkit.org>
3072 Reviewed by Adam Barth.
3074 All DOMConstructorObjects should hold a pointer to the JSDOMGlobalObject
3075 https://bugs.webkit.org/show_bug.cgi?id=27478
3077 This is just moving code.
3078 I've added two new classes: DOMObjectWithGlobalPointer and DOMConstructorWithDocument.
3080 DOMObjectWithGlobalPointer is a new baseclass for DOMConstructorObject.
3081 (It's a baseclass because eventually all DOMObjects will have a global pointer, but
3082 I'll be moving them onto DOMObjectWithGlobalPointer in stages.)
3084 DOMConstructorWithDocument is a new baseclass for the 3 constructor objects
3085 which require a backpointer to the Document to function. I made this a subclass of
3086 DOMConstructorObject to make clear that most constructors can hold no-such assumptions
3087 about having a back-pointer to the Document (since many constructors can be used from Workers).
3089 * bindings/js/JSAudioConstructor.cpp:
3090 (WebCore::JSAudioConstructor::JSAudioConstructor):
3091 * bindings/js/JSAudioConstructor.h:
3092 * bindings/js/JSDOMBinding.h:
3093 (WebCore::DOMObjectWithGlobalPointer::globalObject):
3094 (WebCore::DOMObjectWithGlobalPointer::scriptExecutionContext):
3095 (WebCore::DOMObjectWithGlobalPointer::DOMObjectWithGlobalPointer):
3096 (WebCore::DOMObjectWithGlobalPointer::mark):
3097 (WebCore::DOMConstructorObject::DOMConstructorObject):
3098 (WebCore::DOMConstructorWithDocument::document):
3099 (WebCore::DOMConstructorWithDocument::DOMConstructorWithDocument):
3100 * bindings/js/JSImageConstructor.cpp:
3101 (WebCore::JSImageConstructor::JSImageConstructor):
3102 * bindings/js/JSImageConstructor.h:
3103 * bindings/js/JSMessageChannelConstructor.cpp:
3104 (WebCore::JSMessageChannelConstructor::JSMessageChannelConstructor):
3105 * bindings/js/JSMessageChannelConstructor.h:
3106 * bindings/js/JSOptionConstructor.cpp:
3107 (WebCore::JSOptionConstructor::JSOptionConstructor):
3108 * bindings/js/JSOptionConstructor.h:
3109 * bindings/js/JSWebKitCSSMatrixConstructor.cpp:
3110 (WebCore::JSWebKitCSSMatrixConstructor::JSWebKitCSSMatrixConstructor):
3111 * bindings/js/JSWebKitPointConstructor.cpp:
3112 (WebCore::JSWebKitPointConstructor::JSWebKitPointConstructor):
3113 * bindings/js/JSWorkerConstructor.cpp:
3114 (WebCore::JSWorkerConstructor::JSWorkerConstructor):
3115 * bindings/js/JSXMLHttpRequestConstructor.cpp:
3116 (WebCore::JSXMLHttpRequestConstructor::JSXMLHttpRequestConstructor):
3117 * bindings/js/JSXMLHttpRequestConstructor.h:
3118 * bindings/js/JSXSLTProcessorConstructor.cpp:
3119 (WebCore::JSXSLTProcessorConstructor::JSXSLTProcessorConstructor):
3121 2009-07-21 James Hawkins <jhawkins@google.com>
3123 Reviewed by David Hyatt.
3125 https://bugs.webkit.org/show_bug.cgi?id=27453
3126 Initialize isInt when creating a CSSParserValue for a function.
3128 No change in behavior, so no tests.
3130 * css/CSSFunctionValue.cpp:
3131 (WebCore::CSSFunctionValue::parserValue):
3133 2009-07-20 Jens Alfke <snej@google.com>
3135 Reviewed by David Levin.
3137 Bug 27448: [Chromium] On Mac, arrow keys should cause Select to pop up its menu.
3138 Mac build of Chromium doesn't follow Mac HI guidelines to pop up the menu when
3139 an arrow key is pressed.
3140 https://bugs.webkit.org/show_bug.cgi?id=27448
3142 No new tests; affects only control response to user input.
3144 * dom/SelectElement.cpp:
3145 Changed definition of ARROW_KEYS_POP_MENU to make it true in Mac Chromium,
3146 so it will behave compatibly with Mac HI guidelines on pop-up menus.
3147 It's not possible to have PLATFORM(MAC) be true in the Mac build of Chromium.
3149 2009-07-21 Paul Godavari <paul@chromium.org>
3151 Reviewed by Eric Seidel.
3153 [Chromium] popup menus can crash when the selected index is -1
3154 https://bugs.webkit.org/show_bug.cgi?id=27275
3156 Crash reports from users indicate a crash can occur when PopupListBox::isSelectableItem
3157 is passed an index of less than 0 (which is possible under certain circumstances). This
3158 change prevents such a value from causing a crash by enforcing valid index values passed
3159 by all callers of isSelectableItem. isSelectableItem is now a private method of
3160 PopupListBox, as there are no external callers.
3162 Also cleaned up a small amount of code for style and grammar errors.
3164 No automatic test is provided since we cannot send events to the child window used by
3167 * platform/chromium/PopupMenuChromium.cpp:
3168 (WebCore::PopupListBox::acceptIndex):
3169 (WebCore::PopupListBox::selectIndex):
3170 (WebCore::PopupListBox::isSelectableItem):
3171 (WebCore::PopupListBox::selectPreviousRow):
3173 2009-07-21 Kevin Ollivier <kevino@theolliviers.com>
3175 wx build fix. Don't include winsock2.h on wx, it conflicts with wx's inclusion of winsock.
3177 * platform/network/curl/ResourceHandleManager.h:
3179 2009-07-21 Adam Roben <aroben@apple.com>
3181 Roll out r46153, r46154, and r46155
3183 These changes were causing build failures and assertion failures on
3186 * ForwardingHeaders/wtf/PossiblyNull.h: Removed.
3187 * platform/graphics/cg/ImageBufferCG.cpp:
3189 2009-07-21 Jian Li <jianli@chromium.org>
3191 Reviewed by Eric Seidel.
3193 Implement ErrorEvent API.
3194 https://bugs.webkit.org/show_bug.cgi?id=27387
3196 * DerivedSources.cpp:
3197 * DerivedSources.make:
3201 * WebCore.vcproj/WebCore.vcproj:
3202 * WebCore.xcodeproj/project.pbxproj:
3203 * WebCoreSources.bkl:
3204 * bindings/js/JSEventCustom.cpp:
3206 * dom/ErrorEvent.cpp: Added.
3207 * dom/ErrorEvent.h: Added.
3208 * dom/ErrorEvent.idl: Added.
3210 (WebCore::Event::isErrorEvent):
3213 2009-07-21 Priit Laes <plaes@plaes.org>
3215 Reviewed by Gustavo Noronha.
3217 [Gtk] Searching in thepiratebay.org doesn't work with more than 1 word
3218 https://bugs.webkit.org/show_bug.cgi?id=24602
3220 Remove workaround required for <=libsoup-2.26.1
3222 * platform/network/soup/ResourceHandleSoup.cpp:
3223 (WebCore::restartedCallback):
3225 2009-07-21 Adam Barth <abarth@webkit.org>
3227 Reviewed by David Levin.
3229 V8IsolatedWorld keeps a handle to a disposed context
3230 https://bugs.webkit.org/show_bug.cgi?id=27397
3232 Make a copy of the context handle before making it weak. We don't want
3233 to make the original handle weak because we want it to survive for the
3234 length of the V8IsolatedWorld::evaluate method.
3236 * bindings/v8/V8IsolatedWorld.cpp:
3237 (WebCore::V8IsolatedWorld::V8IsolatedWorld):
3239 2009-07-21 Pavel Feldman <pfeldman@chromium.org>
3241 Reviewed by Timothy Hatcher.
3243 Web Inspector: Add ability to evaluate selection while on break point.
3245 https://bugs.webkit.org/show_bug.cgi?id=27502
3247 * inspector/front-end/SourceFrame.js:
3248 (WebInspector.SourceFrame.prototype._loaded):
3249 (WebInspector.SourceFrame.prototype._documentKeyDown):
3251 2009-07-21 Pavel Feldman <pfeldman@chromium.org>
3253 Reviewed by Timothy Hatcher.
3255 WebInspector: Special case ConsolePanel opening since
3256 it is a 'fast view'.
3258 https://bugs.webkit.org/show_bug.cgi?id=27493
3260 * inspector/InspectorController.cpp:
3261 (WebCore::InspectorController::setWindowVisible):
3263 2009-07-20 Kenneth Rohde Christiansen <kenneth@webkit.org>
3265 Reviewed by Eric Seidel.
3267 Fix Qt code to follow the WebKit Coding Style.
3269 * platform/graphics/qt/FontQt.cpp:
3271 (WebCore::fixSpacing):
3272 * platform/graphics/qt/FontQt43.cpp:
3273 (WebCore::generateComponents):
3274 (WebCore::Font::offsetForPositionForComplexText):
3275 (WebCore::cursorToX):
3276 * platform/graphics/qt/GradientQt.cpp:
3277 (WebCore::Gradient::platformGradient):
3278 * platform/graphics/qt/GraphicsContextQt.cpp:
3279 (WebCore::toQtFillRule):
3280 (WebCore::GraphicsContextPlatformPrivate::GraphicsContextPlatformPrivate):
3281 (WebCore::GraphicsContext::~GraphicsContext):
3282 (WebCore::GraphicsContext::getCTM):
3283 (WebCore::GraphicsContext::concatCTM):
3284 (WebCore::GraphicsContext::getWindowsContext):
3285 * platform/graphics/qt/IconQt.cpp:
3286 (WebCore::Icon::paint):
3287 * platform/graphics/qt/ImageDecoderQt.cpp:
3288 (WebCore::ImageDecoderQt::ReadContext::read):
3289 (WebCore::ImageDecoderQt::ReadContext::readImageLines):
3290 (WebCore::ImageDecoderQt::setData):
3291 * platform/graphics/qt/ImageQt.cpp:
3292 (WebCore::Image::drawPattern):
3293 (WebCore::BitmapImage::draw):
3294 * platform/graphics/qt/ImageSourceQt.cpp:
3295 (WebCore::ImageSource::frameDurationAtIndex):
3296 (WebCore::ImageSource::frameHasAlphaAtIndex):
3297 (WebCore::ImageSource::frameIsCompleteAtIndex):
3298 * platform/graphics/qt/MediaPlayerPrivatePhonon.cpp:
3299 (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3300 (WebCore::MediaPlayerPrivate::create):
3301 (WebCore::MediaPlayerPrivate::bytesLoaded):
3302 (WebCore::MediaPlayerPrivate::updateStates):
3303 * platform/graphics/qt/PathQt.cpp:
3304 (WebCore::Path::addArcTo):
3305 (WebCore::Path::isEmpty):
3306 * platform/graphics/qt/TransformationMatrixQt.cpp:
3307 (WebCore::TransformationMatrix::operator QTransform):
3308 * platform/qt/ClipboardQt.cpp:
3309 (WebCore::ClipboardQt::ClipboardQt):
3310 (WebCore::ClipboardQt::clearData):
3311 (WebCore::ClipboardQt::clearAllData):
3312 (WebCore::ClipboardQt::getData):
3313 (WebCore::ClipboardQt::setData):
3314 (WebCore::ClipboardQt::setDragImage):
3315 (WebCore::getCachedImage):
3316 (WebCore::ClipboardQt::declareAndWriteDragImage):
3317 (WebCore::ClipboardQt::writeURL):
3318 (WebCore::ClipboardQt::writeRange):
3319 (WebCore::ClipboardQt::hasData):
3320 * platform/qt/ClipboardQt.h:
3321 * platform/qt/ContextMenuItemQt.cpp:
3322 (WebCore::ContextMenuItem::action):
3323 (WebCore::ContextMenuItem::title):
3324 * platform/qt/CursorQt.cpp:
3325 (WebCore::westPanningCursor):
3326 (WebCore::notAllowedCursor):
3327 * platform/qt/DragDataQt.cpp:
3328 (WebCore::DragData::containsFiles):
3329 (WebCore::DragData::asFilenames):
3330 (WebCore::DragData::asPlainText):
3331 (WebCore::DragData::asFragment):
3332 * platform/qt/DragImageQt.cpp:
3333 (WebCore::createDragImageIconForCachedImage):
3334 * platform/qt/FileSystemQt.cpp:
3335 (WebCore::getFileSize):
3336 (WebCore::unloadModule):
3337 * platform/qt/Localizations.cpp:
3338 (WebCore::contextMenuItemTagShowSpellingPanel):
3339 * platform/qt/MIMETypeRegistryQt.cpp:
3341 * platform/qt/PasteboardQt.cpp:
3342 (WebCore::Pasteboard::Pasteboard):
3343 (WebCore::Pasteboard::writeSelection):
3344 (WebCore::Pasteboard::plainText):
3345 * platform/qt/PlatformKeyboardEventQt.cpp:
3346 (WebCore::PlatformKeyboardEvent::PlatformKeyboardEvent):
3347 * platform/qt/PlatformMouseEventQt.cpp:
3348 (WebCore::PlatformMouseEvent::PlatformMouseEvent):
3349 * platform/qt/PopupMenuQt.cpp:
3350 (WebCore::PopupMenu::populate):
3351 * platform/qt/RenderThemeQt.cpp:
3352 (WebCore::RenderThemeQt::fallbackStyle):
3353 (WebCore::inflateButtonRect):
3354 (WebCore::RenderThemeQt::computeSizeBasedOnStyle):
3355 (WebCore::RenderThemeQt::paintButton):
3356 (WebCore::RenderThemeQt::paintMenuList):
3357 (WebCore::RenderThemeQt::applyTheme):
3358 (WebCore::WorldMatrixTransformer::WorldMatrixTransformer):
3359 (WebCore::RenderThemeQt::paintMediaBackground):
3360 (WebCore::RenderThemeQt::paintMediaFullscreenButton):
3361 * platform/qt/RenderThemeQt.h:
3362 * platform/qt/ScreenQt.cpp:
3363 (WebCore::screenRect):
3364 (WebCore::usableScreenRect):
3365 * platform/qt/ScrollbarQt.cpp:
3366 (WebCore::Scrollbar::contextMenu):
3367 * platform/qt/ScrollbarThemeQt.cpp:
3369 (WebCore::scrollbarPart):
3370 * platform/qt/ScrollbarThemeQt.h:
3371 * platform/qt/SharedBufferQt.cpp:
3372 (WebCore::SharedBuffer::createWithContentsOfFile):
3373 * platform/qt/TemporaryLinkStubs.cpp:
3374 (PluginDatabase::defaultPluginDirectories):
3375 (PluginDatabase::getPluginPathsInDirectories):
3376 (PluginDatabase::isPreferredPluginDirectory):
3377 (WebCore::getSupportedKeySizes):
3378 (WebCore::signedPublicKeyAndChallengeString):
3379 (WebCore::userIdleTime):
3380 (WebCore::prefetchDNS):
3381 * platform/text/qt/StringQt.cpp:
3382 (WebCore::String::String):
3383 * platform/text/qt/TextBoundaries.cpp:
3384 * platform/text/qt/TextBreakIteratorQt.cpp:
3385 (WebCore::TextBreakIterator::following):
3386 (WebCore::TextBreakIterator::preceding):
3387 (WebCore::WordBreakIteratorQt::first):
3388 (WebCore::WordBreakIteratorQt::next):
3389 (WebCore::WordBreakIteratorQt::previous):
3390 (WebCore::CharBreakIteratorQt::first):
3391 (WebCore::CharBreakIteratorQt::next):
3392 (WebCore::CharBreakIteratorQt::previous):
3393 (WebCore::characterBreakIterator):
3394 * plugins/qt/PluginPackageQt.cpp:
3395 (WebCore::PluginPackage::fetchInfo):
3396 * plugins/qt/PluginViewQt.cpp:
3397 (WebCore::PluginView::userAgentStatic):
3398 (WebCore::PluginView::handlePostReadFile):
3399 (WebCore::PluginView::init):
3401 2009-07-21 Maxime Simon <simon.maxime@gmail.com>
3403 Reviewed by David Levin.
3405 Added a first bunch of Haiku-specific files for WebCore.
3406 https://bugs.webkit.org/show_bug.cgi?id=26988
3408 * platform/haiku/ClipboardHaiku.cpp: Added.
3409 (WebCore::ClipboardHaiku::ClipboardHaiku):
3410 (WebCore::ClipboardHaiku::clearData):
3411 (WebCore::ClipboardHaiku::clearAllData):
3412 (WebCore::ClipboardHaiku::getData):
3413 (WebCore::ClipboardHaiku::setData):
3414 (WebCore::ClipboardHaiku::types):
3415 (WebCore::ClipboardHaiku::files):
3416 (WebCore::ClipboardHaiku::dragLocation):
3417 (WebCore::ClipboardHaiku::dragImage):
3418 (WebCore::ClipboardHaiku::setDragImage):
3419 (WebCore::ClipboardHaiku::dragImageElement):
3420 (WebCore::ClipboardHaiku::setDragImageElement):
3421 (WebCore::ClipboardHaiku::createDragImage):
3422 (WebCore::ClipboardHaiku::declareAndWriteDragImage):
3423 (WebCore::ClipboardHaiku::writeURL):
3424 (WebCore::ClipboardHaiku::writeRange):
3425 (WebCore::ClipboardHaiku::hasData):
3426 * platform/haiku/ClipboardHaiku.h: Added.
3427 (WebCore::ClipboardHaiku::create):
3428 (WebCore::ClipboardHaiku::~ClipboardHaiku):
3429 * platform/haiku/CookieJarHaiku.cpp: Added.
3430 (WebCore::setCookies):
3432 (WebCore::cookiesEnabled):
3433 * platform/haiku/CursorHaiku.cpp: Added.
3434 (WebCore::Cursor::Cursor):
3435 (WebCore::Cursor::~Cursor):
3436 (WebCore::Cursor::operator=):
3437 (WebCore::pointerCursor):
3438 (WebCore::moveCursor):
3439 (WebCore::crossCursor):
3440 (WebCore::handCursor):
3441 (WebCore::iBeamCursor):
3442 (WebCore::waitCursor):
3443 (WebCore::helpCursor):
3444 (WebCore::eastResizeCursor):
3445 (WebCore::northResizeCursor):
3446 (WebCore::northEastResizeCursor):
3447 (WebCore::northWestResizeCursor):
3448 (WebCore::southResizeCursor):
3449 (WebCore::southEastResizeCursor):
3450 (WebCore::southWestResizeCursor):
3451 (WebCore::westResizeCursor):
3452 (WebCore::northSouthResizeCursor):
3453 (WebCore::eastWestResizeCursor):
3454 (WebCore::northEastSouthWestResizeCursor):
3455 (WebCore::northWestSouthEastResizeCursor):
3456 (WebCore::columnResizeCursor):
3457 (WebCore::rowResizeCursor):
3458 (WebCore::verticalTextCursor):
3459 (WebCore::cellCursor):
3460 (WebCore::contextMenuCursor):
3461 (WebCore::noDropCursor):
3462 (WebCore::copyCursor):
3463 (WebCore::progressCursor):
3464 (WebCore::aliasCursor):
3465 (WebCore::noneCursor):
3466 (WebCore::notAllowedCursor):
3467 (WebCore::zoomInCursor):
3468 (WebCore::zoomOutCursor):
3469 (WebCore::grabCursor):
3470 (WebCore::grabbingCursor):
3472 2009-07-21 Albert Astals Cid <aacid@kde.org>
3474 Reviewed by Tor Arne Vestbø.
3476 Change #error line not to have a ' (single quote)
3478 * DerivedSources.cpp:
3480 2009-07-21 Roland Steiner <rolandsteiner@google.com>
3482 Reviewed by David Levin.
3484 Add ENABLE_RUBY to list of build options
3485 https://bugs.webkit.org/show_bug.cgi?id=27324
3487 Added flag ENABLE_RUBY:
3489 * Configurations/FeatureDefines.xcconfig:
3490 * DerivedSources.make:
3493 * WebCore.vcproj/WebCoreCommon.vsprops:
3494 * WebCore.vcproj/build-generated-files.sh:
3496 2009-07-21 James Hawkins <jhawkins@google.com>
3498 Reviewed by Eric Seidel.
3500 https://bugs.webkit.org/show_bug.cgi?id=27467
3501 Return an empty path in PlatformContextSkia::currentPathInLocalCoordinates
3502 if matrix.invert() fails. This prevents the use of an uninitialized
3503 value in inverseMatrix.
3505 No new tests added. Run
3506 LayoutTests/svg/dynamic-updates/SVGMarkerElement-dom-markerHeight-attr.html
3507 under valgrind and notice there are no errors.
3509 * platform/graphics/skia/PlatformContextSkia.cpp:
3510 (PlatformContextSkia::currentPathInLocalCoordinates):
3512 2009-07-21 Stephen White <senorblanco@chromium.org>
3514 Reviewed by Eric Seidel.
3516 https://bugs.webkit.org/show_bug.cgi?id=27388
3518 Fix dotted and dashed borders on Chromium/skia. This follows
3519 the logic in the Cg path, so results are much closer to Safari now
3520 (some tests won't be exactly the same due to font layout differences).
3522 * platform/graphics/skia/GraphicsContextSkia.cpp:
3523 (WebCore::GraphicsContext::drawLine):
3524 * platform/graphics/skia/PlatformContextSkia.cpp:
3525 (PlatformContextSkia::setupPaintForStroking):
3527 2009-07-20 Oliver Hunt <oliver@apple.com>
3529 Reviewed by Gavin Barraclough.
3531 Make it harder to misuse try* allocation routines
3532 https://bugs.webkit.org/show_bug.cgi?id=27469
3534 Add forwarding header for PossiblyNull type, and add missing null check
3535 to ImageBuffer creation.
3537 * ForwardingHeaders/wtf/PossiblyNull.h: Added.
3538 * platform/graphics/cg/ImageBufferCG.cpp:
3539 (WebCore::ImageBuffer::ImageBuffer):
3541 2009-07-20 Adam Langley <agl@google.com>
3543 Reviewed by Eric Seidel.
3545 Guard access to installedMediaEngines()[0].
3547 https://bugs.webkit.org/show_bug.cgi?id=27479
3548 http://code.google.com/p/chromium/issues/detail?id=16541
3550 Else where in the file, installedMediaEngines is always checked for
3551 being empty because access. This patch adds a case which missed that
3554 This triggered a crash in Chromium:
3555 http://www.yakeze.com/chat/example-chromium-crash/
3557 * platform/graphics/MediaPlayer.cpp:
3558 (WebCore::MediaPlayer::load):
3560 2009-07-20 Adam Langley <agl@google.com>
3562 Reviewed by Eric Seidel.
3564 Allow search entries to render with a CSS border if the RenderTheme
3567 https://bugs.webkit.org/show_bug.cgi?id=27466
3568 http://code.google.com/p/chromium/issues/detail?id=16958
3570 <input type="search"> is very much like a text entry except that,
3571 currently, if the RenderTheme doesn't deal with it, nothing is
3572 rendered. With this patch, the default CSS border is rendered if the
3573 RenderTheme requests it.
3575 This will affect many layout tests, but only for Chromium Linux and
3576 those results are not currently in the WebKit tree.