1 2012-04-05 Hans Muller <hmuller@adobe.com>
3 CSS Exclusions polygon shape arguments should be comma separated
4 https://bugs.webkit.org/show_bug.cgi?id=82368
6 Reviewed by Ryosuke Niwa.
8 Changed the CSS Parser to accept a conventional comma separated argument list for the
9 polygon exclusion shape. The syntax had used spaces to separate x,y coordinates, like:
10 polygon(10px,20px 30px,40px). Now commas separate points: polygon(10px 20px, 30px 40px).
11 This change is per the draft exclusions spec, http://dev.w3.org/csswg/css3-exclusions.
12 Additional relevant information about CSS argument list syntax can be found
13 here: http://dev.w3.org/csswg/css3-values/#component-whitespace.
15 Factored comma recognition idiom in CSSParser.cpp into isComma() utility function.
17 The existing tests have been updated.
21 (WebCore::CSSParser::parseFillPosition)
22 (WebCore::CSSParser::parseFillRepeat)
23 (WebCore::CSSParser::parseFillProperty)
24 (WebCore::CSSParser::parseCubicBezierTimingFunctionValue)
25 (WebCore::CSSParser::parseAnimationTimingFunction)
26 (WebCore::CSSParser::parseAnimationProperty)
27 (WebCore::CSSParser::parseExclusionShapePolygon)
28 (WebCore::CSSParser::parseDeprecatedGradient)
29 (WebCore::CSSParser::parseRadialGradient)
30 (WebCore::CSSParser::parseGradientColorStops)
31 (WebCore::CSSParser::parseImageSet)
32 (WebCore::filterInfoForName)
33 (WebCore::CSSParser::parseCustomFilter)
34 (WebCore::CSSParser::parseFontFeatureSettings)
36 * css/CSSWrapShapes.cpp:
37 (WebCore::CSSWrapShapePolygon::cssText):
39 2012-04-05 Joshua Bell <jsbell@chromium.org>
41 IndexedDB: Support string.length in keyPaths
42 https://bugs.webkit.org/show_bug.cgi?id=83221
44 Special case in the IDB spec - keyPaths can reference the |length| property
45 of string values. Other instrinsic properties (|length| of Array, etc) are
46 handled automagically. Relevant section of the updated spec is:
47 http://dvcs.w3.org/hg/IndexedDB/raw-file/tip/Overview.html#key-path-construct
49 Reviewed by Kentaro Hara.
51 Test: storage/indexeddb/keypath-intrinsic-properties.html
53 * bindings/v8/IDBBindingUtilities.cpp:
56 2012-04-05 Arvid Nilsson <anilsson@rim.com>
58 [BlackBerry] Update the InstrumentedPlatformCanvas after rebasing Skia
59 https://bugs.webkit.org/show_bug.cgi?id=83314
61 Reviewed by George Staikos.
64 One new virtual method was added to the SkCanvas, to draw a nine piece
65 image. Override it and mark output as not being a solid color anymore.
67 * platform/graphics/blackberry/InstrumentedPlatformCanvas.h:
68 (WebCore::InstrumentedPlatformCanvas::drawBitmapNine):
69 (InstrumentedPlatformCanvas):
71 2012-04-05 Oliver Hunt <oliver@apple.com>
73 Make WebCore use jsCast rather than static_cast for casting JSC objects
74 https://bugs.webkit.org/show_bug.cgi?id=83320
76 Reviewed by Stephanie Lewis.
78 Mechanically replace static_cast with jsCast where ever we can.
81 * bindings/js/DOMWrapperWorld.cpp:
82 (WebCore::JSStringOwner::finalize):
83 * bindings/js/DOMWrapperWorld.h:
84 (WebCore::currentWorld):
85 * bindings/js/JSArrayBufferCustom.cpp:
86 (WebCore::JSArrayBufferConstructor::constructJSArrayBuffer):
87 * bindings/js/JSAudioContextCustom.cpp:
88 (WebCore::JSAudioContextConstructor::constructJSAudioContext):
89 * bindings/js/JSCSSRuleListCustom.cpp:
90 (WebCore::JSCSSRuleListOwner::isReachableFromOpaqueRoots):
91 * bindings/js/JSCSSStyleDeclarationCustom.cpp:
92 (WebCore::cssPropertyGetterPixelOrPosPrefixCallback):
93 (WebCore::cssPropertyGetterCallback):
94 * bindings/js/JSCSSValueCustom.cpp:
95 (WebCore::JSCSSValueOwner::isReachableFromOpaqueRoots):
96 (WebCore::JSCSSValueOwner::finalize):
97 * bindings/js/JSDOMBinding.cpp:
98 (WebCore::reportException):
99 * bindings/js/JSDOMBinding.h:
100 (WebCore::deprecatedGlobalObjectForPrototype):
101 (WebCore::getDOMPrototype):
102 * bindings/js/JSDOMFormDataCustom.cpp:
103 (WebCore::toHTMLFormElement):
104 (WebCore::JSDOMFormDataConstructor::constructJSDOMFormData):
105 * bindings/js/JSDOMMimeTypeArrayCustom.cpp:
106 (WebCore::JSDOMMimeTypeArray::nameGetter):
107 * bindings/js/JSDOMPluginArrayCustom.cpp:
108 (WebCore::JSDOMPluginArray::nameGetter):
109 * bindings/js/JSDOMPluginCustom.cpp:
110 (WebCore::JSDOMPlugin::nameGetter):
111 * bindings/js/JSDOMStringMapCustom.cpp:
112 (WebCore::JSDOMStringMap::nameGetter):
113 * bindings/js/JSDOMWindowBase.cpp:
114 (WebCore::toJSDOMWindow):
115 * bindings/js/JSDOMWindowCustom.cpp:
116 (WebCore::childFrameGetter):
117 (WebCore::indexGetter):
118 (WebCore::namedItemGetter):
119 (WebCore::toDOMWindow):
120 * bindings/js/JSDOMWindowCustom.h:
121 (WebCore::asJSDOMWindow):
122 * bindings/js/JSDOMWindowShell.h:
123 (WebCore::JSDOMWindowShell::window):
124 * bindings/js/JSDOMWrapper.h:
125 (WebCore::JSDOMWrapper::globalObject):
126 * bindings/js/JSDataViewCustom.cpp:
127 (WebCore::JSDataViewConstructor::constructJSDataView):
128 * bindings/js/JSEventListener.cpp:
129 (WebCore::JSEventListener::handleEvent):
130 * bindings/js/JSEventTarget.cpp:
132 (WebCore::toEventTarget):
133 * bindings/js/JSFloat32ArrayCustom.cpp:
134 (WebCore::JSFloat32ArrayConstructor::constructJSFloat32Array):
135 * bindings/js/JSFloat64ArrayCustom.cpp:
136 (WebCore::JSFloat64ArrayConstructor::constructJSFloat64Array):
137 * bindings/js/JSGeolocationCustom.cpp:
138 (WebCore::JSGeolocation::getCurrentPosition):
139 (WebCore::JSGeolocation::watchPosition):
140 * bindings/js/JSHTMLAllCollectionCustom.cpp:
141 (WebCore::callHTMLAllCollection):
142 (WebCore::JSHTMLAllCollection::nameGetter):
143 * bindings/js/JSHTMLCollectionCustom.cpp:
144 (WebCore::JSHTMLCollection::nameGetter):
145 * bindings/js/JSHTMLDocumentCustom.cpp:
146 (WebCore::JSHTMLDocument::nameGetter):
147 * bindings/js/JSHTMLFormElementCustom.cpp:
148 (WebCore::JSHTMLFormElement::nameGetter):
149 * bindings/js/JSHTMLFrameSetElementCustom.cpp:
150 (WebCore::JSHTMLFrameSetElement::nameGetter):
151 * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
152 (WebCore::JSHTMLOptionsCollection::remove):
153 * bindings/js/JSImageConstructor.cpp:
154 (WebCore::constructImage):
155 * bindings/js/JSInjectedScriptManager.cpp:
156 (WebCore::InjectedScriptManager::createInjectedScript):
157 (WebCore::InjectedScriptManager::discardInjectedScript):
158 (WebCore::InjectedScriptManager::injectedScriptFor):
159 * bindings/js/JSInt16ArrayCustom.cpp:
160 (WebCore::JSInt16ArrayConstructor::constructJSInt16Array):
161 * bindings/js/JSInt32ArrayCustom.cpp:
162 (WebCore::JSInt32ArrayConstructor::constructJSInt32Array):
163 * bindings/js/JSInt8ArrayCustom.cpp:
164 (WebCore::JSInt8ArrayConstructor::constructJSInt8Array):
165 * bindings/js/JSLazyEventListener.cpp:
166 (WebCore::JSLazyEventListener::initializeJSFunction):
167 * bindings/js/JSNamedNodeMapCustom.cpp:
168 (WebCore::JSNamedNodeMap::nameGetter):
169 * bindings/js/JSNodeCustom.cpp:
170 (WebCore::JSNodeOwner::isReachableFromOpaqueRoots):
171 (WebCore::JSNodeOwner::finalize):
172 * bindings/js/JSNodeCustom.h:
174 * bindings/js/JSNodeFilterCustom.cpp:
175 (WebCore::toNodeFilter):
176 * bindings/js/JSNodeListCustom.cpp:
177 (WebCore::JSNodeListOwner::isReachableFromOpaqueRoots):
178 (WebCore::JSNodeList::nameGetter):
179 * bindings/js/JSPluginElementFunctions.cpp:
180 (WebCore::runtimeObjectPropertyGetter):
181 (WebCore::callPlugin):
182 * bindings/js/JSPopStateEventCustom.cpp:
183 (WebCore::JSPopStateEvent::state):
184 * bindings/js/JSSQLTransactionCustom.cpp:
185 (WebCore::JSSQLTransaction::executeSql):
186 * bindings/js/JSSharedWorkerCustom.cpp:
187 (WebCore::JSSharedWorkerConstructor::constructJSSharedWorker):
188 * bindings/js/JSStorageCustom.cpp:
189 (WebCore::JSStorage::nameGetter):
190 * bindings/js/JSStyleSheetListCustom.cpp:
191 (WebCore::JSStyleSheetList::nameGetter):
192 * bindings/js/JSTextTrackCueCustom.cpp:
193 (WebCore::JSTextTrackCueOwner::isReachableFromOpaqueRoots):
194 * bindings/js/JSTextTrackCustom.cpp:
195 (WebCore::JSTextTrackOwner::isReachableFromOpaqueRoots):
196 * bindings/js/JSTextTrackListCustom.cpp:
197 (WebCore::JSTextTrackListOwner::isReachableFromOpaqueRoots):
198 * bindings/js/JSTrackCustom.cpp:
200 * bindings/js/JSUint16ArrayCustom.cpp:
201 (WebCore::JSUint16ArrayConstructor::constructJSUint16Array):
202 * bindings/js/JSUint32ArrayCustom.cpp:
203 (WebCore::JSUint32ArrayConstructor::constructJSUint32Array):
204 * bindings/js/JSUint8ArrayCustom.cpp:
205 (WebCore::JSUint8ArrayConstructor::constructJSUint8Array):
206 * bindings/js/JSUint8ClampedArrayCustom.cpp:
207 (WebCore::JSUint8ClampedArrayConstructor::constructJSUint8ClampedArray):
208 * bindings/js/JSWebKitMutationObserverCustom.cpp:
209 (WebCore::JSWebKitMutationObserverConstructor::constructJSWebKitMutationObserver):
210 * bindings/js/JSWebKitPointCustom.cpp:
211 (WebCore::JSWebKitPointConstructor::constructJSWebKitPoint):
212 * bindings/js/JSWebSocketCustom.cpp:
213 (WebCore::JSWebSocketConstructor::constructJSWebSocket):
214 * bindings/js/JSWorkerContextBase.cpp:
215 (WebCore::toJSDedicatedWorkerContext):
216 (WebCore::toJSSharedWorkerContext):
217 * bindings/js/JSWorkerCustom.cpp:
218 (WebCore::JSWorkerConstructor::constructJSWorker):
219 * bindings/js/JSXSLTProcessorCustom.cpp:
220 (WebCore::JSXSLTProcessor::importStylesheet):
221 (WebCore::JSXSLTProcessor::transformToFragment):
222 (WebCore::JSXSLTProcessor::transformToDocument):
223 * bindings/js/ScriptCallStackFactory.cpp:
224 (WebCore::createScriptCallStackForInspector):
225 * bindings/js/ScriptControllerMac.mm:
226 (WebCore::updateStyleIfNeededForBindings):
227 * bindings/js/ScriptDebugServer.cpp:
228 (WebCore::ScriptDebugServer::dispatchDidPause):
229 * bindings/js/ScriptObject.cpp:
230 (WebCore::ScriptGlobalObject::set):
231 * bindings/js/ScriptState.cpp:
232 (WebCore::domWindowFromScriptState):
233 (WebCore::scriptExecutionContextFromScriptState):
234 * bindings/js/SerializedScriptValue.cpp:
235 (WebCore::CloneSerializer::fillTransferMap):
236 (WebCore::CloneSerializer::dumpArrayBufferView):
237 (WebCore::CloneDeserializer::getJSValue):
238 (WebCore::CloneDeserializer::readTerminal):
239 * bindings/objc/WebScriptObject.mm:
240 (-[WebScriptObject _isSafeScript]):
241 (+[WebScriptObject _convertValueToObjcValue:originRootObject:rootObject:]):
242 * bindings/scripts/CodeGeneratorJS.pm:
243 (GenerateGetOwnPropertySlotBody):
244 (GenerateGetOwnPropertyDescriptorBody):
245 (GenerateImplementation):
248 (GenerateConstructorDefinition):
249 * bridge/jni/jni_jsobject.h:
250 * bridge/jni/jni_jsobject.mm:
251 (JavaJSObject::convertJObjectToValue):
252 * bridge/jni/jsc/JavaInstanceJSC.cpp:
253 (JavaInstance::invokeMethod):
254 * bridge/objc/objc_utility.mm:
255 (JSC::Bindings::convertValueToObjcValue):
256 * bridge/runtime_method.cpp:
257 (JSC::callRuntimeMethod):
258 * bridge/runtime_object.cpp:
259 (JSC::Bindings::callRuntimeConstructor):
260 * testing/js/WebCoreTestSupport.cpp:
261 (WebCoreTestSupport::injectInternalsObject):
262 (WebCoreTestSupport::resetInternalsObject):
264 2012-04-05 Martin Robinson <mrobinson@igalia.com>
266 [GTK] Scrolling some iframes that are partially out of the viewport leads to repaint errors
267 https://bugs.webkit.org/show_bug.cgi?id=83309
269 Reviewed by Gustavo Noronha Silva.
271 Test: platform/gtk/fast/frames/scrolling-iframe-out-of-viewport.html
273 The X11 backing store was not properly trimming the scroll region when it
274 was only a portion of the screen. This was hidden by subsequent repaints.
276 * platform/gtk/GtkWidgetBackingStoreX11.cpp:
277 (WebCore::WidgetBackingStore::scroll): Fix the calculation of the scrolling region.
279 2012-04-05 Sheriff Bot <webkit.review.bot@gmail.com>
281 Unreviewed, rolling out r113299.
282 http://trac.webkit.org/changeset/113299
283 https://bugs.webkit.org/show_bug.cgi?id=83297
285 The patch broke 11 tests on Lion. (Requested by jonlee on
288 * xml/parser/XMLDocumentParser.h:
290 * xml/parser/XMLDocumentParserLibxml2.cpp:
291 (WebCore::XMLDocumentParser::XMLDocumentParser):
292 (WebCore::XMLDocumentParser::startElementNs):
293 (WebCore::XMLDocumentParser::endElementNs):
294 (WebCore::getEntityHandler):
295 (WebCore::XMLDocumentParser::initializeParserContext):
297 2012-04-05 Justin Novosad <junov@chromium.org>
299 [Chromium] Correct misleading trace event names in Canvas2DLayerChromium
300 https://bugs.webkit.org/show_bug.cgi?id=83310
302 Reviewed by Adrienne Walker.
304 * platform/graphics/chromium/Canvas2DLayerChromium.cpp:
305 (WebCore::Canvas2DLayerChromium::paintContentsIfDirty):
307 2012-04-05 Dean Jackson <dino@apple.com>
309 [mac] requestAnimationFrame sometimes stuck when page loads in a background tab
310 https://bugs.webkit.org/show_bug.cgi?id=76105
312 Reviewed by Simon Fraser.
314 Fix three issues with requestAnimationFrame:
315 - It's possible for the call to rAF to come to the document before there
316 is a page associated. Added a guard for this.
317 - A page may try to suspend the scripted animations before the
318 ScriptedAnimationController exists, in which case we need to
319 suspend it immediately after it is created. Do this by keeping
320 track of the state in Page. Otherwise rAF would be busy looping
321 on hidden pages until they are brought to the front and hidden again.
322 - A page created in the background (from WebKit1) does not get
323 informed it is not visible. This can mean that resume() is called
324 more times than suspend() and we get into a state where the number
325 of suspensions becomes -1, and thus fails truthiness tests. Clamp it
328 No new tests, since this is not automatically testable. The most reliable test
329 is to open a page with rAF in a background tab within Safari.
332 (WebCore::Document::webkitRequestAnimationFrame):
333 * dom/ScriptedAnimationController.cpp:
334 (WebCore::ScriptedAnimationController::resume):
336 (WebCore::Page::Page):
337 (WebCore::Page::suspendScriptedAnimations):
338 (WebCore::Page::resumeScriptedAnimations):
340 (WebCore::Page::scriptedAnimationsSuspended):
343 2012-04-05 Brady Eidson <beidson@apple.com>
345 <rdar://problem/9359029> and https://bugs.webkit.org/show_bug.cgi?id=83311
346 Crashes in WebProcess at WebCore::HistoryController::recursiveSetProvisionalItem when restoring previous session
348 Reviewed by Sam Weinig.
350 It's possible to hit a race condition between the UIProcess and the WebProcess where the UIProcess records for a
351 page have been cleared out but the WebProcess is still trying to perform a history navigation within that page.
353 In this situation HistoryController code that expects there to always be a current history item in the back/forward
356 No new tests. (The race conditions involved have proven making a test impractical)
358 * loader/HistoryController.cpp:
359 (WebCore::HistoryController::recursiveSetProvisionalItem): Don't ASSERT the fromItem. We now know there might not be one.
360 (WebCore::HistoryController::recursiveGoToItem): Ditto
361 (WebCore::HistoryController::itemsAreClones): Always return false if either item is null, as a null item and a non-null
362 item cannot possible be clones of each other.
364 2012-04-05 Adam Klein <adamk@chromium.org>
366 Crash in MutationObservers due to an invalid HashSet iterator
367 https://bugs.webkit.org/show_bug.cgi?id=83304
369 Reviewed by Ojan Vafai.
371 If the observed node has been GCed when we clear transient observers
372 from it, the HashSet iterator in WebKitMutationObserver::deliver would
373 be invalidated. This patch fixes that behavior by copying the relevant
374 registrations into a seperate vector first and operating on the copy.
376 This patch also fixes a bug: transient observers should be cleared
377 after every microtask, not just when delivering.
379 Tests: fast/mutation/clear-transient-without-delivery.html
380 fast/mutation/transient-gc-crash.html
382 * dom/MutationObserverRegistration.cpp:
383 (WebCore::MutationObserverRegistration::observedSubtreeNodeWillDetach):
384 Notify the observer that it has a transient registration so it can be properly cleared.
385 * dom/MutationObserverRegistration.h:
386 (WebCore::MutationObserverRegistration::hasTransientRegistrations):
387 Add an accessor for use when deliver() creates its vector of registrations.
388 * dom/WebKitMutationObserver.cpp:
389 (WebCore::WebKitMutationObserver::setHasTransientRegistration): Add this to the active observer set
390 to allow transient registrations to be cleared appropriately.
391 (WebCore::WebKitMutationObserver::deliver): Avoid modifying m_registrations while iterating over it.
392 Clear registrations before checking for a lack of records to deliver.
393 * dom/WebKitMutationObserver.h:
395 2012-04-05 Adam Klein <adamk@chromium.org>
397 Rebaseline binding tests after r113272.
399 * bindings/scripts/test/V8/V8TestInterface.cpp:
400 (WebCore::V8TestInterface::constructorCallback):
401 * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
402 (WebCore::V8TestNamedConstructorConstructorCallback):
403 * bindings/scripts/test/V8/V8TestObj.cpp:
404 (WebCore::V8TestObj::constructorCallback):
405 * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
406 (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
408 2012-04-05 Stephen White <senorblanco@chromium.org>
410 [chromium] Drawing an accelerated canvas onto itself is slow.
411 https://bugs.webkit.org/show_bug.cgi?id=83295
413 Fixed by using a GPU-side deepCopy() in skia, so we don't trigger a
414 readback and re-upload.
416 Reviewed by James Robinson.
418 Correctness is covered by existing tests. Performance is covered
419 by the test case attached to the bug.
421 * platform/graphics/skia/ImageSkia.cpp:
422 (WebCore::BitmapImageSingleFrameSkia::create):
424 2012-04-05 Dana Jansens <danakj@chromium.org>
426 [chromium] Record the number of tiles paint-culled instead of the incorrect number of pixels
427 https://bugs.webkit.org/show_bug.cgi?id=82423
429 Reviewed by Adrienne Walker.
431 We currently attempt to record the number of pixels we save from uploading,
432 however the number is wrong in two ways.
433 1) An early-out if everything is culled results in nothing being reported.
434 2) With threaded-compositor, the number of pixels uploaded in one tile can be
435 changed by culling in another tile, making the number far too difficult to
436 compute to be worthwhile. If a tile was going to be partial-updated, but is
437 culled, now a new tile gets to be partial-updated instead, which affects the
440 This patch breaks up CCOverdrawMetrics to make the methods/variables less
441 overloaded and more clear. This way they don't have to mirror each other
442 so closely on paint/draw sides.
444 Then we record the number of tiles for which we prevented upload via paint
445 culling. This will still over-report (a dirty culled tile stays dirty and
446 will be culled again each commit), but it seems more reasonable as it
447 clearly does not try to mimic a performance metric in the way that a pixel
448 count does, but still gives a rough estimation of the amount of paint
449 culling going on in a page.
451 Covered by existing tests, modified where needed.
453 * platform/graphics/chromium/TiledLayerChromium.cpp:
454 (WebCore::TiledLayerChromium::prepareToUpdateTiles):
455 * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
456 (WebCore::CCOverdrawMetrics::CCOverdrawMetrics):
457 (WebCore::CCOverdrawMetrics::didCullTileForUpload):
459 (WebCore::CCOverdrawMetrics::didUpload):
460 (WebCore::CCOverdrawMetrics::didCullForDrawing):
461 (WebCore::CCOverdrawMetrics::recordMetrics):
462 (WebCore::CCOverdrawMetrics::recordMetricsInternal):
463 * platform/graphics/chromium/cc/CCOverdrawMetrics.h:
465 (WebCore::CCOverdrawMetrics::pixelsCulledForDrawing):
466 (WebCore::CCOverdrawMetrics::pixelsUploadedOpaque):
467 (WebCore::CCOverdrawMetrics::pixelsUploadedTranslucent):
468 (WebCore::CCOverdrawMetrics::tilesCulledForUpload):
469 * platform/graphics/chromium/cc/CCQuadCuller.cpp:
470 (WebCore::CCQuadCuller::append):
472 2012-04-05 Enrica Casucci <enrica@apple.com>
474 Provide a separate editing command to cleanup of redundant markup.
475 https://bugs.webkit.org/show_bug.cgi?id=83240
477 Reviewed by Ryosuke Niwa.
479 This patch moves the logic originally performed by the private
480 method removeRedundantMarkup inside ReplaceSelectionCommand into
481 a separate command. This way the markup cleanup can be exposed as
482 a separate command, independent from ReplaceSelectionCommand.
484 No new tests. No change in functionality.
487 * GNUmakefile.list.am:
490 * WebCore.vcproj/WebCore.vcproj:
491 * WebCore.xcodeproj/project.pbxproj:
492 Added new file to project files.
493 * editing/EditorAllInOne.cpp: Added SimplifyMarkupCommand.
494 * editing/ReplaceSelectionCommand.cpp:
495 (WebCore::ReplaceSelectionCommand::doApply): Now uses SimplifyMarkupCommand.
496 * editing/ReplaceSelectionCommand.h:
497 (ReplaceSelectionCommand): Removed removeRedundantMarkup.
498 * editing/SimplifyMarkupCommand.cpp: Added.
499 (WebCore::SimplifyMarkupCommand::SimplifyMarkupCommand):
500 (WebCore::SimplifyMarkupCommand::doApply):
501 * editing/SimplifyMarkupCommand.h: Added.
502 (WebCore::SimplifyMarkupCommand::create):
504 2012-04-05 Shawn Singh <shawnsingh@chromium.org>
506 [chromium] Need to clip to homogeneous w=0 plane when applying transforms.
507 https://bugs.webkit.org/show_bug.cgi?id=80806
509 Reviewed by Adrienne Walker.
511 Unit tests added to CCLayerTreeHostCommon. This change is also
512 covered by other existing unit tests and layout tests.
514 WebCore TransformationMatrix mapRect / mapQuad / projectQuad do
515 not properly handle the case where a surface is oriented partially
516 behind the camera, with a perspective projection. In this case,
517 projected points may appear to be valid in cartesian coordinates,
518 but they are indeed not valid, and this problem can only be
519 detected in homogeneous coordinates after applying the transform,
520 before the divide-by-w step.
522 The correct solution is to clip geometry where w < 0. This patch
523 makes this change local to chromium only, to fix rendering bugs
524 that arise from this problem. The primary fix is to correct
525 calculateVisibleLayerRect(), but other ancillary locations are
526 also fixed, in particular, the antialiasing code path is simply
527 skipped when this case arises.
529 Eventually this math needs to be merged into TransformationMatrix,
530 to fix hit-testing bugs that occur in both Chromium and Safari.
533 * platform/graphics/chromium/LayerRendererChromium.cpp:
534 (WebCore::findTileProgramUniforms):
535 (WebCore::LayerRendererChromium::drawTileQuad):
536 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
537 (WebCore::CCLayerTreeHostCommon::calculateVisibleRect):
538 (WebCore::isScaleOrTranslation):
539 (WebCore::calculateDrawTransformsAndVisibilityInternal):
540 * platform/graphics/chromium/cc/CCMathUtil.cpp: Added.
542 (WebCore::HomogeneousCoordinate::HomogeneousCoordinate):
543 (HomogeneousCoordinate):
544 (WebCore::HomogeneousCoordinate::shouldBeClipped):
545 (WebCore::HomogeneousCoordinate::cartesianPoint2d):
546 (WebCore::projectPoint):
548 (WebCore::computeClippedPointForEdge):
549 (WebCore::expandBoundsToIncludePoint):
550 (WebCore::computeEnclosingRectOfClippedQuad):
551 (WebCore::computeEnclosingRect):
552 (WebCore::CCMathUtil::mapClippedRect):
553 (WebCore::CCMathUtil::projectClippedRect):
554 (WebCore::CCMathUtil::mapQuad):
555 (WebCore::CCMathUtil::projectQuad):
556 * platform/graphics/chromium/cc/CCMathUtil.h: Added.
559 * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
560 (WebCore::computeUnoccludedContentRect):
562 2012-04-05 Patrick Gansterer <paroga@webkit.org>
564 [Qt] Correct <wtf/*.h> include paths.
565 https://bugs.webkit.org/show_bug.cgi?id=83270
567 Reviewed by Eric Seidel.
569 Modify the #include declerations so that the
570 wtf types are included using the full path.
572 * platform/graphics/TiledBackingStoreBackend.h:
574 2012-04-05 Antonio Gomes <agomes@rim.com>
576 Unreviewed bit left over from rebasing the origin patch before landing it.
578 Complementary to r113329.
580 * rendering/HitTestResult.cpp:
581 (WebCore::HitTestResult::operator=):
583 2012-04-05 Sheriff Bot <webkit.review.bot@gmail.com>
585 Unreviewed, rolling out r113241.
586 http://trac.webkit.org/changeset/113241
587 https://bugs.webkit.org/show_bug.cgi?id=83293
589 Requested by sievers@chromium.org (Requested by zhenyao on
592 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
593 (WebCore::CCLayerTreeHostImpl::canDraw):
594 (WebCore::CCLayerTreeHostImpl::prepareToDraw):
595 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
596 (CCLayerTreeHostImpl):
597 * platform/graphics/chromium/cc/CCThreadProxy.cpp:
598 (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
600 2012-04-05 Sheriff Bot <webkit.review.bot@gmail.com>
602 Unreviewed, rolling out r113341.
603 http://trac.webkit.org/changeset/113341
604 https://bugs.webkit.org/show_bug.cgi?id=83299
606 bots caught some build errors (Requested by shawnsingh on
610 * platform/graphics/chromium/LayerRendererChromium.cpp:
611 (WebCore::findTileProgramUniforms):
612 (WebCore::LayerRendererChromium::drawTileQuad):
613 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
614 (WebCore::CCLayerTreeHostCommon::calculateVisibleRect):
615 (WebCore::isScaleOrTranslation):
616 (WebCore::calculateDrawTransformsAndVisibilityInternal):
617 * platform/graphics/chromium/cc/CCMathUtil.cpp: Removed.
618 * platform/graphics/chromium/cc/CCMathUtil.h: Removed.
619 * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
620 (WebCore::projectQuad):
622 (WebCore::computeUnoccludedContentRect):
624 2012-04-05 Justin Novosad <junov@chromium.org>
626 [Chromium] With the skia port, setting LCD text filtering is causing
627 texture cache invalidations of gpu canvas backing store
628 https://bugs.webkit.org/show_bug.cgi?id=74183
630 Reviewed by Stephen White.
632 Replacing unnecessary usage of SkCanvas::LayerIter with calls to
633 SkCanvas::isDrawingToLayer(). Same results, lower overhead, and no
634 GPU texture invalidation.
636 * platform/graphics/chromium/FontChromiumWin.cpp:
638 (WebCore::TransparencyAwareFontPainter::initializeForGDI):
639 * platform/graphics/harfbuzz/FontHarfBuzz.cpp:
641 (WebCore::adjustTextRenderMode):
642 * platform/graphics/skia/FontSkia.cpp:
644 (WebCore::adjustTextRenderMode):
645 * platform/graphics/skia/SkiaFontWin.cpp:
647 (WebCore::disableTextLCD):
648 * rendering/RenderThemeChromiumWin.cpp:
651 2012-04-05 Zan Dobersek <zandobersek@gmail.com>
653 media/track/track-webvtt-tc004-magic-header.html flakily times out
654 https://bugs.webkit.org/show_bug.cgi?id=72279
656 Reviewed by Eric Carlson.
658 Move all the checking for the WebVTT file identifier from TextTrackLoader
659 to WebVTTParser, notifying the parser clients of parsing failures through
660 a new method. Remove the WebVTTParser::fileIdentifierMaximumLength method
661 and make WebVTTParser::hasRequiredFileIdentifier private. The latter now
662 operates on a vector holding the identifier data to which data is added
663 until there's enough of it to possibly hold the optional BOM character
664 and the required WEBVTT character sequence.
666 No new tests. Fixes an existing test.
668 * html/track/WebVTTParser.cpp: Fix a typo throughout the file:
669 fileIdentiferLength -> fileIdentifierLength
671 (WebCore::WebVTTParser::parseBytes): Only continue with searcing for
672 the WEBVTT identifier if there's enough data to possibly contain the
673 identifier. Report that the file failed to parse if the identifier
675 (WebCore::WebVTTParser::hasRequiredFileIdentifier): Refactor to operate
676 on the vector containing identifier data and merge with the
677 hasLongWebVTTIdentifier function.
678 * html/track/WebVTTParser.h:
679 (WebVTTParserClient): Add a new method.
681 * loader/TextTrackLoader.cpp:
682 (WebCore::TextTrackLoader::processNewCueData): Parser is now created
683 immediately regardless of the mime type the response holds.
684 (WebCore::TextTrackLoader::fileFailedToParse): Log the error, set the
685 state to failed, start the cue load timer and cancel the load if the file
686 was not parsed successfully.
688 * loader/TextTrackLoader.h:
691 2012-04-05 Shawn Singh <shawnsingh@chromium.org>
693 [chromium] Need to clip to homogeneous w=0 plane when applying transforms.
694 https://bugs.webkit.org/show_bug.cgi?id=80806
696 Reviewed by Adrienne Walker.
698 Unit tests added to CCLayerTreeHostCommon. This change is also
699 covered by other existing unit tests and layout tests.
701 WebCore TransformationMatrix mapRect / mapQuad / projectQuad do
702 not properly handle the case where a surface is oriented partially
703 behind the camera, with a perspective projection. In this case,
704 projected points may appear to be valid in cartesian coordinates,
705 but they are indeed not valid, and this problem can only be
706 detected in homogeneous coordinates after applying the transform,
707 before the divide-by-w step.
709 The correct solution is to clip geometry where w < 0. This patch
710 makes this change local to chromium only, to fix rendering bugs
711 that arise from this problem. The primary fix is to correct
712 calculateVisibleLayerRect(), but other ancillary locations are
713 also fixed, in particular, the antialiasing code path is simply
714 skipped when this case arises.
716 Eventually this math needs to be merged into TransformationMatrix,
717 to fix hit-testing bugs that occur in both Chromium and Safari.
720 * platform/graphics/chromium/LayerRendererChromium.cpp:
721 (WebCore::findTileProgramUniforms):
722 (WebCore::LayerRendererChromium::drawTileQuad):
723 * platform/graphics/chromium/cc/CCLayerTreeHostCommon.cpp:
724 (WebCore::CCLayerTreeHostCommon::calculateVisibleRect):
725 (WebCore::isScaleOrTranslation):
726 (WebCore::calculateDrawTransformsAndVisibilityInternal):
727 * platform/graphics/chromium/cc/CCMathUtil.cpp: Added.
729 (WebCore::HomogeneousCoordinate::HomogeneousCoordinate):
730 (HomogeneousCoordinate):
731 (WebCore::HomogeneousCoordinate::shouldBeClipped):
732 (WebCore::HomogeneousCoordinate::cartesianPoint2d):
733 (WebCore::projectPoint):
735 (WebCore::computeClippedPointForEdge):
736 (WebCore::expandBoundsToIncludePoint):
737 (WebCore::computeEnclosingRectOfClippedQuad):
738 (WebCore::computeEnclosingRect):
739 (WebCore::CCMathUtil::mapClippedRect):
740 (WebCore::CCMathUtil::projectClippedRect):
741 (WebCore::CCMathUtil::mapQuad):
742 (WebCore::CCMathUtil::projectQuad):
743 * platform/graphics/chromium/cc/CCMathUtil.h: Added.
746 * platform/graphics/chromium/cc/CCOcclusionTracker.cpp:
747 (WebCore::computeUnoccludedContentRect):
749 2012-04-05 Jia Pu <jpu@apple.com>
751 Move correction panel related functions from EditorClient into separated AlternativeTextClient class.
752 https://bugs.webkit.org/show_bug.cgi?id=82970
754 Reviewed by Enrica Casucci.
756 No new tests, since there's no change of functionality.
758 The existing correction panel related functions in EditorClient are currently used only by OS X.
759 We'd like to move them into separate AlternativeTextClient class to avoid using #ifdef's. This
760 new client class will also hold dictation alternative related interface that we will add soon for
763 * WebCore.vcproj/WebCore.vcproj:
764 * WebCore.xcodeproj/project.pbxproj:
765 * editing/AlternativeTextController.cpp: Changes in this file are all for calling functions in
766 AlternativeTextClient instead of those in EditoClient.
767 (WebCore::AlternativeTextController::show):
768 (WebCore::AlternativeTextController::dismiss):
769 (WebCore::AlternativeTextController::dismissSoon):
770 (WebCore::AlternativeTextController::respondToUnappliedSpellCorrection):
771 (WebCore::AlternativeTextController::timerFired):
772 (WebCore::AlternativeTextController::isAutomaticSpellingCorrectionEnabled):
773 (WebCore::AlternativeTextController::alternativeTextClient):
775 (WebCore::AlternativeTextController::editorClient):
776 (WebCore::AlternativeTextController::textChecker):
777 (WebCore::AlternativeTextController::recordAutocorrectionResponseReversed):
778 (WebCore::AlternativeTextController::recordSpellcheckerResponseForModifiedCorrection):
779 * editing/AlternativeTextController.h:
781 (AlternativeTextController):
782 * editing/TextCheckingHelper.h:
784 * loader/EmptyClients.h:
786 * page/AlternativeTextClient.h: Added.
788 (AlternativeTextClient):
789 (WebCore::AlternativeTextClient::~AlternativeTextClient):
790 * page/EditorClient.h:
793 (WebCore::Page::Page):
794 (WebCore::Page::PageClients::PageClients):
799 (WebCore::Page::alternativeTextClient):
801 2012-04-05 Min Qin <qinmin@google.com>
803 Fix fullscreen video button for android
804 https://bugs.webkit.org/show_bug.cgi?id=83087
806 Reviewed by Dimitri Glazkov.
808 https://bugs.webkit.org/show_bug.cgi?id=70437 changed css keyword for fullscreen video button.
809 It is changed from media-fullscreen-button to media-enter-fullscreen-button.
810 However, it does not change the value in mediaControlChromiumAndroid.css.
813 * css/mediaControlsChromiumAndroid.css:
814 (video::-webkit-media-controls-fullscreen-button):
816 2012-04-05 Pavel Feldman <pfeldman@chromium.org>
818 Web Inspector: CSS file revisions are not restored upon front-end reopen.
819 https://bugs.webkit.org/show_bug.cgi?id=83292
821 Reviewed by Yury Semikhatsky.
823 Populating suggestions before the panel creation now.
825 * inspector/front-end/inspector.js:
826 (WebInspector._doLoadedDoneWithCapabilities.get if):
828 2012-04-04 Simon Fraser <simon.fraser@apple.com>
830 Add assertions to check for mutation of RenderLayer z-order lists during enumeration
831 https://bugs.webkit.org/show_bug.cgi?id=83242
833 Reviewed by James Robinson.
835 Add debug-only code that detects whether RenderLayer's z-order and
836 normal flow lists are being cleared or otherwise mutated while we're
837 enumerating over them.
839 * rendering/RenderLayer.cpp:
840 (WebCore::RenderLayer::RenderLayer):
841 (WebCore::RenderLayer::paintList):
842 (WebCore::RenderLayer::calculateLayerBounds):
843 (WebCore::RenderLayer::dirtyZOrderLists):
844 (WebCore::RenderLayer::dirtyNormalFlowList):
845 (WebCore::RenderLayer::updateZOrderListsSlowCase):
846 (WebCore::RenderLayer::updateNormalFlowList):
847 * rendering/RenderLayer.h:
849 (WebCore::RenderLayer::layerListMutationAllowed):
850 (WebCore::RenderLayer::setLayerListMutationAllowed):
852 (LayerListMutationDetector):
853 (WebCore::LayerListMutationDetector::LayerListMutationDetector):
854 (WebCore::LayerListMutationDetector::~LayerListMutationDetector):
855 * rendering/RenderLayerBacking.cpp:
856 (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
857 * rendering/RenderLayerCompositor.cpp:
858 (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
859 (WebCore::RenderLayerCompositor::computeCompositingRequirements):
860 (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
861 (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
862 (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
863 (WebCore::RenderLayerCompositor::recursiveRepaintLayerRect):
864 (WebCore::RenderLayerCompositor::layerHas3DContent):
866 2012-04-05 Sheriff Bot <webkit.review.bot@gmail.com>
868 Unreviewed, rolling out r113254.
869 http://trac.webkit.org/changeset/113254
870 https://bugs.webkit.org/show_bug.cgi?id=83291
872 Requested by sievers@chromium.org (Requested by zhenyao on
875 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
876 (WebCore::CCLayerTreeHostImpl::canDraw):
878 2012-04-05 Sheriff Bot <webkit.review.bot@gmail.com>
880 Unreviewed, rolling out r113307.
881 http://trac.webkit.org/changeset/113307
882 https://bugs.webkit.org/show_bug.cgi?id=83288
884 Requested by sievers@chromium.org (Requested by zhenyao on
887 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
888 (WebCore::CCLayerTreeHostImpl::canDraw):
890 2012-03-14 Antonio Gomes <agomes@rim.com>
892 Extend HitTestResult to support not "discarding" shadow content in favor of its DOM ancestor
893 https://bugs.webkit.org/show_bug.cgi?id=80847
895 Reviewed by David Hyatt.
897 In order to improve touch precision on shadow tree content, patch
898 extends the rect-hittest'ing system to allow shadow content
899 to be stored as the rect-hittest result node list.
901 Primary use cases are for this extension is making it easier to
902 improve the clickability of default controls of <video> and <audio>
905 For the callee site, the use is simple: if shadow content in the rect-hittest
906 result is desired, just add an extra 'AllowShadowContent' parameter at the creation
907 of the HitTestResult object.
909 Test: fast/dom/nodesFromRect-shadowContent.html
912 (WebCore::Document::nodesFromRect):
915 * page/EventHandler.cpp:
916 (WebCore::EventHandler::hitTestResultAtPoint):
917 * rendering/HitTestResult.cpp:
918 (WebCore::HitTestResult::HitTestResult):
919 (WebCore::HitTestResult::addNodeToRectBasedTestResult):
920 * rendering/HitTestResult.h:
922 (WebCore::HitTestResult::shadowContentFilterPolicy):
923 * rendering/RenderImage.cpp:
924 (WebCore::RenderImage::nodeAtPoint):
925 * rendering/RenderLayer.cpp:
926 (WebCore::RenderLayer::hitTestLayer):
927 (WebCore::RenderLayer::hitTestList):
928 * testing/Internals.cpp:
929 (WebCore::Internals::nodesFromRect):
930 * testing/Internals.h:
932 * testing/Internals.idl:
934 2012-04-05 Hans Muller <hmuller@adobe.com>
936 Rename CSS Exclusions "rect" value to "rectangle"
937 https://bugs.webkit.org/show_bug.cgi?id=82367
939 Reviewed by Ryosuke Niwa.
941 Changed the CSS exclusion shape called "rect" to "rectangle" to match
942 the current draft spec - http://dev.w3.org/csswg/css3-exclusions.
944 The meeting minutes where the decision to rename the exclusion "rect" function
945 to "rectangle" are: http://lists.w3.org/Archives/Public/www-style/2012Feb/0325.html
947 No new tests were created; just updated the existing ones.
950 (WebCore::CSSParser::parseWrapShapeRectangle):
951 (WebCore::CSSParser::parseWrapShape):
953 * css/CSSWrapShapes.cpp:
954 (WebCore::CSSWrapShapeRectangle::cssText):
955 * css/CSSWrapShapes.h:
956 (WebCore::CSSWrapShapeRectangle::create):
957 (WebCore::CSSWrapShapeRectangle::type):
958 (WebCore::CSSWrapShapeRectangle::CSSWrapShapeRectangle):
960 2012-04-05 Arvid Nilsson <anilsson@rim.com>
962 [BlackBerry] Disable paintingGoesToWindow() for the root layer when forced compositing mode is active
963 https://bugs.webkit.org/show_bug.cgi?id=83127
965 Reviewed by Rob Buis.
968 The BlackBerry port will use accelerated compositing code path to
969 render the root layer in some situations.
971 The plan is to do this by activating the "force compositing mode"
972 setting, but that in itself doesn't get us all the way, since painting
973 will still go to window for the root layer.
975 Fixed by adding a special clause in
976 RenderLayerBacking::paintingGoesToWindow() for PLATFORM(BLACKBERRY).
978 No new tests, this is currently not testable with the BlackBerry WebKit
979 testing infrastructure.
981 * rendering/RenderLayerBacking.cpp:
982 (WebCore::RenderLayerBacking::paintingGoesToWindow):
983 * rendering/RenderLayerCompositor.h:
984 (RenderLayerCompositor):
985 (WebCore::RenderLayerCompositor::inForcedCompositingMode): Added.
987 2012-04-05 Stephen Chenney <schenney@chromium.org>
989 REGRESSION(99539): Infinite repaint loop with SVGImage and deferred repaint timers
990 https://bugs.webkit.org/show_bug.cgi?id=78315
992 Reviewed by Dimitri Glazkov.
994 The existing fix for this issue was failing to check if the frameView object
995 was currently _in_ layout, in addition to whether it needs layout. Calling the
996 redraw method while in layout leads to a debug assertion and potential infinite
997 layout loops. Now we check whether we need layout or are in layout. We also add
998 a check when the repaint timer fires to ensure we do not call redraw during layout
1001 This patch was tested with tens of thousands of runs on layout test cases that
1002 previously crashed at a rate of about 1 in 25. Now we see no crashes and no test
1005 No new tests, as this exists to fix flaky existing tests.
1007 * svg/graphics/SVGImageCache.cpp:
1008 (WebCore::SVGImageCache::imageContentChanged):
1009 (WebCore::SVGImageCache::redrawTimerFired):
1011 2012-04-05 Keishi Hattori <keishi@webkit.org>
1013 Hide datalist element
1014 https://bugs.webkit.org/show_bug.cgi?id=82874
1016 The datalist element should be hidden when ENABLE_DATALIST is on.
1018 Reviewed by Kent Tamura.
1020 Tests: fast/forms/datalist/datalist-fallback-content-expected.html
1021 fast/forms/datalist/datalist-fallback-content.html
1024 (datalist): Added display:none.
1026 2012-04-05 W. James MacLean <wjmaclean@chromium.org>
1028 Adjust max bisection search iterations for TouchpadFlingGestureCurve.
1029 https://bugs.webkit.org/show_bug.cgi?id=83166
1031 Reviewed by James Robinson.
1033 Covered by existing tests.
1035 * platform/TouchpadFlingPlatformGestureCurve.cpp:
1038 2012-04-05 Peter Rybin <peter.rybin@gmail.com>
1040 Web Inspector: CodeGeneratorInspector.py: switch FileSystem, Profiler and Worker domains to typed API
1041 https://bugs.webkit.org/show_bug.cgi?id=83069
1043 Reviewed by Yury Semikhatsky.
1045 Domains are switched to 'strict' mode. However, hardly any changes were needed in C++ code because
1046 only basic types are currently used in Inspector.json.
1048 * inspector/CodeGeneratorInspector.py:
1049 * inspector/InspectorProfilerAgent.cpp:
1050 (WebCore::InspectorProfilerAgent::getProfileHeaders):
1052 (WebCore::InspectorProfilerAgent::getObjectByHeapObjectId):
1053 * inspector/InspectorProfilerAgent.h:
1054 (InspectorProfilerAgent):
1056 2012-04-05 Levi Weintraub <leviw@chromium.org>
1058 DOM measurement APIs should operate on pixel snapped values.
1059 https://bugs.webkit.org/show_bug.cgi?id=83138
1061 Reviewed by Julien Chaffraix.
1063 DOM measurement APIs return unscaled integers. In an effort to return the best possible values (and
1064 most consistent with current behavior) when we use sub-pixel values for Layout, we want to adjust
1065 the actual on-screen position and size values for scaling, not the sub-pixel values.
1067 No new tests. No change in behavior.
1070 (WebCore::adjustForLocalZoom): Needs to return an integer, since this is what the DOM API calls for.
1071 (WebCore::Element::offsetWidth): Using pixel snapped values for all the following functions.
1072 (WebCore::Element::offsetHeight):
1073 (WebCore::Element::clientLeft):
1074 (WebCore::Element::clientTop):
1075 (WebCore::Element::clientWidth):
1076 (WebCore::Element::clientHeight):
1077 * html/HTMLImageElement.cpp:
1078 (WebCore::HTMLImageElement::width):
1079 (WebCore::HTMLImageElement::height):
1081 2012-04-05 Pavel Feldman <pfeldman@chromium.org>
1083 Web Inspector: add ability to copy resource URL from web inspector's resources page.
1084 https://bugs.webkit.org/show_bug.cgi?id=83175
1086 Reviewed by Yury Semikhatsky.
1088 Added requested context menu item.
1090 * inspector/front-end/ResourcesPanel.js:
1091 (WebInspector.FrameResourceTreeElement.prototype._handleContextMenuEvent):
1093 2012-04-04 Andrey Kosyakov <caseq@chromium.org>
1095 Web Inspector: display frame duration instead of time ruler in Timeline panel's frame mode
1096 https://bugs.webkit.org/show_bug.cgi?id=83184
1098 Reviewed by Pavel Feldman.
1100 * inspector/front-end/TimelineFrameController.js:
1101 (WebInspector.TimelineFrameController): Maintain reference to TimelinePresentationModel
1102 (WebInspector.TimelineFrameController.prototype._flushFrame): Report frames to TimelinePresentationModel (only real ones)
1103 * inspector/front-end/TimelineGrid.js:
1104 (WebInspector.TimelineGrid.prototype.removeDividers): remove time marks/labels from upper time ruler
1105 * inspector/front-end/TimelineOverviewPane.js:
1106 (WebInspector.TimelineOverviewPane.prototype._updateEventDividers): Updated call site of createEventDivider
1107 * inspector/front-end/TimelinePanel.js:
1108 (WebInspector.TimelinePanel.prototype._updateEventDividers):
1109 (WebInspector.TimelinePanel.prototype._shouldShowFrames):
1110 (WebInspector.TimelinePanel.prototype._updateFrames): Frame bars rendering logic.
1111 (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline.addTimestampRecords): Do not keep frames in the panel any more.
1112 (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
1113 (WebInspector.TimelinePanel.prototype._refresh): Moved updateDividers() call here...
1114 (WebInspector.TimelinePanel.prototype._refreshRecords): ... from here.
1115 * inspector/front-end/TimelinePresentationModel.js:
1116 (WebInspector.TimelinePresentationModel.createEventDivider): Use type & title, not entire record.
1117 (WebInspector.TimelinePresentationModel.prototype.frames): Maintain frames in the TimelinePresentationModel.
1118 (WebInspector.TimelinePresentationModel.prototype.reset): ditto.
1119 (WebInspector.TimelinePresentationModel.prototype.addFrame): ditto.
1120 (WebInspector.TimelinePresentationModel.Record): Fix title for timestamp events (drive by).
1121 * inspector/front-end/timelinePanel.css:
1122 (.timeline-frame-strip):
1124 2012-04-05 MORITA Hajime <morrita@google.com>
1126 IsCommentNode flags is a waste.
1127 https://bugs.webkit.org/show_bug.cgi?id=83251
1129 Reviewed by Ryosuke Niwa.
1131 Effectively nobody uses it. To save a precious NodeFlags bit, this
1132 change removes NodeFlags::IsCommentFlag and its companion mehtod
1133 Node::isCommentNode().
1135 No new tests. No behaviour change.
1137 * dom/CharacterData.h:
1138 (WebCore::CharacterData::CharacterData):
1140 (WebCore::Comment::Comment):
1142 * rendering/RenderTreeAsText.cpp:
1143 (WebCore::getTagName):
1144 This was the only client of Node::isCommentNode(). Replaced it with nodeType() call.
1146 2012-04-05 Hans Wennborg <hans@chromium.org>
1148 webkit_unit_tests build fix.
1149 https://bugs.webkit.org/show_bug.cgi?id=83261
1151 Unreviewed, webkit_unit_tests buildfix.
1153 The CCLayerTreeHostTestEmptyContentsShouldNotDraw.runMultiThread test
1154 stopped working after r113254.
1158 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1159 (WebCore::CCLayerTreeHostImpl::canDraw):
1161 2012-04-05 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
1163 [EFL] keycode translation is wrong for function keys
1164 https://bugs.webkit.org/show_bug.cgi?id=82738
1166 This patch fixes keycode translation for function keys.
1168 Reviewed by Philippe Normand.
1170 Test: fast/events/keydown-function-keys.html
1172 * platform/efl/EflKeyboardUtilities.cpp:
1173 (WebCore::createWindowsKeyMap):
1175 2012-04-01 Nikolas Zimmermann <nzimmermann@rim.com>
1177 Work around an entity parsing bug in libxml2 2.7.3 (supplied with Lion) and unskip tests
1178 https://bugs.webkit.org/show_bug.cgi?id=82577
1180 Reviewed by Filip Pizlo.
1182 Work-around entity expansion bug that affects several SVG tests on Lion.
1184 Sample test document which is currently broken:
1185 <?xml version="1.0" encoding="UTF-8"?>
1186 <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Basic//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-basic.dtd" [
1187 <!ENTITY Smile "<rect x='.5' y='.5' width='29' height='39' fill='black' stroke='red'/>">
1190 <svg xmlns="http://www.w3.org/2000/svg">&Smile;</svg>
1192 The expanded rect carries no namespace, thus an Element will be created for it, instead of a SVGRectElement.
1193 libxml2 2.7.4 fixed this bug (https://bugzilla.gnome.org/show_bug.cgi?id=502960) in 2009 already, but Lion
1194 still ships with 2.7.3, so we need to find a work-around for the problem. It works like this:
1195 - When an entity is requested (getEntityHandler) determine whether the entity is being declared (while the <!ENTITY.. parses)
1196 or wheter its references (when the &Smile; is parsed). If its referenced, record the current depth of the libxml2 parser.
1197 - When startElementNs is called while we're expanding entities, be sure to transfer the namespace of the parent node
1198 to the new node, but only do this if the current depth() is greater than the depth() at the time where entity expansion started.
1199 This way we only apply our workaround for elements inside entities, that get expanded at the insertion point.
1200 - When endElementNs is called, and our current depth() is less than our equal to the depth() where entity expansion started,
1201 clear the recorded detph(), and stop executing the workaround.
1203 It requires storing an extra integer & boolean in XMLDocumentParser, which is only used for this work-around.
1205 * xml/parser/XMLDocumentParser.h:
1206 (XMLDocumentParser):
1207 (WebCore::XMLDocumentParser::isParsingEntityDeclaration):
1208 (WebCore::XMLDocumentParser::setIsParsingEntityDeclaration):
1209 (WebCore::XMLDocumentParser::depthTriggeringEntityExpansion):
1210 (WebCore::XMLDocumentParser::setDepthTriggeringEntityExpansion):
1211 * xml/parser/XMLDocumentParserLibxml2.cpp:
1212 (WebCore::XMLDocumentParser::XMLDocumentParser):
1213 (WebCore::hackAroundLibXMLEntityParsingBug):
1214 (WebCore::XMLDocumentParser::startElementNs):
1215 (WebCore::XMLDocumentParser::endElementNs):
1216 (WebCore::entityDeclarationHandler):
1217 (WebCore::getEntityHandler):
1218 (WebCore::XMLDocumentParser::initializeParserContext):
1220 2012-04-04 Kent Tamura <tkent@chromium.org>
1222 Add JavaScript and CSS code for the calendar picker implementation
1223 https://bugs.webkit.org/show_bug.cgi?id=83011
1225 Reviewed by Hajime Morita.
1227 Add calendarPicker.js and calendarPicker.css, and add a build rule to
1228 generate a C++ file. This change doesn't make any behavior change
1229 because the code is wrapped by ENABLE(CALENDAR_PICKER).
1231 Tests: ManualTests/forms/calendar-picker.html
1233 * Resources/calendarPicker.css: Added.
1234 * Resources/calendarPicker.js: Added.
1235 * WebCore.gyp/WebCore.gyp: Generate CalendarPicker.{cpp,h} from calendarPicker.{css,js}.
1237 2012-04-05 Kinuko Yasuda <kinuko@chromium.org>
1239 Expose DataTransferItem.getAsEntry() to allow users access dropped files as FileEntry
1240 https://bugs.webkit.org/show_bug.cgi?id=82592
1242 Reviewed by David Levin.
1244 For now the method is prefixed thus it is to be exposed as 'webkitGetAsEntry'.
1246 The API is proposed and discussed in the following whatwg thread:
1247 http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-November/033814.html
1249 Add DataTransferItemFilesystem under Modules/filesystem and implemented the bridging part for chromium.
1251 Test: editing/pasteboard/data-transfer-items-drag-drop-entry.html
1253 * Modules/filesystem/DataTransferItemFileSystem.h: Added.
1254 (DataTransferItemFileSystem):
1255 * Modules/filesystem/DataTransferItemFileSystem.idl: Added for DataTransferItem.getAsEntry which is only exposed if filesystem is enabled.
1256 * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.cpp: Added for chromium implementation.
1257 * Modules/filesystem/chromium/DataTransferItemFileSystemChromium.h: Added.
1258 * Modules/filesystem/chromium/DraggedIsolatedFileSystem.cpp: Added.
1259 * Modules/filesystem/chromium/DraggedIsolatedFileSystem.h: Added.
1261 * platform/chromium/ChromiumDataObject.cpp:
1262 * platform/chromium/ChromiumDataObject.h:
1263 (WebCore::ChromiumDataObject::filesystemId): Added.
1264 (WebCore::ChromiumDataObject::setFilesystemId): Added.
1265 * platform/chromium/ClipboardChromium.cpp:
1267 2012-04-04 Patrick Gansterer <paroga@webkit.org>
1269 Add WTF::getCurrentLocalTime()
1270 https://bugs.webkit.org/show_bug.cgi?id=83164
1272 Reviewed by Alexey Proskuryakov.
1274 Replace the calls to WTF::getLocalTime() with time(0) with the new function.
1275 This allows us to use Win32 API on windows to get the same result in a next step.
1277 * html/FTPDirectoryDocument.cpp:
1278 (WebCore::processFileDateString):
1279 * loader/archive/mhtml/MHTMLArchive.cpp:
1280 (WebCore::MHTMLArchive::generateMHTMLData):
1282 2012-04-04 Hayato Ito <hayato@chromium.org>
1284 Remove ReifiedTreeTraversal.
1285 https://bugs.webkit.org/show_bug.cgi?id=83110
1287 Reviewed by Dimitri Glazkov.
1289 We can now remove ReifiedTreeTraversal. All clients have switched to use ComposedShadowTreeWalker.
1291 No new tests. No change in functionality.
1294 * GNUmakefile.list.am:
1298 * WebCore.vcproj/WebCore.vcproj:
1299 * WebCore.xcodeproj/project.pbxproj:
1300 * dom/ReifiedTreeTraversal.cpp: Removed.
1301 * dom/ReifiedTreeTraversal.h: Removed.
1302 * testing/Internals.cpp:
1303 * testing/Internals.h:
1305 * testing/Internals.idl:
1307 2012-04-04 Dmitry Lomov <dslomov@google.com>
1309 WorkerEventQueue::close might access deleted WorkerEventQueue::EventDispatcherTask.
1310 https://bugs.webkit.org/show_bug.cgi?id=83202
1312 On closing the event queue, WorkerEventQueue cancels all the tasks associated with events.
1313 The tasks in their turn delete themselves from the map whenever task gets executed.
1314 However if shutdown occurs when task is in queue but before task gets executed, the task will be deleted without execution.
1315 This patch makes sure that no deleted tasks stay in WorkerEventQueue, by task removing itself in destructor.
1317 Reviewed by David Levin.
1319 Covered by existing tests.
1321 * workers/WorkerEventQueue.cpp:
1322 (WebCore::WorkerEventQueue::EventDispatcherTask::~EventDispatcherTask):
1323 (WorkerEventQueue::EventDispatcherTask):
1324 (WebCore::WorkerEventQueue::EventDispatcherTask::performTask):
1326 2012-04-04 Julien Chaffraix <jchaffraix@webkit.org>
1328 RenderLayer scrollbars' updates should be split between layout induced and style change induced
1329 https://bugs.webkit.org/show_bug.cgi?id=83213
1331 Reviewed by Simon Fraser.
1333 Refactoring only, no change in behavior.
1335 This patches splits up the 2 reasons for modifying the scrollbars:
1336 - style updates, handled in updateScrollbarsAfterStyleChange.
1337 - layout time, handled in updateScrollbarsAfterLayout.
1339 * rendering/RenderLayer.cpp:
1340 (WebCore::RenderLayer::contentsSize):
1341 Removed now unneeded const-casts.
1343 (WebCore::RenderLayer::setHasHorizontalScrollbar):
1344 (WebCore::RenderLayer::setHasVerticalScrollbar):
1345 Updated to use hasHorizontalScrollbar / hasVerticalScrollbar.
1347 (WebCore::RenderLayer::scrollWidth):
1348 (WebCore::RenderLayer::scrollHeight):
1349 Made those functions |const|.
1351 (WebCore::RenderLayer::computeScrollDimensions):
1352 Removed the unneeded booleans and move the do-we-have-overflow-logic
1353 into hasHorizontalOverflow and hasVerticalOverflow.
1355 (WebCore::RenderLayer::hasHorizontalOverflow):
1356 (WebCore::RenderLayer::hasVerticalOverflow):
1357 Added those new helper functions.
1359 (WebCore::RenderLayer::updateScrollbarsAfterLayout):
1360 (WebCore::RenderLayer::updateScrollInfoAfterLayout):
1361 Updated the latter to call the former.
1363 (WebCore::RenderLayer::updateScrollbarsAfterStyleChange):
1364 (WebCore::RenderLayer::styleChanged):
1367 (WebCore::overflowCanHaveAScrollbar):
1368 Add this helper function for updateScrollbarsAfterStyleChange.
1370 * rendering/RenderLayer.h:
1371 (WebCore::RenderLayer::hasHorizontalScrollbar):
1372 (WebCore::RenderLayer::hasVerticalScrollbar):
1373 Added those 2 new helper functions.
1375 2012-04-04 Andrei Burago <aburago@chromium.org>
1377 Auto-size may not work on first load
1378 https://bugs.webkit.org/show_bug.cgi?id=82989
1380 Reviewed by David Levin.
1382 No new tests. The only known repro scenario involves using chrome with a third-party extension,
1383 which makes making a test out of it problematic.
1386 (WebCore::Document::implicitClose):
1387 * page/FrameView.cpp:
1388 (WebCore::FrameView::autoSizeIfEnabled):
1390 2012-04-04 Adam Barth <abarth@webkit.org>
1392 XSSAuditor doesn't catch injected srcdoc attributes
1393 https://bugs.webkit.org/show_bug.cgi?id=83238
1395 Reviewed by Daniel Bates.
1397 <iframe srcdoc> is an XSS injection vector because the srcdoc inherits
1398 the security origin of the parent page. This patch updates the XSS
1399 auditor to check whether the attribute is injected using the same
1400 hueristics we use for inline event handlers.
1402 Test: http/tests/security/xssAuditor/iframe-srcdoc.html
1404 * html/parser/XSSAuditor.cpp:
1405 (WebCore::XSSAuditor::filterIframeToken):
1406 (WebCore::XSSAuditor::eraseDangerousAttributesIfInjected):
1407 (WebCore::XSSAuditor::eraseAttributeIfInjected):
1408 (WebCore::XSSAuditor::decodedSnippetForAttribute):
1409 * html/parser/XSSAuditor.h:
1411 2012-04-04 Leo Yang <leo.yang@torchmobile.com.cn>
1413 [BlackBerry] Add local: protocol support in KURL for blackberry
1414 https://bugs.webkit.org/show_bug.cgi?id=82695
1416 Reviewed by Rob Buis.
1418 BlackBerry porting is using local: protocol just as file: protocol
1419 with the exception that it sandboxes the path to the application private space.
1421 * platform/KURL.cpp:
1422 (WebCore::KURL::parse):
1423 (WebCore::portAllowed):
1425 2012-04-04 Simon Fraser <simon.fraser@apple.com>
1427 https://bugs.webkit.org/show_bug.cgi?id=82994
1429 Reviewed by James Robinson.
1431 Fix an issue when removing elements with reflections from the document.
1433 Test: compositing/reflections/remove-reflection.html
1435 * platform/graphics/GraphicsLayer.cpp:
1436 (WebCore::GraphicsLayer::willBeDestroyed):
1438 2012-04-04 Charles Wei <charles.wei@torchmobile.com.cn>
1440 Need using namespace std for system calls in MIMESniffing.cpp
1441 https://bugs.webkit.org/show_bug.cgi?id=82706
1443 Reviewed by Antonio Gomes.
1445 No new tests, just fix the compile error for BlackBerry porting.
1447 * platform/network/MIMESniffing.cpp:
1449 2012-04-04 Greg Billock <gbillock@google.com>
1451 Switch web intents API to be vendor-prefixed
1452 https://bugs.webkit.org/show_bug.cgi?id=83172
1454 Reviewed by Adam Barth.
1456 * Modules/intents/DOMWindowIntents.idl:
1457 * Modules/intents/NavigatorIntents.cpp:
1458 (WebCore::NavigatorIntents::webkitStartActivity):
1459 * Modules/intents/NavigatorIntents.h:
1461 * Modules/intents/NavigatorIntents.idl:
1463 2012-04-04 Alexis Menard <alexis.menard@openbossa.org>
1465 [Part 4] We should use CSSPropertyID rather than integers when manipulating CSS property ids.
1466 https://bugs.webkit.org/show_bug.cgi?id=83224
1468 Reviewed by Tony Chang.
1470 CSSPropertyID enum holds all the CSS property ids but many parts of WebKit treat the ids
1471 as integers. While it's not incorrect it is nicer to use the enum as a parameter of
1472 functions manipulating property ids, as we ensure that the value passed will be an
1473 existing value. This patch clean up some remaining part of code.
1475 No new tests : There should be no behavior change in this patch.
1477 * css/CSSStyleSelector.cpp:
1478 (WebCore::CSSStyleSelector::collectMatchingRulesForList):
1479 * page/animation/AnimationBase.h:
1480 (WebCore::AnimationBase::affectsProperty):
1481 (WebCore::AnimationBase::isAnimatingProperty):
1482 * page/animation/CompositeAnimation.cpp:
1483 (WebCore::CompositeAnimation::getAnimationForProperty):
1484 (WebCore::CompositeAnimation::overrideImplicitAnimations):
1485 (WebCore::CompositeAnimation::resumeOverriddenImplicitAnimations):
1486 (WebCore::CompositeAnimation::isAnimatingProperty):
1487 * page/animation/CompositeAnimation.h:
1488 (CompositeAnimation):
1489 * page/animation/ImplicitAnimation.cpp:
1490 (WebCore::ImplicitAnimation::affectsProperty):
1491 * page/animation/ImplicitAnimation.h:
1492 (WebCore::ImplicitAnimation::transitionProperty):
1493 (WebCore::ImplicitAnimation::animatingProperty):
1494 (ImplicitAnimation):
1495 * page/animation/KeyframeAnimation.cpp:
1496 (WebCore::KeyframeAnimation::fetchIntervalEndpointsForProperty):
1497 (WebCore::KeyframeAnimation::hasAnimationForProperty):
1498 (WebCore::KeyframeAnimation::overrideAnimations):
1499 (WebCore::KeyframeAnimation::resumeOverriddenAnimations):
1500 (WebCore::KeyframeAnimation::affectsProperty):
1501 * page/animation/KeyframeAnimation.h:
1502 (KeyframeAnimation):
1503 * rendering/RenderLayerBacking.cpp:
1504 (WebCore::RenderLayerBacking::transitionPaused):
1505 (WebCore::RenderLayerBacking::transitionFinished):
1506 (WebCore::RenderLayerBacking::graphicsLayerToCSSProperty):
1507 (WebCore::RenderLayerBacking::cssToGraphicsLayerProperty):
1508 * rendering/RenderLayerBacking.h:
1509 (RenderLayerBacking):
1511 2012-04-04 Rafael Weinstein <rafaelw@chromium.org>
1513 [MutationObservers] implement takeRecords()
1514 https://bugs.webkit.org/show_bug.cgi?id=83218
1516 Reviewed by Ojan Vafai.
1518 This patch implements MutationObserver.takeRecords per the DOM4 spec.
1519 takeRecords retrieves and clears any pending mutation records for
1522 Test: fast/mutation/takeRecords.html
1524 * dom/WebKitMutationObserver.cpp:
1525 (WebCore::WebKitMutationObserver::takeRecords):
1527 (WebCore::WebKitMutationObserver::deliver):
1528 * dom/WebKitMutationObserver.h:
1529 * dom/WebKitMutationObserver.idl:
1531 2012-04-04 Shinya Kawanaka <shinyak@chromium.org>
1533 Shadow DOM is exposed in JS.
1534 https://bugs.webkit.org/show_bug.cgi?id=82607
1536 Reviewed by Hajime Morita.
1538 DOMSelection didn't consider nested shadow trees. This patch makes DOMSelection
1539 take nested shadow trees into account.
1541 To test that the element is not in a shadow tree, Internals has a treeScopeRootNode method
1542 which returns the root node of the belonging tree scope.
1544 Test: fast/dom/shadow/selection-shouldnt-expose-shadow-dom.html
1547 * page/DOMSelection.cpp:
1548 (WebCore::selectionShadowAncestor):
1550 * testing/Internals.cpp:
1551 (WebCore::Internals::treeScopeRootNode):
1553 * testing/Internals.h:
1555 * testing/Internals.idl:
1557 2012-04-04 Luke Macpherson <macpherson@chromium.org>
1559 Replace further usage of int with CSSPropertyID.
1560 https://bugs.webkit.org/show_bug.cgi?id=83119
1562 Reviewed by Simon Fraser.
1564 No new tests / no functionality changed.
1566 * css/CSSComputedStyleDeclaration.cpp:
1567 (WebCore::logUnimplementedPropertyID):
1568 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
1570 * css/CSSParser.cpp:
1571 (WebCore::CSSParser::CSSParser):
1574 (WebCore::ShorthandScope::~ShorthandScope):
1575 * css/CSSProperty.h:
1576 (WebCore::CSSProperty::CSSProperty):
1577 * css/SVGCSSComputedStyleDeclaration.cpp:
1578 (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
1579 * css/StylePropertySet.h:
1582 * dom/StyledElement.h:
1584 * editing/EditingStyle.h:
1586 * html/HTMLElement.h:
1589 2012-04-04 Adam Klein <adamk@chromium.org>
1591 Use PassRefPtr in V8DOMWrapper interface to avoid explicit ref() calls
1592 https://bugs.webkit.org/show_bug.cgi?id=82238
1594 Reviewed by Adam Barth.
1596 Relanding r112163 without modification, as it still seems valid.
1597 Will watch Chrome Canaries closely for any memory issues.
1599 The setJSWrapper* methods previously featured a comment that asked
1600 callers to ref the objects before passing them in. This change makes
1601 that contract explicit (and allows the removal of the comment).
1603 In addition, for ConstructorCallbacks, this change slightly reduces
1604 refcount churn by passing on the initial ref via RefPtr::release().
1606 No new tests, no change in behavior.
1608 * bindings/scripts/CodeGeneratorV8.pm:
1609 (GenerateConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref() call.
1610 (GenerateNamedConstructorCallback): ditto.
1611 * bindings/v8/V8DOMWindowShell.cpp:
1612 (WebCore::V8DOMWindowShell::installDOMWindow): Cast to a PassRefPtr and remove explicit ref call.
1613 * bindings/v8/V8DOMWrapper.cpp:
1614 (WebCore::V8DOMWrapper::setJSWrapperForDOMNode): Pass leaked refs into the DOMNodeMaps.
1615 * bindings/v8/V8DOMWrapper.h:
1616 (V8DOMWrapper): Make the setJSWrapperFor* methods take PassRefPtr<T>.
1617 (WebCore::V8DOMWrapper::setJSWrapperForDOMObject): Pass leaked ref into the DOMObjectMap.
1618 (WebCore::V8DOMWrapper::setJSWrapperForActiveDOMObject): Pass leaked ref into the ActiveDOMObjectMap.
1619 * bindings/v8/V8Proxy.h:
1620 (WebCore::toV8): Remove explicit ref.
1621 * bindings/v8/WorkerContextExecutionProxy.cpp:
1622 (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): Cast to a PassRefPTr and remove explicit ref call.
1623 * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1624 (WebCore::v8HTMLImageElementConstructorCallback): Use RefPtr::release() to avoid refcount churn and remove explicit ref.
1625 * bindings/v8/custom/V8WebKitMutationObserverCustom.cpp:
1626 (WebCore::V8WebKitMutationObserver::constructorCallback): ditto.
1627 * bindings/v8/custom/V8WebSocketCustom.cpp:
1628 (WebCore::V8WebSocket::constructorCallback): ditto.
1629 * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
1630 (WebCore::V8XMLHttpRequest::constructorCallback): ditto.
1632 2012-04-04 Chris Rogers <crogers@google.com>
1634 WaveTable::waveDataForFundamentalFrequency() should properly interpret negative frequency
1635 https://bugs.webkit.org/show_bug.cgi?id=83228
1637 Reviewed by Kenneth Russell.
1639 * Modules/webaudio/WaveTable.cpp:
1640 (WebCore::WaveTable::waveDataForFundamentalFrequency):
1642 2012-04-04 Adam Klein <adamk@chromium.org>
1644 Delay post-insertion notifications until new DOM tree is complete
1645 https://bugs.webkit.org/show_bug.cgi?id=82631
1647 Reviewed by Ojan Vafai.
1649 When inserting a DocumentFragment, WebKit previously would update both
1650 internal WebCore state and mutation event listeners after each node
1651 was inserted. This is inconsistent not only with DOM4, but also
1652 with (at least) Firefox and IE. Given the many bugs over the years in
1653 WebKit due to this behavior, it seems better to delay notification
1654 until the fragment is completely inserted.
1656 The changes to the three core mutation methods below are similar:
1657 the only logic remaining in the loop is checking that insertion is
1658 possible and taking care of that insertion. The entire loop is then
1659 wrapped in forbidEventDispatch/allowEventDispatch, effectively
1660 asserting that none of the code inside will have side effects.
1662 The one bit of logic added to the loop is resizing the targets
1663 vector down to the set of nodes actually inserted as part of the
1664 loop. This makes it possible to simply pass the vector on to
1665 notifyChildrenInserted without having to also pass along a count of
1666 actually-inserted nodes.
1668 As for the code that used to live inside the loop that could have
1669 side-effects, or depended on those side-effects, it has been moved
1670 out, either above (the check that the refChild is still valid in
1671 insertBefore) or after (the calls to notifyChildrenInserted).
1673 Finally, it was necessary to retrofit ChildListMutationScope to take a
1674 vector of added nodes instead of a single node at a time, due to the
1675 assertions in isAddedNodeInOrder (now renamed to be plural). Note that
1676 there is now a single call to ChildListMutationScope::childrenAdded,
1677 inside notifyChildrenInserted.
1679 Test: fast/events/domnodeinserted-entire-fragment.html
1681 * dom/ChildListMutationScope.cpp:
1682 (ChildListMutationScope::MutationAccumulator): Renamed method to be plural.
1683 (WebCore::ChildListMutationScope::MutationAccumulator::areAddedNodesInOrder): Handle a NodeVector instead of a Node.
1684 (WebCore::ChildListMutationScope::MutationAccumulator::childrenAdded): Handle adding a NodeVector instead of a Node.
1685 (WebCore::ChildListMutationScope::MutationAccumulationRouter::childrenAdded): Renamed to be plural, pass NodeVector through.
1686 * dom/ChildListMutationScope.h:
1687 (WebCore::ChildListMutationScope::childrenAdded): ditto.
1688 (MutationAccumulationRouter):
1689 * dom/ContainerNode.cpp:
1690 (WebCore): Renamed updateTreeAfterInsertion to notifyChildrenInserted.
1691 (WebCore::ContainerNode::insertBefore): See main ChangeLog explanation.
1692 (WebCore::ContainerNode::replaceChild): ditto.
1693 (WebCore::ContainerNode::appendChild): ditto.
1694 (WebCore::dispatchChildInsertionEvents): Remove MutationObserver handling.
1695 (WebCore::notifyChildrenInserted): Handle a NodeVector of all inserted children,
1696 and take on responsiblity for MutationObserver handling as well as dispatchSubtreeModifiedEvent.
1698 2012-04-04 Chris Rogers <crogers@google.com>
1700 RealtimeAnalyserNode should support smaller analysis sizes
1701 https://bugs.webkit.org/show_bug.cgi?id=83215
1703 Reviewed by Kenneth Russell.
1705 RealtimeAnalyserNode analysis size currently goes no lower than 128.
1706 It is useful to support lower power-of-two sizes.
1707 Decrease this limit to 32.
1709 Updated webaudio/realtimeanalyser-fft-sizing-expected.txt
1711 * Modules/webaudio/RealtimeAnalyser.cpp:
1714 2012-04-04 Tony Chang <tony@chromium.org>
1716 CSS transitions should work on the flex property
1717 https://bugs.webkit.org/show_bug.cgi?id=75915
1719 Reviewed by Dean Jackson.
1721 Test: transitions/flex-transitions.html
1723 * page/animation/AnimationBase.cpp:
1724 (WebCore::PropertyWrapperGetter::equals): Fix indention.
1725 (PropertyWrapperFlex): Add a wrapper for -webkit-flex which has 3 values (two floats and
1726 a length), but is not a shorthand.
1727 (WebCore::PropertyWrapperFlex::PropertyWrapperFlex):
1728 (WebCore::PropertyWrapperFlex::equals):
1729 (WebCore::PropertyWrapperFlex::blend):
1731 (WebCore::AnimationBase::ensurePropertyMap):
1733 2012-04-04 Tom Sepez <tsepez@chromium.org>
1735 XSSAuditor bypass through HTTP Parameter Pollution.
1736 https://bugs.webkit.org/show_bug.cgi?id=81283
1738 Reviewed by Adam Barth.
1740 Deal with concatenation of multiple parameters via comma-splicing that
1741 is common to some webservers. We can no longer trust that all of the
1742 attributes of a reflected script tag, nor the reflected script itself,
1743 came from the same single URL parameter. The fix is to take commas into
1744 account when trucating the snippet used for matching.
1746 Test: http/tests/security/xssAuditor/script-tag-with-comma.html
1748 * html/parser/XSSAuditor.cpp:
1749 (WebCore::XSSAuditor::filterScriptToken):
1751 (WebCore::XSSAuditor::decodedSnippetForName):
1752 (WebCore::XSSAuditor::decodedSnippetForJavaScript):
1754 2012-04-04 Dan Bernstein <mitz@apple.com>
1756 Paginated webviews render nothing in their gutters
1757 https://bugs.webkit.org/show_bug.cgi?id=83231
1759 Reviewed by Adele Peterson.
1761 When the RenderView has columns, nothing draws in the gutters.
1763 * page/FrameView.cpp:
1764 (WebCore::FrameView::paintContents): Paint the background color behind everything when
1767 2012-04-04 Mark Pilgrim <pilgrim@chromium.org>
1769 Call histogramEnumeration directly
1770 https://bugs.webkit.org/show_bug.cgi?id=83106
1772 Reviewed by Adam Barth.
1774 Part of a refactoring project to remove the PlatformSupport
1775 abstraction from some functions. See bug 82948.
1777 * bindings/v8/custom/V8InspectorFrontendHostCustom.cpp:
1778 (WebCore::histogramEnumeration):
1779 * platform/chromium/HistogramSupportChromium.cpp:
1780 (WebCore::HistogramSupport::histogramEnumeration):
1781 * platform/chromium/PlatformSupport.h:
1784 2012-04-04 Zhenyao Mo <zmo@google.com>
1786 Unreviewed, GPU bots build fix.
1788 Commited on behalf of sievers@chromium.org.
1790 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1791 (WebCore::CCLayerTreeHostImpl::canDraw):
1793 2012-04-04 Abhishek Arya <inferno@chromium.org>
1795 Add helpers to create anonymous table parts.
1796 https://bugs.webkit.org/show_bug.cgi?id=83116
1798 Reviewed by Julien Chaffraix.
1800 The patch introduces helpers to create anonymous table parts by
1801 introducing a new static function createAnonymousWithParentRenderer.
1802 The function builds a new anonymous wrapper of the same type as the class,
1803 inheriting style properties from parent and sets a display based on
1804 argument/default values. Also we streamline the RenderBlock functions
1805 to match this naming convention.
1807 * rendering/RenderBlock.cpp:
1808 (WebCore::RenderBlock::createAnonymousBlockWithSameTypeAs):
1809 (WebCore::RenderBlock::createAnonymousWithParentRendererAndDisplay):
1811 (WebCore::RenderBlock::createAnonymousColumnsWithParentRendererAndDisplay):
1812 (WebCore::RenderBlock::createAnonymousColumnSpanWithParentRendererAndDisplay):
1813 * rendering/RenderBlock.h:
1815 (WebCore::RenderBlock::createAnonymousBlock):
1816 (WebCore::RenderBlock::createAnonymousColumnsBlock):
1817 (WebCore::RenderBlock::createAnonymousColumnSpanBlock):
1818 * rendering/RenderButton.cpp:
1819 (WebCore::RenderButton::addChild):
1820 * rendering/RenderObject.cpp:
1821 (WebCore::RenderObject::addChild):
1822 * rendering/RenderTable.cpp:
1823 (WebCore::RenderTable::addChild):
1824 (WebCore::RenderTable::createAnonymousWithParentRendererAndDisplay):
1826 * rendering/RenderTable.h:
1828 * rendering/RenderTableCell.cpp:
1829 (WebCore::RenderTableCell::createAnonymousWithParentRendererAndDisplay):
1831 * rendering/RenderTableCell.h:
1833 * rendering/RenderTableRow.cpp:
1834 (WebCore::RenderTableRow::addChild):
1835 (WebCore::RenderTableRow::createAnonymousWithParentRendererAndDisplay):
1837 * rendering/RenderTableRow.h:
1839 * rendering/RenderTableSection.cpp:
1840 (WebCore::RenderTableSection::addChild):
1841 (WebCore::RenderTableSection::createAnonymousWithParentRendererAndDisplay):
1843 * rendering/RenderTableSection.h:
1844 (RenderTableSection):
1846 2012-04-04 Erik Arvidsson <arv@chromium.org>
1848 [V8] Add a per context data store and use that for caching boiler plates as well as constructor functions
1849 https://bugs.webkit.org/show_bug.cgi?id=83093
1851 Reviewed by Adam Barth.
1853 This introduces a V8BindingPerContextData class. After creating a new v8::Context we also create a new
1854 per context data instance. This instance maintains the boiler plate and constructor caches. V8DOMWrapper
1855 now delegates the caching to this new class. Previously the caching was only done in V8DOMWindowShell which
1856 made workers and isolated worlds behave slightly different.
1858 Tests: fast/dom/constructor-proto.html
1859 fast/workers/constructor-proto.html
1862 * bindings/scripts/CodeGeneratorV8.pm:
1863 (GenerateConstructorGetter): Renamed getConstructor to constructorForType.
1864 * bindings/v8/V8BindingPerContextData.cpp: Added.
1866 (WebCore::V8BindingPerContextData::dispose): This clears the persistent handles stored in the maps.
1867 (WebCore::V8BindingPerContextData::init): This installs the hidden prototype which is used as the
1868 [[Prototype]] for the constructor functions (for HotMail compat).
1869 (WebCore::V8BindingPerContextData::createWrapperFromCacheSlowCase): Instantiates a new object and
1870 stores it in the boilerplate map, and returns a clone.
1871 (WebCore::V8BindingPerContextData::constructorForTypeSlowCase): Creates the function for the constructor
1872 and stores it in the constructor map.
1873 * bindings/v8/V8BindingPerContextData.h: Added.
1875 (V8BindingPerContextData):
1876 (WebCore::V8BindingPerContextData::create):
1877 (WebCore::V8BindingPerContextData::~V8BindingPerContextData):
1878 (WebCore::V8BindingPerContextData::createWrapperFromCache): Checks the cache and clones the wrapper in
1879 the cache. If no boiler plate exists one is created and cached.
1880 (WebCore::V8BindingPerContextData::constructorForType): If the constructor already exists the cached
1881 constructor function is returned, otherwise a new constructor function is created and cached.
1882 (WebCore::V8BindingPerContextData::V8BindingPerContextData):
1883 * bindings/v8/V8DOMWindowShell.cpp:
1884 (WebCore::V8DOMWindowShell::disposeContextHandles): Clear the per context data when disposing the handles.
1885 (WebCore::V8DOMWindowShell::initContextIfNeeded): Create and initialize the per context data.
1886 (WebCore::V8DOMWindowShell::installDOMWindow):
1887 * bindings/v8/V8DOMWindowShell.h:
1889 (WebCore::V8DOMWindowShell::perContextData):
1890 * bindings/v8/V8DOMWrapper.cpp:
1891 (WebCore::V8DOMWrapper::constructorForType): Static method to get the constructor. The per context data
1892 is determined based on the type of the parameters.
1894 (WebCore::V8DOMWrapper::perContextData):
1895 (WebCore::V8DOMWrapper::instantiateV8Object): Use the per context data to unify the code paths.
1896 * bindings/v8/V8DOMWrapper.h:
1899 * bindings/v8/V8IsolatedContext.cpp:
1900 (WebCore::V8IsolatedContext::V8IsolatedContext): Create and initialize the per context data.
1901 (WebCore::V8IsolatedContext::destroy): Clear the per context data.
1902 * bindings/v8/V8IsolatedContext.h:
1904 (WebCore::V8IsolatedContext::perContextData):
1905 (V8IsolatedContext):
1906 * bindings/v8/V8Proxy.cpp:
1907 (WebCore::V8Proxy::retrievePerContextData):
1909 * bindings/v8/V8Proxy.h:
1912 * bindings/v8/WorkerContextExecutionProxy.cpp:
1913 (WebCore::WorkerContextExecutionProxy::dispose): Clear the per context data
1914 (WebCore::WorkerContextExecutionProxy::initContextIfNeeded): Create and initialize the per context data.
1915 * bindings/v8/WorkerContextExecutionProxy.h:
1917 (WebCore::WorkerContextExecutionProxy::perContextData):
1918 (WorkerContextExecutionProxy):
1920 2012-04-04 Shawn Singh <shawnsingh@chromium.org>
1922 [chromium] Move recursive renderSurface clearing to CCLayerTreeHostImpl
1923 https://bugs.webkit.org/show_bug.cgi?id=82091
1925 Reviewed by James Robinson.
1927 No new tests needed, minor refactoring covered by existing tests.
1929 This patch is just a minor cleanup, moving clearRenderSurfacesOnCCLayerImplRecursive()
1930 from LayerRendererChromium to CCLayerTreeHostImpl. It makes more sense to place the code
1931 there, so that LayerRendererChromium is more like a blind utility for drawing things
1932 while CCLayerTreeHostImpl actually manages the state of the resources.
1934 * platform/graphics/chromium/LayerRendererChromium.cpp:
1935 (WebCore::LayerRendererChromium::beginDrawingFrame):
1936 * platform/graphics/chromium/LayerRendererChromium.h:
1937 (LayerRendererChromium):
1938 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
1939 (WebCore::CCLayerTreeHostImpl::~CCLayerTreeHostImpl):
1940 (WebCore::CCLayerTreeHostImpl::initializeLayerRenderer):
1941 (WebCore::CCLayerTreeHostImpl::sendDidLoseContextRecursive):
1942 (WebCore::CCLayerTreeHostImpl::clearRenderSurfacesOnCCLayerImplRecursive):
1944 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.h:
1945 (WebCore::CCLayerTreeHostImpl::rootLayer):
1946 (CCLayerTreeHostImpl):
1948 2012-04-04 Chris Rogers <crogers@google.com>
1950 Web Audio should use MutexTryLocker class
1951 https://bugs.webkit.org/show_bug.cgi?id=83194
1953 Reviewed by Kenneth Russell.
1955 Switch existing Web Audio code from directly calling tryLock() on a Mutex to use a MutexTryLocker.
1956 No new tests since it is a low-level threading primitive and is difficult to test.
1957 Existing Web Audio tests continue to test the process() methods affected.
1959 * Modules/webaudio/AudioBufferSourceNode.cpp:
1960 (WebCore::AudioBufferSourceNode::process):
1961 * Modules/webaudio/AudioParamTimeline.cpp:
1962 (WebCore::AudioParamTimeline::valuesForTimeRange):
1963 * Modules/webaudio/ConvolverNode.cpp:
1964 (WebCore::ConvolverNode::process):
1965 * Modules/webaudio/MediaElementAudioSourceNode.cpp:
1966 (WebCore::MediaElementAudioSourceNode::process):
1967 * Modules/webaudio/Oscillator.cpp:
1968 (WebCore::Oscillator::process):
1969 * Modules/webaudio/WaveShaperProcessor.cpp:
1970 (WebCore::WaveShaperProcessor::process):
1972 2012-04-04 Raphael Kubo da Costa <rakuco@webkit.org>
1974 [CSS] Make makevalues.pl and makeprop.pl ignore '#'s.
1975 https://bugs.webkit.org/show_bug.cgi?id=83212
1977 Reviewed by Tony Chang.
1979 This patch is a side-effect of my intentions to make the
1980 CMake-based ports work with GCC 4.7 without changing the
1981 parameters currently passed to the preprocessor. "-P" is always
1982 being passed to the preprocessor, but this breaks
1983 dom/make_names.pl due to GCC not outputting empty lines with "-P"
1984 anymore; if I switch to never passing "-P" (my aim), the CSS
1985 scripts currently break because of the additional lines output by
1986 the preprocessor. InFilesParser.pm and make-css-file-array.pl
1987 already skip lines which start with '#', for example.
1989 No new tests, tools plumbing.
1992 * css/makevalues.pl:
1994 2012-04-04 Min Qin <qinmin@google.com>
1996 Disable fancy upsampling and dithering for decoding jpeg on android
1997 https://bugs.webkit.org/show_bug.cgi?id=83196
1999 Reviewed by Kenneth Russell.
2001 Dithering and fancy upsampling are currently disabled for chrome on android.
2002 This gives us about 20% performance improvement.
2003 Since the screen of mobile devices is small, impact on image quality is limited.
2004 This change does not introduce any changes on other platforms.
2006 * platform/image-decoders/jpeg/JPEGImageDecoder.cpp:
2008 (doFancyUpsampling):
2009 (WebCore::JPEGImageReader::decode):
2011 2012-04-04 Daniel Sievers <sievers@chromium.org>
2013 [Chromium] Always skip draw and readback if there is nothing
2015 https://bugs.webkit.org/show_bug.cgi?id=82680
2017 This avoids corruption from pushing frames that have no valid
2018 content drawn into them.
2019 Also in addition to checking for non-existing root layers, check
2020 for root layers with no content bounds. It's possible to see those
2021 with kForceCompositing mode for empty documents.
2023 Reviewed by James Robinson.
2025 Added CCLayerTreeHostTestEmptyContentsShouldNotDraw.
2027 * platform/graphics/chromium/cc/CCLayerTreeHostImpl.cpp:
2028 (WebCore::CCLayerTreeHostImpl::canDraw):
2029 (WebCore::CCLayerTreeHostImpl::prepareToDraw):
2030 * platform/graphics/chromium/cc/CCThreadProxy.cpp:
2031 (WebCore::CCThreadProxy::scheduledActionDrawAndSwapInternal):
2033 2012-03-15 Jer Noble <jer.noble@apple.com>
2035 Full Screen mode should cancel before navigation.
2036 https://bugs.webkit.org/show_bug.cgi?id=81295
2038 Reviewed by Anders Carlsson.
2040 No new tests; protect against speculative crasher when a bad client calls the below
2041 functions at inopportune times.
2043 Check that the document is not either detached or in the page cache, and if so, bail out
2046 (WebCore::Document::webkitWillEnterFullScreenForElement):
2047 (WebCore::Document::webkitDidEnterFullScreenForElement):
2048 (WebCore::Document::webkitWillExitFullScreenForElement):
2049 (WebCore::Document::webkitDidExitFullScreenForElement):
2051 2012-04-04 Emil A Eklund <eae@chromium.org>
2053 Fix getFilterOutsets parameter types in RenderLayer
2054 https://bugs.webkit.org/show_bug.cgi?id=83041
2056 Reviewed by Julien Chaffraix.
2058 The getFilterOutsets method was changed to take integers in r112475, update
2059 RenderLayer to use the right data type for the outset arguments.
2061 No new tests, no change in functionality.
2063 * rendering/RenderLayer.cpp:
2064 (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
2065 (WebCore::RenderLayer::calculateLayerBounds):
2067 2012-04-04 Erik Arvidsson <arv@chromium.org>
2069 Rebaseline binding tests.
2073 * bindings/scripts/test/V8/V8TestInterface.cpp:
2074 (WebCore::V8TestInterface::constructorCallback):
2075 * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2076 (WebCore::V8TestNamedConstructorConstructorCallback):
2077 * bindings/scripts/test/V8/V8TestObj.cpp:
2078 (WebCore::V8TestObj::constructorCallback):
2079 * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2080 (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
2082 2012-04-04 Dmitry Lomov <dslomov@google.com>
2084 [JSC] ArrayBufferView and its ArrayBuffer are appended to object pool in wrong order
2085 https://bugs.webkit.org/show_bug.cgi?id=82090
2086 The implementation of structured cloning algorithm (http://www.w3.org/TR/html5/common-dom-interfaces.html#internal-structured-cloning-algorithm)
2087 in SerializedScriptValue.cpp assigns numerical identifiers to encontered objects as it traverses
2088 the cloned object during serialization.
2089 When the cloning encounters an already seen object, it transfers the assigned numerical id
2090 instead of cloning the object again. Deserialization process then repeats the process in
2091 the mirror fashion, i.e. on deserializing the object it assigns deserialized object a numeric id and if it
2092 deserializes the id it substitutes the perviously deserialized objects. It is critical that serialization and deserialization
2093 assigns numeric ids in the same order.
2095 The bug (discovered by Yong Li) is that when serializing ArrayBufferView, the ids were assigned first to
2096 the ArrayBufferView and then to underlying ArrayBuffer; however on deserialization the ids were assigned another way round.
2098 This patch fixes that by assigning the id first to ArrayBuffer and then to ArrayBufferView, and adds corresponding test cases.
2100 Reviewed by Kenneth Russell.
2102 New test cases added to fast/canvas/web-gl/array-message-passing.html.
2104 * bindings/js/SerializedScriptValue.cpp:
2105 (WebCore::CloneSerializer::checkForDuplicate):
2107 (WebCore::CloneSerializer::recordObject):
2108 (WebCore::CloneSerializer::startObjectInternal):
2109 (WebCore::CloneSerializer::dumpIfTerminal):
2111 2012-04-04 Ian Vollick <vollick@chromium.org>
2113 [chromium] When setting animation started events, should check the root layer
2114 https://bugs.webkit.org/show_bug.cgi?id=83060
2116 Reviewed by Adrienne Walker.
2120 * platform/graphics/chromium/cc/CCLayerTreeHost.cpp:
2121 (WebCore::CCLayerTreeHost::animateLayers):
2122 (WebCore::CCLayerTreeHost::animateLayersRecursive):
2123 (WebCore::CCLayerTreeHost::setAnimationEventsRecursive):
2125 2012-04-04 Adam Klein <adamk@chromium.org>
2127 Web Inspector: break on DOM node insertion only once per operation, not once per inserted node
2128 https://bugs.webkit.org/show_bug.cgi?id=82967
2130 Reviewed by Ojan Vafai.
2132 This change affects the case where a DocumentFragment is inserted,
2133 rather than a single node. This is most common when using innerHTML:
2134 the effect of the change is that inserting, e.g., '<input><input>',
2135 the SubtreeModified breakpoint will be hit once, rather than twice
2136 (once for each input element). Given that the particular node being
2137 inserted wasn't exposed as part of the breakpoint, this seems strictly
2140 Now that the call to willInsertDOMNode is outside the loop, there's
2141 not an obvious node to pass in as the new child. Luckily, InspectorDOMDebuggerAgent
2142 already ignored that argument, so it's simply been removed from the signature.
2144 This changes paves the way to do only tree-modification work, and no
2145 external notifications, inside the loops in appendChild/insertBefore/replaceChild.
2147 * dom/ContainerNode.cpp:
2148 (WebCore::ContainerNode::insertBefore): Hoisted call to willInsertDOMNode out of loop.
2149 (WebCore::ContainerNode::replaceChild): ditto.
2150 (WebCore::ContainerNode::appendChild): ditto.
2151 * inspector/InspectorDOMDebuggerAgent.cpp:
2152 (WebCore::InspectorDOMDebuggerAgent::willInsertDOMNode): Removed first argument (now takes only the parent).
2153 * inspector/InspectorDOMDebuggerAgent.h:
2154 (InspectorDOMDebuggerAgent):
2155 * inspector/InspectorInstrumentation.cpp:
2156 (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl): Removed second argument.
2157 * inspector/InspectorInstrumentation.h:
2158 (InspectorInstrumentation):
2159 (WebCore::InspectorInstrumentation::willInsertDOMNode): Removed second argument.
2161 2012-04-04 Jeffrey Pfau <jpfau@apple.com>
2163 Move pending sheet removal from ~HTMLLinkElement to removal from document.
2164 https://bugs.webkit.org/show_bug.cgi?id=69184
2166 Reviewed by Adam Barth.
2168 Test: fast/html/pending-stylesheet-crash.html
2170 * html/HTMLLinkElement.cpp:
2171 (WebCore::HTMLLinkElement::~HTMLLinkElement):
2172 (WebCore::HTMLLinkElement::removedFromDocument):
2174 2012-04-04 Mark Pilgrim <pilgrim@chromium.org>
2176 Call histogramCustomCounts directly
2177 https://bugs.webkit.org/show_bug.cgi?id=83112
2179 Reviewed by Adam Barth.
2181 * platform/chromium/PlatformSupport.h:
2183 * platform/graphics/chromium/ContentLayerChromium.cpp:
2184 (WebCore::ContentLayerPainter::paint):
2185 * platform/graphics/chromium/cc/CCOverdrawMetrics.cpp:
2186 (WebCore::CCOverdrawMetrics::recordMetricsInternal):
2188 2012-04-04 Alexis Menard <alexis.menard@openbossa.org>
2190 Animation related classes should use CSSPropertyID rather than integers when manipulating CSS property ids.
2191 https://bugs.webkit.org/show_bug.cgi?id=83050
2193 Reviewed by Simon Fraser.
2195 Split the concept of animate none and animate all into a separate function rather than using the property member
2196 with some magic value set on it. Make also sure that we use CSSPropertyID all over the place rather than integers.
2197 We still have some place where convert from int to CSSPropertyID (mostly due to the fact that we need to make Hash*
2198 related classes to handle CSSPropertyID). While refactoring I also removed some dead code.
2200 No new tests : not behaviour changes intented.
2202 * css/CSSComputedStyleDeclaration.cpp:
2203 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2204 * css/CSSStyleApplyProperty.cpp:
2205 (WebCore::ApplyPropertyAnimation::applyInheritValue):
2206 (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2207 * css/CSSStyleSelector.cpp:
2208 (WebCore::CSSStyleSelector::collectMatchingRulesForList):
2209 * page/animation/AnimationBase.cpp:
2211 (WebCore::PropertyWrapperBase::PropertyWrapperBase):
2212 (WebCore::PropertyWrapperBase::property):
2213 (PropertyWrapperBase):
2214 (WebCore::PropertyWrapperGetter::PropertyWrapperGetter):
2215 (WebCore::PropertyWrapper::PropertyWrapper):
2216 (WebCore::RefCountedPropertyWrapper::RefCountedPropertyWrapper):
2217 (WebCore::StyleImagePropertyWrapper::StyleImagePropertyWrapper):
2218 (WebCore::PropertyWrapperColor::PropertyWrapperColor):
2219 (WebCore::PropertyWrapperShadow::PropertyWrapperShadow):
2220 (WebCore::PropertyWrapperMaybeInvalidColor::PropertyWrapperMaybeInvalidColor):
2221 (WebCore::PropertyWrapperVisitedAffectedColor::PropertyWrapperVisitedAffectedColor):
2222 (WebCore::FillLayersPropertyWrapper::FillLayersPropertyWrapper):
2223 (WebCore::ShorthandPropertyWrapper::ShorthandPropertyWrapper):
2224 (WebCore::PropertyWrapperSVGPaint::PropertyWrapperSVGPaint):
2225 (WebCore::wrapperForProperty):
2226 (WebCore::AnimationBase::propertiesEqual):
2227 The code removed here could never be reached. propertiesEqual is used only in CompositeAnimation::updateTransitions and through
2228 ImplicitAnimation::isTargetPropertyEqual which is also called in CompositeAnimation. Both calls are protected by an ASSERT in
2229 CompositeAnimation:116 where we make sure the property id we're dealing with is a valid property id, therefore prop can't be equal to
2230 the old value cAnimateAll or even the new mode concept introduced in that patch can't be AnimateAll.
2231 (WebCore::AnimationBase::getPropertyAtIndex):
2232 (WebCore::AnimationBase::blendProperties):
2233 (WebCore::AnimationBase::animationOfPropertyIsAccelerated):
2234 (WebCore::gatherEnclosingShorthandProperties):
2235 (WebCore::AnimationBase::animatableShorthandsAffectingProperty):
2236 * page/animation/AnimationBase.h:
2238 * page/animation/CompositeAnimation.cpp:
2239 (WebCore::CompositeAnimation::updateTransitions):
2240 (WebCore::CompositeAnimation::pauseTransitionAtTime):
2241 * page/animation/CompositeAnimation.h:
2242 (CompositeAnimation):
2243 * page/animation/ImplicitAnimation.cpp:
2244 (WebCore::ImplicitAnimation::ImplicitAnimation):
2245 (WebCore::ImplicitAnimation::sendTransitionEvent):
2246 The check removed is useless as ImplicitAnimation constructor ensure via an ASSERT that the animatingProperty value is a correct and valid
2247 property id. Even the old code was ensuring the value of animatingProperty was different from cAnimateAll at construction time. As stated also
2248 in CompositeAnimation::updateTransitions and cover by the same ASSERT explained earlier, ImplicitAnimation are constructed for valid property ids.
2249 (WebCore::ImplicitAnimation::isTargetPropertyEqual):
2250 (WebCore::ImplicitAnimation::blendPropertyValueInStyle):
2251 * page/animation/ImplicitAnimation.h:
2252 (WebCore::ImplicitAnimation::create):
2253 (ImplicitAnimation):
2254 * page/animation/KeyframeAnimation.cpp:
2255 (WebCore::KeyframeAnimation::animate):
2256 (WebCore::KeyframeAnimation::getAnimatedStyle):
2257 (WebCore::KeyframeAnimation::timeToNextService):
2258 * platform/animation/Animation.cpp:
2259 (WebCore::Animation::Animation):
2260 (WebCore::Animation::operator=):
2261 (WebCore::Animation::animationsMatch):
2262 * platform/animation/Animation.h:
2263 (WebCore::Animation::property):
2264 (WebCore::Animation::animationMode):
2265 (WebCore::Animation::setProperty):
2266 (WebCore::Animation::setAnimationMode):
2268 (WebCore::Animation::initialAnimationProperty):
2269 * rendering/RenderLayerBacking.cpp:
2270 (WebCore::RenderLayerBacking::startTransition):
2271 * rendering/RenderLayerBacking.h:
2272 (RenderLayerBacking):
2273 * rendering/style/RenderStyle.cpp:
2274 (WebCore::RenderStyle::transitionForProperty):
2275 * rendering/style/RenderStyle.h:
2277 2012-04-04 Emil A Eklund <eae@chromium.org>
2279 Fix usage of LayoutUnits and snapping for scrolling in RenderBox
2280 https://bugs.webkit.org/show_bug.cgi?id=83073
2282 Reviewed by Eric Seidel.
2284 Fix usage of LayoutUnits and snapping/rounding logic in RenderBox.
2286 No new tests, no change in functionality.
2288 * rendering/RenderBox.cpp:
2289 (WebCore::RenderBox::scrollWidth):
2290 Change scrollWidth to properly pixel snap values.
2292 (WebCore::RenderBox::scrollHeight):
2293 Change scrollHeight to properly pixel snap values.
2295 (WebCore::RenderBox::scrolledContentOffset):
2296 Change to return IntSize to match function definition.
2298 (WebCore::RenderBox::cachedSizeForOverflowClip):
2299 Changed cachedSizeForOverflowClip to LayoutSize as the overflow and clip
2300 rects all have subpixel precision.
2302 * rendering/RenderBox.h:
2303 (WebCore::RenderBox::pixelSnappedWidth):
2304 (WebCore::RenderBox::pixelSnappedHeight):
2305 Removed FIXME comment as the implementation
2307 (WebCore::RenderBox::minYLayoutOverflow):
2308 (WebCore::RenderBox::maxYLayoutOverflow):
2309 (WebCore::RenderBox::minXLayoutOverflow):
2310 (WebCore::RenderBox::maxXLayoutOverflow):
2311 Added static_cast for border values.
2313 (WebCore::RenderBox::hasVisualOverflow):
2314 Changed to compare two pixel snapped values as we don't want to indicate
2315 overflow in cases where the the size is rounded down resulting in no
2318 2012-04-04 Emil A Eklund <eae@chromium.org>
2320 Fix types for location, size and rect calculations for render objects
2321 https://bugs.webkit.org/show_bug.cgi?id=83089
2323 Reviewed by Eric Seidel.
2325 Fix usage of LayoutUnits and rounding for a couple of different render
2328 No new tests, no change in functionality.
2330 * rendering/RenderDetailsMarker.cpp:
2331 (WebCore::RenderDetailsMarker::getPath):
2332 Change getPath to take a LayoutPoint as the transform has subpixel
2335 * rendering/RenderFlowThread.cpp:
2336 (WebCore::RenderFlowThread::computeLogicalHeight):
2337 Change logicalHeight to LayoutUnit as it is computed from subpixel
2340 * rendering/RenderInputSpeech.cpp:
2341 (WebCore::RenderInputSpeech::paintInputFieldSpeechButton):
2342 Change button rect computation to LayoutRect and pixel snap just before
2343 painting to preserve precision.
2345 * rendering/RenderLineBoxList.cpp:
2346 (WebCore::RenderLineBoxList::rangeIntersectsRect):
2347 (WebCore::RenderLineBoxList::lineIntersectsDirtyRect):
2348 (WebCore::RenderLineBoxList::paint):
2349 Change range calculations to LayoutUnits to preserve precision.
2351 * rendering/RenderMarquee.cpp:
2352 (WebCore::RenderMarquee::computePosition):
2353 Change width calculations to LayoutUnits to preserve precision.
2355 * rendering/RenderTable.cpp:
2356 (WebCore::RenderTable::layoutCaption):
2357 Change table captions to LayoutUnits as the values are computed from
2358 subpixel componenets.
2360 * rendering/style/RenderStyle.cpp:
2361 (WebCore::RenderStyle::getRoundedBorderFor):
2362 Snap border rect as RoundedRects use ints for crisp rendering.
2364 * rendering/style/ShadowData.cpp:
2365 (WebCore::ShadowData::adjustRectForShadow):
2366 Change adjustRectForShadow to take a LayoutRect as it already uses
2369 2012-04-04 Emil A Eklund <eae@chromium.org>
2371 Convert RootInlineBox to LayoutUnits in preparation for turning on subpixel layout
2372 https://bugs.webkit.org/show_bug.cgi?id=83054
2374 Reviewed by Eric Seidel.
2376 Convert RootInlineBox over to LayoutUnits, this mostly involves updating
2377 the alignment and adjustment code to be subpixel aware.
2379 No new tests, no change in functionality.
2381 * rendering/RootInlineBox.cpp:
2382 (WebCore::RootInlineBox::alignBoxesInBlockDirection):
2383 Change beforeAnnotationsAdjustment to LayoutUnit.
2385 (WebCore::RootInlineBox::beforeAnnotationsAdjustment):
2386 Change method to return LayoutUnit as it is computed from values with
2389 (WebCore::RootInlineBox::lineSnapAdjustment):
2390 Round values before computing remainder.
2392 (WebCore::RootInlineBox::ascentAndDescentForBox):
2393 Change ascent and decent calculation to use LayoutUnits as they are
2394 computed from values with subpixel precision.
2396 (WebCore::RootInlineBox::verticalPositionForBox):
2397 Change verticalPosition to LayoutUnit.
2399 * rendering/RootInlineBox.h:
2402 2012-04-05 Joseph Pecoraro <pecoraro@apple.com>
2404 <http://webkit.org/b/83108> Web Inspector: JSC Crash inspecting node with object event listener
2406 Reviewed by Geoff Garen.
2408 * bindings/js/ScriptEventListener.cpp:
2409 (WebCore::eventListenerHandlerLocation):
2410 Use jsDynamicCast to bail when the JSObject is not a JSFunction.
2412 2012-04-04 Mark Pilgrim <pilgrim@chromium.org>
2414 Call suddenTerminationChanged directly
2415 https://bugs.webkit.org/show_bug.cgi?id=83114
2417 Reviewed by Adam Barth.
2419 * platform/chromium/PlatformSupport.h:
2421 * platform/chromium/SuddenTerminationChromium.cpp:
2422 (WebCore::disableSuddenTermination):
2423 (WebCore::enableSuddenTermination):
2425 2012-04-04 Adam Barth <abarth@webkit.org>
2427 figure out how to export webcore symbols from webkit.dll properly
2428 https://bugs.webkit.org/show_bug.cgi?id=83105
2430 Reviewed by Dimitri Glazkov.
2433 - Separate the platform support files into a new GYP variable so
2434 that they can be build as part of webkit.dll rather than in
2435 webcore_platform.lib. Building them as part of webkit.dll ensure
2436 that the symbols marked for export will actually be in webkit.dll
2437 (and hence exported), even if nothing else in webkit.dll
2438 references the obj file that contains the symbol.
2439 * platform/chromium/support/WebMediaStreamSourcesRequest.cpp:
2440 - Unwind our ugly, ugly hack to make the Windows component build
2443 2012-04-04 Mark Pilgrim <pilgrim@chromium.org>
2445 Call sandboxEnabled directly
2446 https://bugs.webkit.org/show_bug.cgi?id=83113
2448 Reviewed by Adam Barth.
2450 * platform/chromium/PlatformSupport.h:
2453 2012-04-04 Peter Rybin <peter.rybin@gmail.com>
2455 Web Inspector: CodeGeneratorInspector.py: switch IndexedDB, DOMStorage, ApplicationCache domains to typed API
2456 https://bugs.webkit.org/show_bug.cgi?id=83039
2458 Reviewed by Pavel Feldman.
2460 Client code is switched to typed API (all InspectorObject and InspectorArray types are
2461 replaced with generated types from TypeBuilder according to Inspector.json).
2463 Missing array of array specialization is added. Inspector.json is fixed to comform
2464 with actual behavior of InspectorDOMStorageAgent.
2466 Output parameter initialization is assured.
2468 * inspector/CodeGeneratorInspector.py:
2469 * inspector/Inspector.json:
2470 * inspector/InspectorApplicationCacheAgent.cpp:
2471 (WebCore::InspectorApplicationCacheAgent::getFramesWithManifests):
2472 (WebCore::InspectorApplicationCacheAgent::getApplicationCacheForFrame):
2473 (WebCore::InspectorApplicationCacheAgent::buildObjectForApplicationCache):
2474 * inspector/InspectorApplicationCacheAgent.h:
2475 (InspectorApplicationCacheAgent):
2476 * inspector/InspectorDOMStorageAgent.cpp:
2477 (WebCore::InspectorDOMStorageAgent::getDOMStorageEntries):
2478 (WebCore::InspectorDOMStorageAgent::setDOMStorageItem):
2479 (WebCore::InspectorDOMStorageAgent::removeDOMStorageItem):
2480 * inspector/InspectorDOMStorageAgent.h:
2481 (InspectorDOMStorageAgent):
2482 * inspector/InspectorDOMStorageResource.cpp:
2483 (WebCore::InspectorDOMStorageResource::bind):
2485 2012-04-04 Tony Chang <tony@chromium.org>
2487 Remove flex function css parsing
2488 https://bugs.webkit.org/show_bug.cgi?id=83083
2490 Reviewed by Ojan Vafai.
2492 The flexbox spec switched from using a flex() function on the width
2493 and height to a css property. Now that the -webkit-flex: has been
2494 implemented, we can remove the flex() function code.
2496 No new tests. Removing an old test that used to test the flex() function.
2499 * GNUmakefile.list.am:
2502 * WebCore.vcproj/WebCore.vcproj:
2503 * WebCore.xcodeproj/project.pbxproj:
2504 * css/CSSAllInOne.cpp:
2505 * css/CSSFlexValue.cpp: Removed.
2506 * css/CSSFlexValue.h: Removed.
2507 * css/CSSParser.cpp:
2508 (WebCore::CSSParser::parseValue):
2509 (WebCore::CSSParser::parseFlex):
2512 * css/CSSStyleApplyProperty.cpp:
2513 (WebCore::ApplyPropertyLength::applyValue):
2514 (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty):
2516 (WebCore::CSSValue::cssText):
2517 (WebCore::CSSValue::destroy):
2519 * rendering/style/RenderStyle.h:
2520 * rendering/style/StyleFlexibleBoxData.cpp:
2521 (WebCore::StyleFlexibleBoxData::StyleFlexibleBoxData):
2522 (WebCore::StyleFlexibleBoxData::operator==):
2523 * rendering/style/StyleFlexibleBoxData.h:
2525 2012-04-04 Kausalya Madhusudhanan <kmadhusu@chromium.org>
2527 [Coverity] Address some uninit constructor values.
2528 https://bugs.webkit.org/show_bug.cgi?id=82424
2530 Reviewed by Stephen White.
2532 New tests are not required since I did not modify any code behavior. I just initialized the class member variables in the constructor.
2534 * Modules/gamepad/Gamepad.cpp:
2535 (WebCore::Gamepad::Gamepad):
2536 * accessibility/AccessibilitySpinButton.cpp:
2537 (WebCore::AccessibilitySpinButtonPart::AccessibilitySpinButtonPart):
2538 * dom/WheelEvent.cpp:
2539 (WebCore::WheelEvent::WheelEvent):
2540 * html/canvas/WebGLContextObject.h:
2541 (WebGLContextObject):
2542 * platform/PlatformTouchPoint.h:
2543 (WebCore::PlatformTouchPoint::PlatformTouchPoint):
2544 * platform/graphics/chromium/cc/CCPageScaleAnimation.cpp:
2545 (WebCore::CCPageScaleAnimation::CCPageScaleAnimation):
2546 * platform/graphics/chromium/cc/CCRenderSurface.cpp:
2547 (WebCore::CCRenderSurface::CCRenderSurface):
2548 * xml/parser/MarkupTokenBase.h:
2549 (WebCore::AtomicMarkupTokenBase::AtomicMarkupTokenBase):
2551 2012-04-04 Pavel Feldman <pfeldman@chromium.org>
2553 Web Inspector: expose savedURL, setToolbarColors and toggleSearchingForNode in InspectorFrontendAPI
2554 https://bugs.webkit.org/show_bug.cgi?id=83170
2556 Reviewed by Yury Semikhatsky.
2558 Chromium port is calling these from the embedder layer and they all are perfect candidates
2559 for the InspectorFrontendAPI. Adding them there.
2561 * inspector/front-end/InspectorFrontendAPI.js:
2562 (InspectorFrontendAPI.enterInspectElementMode):
2563 (InspectorFrontendAPI.savedURL):
2564 (InspectorFrontendAPI.setToolbarColors):
2566 2012-04-04 Ilya Tikhonovsky <loislo@chromium.org>
2568 Web Inspector: linearise aggregate's retaining size calculation.
2569 https://bugs.webkit.org/show_bug.cgi?id=83125
2571 This version is twice as fast as the original and it is non-recursive.
2573 Reviewed by Yury Semikhatsky.
2575 * inspector/front-end/HeapSnapshot.js:
2576 (WebInspector.HeapSnapshot.prototype._getDominatedIndex): was moved closer to it's usage
2577 (WebInspector.HeapSnapshot.prototype._calculateClassesRetainedSize): it was _buildAggregates' inner function forDominatedNodes.
2579 a) extracted from _buildAggregates;
2580 b) made non-recursive;
2581 c) many getters were inlined;
2582 d) subarray of dominating nodes were inlined too.
2583 (WebInspector.HeapSnapshot.prototype._buildAggregates): many getters were inlined.
2584 (WebInspector.HeapSnapshot.prototype.aggregates):
2586 2012-04-04 Allan Sandfeld Jensen <allan.jensen@nokia.com>
2588 Best clickable node might return non "clickable" node.
2589 https://bugs.webkit.org/show_bug.cgi?id=83153
2591 Reviewed by Kenneth Rohde Christiansen.
2593 Do not return non-clickable nodes as a best clickable node.
2595 * page/EventHandler.cpp:
2596 (WebCore::EventHandler::bestClickableNodeForTouchPoint):
2598 2012-04-04 Pavel Feldman <pfeldman@chromium.org>
2600 Web Inspector: migrate from InspectorFrontendHost.saveAs to InspectorFrontendHost.save.
2601 https://bugs.webkit.org/show_bug.cgi?id=83162
2603 Reviewed by Yury Semikhatsky.
2605 This change adds Save item into the context menus for inspector. It also makes
2606 saveAs parameter optional in the InspectorFrontendHost.save so that we could
2607 skip the dialog for the paths that were already saved. Embedder tells the front-end
2608 what urls were successfully saved so that front-end could issue subsequent save commands
2611 * English.lproj/localizedStrings.js:
2612 * inspector/InspectorFrontendClient.h:
2613 (InspectorFrontendClient):
2614 * inspector/InspectorFrontendClientLocal.h:
2615 (WebCore::InspectorFrontendClientLocal::canSave):
2616 (WebCore::InspectorFrontendClientLocal::save):
2617 * inspector/InspectorFrontendHost.cpp:
2618 (WebCore::InspectorFrontendHost::canSave):
2619 (WebCore::InspectorFrontendHost::save):
2620 * inspector/InspectorFrontendHost.h:
2621 (InspectorFrontendHost):
2622 * inspector/InspectorFrontendHost.idl:
2623 * inspector/front-end/InspectorFrontendHostStub.js:
2624 (.WebInspector.InspectorFrontendHostStub.prototype.canSave):
2625 * inspector/front-end/JavaScriptSourceFrame.js:
2626 * inspector/front-end/NetworkPanel.js:
2627 (WebInspector.NetworkLogView.prototype._contextMenu):
2628 (WebInspector.NetworkLogView.prototype._exportAll):
2629 (WebInspector.NetworkLogView.prototype._exportResource):
2630 * inspector/front-end/ResourceView.js:
2631 * inspector/front-end/ResourcesPanel.js:
2632 (WebInspector.FrameResourceTreeElement.prototype._appendSaveAsAction.doSave):
2633 (WebInspector.FrameResourceTreeElement.prototype._appendSaveAsAction.save):
2634 (WebInspector.FrameResourceTreeElement.prototype._appendSaveAsAction):
2635 (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent.doSave):
2636 (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent.save):
2637 (WebInspector.ResourceRevisionTreeElement.prototype._handleContextMenuEvent):
2638 * inspector/front-end/Settings.js:
2639 * inspector/front-end/SourceFrame.js:
2640 (WebInspector.TextViewerDelegateForSourceFrame.prototype.populateTextAreaContextMenu):
2641 * inspector/front-end/TextViewer.js:
2642 (WebInspector.TextViewer.prototype._contextMenu):
2643 (WebInspector.TextViewer.prototype._commitEditing):
2644 (WebInspector.TextViewerDelegate.prototype.populateTextAreaContextMenu):
2645 * inspector/front-end/TimelineModel.js:
2646 (WebInspector.TimelineModel.prototype.saveToFile):
2647 * inspector/front-end/TimelinePanel.js:
2648 (WebInspector.TimelinePanel.prototype._registerShortcuts):
2649 (WebInspector.TimelinePanel.prototype._contextMenu):
2650 * inspector/front-end/inspector.js:
2652 2012-04-04 Andrey Kosyakov <caseq@chromium.org>
2654 Web Inspector: time dividers are incorrectly rendered on empty timeline grid
2655 https://bugs.webkit.org/show_bug.cgi?id=83165
2657 Reviewed by Pavel Feldman.
2659 * inspector/front-end/NetworkPanel.js:
2660 (WebInspector.NetworkBaseCalculator.prototype.setDisplayWindow):
2661 * inspector/front-end/TimelineGrid.js:
2662 (WebInspector.TimelineGrid.prototype.updateDividers):
2664 2012-04-04 Sergio Villar Senin <svillar@igalia.com>
2666 [GTK] ASSERT in SocketStreamHandleSoup.cpp
2667 https://bugs.webkit.org/show_bug.cgi?id=83123
2669 Reviewed by Martin Robinson.
2671 Do not try to reuse a GOwnPtr as calling outPtr() causes an
2672 assertion if the pointer is already valid. Also do not try to
2673 close the IOStream if it was not created.
2676 http/tests/websocket/tests/hybi/workers/worker-reload.html but I
2677 am leaving it skipped until webkit.org/b/83124 is fixed.
2679 * platform/network/soup/SocketStreamHandleSoup.cpp:
2680 (WebCore::connectedCallback):
2682 2012-04-04 Alexis Menard <alexis.menard@openbossa.org>
2684 Re-add variable names in CSS related headers to help understanding the meaning of them.
2685 https://bugs.webkit.org/show_bug.cgi?id=83151
2687 Reviewed by Andreas Kling.
2689 r112952, r113031, r113042 removed variable names in some places but at the end it
2690 was better before as it helps understanding what the variables represent. This patch
2691 address this issue and add back the names where it makes sense.
2693 No new tests : cosmetic changes, no behavior change here.
2697 * css/StylePropertySet.h:
2699 * dom/StyledElement.h:
2701 * editing/EditingStyle.h:
2705 * html/HTMLElement.h:
2708 2012-04-04 Nikolas Zimmermann <nzimmermann@rim.com>
2710 Implement animatedPathSegList support for SVGPathElement
2711 https://bugs.webkit.org/show_bug.cgi?id=83140
2713 Reviewed by Zoltan Herczeg.
2715 Add the last missing piece of animVal support: animations of the SVGPathElement's 'd' attribute
2716 should be reflected in the 'animatedPathSegList' not the 'pathSegList'.
2718 The SVGAnimatedPathAnimator is special as it doesn't operate on the SVGPathSegList types
2719 directly, but on the SVGPathByteStreams for performance reasons. The SVGPathSegLists
2720 are refcounted and exposed to JS, thus require lots of memory, compared to a simple
2721 byte stream, which SVGPathByteStream is. Only build an 'animatedPathSegList' while
2722 animating if its actually observed by the bindings, as this operation is heavy.
2724 This marks the finish of the animVal patch series: no more string round trips during
2725 animation. Previously paths were animated as byte streams, then converted to a String
2726 passed to pathElement->setAttribute("d", "newString"), parsed again to a byte stream, etc.
2728 A follow-up patch will remove the last crufts of direct setAttribute() animation.
2730 Extend all existing animated SVGPathElement tests to cover animatedPathSegList.
2732 * svg/SVGAnimatedColor.h:
2733 (WebCore::SVGAnimatedColorAnimator::startAnimValAnimation):
2734 (WebCore::SVGAnimatedColorAnimator::stopAnimValAnimation):
2735 (WebCore::SVGAnimatedColorAnimator::resetAnimValToBaseVal):
2736 (WebCore::SVGAnimatedColorAnimator::animValWillChange):
2737 (WebCore::SVGAnimatedColorAnimator::animValDidChange):
2738 (SVGAnimatedColorAnimator):
2739 * svg/SVGAnimatedPath.cpp:
2740 (WebCore::SVGAnimatedPathAnimator::constructFromString):
2741 (WebCore::SVGAnimatedPathAnimator::startAnimValAnimation):
2743 (WebCore::SVGAnimatedPathAnimator::stopAnimValAnimation):
2744 (WebCore::SVGAnimatedPathAnimator::resetAnimValToBaseVal):
2745 (WebCore::SVGAnimatedPathAnimator::animValWillChange):
2746 (WebCore::SVGAnimatedPathAnimator::animValDidChange):
2747 (WebCore::SVGAnimatedPathAnimator::calculateAnimatedValue):
2748 * svg/SVGAnimatedPath.h:
2749 (SVGAnimatedPathAnimator):
2750 * svg/SVGAnimatedType.cpp:
2751 (WebCore::SVGAnimatedType::valueAsString):
2752 (WebCore::SVGAnimatedType::setValueAsString):
2753 (WebCore::SVGAnimatedType::supportsAnimVal):
2754 * svg/SVGAnimatedTypeAnimator.h:
2755 (SVGAnimatedTypeAnimator):
2756 (WebCore::SVGAnimatedTypeAnimator::findAnimatedPropertiesForAttributeName):
2757 * svg/SVGPathElement.cpp:
2758 (WebCore::SVGPathElement::SVGPathElement):
2759 (WebCore::SVGPathElement::getTotalLength):
2760 (WebCore::SVGPathElement::getPointAtLength):
2761 (WebCore::SVGPathElement::getPathSegAtLength):
2762 (WebCore::SVGPathElement::parseAttribute):
2763 (WebCore::SVGPathElement::svgAttributeChanged):
2764 (WebCore::SVGPathElement::pathByteStream):
2766 (WebCore::SVGPathElement::lookupOrCreateDWrapper):
2767 (WebCore::SVGPathElement::pathSegList):
2768 (WebCore::SVGPathElement::animatedPathSegList):
2769 (WebCore::SVGPathElement::pathSegListChanged):
2770 * svg/SVGPathElement.h:
2773 (WebCore::SVGPathElement::isAnimValObserved):
2774 * svg/SVGPathParserFactory.cpp:
2775 (WebCore::SVGPathParserFactory::buildSVGPathByteStreamFromSVGPathSegList):
2776 (WebCore::SVGPathParserFactory::buildSVGPathByteStreamFromString):
2777 (WebCore::SVGPathParserFactory::buildAnimatedSVGPathByteStream):
2778 * svg/SVGPathParserFactory.h:
2779 (SVGPathParserFactory):
2780 * svg/SVGPathSegWithContext.h:
2781 * svg/properties/SVGAnimatedListPropertyTearOff.h:
2782 (SVGAnimatedListPropertyTearOff):
2783 (WebCore::SVGAnimatedListPropertyTearOff::baseVal):
2784 (WebCore::SVGAnimatedListPropertyTearOff::animVal):
2785 (WebCore::SVGAnimatedListPropertyTearOff::removeItemFromList):
2786 (WebCore::SVGAnimatedListPropertyTearOff::detachListWrappers):
2787 (WebCore::SVGAnimatedListPropertyTearOff::currentAnimatedValue):
2788 (WebCore::SVGAnimatedListPropertyTearOff::animationStarted):
2789 (WebCore::SVGAnimatedListPropertyTearOff::animationEnded):
2790 (WebCore::SVGAnimatedListPropertyTearOff::synchronizeWrappersIfNeeded):
2791 * svg/properties/SVGAnimatedPathSegListPropertyTearOff.h:
2792 (WebCore::SVGAnimatedPathSegListPropertyTearOff::baseVal):
2793 (WebCore::SVGAnimatedPathSegListPropertyTearOff::animVal):
2794 (WebCore::SVGAnimatedPathSegListPropertyTearOff::removeItemFromList):
2795 (SVGAnimatedPathSegListPropertyTearOff):
2796 (WebCore::SVGAnimatedPathSegListPropertyTearOff::animationStarted):
2797 (WebCore::SVGAnimatedPathSegListPropertyTearOff::animationEnded):
2798 (WebCore::SVGAnimatedPathSegListPropertyTearOff::animValDidChange):
2799 (WebCore::SVGAnimatedPathSegListPropertyTearOff::animatedPathByteStream):
2800 (WebCore::SVGAnimatedPathSegListPropertyTearOff::SVGAnimatedPathSegListPropertyTearOff):
2801 * svg/properties/SVGAnimatedTransformListPropertyTearOff.h:
2802 (WebCore::SVGAnimatedTransformListPropertyTearOff::baseVal):
2803 (WebCore::SVGAnimatedTransformListPropertyTearOff::animVal):
2804 * svg/properties/SVGListProperty.h:
2805 (WebCore::SVGListProperty::setValuesAndWrappers):
2806 (WebCore::SVGListProperty::SVGListProperty):
2807 (WebCore::SVGListProperty::~SVGListProperty):
2810 2012-04-04 Allan Sandfeld Jensen <allan.jensen@nokia.com>
2812 Best zoomable area does not balance intersection with target area.
2813 https://bugs.webkit.org/show_bug.cgi?id=83148
2815 Reviewed by Kenneth Rohde Christiansen.
2817 Change the two step sort to simply picking the best quotient of touch intersection with target area.
2819 Test: touchadjustment/zoom-fatfinger.html
2821 * page/TouchAdjustment.cpp:
2822 (WebCore::TouchAdjustment::distanceSquaredToTargetCenterLine):
2824 (WebCore::TouchAdjustment::zoomableIntersectionQuotient):
2825 (WebCore::TouchAdjustment::findNodeWithLowestDistanceMetric):
2826 (WebCore::findBestClickableCandidate):
2827 (WebCore::findBestZoomableArea):
2829 2012-04-04 Andrey Kosyakov <caseq@chromium.org>
2831 Web Inspector: make padding and client window width part of timeline calculator's state
2832 https://bugs.webkit.org/show_bug.cgi?id=83122
2834 Reviewed by Pavel Feldman.
2836 - preserve window width and padding within TimelineCalculator
2837 - rely on calculator to add expansion arrow padding
2838 - add TimelineCalculator::computePosition() for computing single position (not entire bar dimensions)
2840 * inspector/front-end/MemoryStatistics.js:
2841 (WebInspector.MemoryStatistics.prototype._refreshDividers):
2842 * inspector/front-end/NetworkPanel.js:
2843 (WebInspector.NetworkLogView.prototype._updateDividersIfNeeded):
2844 (WebInspector.NetworkLogView.prototype._reset):
2845 (WebInspector.NetworkBaseCalculator.prototype.computePosition):
2846 (WebInspector.NetworkBaseCalculator.prototype.formatTime):
2847 (WebInspector.NetworkBaseCalculator.prototype.setDisplayWindow):
2848 * inspector/front-end/TimelineGrid.js:
2849 (WebInspector.TimelineGrid.prototype.updateDividers):
2850 (WebInspector.TimelineGrid.prototype.addEventDividers):
2851 * inspector/front-end/TimelineOverviewPane.js:
2852 (WebInspector.TimelineOverviewPane.prototype._update):
2853 (WebInspector.TimelineOverviewPane.prototype._reset):
2854 (WebInspector.TimelineOverviewCalculator.prototype.computePosition):
2855 (WebInspector.TimelineOverviewCalculator.prototype.setDisplayWindow):
2856 * inspector/front-end/TimelinePanel.js:
2857 (WebInspector.TimelinePanel.prototype._updateEventDividers):
2858 (WebInspector.TimelinePanel.prototype._refresh):
2859 (WebInspector.TimelinePanel.prototype._refreshRecords):
2860 (WebInspector.TimelineCalculator.prototype.computePosition):
2861 (WebInspector.TimelineCalculator.prototype.computeBarGraphWindowPosition):
2862 (WebInspector.TimelineCalculator.prototype.setDisplayWindow):
2863 (WebInspector.TimelineRecordGraphRow.prototype.update):
2864 (WebInspector.TimelineExpandableElement.prototype._update):
2866 2012-04-04 Noel Gordon <noel.gordon@gmail.com>
2868 [FileSystem] Forward declare File in FileCallback.h
2869 https://bugs.webkit.org/show_bug.cgi?id=83128
2871 Reviewed by Kentaro Hara.
2873 No new tests. Covered by existing tests.
2875 * Modules/filesystem/FileCallback.h: forward declare File class to make
2876 #include of "File.h" redundant.
2879 2012-04-04 Sheriff Bot <webkit.review.bot@gmail.com>
2881 Unreviewed, rolling out r113156.
2882 http://trac.webkit.org/changeset/113156
2883 https://bugs.webkit.org/show_bug.cgi?id=83146
2885 Breaks inspector layout tests (Requested by pfeldman on
2888 * inspector/front-end/MemoryStatistics.js:
2889 (WebInspector.MemoryStatistics.prototype._refreshDividers):
2890 * inspector/front-end/TimelineGrid.js:
2891 (WebInspector.TimelineGrid.prototype.updateDividers):
2892 (WebInspector.TimelineGrid.prototype.addEventDividers):
2893 * inspector/front-end/TimelineOverviewPane.js:
2894 (WebInspector.TimelineOverviewPane.prototype._update):
2895 (WebInspector.TimelineOverviewPane.prototype._reset):
2896 * inspector/front-end/TimelinePanel.js:
2897 (WebInspector.TimelinePanel.prototype._updateEventDividers):
2898 (WebInspector.TimelinePanel.prototype._refresh):
2899 (WebInspector.TimelinePanel.prototype._refreshRecords):
2900 (WebInspector.TimelinePanel.prototype.get timelinePaddingLeft):
2901 (WebInspector.TimelineCalculator.prototype.computeBarGraphWindowPosition):
2902 (WebInspector.TimelineRecordGraphRow.prototype.update):
2903 (WebInspector.TimelineExpandableElement.prototype._update):
2905 2012-04-04 Pavel Feldman <pfeldman@chromium.org>
2907 Web Inspector: front-end should accept raw web socket address for the remote connection.
2908 https://bugs.webkit.org/show_bug.cgi?id=83134
2910 Reviewed by Yury Semikhatsky.
2912 Migrated from the /devtools/page web socket schema to the generic one where remote target address
2913 can be specified as index.html?ws=localhost:9222/page1. Left the old host/page way for backwards
2916 * inspector/front-end/inspector.js:
2918 2012-04-04 Kent Tamura <tkent@chromium.org>
2920 Add localization functions for the calendar picker
2921 https://bugs.webkit.org/show_bug.cgi?id=83129
2923 Reviewed by Hajime Morita.
2925 No behavior changes yet.
2927 * WebCore.gypi: Add LocalizedCalendar.h and LocalizedCalendarICU.cpp.
2928 * platform/LocalizedStrings.h: Add calendarTodayText() and calendarClearText().
2929 * platform/text/LocalizedCalendar.h:
2930 Added. This provides monthLabels(), weekDayShortLabels(), and firstDayOfWeek().
2931 * platform/text/LocalizedCalendarICU.cpp: Added. ICU implementations of the above functions.
2932 (WebCore::ScopedDateFormat): A wrapper for UDateFormat*.
2933 (WebCore::ScopedDateFormat::ScopedDateFormat):
2934 (WebCore::ScopedDateFormat::~ScopedDateFormat):
2935 (WebCore::ScopedDateFormat::get):
2936 (createFallbackMonthLabels): Creates fallback month labels in English.
2937 (createLabelVector):
2938 A helper for createMonthLabels() and createWeekDayShortLabels().
2939 (createMonthLabels):
2940 Creates month labels using createLabelVector() or createFallbackMonthLabels().
2941 (WebCore::monthLabels):
2942 (createFallbackWeekDayShortLabels): Creates fallback week labels in English.
2943 (createWeekDayShortLabels):
2944 Creates month labels using createLabelVector() or createFallbackWeekDayShortLabels().
2945 (WebCore::weekDayShortLabels):
2946 (getFirstDayOfWeek):
2947 (WebCore::firstDayOfWeek):
2949 2012-04-03 Hans Wennborg <hans@chromium.org>
2951 Speech JavaScript API: Plumbing for Chromium
2952 https://bugs.webkit.org/show_bug.cgi?id=81667
2954 Reviewed by Darin Fisher.
2956 SpeechGrammar::src() is called with a ScriptExecutionContext, because
2957 the attribute setter needs it. Provide a src() method that doesn't
2958 take a ScriptExecutionContext that can be used internally.
2960 Rename SpeechRecognition::audioStartCallback(), etc. to use event style
2961 names, i.e. didStartAudio(), etc.
2963 Remove SpeechRecognitionClient::notifyVisibilityHidden(). The embedder
2964 can keep track of the visibility.
2966 Remove SpeechRecognitionClient::unregisterSpeechRecognition,
2969 No new tests, just minor tweaks.
2971 * Modules/speech/SpeechGrammar.h:
2972 (WebCore::SpeechGrammar::src):
2973 * Modules/speech/SpeechRecognition.cpp:
2974 (WebCore::SpeechRecognition::didStartAudio):
2975 (WebCore::SpeechRecognition::didStartSound):
2976 (WebCore::SpeechRecognition::didStartSpeech):
2977 (WebCore::SpeechRecognition::didEndSpeech):
2978 (WebCore::SpeechRecognition::didEndSound):
2980 (WebCore::SpeechRecognition::didEndAudio):
2981 (WebCore::SpeechRecognition::didReceiveResult):
2982 (WebCore::SpeechRecognition::didReceiveNoMatch):
2983 (WebCore::SpeechRecognition::didDeleteResult):
2984 (WebCore::SpeechRecognition::didReceiveError):
2985 (WebCore::SpeechRecognition::didStart):
2986 (WebCore::SpeechRecognition::didEnd):
2987 * Modules/speech/SpeechRecognition.h:
2988 (SpeechRecognition):
2989 * Modules/speech/SpeechRecognitionClient.h:
2990 (SpeechRecognitionClient):
2991 * Modules/speech/SpeechRecognitionController.h:
2993 2012-04-03 Levi Weintraub <leviw@chromium.org>
2995 Switch baseline values to LayoutUnits in RenderTableSection.
2996 https://bugs.webkit.org/show_bug.cgi?id=83017
2998 Reviewed by Julien Chaffraix.
3000 We initially intend to keep table layout on integers post switching the render tree to primarily
3001 use sub-pixel precision. Baseline positions switch to sub-pixel units, and in table layout code are
3002 combined with padding (also sub-pixel), which means we ideally won't truncate their values until
3003 after they're added together. Converting baseline values in RenderTableSection to LayoutUnits.
3005 No new tests. No change in behavior.
3007 * rendering/RenderTableSection.cpp:
3008 (WebCore::RenderTableSection::calcRowLogicalHeight):
3009 (WebCore::RenderTableSection::layoutRows):
3010 * rendering/RenderTableSection.h:
3013 2012-04-04 Zan Dobersek <zandobersek@gmail.com>
3015 [GTK] Scrolling doesn't work in WebKit2 since r110185
3016 https://bugs.webkit.org/show_bug.cgi?id=81779
3018 Reviewed by James Robinson.
3020 Bring back functionality of the ScrollAnimatorNone for ports that
3021 use a fallback timer for animation frames.
3023 No new tests - only restoring previous functionality.
3025 * platform/ScrollAnimatorNone.cpp:
3026 (WebCore::ScrollAnimatorNone::ScrollAnimatorNone):
3027 (WebCore::ScrollAnimatorNone::fireUpAnAnimation):
3029 (WebCore::ScrollAnimatorNone::animationTimerFired):
3030 (WebCore::ScrollAnimatorNone::startNextTimer):
3031 (WebCore::ScrollAnimatorNone::animationTimerActive):
3032 (WebCore::ScrollAnimatorNone::stopAnimationTimerIfNeeded):
3033 * platform/ScrollAnimatorNone.h:
3034 (ScrollAnimatorNone):
3036 2012-04-02 Peter Rybin <peter.rybin@gmail.com>
3038 Web Inspector: CodeGeneratorInspector.py: switch Inspector, Memory and Database domains to typed API
3039 https://bugs.webkit.org/show_bug.cgi?id=82958
3041 Reviewed by Yury Semikhatsky.
3043 Client code is switched to typed API (all InspectorObject and InspectorArray types are replaced with
3044 generated types from TypeBuilder according to Inspector.json).
3046 Missing array of InspectorValues specialization is added.
3048 * inspector/CodeGeneratorInspector.py:
3049 * inspector/InjectedScriptHost.cpp:
3050 (WebCore::InjectedScriptHost::inspectImpl):
3051 * inspector/InspectorAgent.cpp:
3052 (WebCore::InspectorAgent::inspect):
3053 * inspector/InspectorAgent.h:
3055 * inspector/InspectorDatabaseAgent.cpp:
3057 (WebCore::InspectorDatabaseAgent::getDatabaseTableNames):
3058 * inspector/InspectorDatabaseAgent.h:
3059 (InspectorDatabaseAgent):
3060 * inspector/InspectorDatabaseResource.cpp:
3061 (WebCore::InspectorDatabaseResource::bind):
3062 * inspector/InspectorMemoryAgent.cpp:
3063 (WebCore::InspectorMemoryAgent::getDOMNodeCount):
3064 * inspector/InspectorMemoryAgent.h:
3065 (InspectorMemoryAgent):
3067 2012-04-04 Andrey Kosyakov <caseq@chromium.org>
3069 Web Inspector: make padding and client window width part of timeline calculator's state
3070 https://bugs.webkit.org/show_bug.cgi?id=83122
3072 Reviewed by Pavel Feldman.
3074 - preserve window width and padding within TimelineCalculator
3075 - rely on calculator to add expansion arrow padding
3076 - add TimelineCalculator::computePosition() for computing single position (not entire bar dimensions)
3078 * inspector/front-end/MemoryStatistics.js:
3079 (WebInspector.MemoryStatistics.prototype._refreshDividers):
3080 * inspector/front-end/TimelineGrid.js:
3081 (WebInspector.TimelineGrid.prototype.updateDividers):
3082 * inspector/front-end/TimelineOverviewPane.js:
3083 (WebInspector.TimelineOverviewPane.prototype._update):
3084 (WebInspector.TimelineOverviewPane.prototype._reset):
3085 (WebInspector.TimelineOverviewCalculator.prototype.computePosition):
3086 (WebInspector.TimelineOverviewCalculator.prototype.setDisplayWindow):
3087 * inspector/front-end/TimelinePanel.js:
3088 (WebInspector.TimelinePanel.prototype._updateEventDividers):
3089 (WebInspector.TimelinePanel.prototype._refresh):
3090 (WebInspector.TimelinePanel.prototype._refreshRecords):
3091 (WebInspector.TimelineCalculator):
3092 (WebInspector.TimelineCalculator.prototype.computePosition):
3093 (WebInspector.TimelineCalculator.prototype.computeBarGraphWindowPosition):
3094 (WebInspector.TimelineCalculator.prototype.setDisplayWindow):
3095 (WebInspector.TimelineRecordGraphRow.prototype.update):
3096 (WebInspector.TimelineExpandableElement.prototype._update):
3098 2012-04-04 Sheriff Bot <webkit.review.bot@gmail.com>
3100 Unreviewed, rolling out r113149.
3101 http://trac.webkit.org/changeset/113149
3102 https://bugs.webkit.org/show_bug.cgi?id=83126
3104 for breaking Chromium builders (Requested by pfeldman on
3107 * Modules/speech/SpeechGrammar.h:
3108 * Modules/speech/SpeechRecognition.cpp:
3109 (WebCore::SpeechRecognition::audioStartCallback):
3110 (WebCore::SpeechRecognition::soundStartCallback):
3111 (WebCore::SpeechRecognition::speechStartCallback):
3112 (WebCore::SpeechRecognition::speechEndCallback):
3113 (WebCore::SpeechRecognition::audioEndCallback):
3114 (WebCore::SpeechRecognition::resultCallback):
3115 (WebCore::SpeechRecognition::noMatchCallback):
3116 (WebCore::SpeechRecognition::resultDeletedCallback):
3117 (WebCore::SpeechRecognition::errorCallback):
3118 (WebCore::SpeechRecognition::startCallback):
3119 (WebCore::SpeechRecognition::endCallback):
3120 * Modules/speech/SpeechRecognition.h:
3121 (SpeechRecognition):
3122 * Modules/speech/SpeechRecognitionClient.h:
3123 (SpeechRecognitionClient):
3124 * Modules/speech/SpeechRecognitionController.h:
3125 (WebCore::SpeechRecognitionController::visibilityHidden):
3126 (WebCore::SpeechRecognitionController::unregisterSpeechRecognition):
3128 2012-04-03 Andrey Kosyakov <caseq@chromium.org>
3130 Web Inspector: event marks are missing in the timeline overview
3131 https://bugs.webkit.org/show_bug.cgi?id=83043
3133 Reviewed by Pavel Feldman.
3135 - invoke overview event dividers update as part of overview update, not lower pane update;
3136 - store raw records for event dividers within overview;
3137 - moved createEventDividers to a class method of TimelinePresentationModel for reuse.
3138 - ditto for forAllRecords
3140 * inspector/front-end/TimelineOverviewPane.js:
3141 (WebInspector.TimelineOverviewPane):
3142 (WebInspector.TimelineOverviewPane.prototype._update):
3143 (WebInspector.TimelineOverviewPane.prototype._updateCategoryStrips):
3144 (WebInspector.TimelineOverviewPane.prototype._updateEventDividers):
3145 (WebInspector.TimelineOverviewPane.prototype._onRecordAdded):
3146 (WebInspector.TimelineOverviewPane.prototype._reset):
3147 (WebInspector.HeapGraph.prototype.update):
3148 * inspector/front-end/TimelinePanel.js:
3149 (WebInspector.TimelinePanel.prototype._updateEventDividers):
3150 (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline.addTimestampRecords):
3151 (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline):
3152 * inspector/front-end/TimelinePresentationModel.js:
3153 (WebInspector.TimelinePresentationModel.isEventDivider):
3154 (WebInspector.TimelinePresentationModel.forAllRecords):
3155 (WebInspector.TimelinePresentationModel.createEventDivider):
3157 2012-04-03 Hans Wennborg <hans@chromium.org>
3159 Speech JavaScript API: Plumbing for Chromium
3160 https://bugs.webkit.org/show_bug.cgi?id=81667
3162 Reviewed by Darin Fisher.
3164 SpeechGrammar::src() is called with a ScriptExecutionContext, because
3165 the attribute setter needs it. Provide a src() method that doesn't
3166 take a ScriptExecutionContext that can be used internally.
3168 Rename SpeechRecognition::audioStartCallback(), etc. to use event style
3169 names, i.e. didStartAudio(), etc.
3171 Remove SpeechRecognitionClient::notifyVisibilityHidden(). The embedder
3172 can keep track of the visibility.
3174 Remove SpeechRecognitionClient::unregisterSpeechRecognition,
3177 No new tests, just minor tweaks.
3179 * Modules/speech/SpeechGrammar.h:
3180 (WebCore::SpeechGrammar::src):
3181 * Modules/speech/SpeechRecognition.cpp:
3182 (WebCore::SpeechRecognition::didStartAudio):
3183 (WebCore::SpeechRecognition::didStartSound):
3184 (WebCore::SpeechRecognition::didStartSpeech):
3185 (WebCore::SpeechRecognition::didEndSpeech):
3186 (WebCore::SpeechRecognition::didEndSound):
3188 (WebCore::SpeechRecognition::didEndAudio):
3189 (WebCore::SpeechRecognition::didReceiveResult):
3190 (WebCore::SpeechRecognition::didReceiveNoMatch):
3191 (WebCore::SpeechRecognition::didDeleteResult):
3192 (WebCore::SpeechRecognition::didReceiveError):
3193 (WebCore::SpeechRecognition::didStart):
3194 (WebCore::SpeechRecognition::didEnd):
3195 * Modules/speech/SpeechRecognition.h:
3196 (SpeechRecognition):
3197 * Modules/speech/SpeechRecognitionClient.h:
3198 (SpeechRecognitionClient):
3199 * Modules/speech/SpeechRecognitionController.h:
3201 2012-04-04 Mariusz Grzegorczyk <mariusz.g@samsung.com>
3203 Fix build break when CONTEXT_MENUS is disabled.
3204 https://bugs.webkit.org/show_bug.cgi?id=82342
3206 Reviewed by Andreas Kling.
3208 Fixes build break in WebKit-Gtk, and WebKit-EFL ports when CONTEXT_MENUS macro is disabled.
3210 * page/ContextMenuClient.h:
3211 * page/ContextMenuController.h:
3213 (WebCore::Page::PageClients::PageClients):
3217 * platform/ContextMenu.cpp:
3218 * platform/ContextMenu.h:
3219 * platform/ContextMenuItem.cpp:
3220 * platform/ContextMenuItem.h:
3221 * platform/efl/ContextMenuEfl.cpp:
3222 * platform/efl/ContextMenuItemEfl.cpp:
3223 * platform/gtk/ContextMenuGtk.cpp:
3224 * platform/gtk/ContextMenuItemGtk.cpp:
3226 2012-04-03 Adam Barth <abarth@webkit.org>
3228 Implement <iframe srcdoc>
3229 https://bugs.webkit.org/show_bug.cgi?id=82991
3231 Reviewed by Sam Weinig.
3233 This patch implements the <iframe srcdoc> feature. This feature allows
3234 authors to easily supply the contents of an iframe without needing to
3235 round-trip to the server. Using srcdoc is more convenient than using
3236 data URLs because we set a bunch of properties of the child document
3237 sensibly. For example, the child inherits the base URL of the parent
3238 and the child uses standards mode by default.
3240 This feature is specified in
3241 <http://www.whatwg.org/specs/web-apps/current-work/#attr-iframe-srcdoc>.
3242 Although the feature has been in the spec for a while, I'm not aware of
3243 any other implementations in major browsers. The srcdoc feature works
3244 especially well with the sandbox and seamless attributes. We already
3245 implement sandbox and will likely implement seamless soon.
3247 The srcdoc feature was announced on the webkit-dev mailing list on March 30:
3248 https://lists.webkit.org/pipermail/webkit-dev/2012-March/020161.html
3250 This patch approaches the implementation using SubstituteData, which is
3251 a mechanism previously used for error messages and the like. Using
3252 SubstituteData has the advantage of not needing to modify the loading
3253 or history pipelines at all, making the integration of srcdoc with the
3254 rest of WebCore quite smooth.
3256 This patch encodes the contents of the srcdoc attribute to and from
3257 UTF-8 when round-tripping the contents through the loader. In a future
3258 patch, I plan to experiment with whether using UTF-16 (or perhaps
3259 another encoding) can improve performance. There might also be a way to
3260 avoid the memcpy entirely, but these optimizations are best left to
3261 followup patches as this patch focuses on the observable behavior of
3264 Tests: fast/frames/srcdoc/reloading-a-srcdoc-document-loads-it-again.html
3265 fast/frames/srcdoc/setting-src-does-nothing.html
3266 fast/frames/srcdoc/setting-srcdoc-reloads-document.html
3267 fast/frames/srcdoc/srcdoc-beats-src-dom.html
3268 fast/frames/srcdoc/srcdoc-beats-src.html
3269 fast/frames/srcdoc/srcdoc-can-be-in-qurks-mode.html
3270 fast/frames/srcdoc/srcdoc-can-navigate.html
3271 fast/frames/srcdoc/srcdoc-defaults-to-standards-mode.html
3272 fast/frames/srcdoc/srcdoc-loads-content.html
3273 fast/frames/srcdoc/srcdoc-urls.html
3274 http/tests/security/srcdoc-can-access-parent.html
3275 http/tests/security/srcdoc-in-sandbox-cannot-access-parent.html
3276 http/tests/security/srcdoc-inherits-referrer-for-forms.html
3277 http/tests/security/srcdoc-inherits-referrer.html
3280 (WebCore::Document::Document):
3281 (WebCore::Document::initSecurityContext):
3282 - srcdoc documents need to inherit their security contexts from
3283 their parents. We pick this initialization point to inherit the
3284 base URL and to set the "srcdoc Document" bit so that everything
3285 gets initialized atomically and from precisely the same owner
3289 (WebCore::Document::isSrcdocDocument):
3290 - This bit of state is present in the HTML5 spec and is referred to
3291 by a number of different requirements in the spec.
3292 * html/HTMLAttributeNames.in:
3293 * html/HTMLFrameElementBase.cpp:
3294 (WebCore::HTMLFrameElementBase::parseAttribute):
3295 (WebCore::HTMLFrameElementBase::location):
3296 - These functions implement the requirement that the srcdoc
3297 attribute takes precedence over the src attribute and triggers a
3298 load of a document with the URL about:srcdoc.
3299 * html/HTMLIFrameElement.idl:
3300 - Expose the srcdoc property as a reflection of the DOM attribute.
3301 * html/parser/HTMLTreeBuilder.cpp:
3302 (WebCore::HTMLTreeBuilder::defaultForInitial):
3303 - This tweak allows srcdoc documents to use standards mode by
3304 default, saving authors from having to include a doctype in each
3306 * loader/FrameLoader.cpp:
3307 (WebCore::FrameLoader::defaultSubstituteDataForURL):
3308 - This function transfers the contents of the srcdoc attribute into
3309 the loading pipeline. If the client supplies other
3310 SubstituteData, that takes precendence over our "default"
3312 (WebCore::FrameLoader::outgoingReferrer):
3313 - This function implements the requirement from the HTML5 spec that
3314 srcdoc documents inherit their referrer from their parent
3315 document. A recursive implementation might have been more
3316 aesthetic but the iterative implementation seemed like a better
3318 (WebCore::FrameLoader::shouldTreatURLAsSrcdocDocument):
3319 - An about:srcdoc URL only has special meaning when loaded in an
3320 iframe with a srcdoc attribute. Otherwise, it's just a normal
3321 "about" URL, meaning a blank page.
3322 (WebCore::FrameLoader::urlSelected):
3323 (WebCore::FrameLoader::submitForm):
3324 (WebCore::FrameLoader::loadFrameRequest):
3325 (WebCore::FrameLoader::load):
3326 (WebCore::FrameLoader::loadWithNavigationAction):
3327 (WebCore::FrameLoader::reloadWithOverrideEncoding):
3328 (WebCore::FrameLoader::reload):
3329 (WebCore::FrameLoader::loadResourceSynchronously):
3330 - Update these call sites to call defaultSubstituteDataForURL and
3331 outgoingReferrer consistently.
3332 * loader/FrameLoader.h:
3335 2012-03-29 Geoffrey Garen <ggaren@apple.com>
3337 First step toward incremental Weak<T> finalization
3338 https://bugs.webkit.org/show_bug.cgi?id=82670
3340 Reviewed by Filip Pizlo.
3342 Updated WebCore for Weak<T> API changes.
3344 * bindings/js/DOMWrapperWorld.cpp:
3345 (WebCore::JSStringOwner::finalize): We're not allowed to get() a dead Weak<T>
3346 anymore, so use the debug-only was() helper function instead.
3348 * bindings/js/JSDOMBinding.h:
3349 (WebCore::uncacheWrapper): Ditto.
3351 * bindings/js/JSNodeCustom.h:
3352 (WebCore::setInlineCachedWrapper):
3353 (WebCore::clearInlineCachedWrapper): We're not allowed to get() a dead
3354 Weak<T>, so I had to push down these ASSERTs into ScriptWrappable.
3356 * bindings/js/JSNodeFilterCondition.cpp:
3357 (WebCore::JSNodeFilterCondition::acceptNode): Updated for non-Handle-ness
3360 * bindings/js/ScriptWrappable.h:
3361 (WebCore::ScriptWrappable::setWrapper):
3362 (WebCore::ScriptWrappable::clearWrapper): Use was(), as above.
3364 2012-04-03 Luke Macpherson <macpherson@chromium.org>
3366 Don't parse "show" and "hide" as valid values for display property.
3367 https://bugs.webkit.org/show_bug.cgi?id=83115
3369 Reviewed by Adam Barth.
3373 * css/CSSParser.cpp:
3374 (WebCore::isValidKeywordPropertyAndValue):
3376 2012-04-03 Yuta Kitamura <yutak@chromium.org>
3378 Crash in WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadCreateWebSocketChannel
3379 https://bugs.webkit.org/show_bug.cgi?id=82873
3381 Reviewed by David Levin.
3383 WorkerThreadableWebSocketChannel::Bridge should properly handle the cases where inter-thread
3384 callback is not called due to the termination of the worker run loop. Specifically, the bridge
3385 should not send its "this" pointer to the main thread, because the bridge object may be freed
3386 in the worker thread before the main thread starts to process.
3388 Test: http/tests/websocket/tests/hybi/workers/worker-reload.html
3390 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.cpp:
3391 (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
3392 (WebCore::ThreadableWebSocketChannelClientWrapper::peer):
3393 (WebCore::ThreadableWebSocketChannelClientWrapper::didCreateWebSocketChannel):
3394 Renamed from setUseHixie76Protocol, as this funtion now also sets m_peer.
3395 Sets m_syncMethodDone to true, because this function is called in the end of
3396 synchronous wait of Bridge::initialize().
3397 (WebCore::ThreadableWebSocketChannelClientWrapper::clearPeer):
3398 (WebCore::ThreadableWebSocketChannelClientWrapper::useHixie76Protocol):
3399 * Modules/websockets/ThreadableWebSocketChannelClientWrapper.h:
3400 Add WorkerThreadableWebSocketChannel::Peer which is initialized after the creation of
3401 WebSocketChannel in the main thread.
3402 (ThreadableWebSocketChannelClientWrapper):
3403 * Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
3404 (WebCore::WorkerThreadableWebSocketChannel::WorkerThreadableWebSocketChannel):
3405 Don't do synchronous wait in the constructor, as a member function may be called
3406 during the wait before the constructor finishes. The meat of the constructor has
3407 moved to initialize() function.
3408 (WebCore::WorkerThreadableWebSocketChannel::Bridge::Bridge):
3409 (WebCore::WorkerThreadableWebSocketChannel::Bridge::~Bridge):
3410 (WorkerContextDidInitializeTask):
3411 (WebCore::WorkerContextDidInitializeTask::create):
3412 (WebCore::WorkerContextDidInitializeTask::~WorkerContextDidInitializeTask):
3413 (WebCore::WorkerContextDidInitializeTask::WorkerContextDidInitializeTask):
3414 (WebCore::WorkerThreadableWebSocketChannel::Bridge::mainThreadInitialize):
3415 (WebCore::WorkerThreadableWebSocketChannel::Bridge::initialize):
3416 Don't pass "this" object to the main thread. Receive the pointer to the peer object
3417 via ThreadableWebSocketChannelClientWrapper which is ThreadSafeRefCounted<>.
3418 (WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
3419 m_peer may be NULL, and we should not do anything in that case.
3420 (WebCore::WorkerThreadableWebSocketChannel::Bridge::send):
3421 (WebCore::WorkerThreadableWebSocketChannel::Bridge::bufferedAmount):
3422 (WebCore::WorkerThreadableWebSocketChannel::mainThreadClose):
3423 (WebCore::WorkerThreadableWebSocketChannel::Bridge::close):
3424 (WebCore::WorkerThreadableWebSocketChannel::Bridge::fail):
3425 (WebCore::WorkerThreadableWebSocketChannel::Bridge::suspend):
3426 (WebCore::WorkerThreadableWebSocketChannel::Bridge::resume):
3427 * Modules/websockets/WorkerThreadableWebSocketChannel.h:
3428 (WorkerThreadableWebSocketChannel):
3429 (WebCore::WorkerThreadableWebSocketChannel::refThreadableWebSocketChannel):
3430 (WebCore::WorkerThreadableWebSocketChannel::derefThreadableWebSocketChannel):