Objective-C API: Rename JSValue.h/APIJSValue.h to JSCJSValue.h/JSValue.h
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-01-24  Mark Hahnenberg  <mhahnenberg@apple.com>
2
3         Objective-C API: Rename JSValue.h/APIJSValue.h to JSCJSValue.h/JSValue.h
4         https://bugs.webkit.org/show_bug.cgi?id=107327
5
6         Reviewed by Filip Pizlo.
7
8         No new tests.
9
10         We're renaming these two files, so we have to replace the names everywhere.
11
12         * ForwardingHeaders/runtime/JSCJSValue.h: Copied from Source/WebCore/ForwardingHeaders/runtime/JSValue.h.
13         * ForwardingHeaders/runtime/JSValue.h: Removed.
14         * WebCore.vcproj/WebCore.vcproj:
15         * bindings/js/JSArrayBufferViewHelper.h:
16         * bindings/js/JSCustomXPathNSResolver.h:
17         * bindings/js/JSHTMLAllCollectionCustom.cpp:
18         * bindings/js/JSIntentConstructor.cpp:
19         * bindings/js/JSMessagePortCustom.h:
20         * bindings/js/JSNodeFilterCondition.h:
21         * bindings/js/JavaScriptCallFrame.cpp:
22         * bindings/js/ScriptCallStackFactory.cpp:
23         * bindings/js/ScriptValue.h:
24         * bindings/js/SerializedScriptValue.h:
25         * bindings/objc/WebScriptObjectPrivate.h:
26         * bridge/c/c_utility.h:
27         * bridge/testbindings.cpp:
28         * bridge/testbindings.mm:
29         * bridge/testqtbindings.cpp:
30         * plugins/PluginView.cpp:
31         * plugins/blackberry/PluginViewBlackBerry.cpp:
32         * plugins/gtk/PluginViewGtk.cpp:
33         * plugins/mac/PluginViewMac.mm:
34         * plugins/qt/PluginViewQt.cpp:
35         * plugins/win/PluginViewWin.cpp:
36
37 2013-01-24  Jer Noble  <jer.noble@apple.com>
38
39         Unreviewed build fix for Mac/Lion.
40
41         Protect Lion from the absence of VideoToolbox.h by wrapping in #if
42         guards.
43
44         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
45
46 2013-01-24  Anders Carlsson  <andersca@apple.com>
47
48         Add stubbed out StorageNamespaceProxy class
49         https://bugs.webkit.org/show_bug.cgi?id=107846
50
51         Reviewed by Sam Weinig.
52
53         Make StorageNamespace.h and StorageArea.h private headers.
54
55         * WebCore.xcodeproj/project.pbxproj:
56
57 2013-01-24  Tony Chang  <tony@chromium.org>
58
59         Remove document as a parameter from a few internals methods
60         https://bugs.webkit.org/show_bug.cgi?id=107757
61
62         Reviewed by Hajime Morita.
63
64         Remove document as a parameter since there's already one associated with internals.
65
66         No new tests, this refactors some testing code and is covered by
67         exisiting tests.
68
69         * testing/Internals.cpp:
70         (WebCore::Internals::isPreloaded):
71         (WebCore::Internals::createContentElement):
72         (WebCore::Internals::absoluteCaretBounds):
73         * testing/Internals.h:
74         (Internals):
75         * testing/Internals.idl:
76
77 2013-01-24  Mike West  <mkwst@chromium.org>
78
79         Web Inspector: 'console.debug' should generate messages at DebugMessageLevel.
80         https://bugs.webkit.org/show_bug.cgi?id=107816
81
82         Reviewed by Pavel Feldman.
83
84         'console.debug' is currently aliased to 'console.log'. Since we now
85         render debug-level messages differently to log messages, we should use
86         the proper message level for 'console.debug'.
87
88         * page/Console.cpp:
89         (WebCore::Console::debug):
90             Replace the alias to 'console.log' with message creation at
91             DebugMessageLevel.
92
93 2013-01-24  Dima Gorbik  <dgorbik@apple.com>
94
95         Implement :past pseudo class for the WebVTT ::cue pseudo element
96         https://bugs.webkit.org/show_bug.cgi?id=105482
97
98         Reviewed by Eric Carlson.
99
100         It is good to have a designated pseudo class for this, though same could
101         be achieved by using a combination of ::cue and ::cue(:future).
102         Tests also check that nested timestamps work properly.
103
104         Test: media/track/track-css-matching-timestamps.html
105
106         * css/CSSSelector.cpp:
107         (WebCore::CSSSelector::pseudoId):
108         (WebCore::nameToPseudoTypeMap):
109         (WebCore::CSSSelector::extractPseudoType):
110         * css/CSSSelector.h:
111         * css/SelectorChecker.cpp:
112         (WebCore::SelectorChecker::checkOne):
113
114 2013-01-23  Jer Noble  <jer.noble@apple.com>
115
116         Mac: Avoid using k32BGRAPixelFormat on certain platforms.
117         https://bugs.webkit.org/show_bug.cgi?id=107732
118
119         Reviewed by Eric Carlson.
120
121         Using a AVPlayerItemVideoOutput to generate ARGB pixel buffers is a potential performance
122         hit, as the AVPlayerItemVideoOutput will send YUV buffers through a VTPixeBufferTransferSession
123         to convert them to ARGB regardless of whether or not a given buffer will be used. Instead,
124         ask the AVPlayerItemVideoOutput for pixel buffers in the decoder's native pixel format and use
125         the VTPixelBufferTransferSession to convert to ARGB only those pixel buffers which were actually
126         requested.
127
128         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.h:
129         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
130         (WebCore::MediaPlayerPrivateAVFoundationObjC::createVideoOutput): Ask for the decoder's native
131             pixel format.
132         (WebCore::MediaPlayerPrivateAVFoundationObjC::createPixelBuffer): Lazily create a VTPixelTransferSession
133             and convert output pixel buffers to k32BGRAPixelFormat.
134
135 2013-01-24  Christian Biesinger  <cbiesinger@chromium.org>
136
137         Convert RenderFullScreen to use the non-deprecated flexbox
138         https://bugs.webkit.org/show_bug.cgi?id=107746
139
140         Reviewed by Ojan Vafai.
141
142         Tests: covered by existing tests in fullscreen/.
143
144         * rendering/RenderFullScreen.h:
145         * rendering/RenderFullScreen.cpp:
146         (RenderFullScreen::RenderFullScreen):
147         (RenderFullScreen::willBeDestroyed):
148         Inherit from RenderFlexibleBox
149
150         (createFullScreenStyle):
151         Use the new-style CSS properties (justify-content, etc)
152
153         * css/fullscreen.css:
154         (video:-webkit-full-screen, audio:-webkit-full-screen):
155         * css/fullscreenQuickTime.css:
156         (video:-webkit-full-screen::-webkit-media-controls-panel):
157         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
158         (video:-webkit-full-screen::-webkit-media-controls-return-to-realtime-button):
159         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
160         * css/mediaControlsBlackBerryFullscreen.css:
161         (video:-webkit-full-screen::-webkit-media-controls-panel):
162         (video:-webkit-full-screen::-webkit-media-controls-button-group-container):
163         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-time-display-container):
164         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-play-button):
165         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-timeline-container):
166         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-current-time-display):
167         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-time-remaining-display):
168         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-timeline):
169         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-fullscreen-button):
170         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-divider):
171         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-container, video:-webkit-full-screen::-webkit-media-controls-play-button-container):
172         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button-container):
173         (video:-webkit-full-screen::-webkit-media-controls-play-button-container):
174         (video:-webkit-full-screen::-webkit-media-controls-placeholder):
175         * css/mediaControlsQtFullscreen.css:
176         (video::-webkit-media-controls-panel):
177         (video::-webkit-media-controls-play-button):
178         Update fullscreen-related CSS to use the new flexbox
179
180 2013-01-23  Jer Noble  <jer.noble@apple.com>
181
182         Mac: Video appears in wrong place during pinch operations
183         https://bugs.webkit.org/show_bug.cgi?id=107730
184
185         Reviewed by Eric Carlson.
186
187         Send the correct input and output rects, post translation and scaling,
188         to the CIContext for drawing.
189
190         * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
191         (WebCore::MediaPlayerPrivateAVFoundationObjC::paintWithVideoOutput):
192
193 2013-01-24  Max Vujovic  <mvujovic@adobe.com>
194
195         [CSS Filters] CSS opacity property clips filter outsets
196         https://bugs.webkit.org/show_bug.cgi?id=106549
197
198         Reviewed by Dirk Schulze.
199
200         Expand the transparencyClipBox for filter outsets and pass the filter output rect instead of
201         the input rect to beginTransparencyLayers for clipping. Details below.
202
203         Test: css3/filters/css-opacity-with-drop-shadow.html
204
205         * rendering/RenderLayer.cpp:
206         (WebCore):
207         (WebCore::RenderLayer::setFilterBackendNeedsRepaintingInRect):
208             Replace filter outset calcuation with a call to expandRectForFilterOutsets.
209         (WebCore::expandRectForFilterOutsets):
210             New method to factor out repeated filter outset calculation code.
211         (WebCore::transparencyClipBox):
212             After expanding the clip rect for descendants and reflection, expand it for filter
213             outsets, so they don't get clipped when we begin a transparency layer.
214         (WebCore::RenderLayer::paintLayerContents):
215             Pass paintingInfo.paintDirtyRect instead of localPaintingInfo.paintDirtyRect to
216             beginTransparencyLayers for clipping. localPaintingInfo.paintDirtyRect (aka the filter
217             input rect) does not contain filter outsets, so they would get clipped. Now, we pass
218             paintingInfo.paintDirtyRect (the filter output rect), which includes the filter outsets.
219         (WebCore::RenderLayer::calculateLayerBounds):
220             Replace filter outset calcuation with a call to expandRectForFilterOutsets.
221         * rendering/RenderLayer.h:
222         (RenderLayer):
223
224 2013-01-24  Ryosuke Niwa  <rniwa@webkit.org>
225
226         Fix a typo after r139838.
227
228         * dom/NodeRareData.h:
229         (NodeRareData):
230
231 2013-01-24  Ryosuke Niwa  <rniwa@webkit.org>
232
233         Abandoned Memory: SVGFontElement and Corresponding SVGDocument Never Deconstructed
234         https://bugs.webkit.org/show_bug.cgi?id=66438
235
236         Reviewed by Dirk Schulze.
237
238         The memory leak was caused by SVGFontFaceElement storing its own parent in a RefPtr.
239
240         Fixed the bug by storing a raw pointer instead, and clearing the pointer in removedFrom
241         when the node detached from the document. Also added several sanity check assertions.
242
243         * svg/SVGFontFaceElement.cpp:
244         (WebCore::SVGFontFaceElement::SVGFontFaceElement):
245         (WebCore::SVGFontFaceElement::associatedFontElement):
246         (WebCore::SVGFontFaceElement::rebuildFontFace):
247         (WebCore::SVGFontFaceElement::insertedInto):
248         (WebCore::SVGFontFaceElement::removedFrom):
249         * svg/SVGFontFaceElement.h:
250         (SVGFontFaceElement):
251
252 2013-01-22  Robert Hogan  <robert@webkit.org>
253
254         Inline Containing Only Collapsed Whitespace Not Getting a Linebox
255         https://bugs.webkit.org/show_bug.cgi?id=31397
256
257         Reviewed by David Hyatt.
258
259         Treat inlines containing only collapsed whitespace as empty. This allows them
260         to get a linebox.
261
262         Test: fast/inline/inline-containing-collapsed-whitespace-treated-as-empty.html
263
264         * dom/Position.cpp:
265         (WebCore::boundingBoxLogicalHeight):
266         (WebCore):
267         (WebCore::Position::hasRenderedNonAnonymousDescendantsWithHeight):
268         * rendering/InlineIterator.h:
269         (WebCore::isEmptyInline):
270         (WebCore):
271         (WebCore::bidiNextShared):
272         (WebCore::bidiFirstSkippingEmptyInlines):
273         * rendering/RenderBlockLineLayout.cpp:
274         (WebCore::alwaysRequiresLineBox):
275         (WebCore::requiresLineBox):
276         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
277         * rendering/RenderText.cpp:
278         * rendering/RenderText.h:
279         (RenderText):
280
281 2013-01-24  Andrey Lushnikov  <lushnikov@chromium.org>
282
283         Web Inspector: expand more chunks in DTE
284         https://bugs.webkit.org/show_bug.cgi?id=107698
285
286         Reviewed by Pavel Feldman.
287
288         Mock DefaultTextEditor visible area as if it is slightly larger than real one and
289         do all chunk expandings and repaints based on this new area.
290
291         No new tests: no change in behaviour.
292
293         * inspector/front-end/DefaultTextEditor.js:
294         (WebInspector.TextEditorChunkedPanel.prototype.findVisibleChunks):
295
296 2013-01-24  Victor Jaquez  <vjaquez@igalia.com>
297
298         [GStreamer] Implement setPreservesPitch()
299         https://bugs.webkit.org/show_bug.cgi?id=31155
300
301         Enables audio pitch preservation by using the scaletempo GStreamer
302         element when required by the MediaPlayer.
303
304         Reviewed by Philippe Normand.
305
306         No new tests, but a layout test shall be implemented at some point
307         using WebAudio API.
308
309         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
310         (WebCore::MediaPlayerPrivateGStreamer::setPreservesPitch):
311         (WebCore):
312         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
313         (MediaPlayerPrivateGStreamer):
314
315 2013-01-24  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
316
317         Removing deleted files from WebCore/Target.pri after r140399.
318         https://bugs.webkit.org/show_bug.cgi?id=107815
319
320         Reviewed by Csaba Osztrogon√°c.
321
322         * Target.pri:
323
324 2013-01-24  Martin Robinson  <mrobinson@igalia.com>
325
326         Try to fix the Qt Windows build
327
328         * xml/parser/XMLDocumentParserQt.cpp:
329         (WebCore::decodeNamedEntity): Use a reinterpret_cast to const QChar* like StringQt.cpp.
330
331 2013-01-24  Andrey Adaikin  <aandrey@chromium.org>
332
333         Web Inspector: [Canvas] REGRESSION: stack traces in the replay log are gone
334         https://bugs.webkit.org/show_bug.cgi?id=107805
335
336         Reviewed by Pavel Feldman.
337
338         The V8's Error.prepareStackTrace is now called from the Error.captureStackTrace
339         function instead of the "stack" getter function.
340
341         Test: inspector/profiler/canvas2d/canvas-stack-trace.html
342
343         * inspector/InjectedScriptCanvasModuleSource.js:
344         (.):
345
346 2013-01-23  Andrey Adaikin  <aandrey@chromium.org>
347
348         Web Inspector: [Canvas] UI: add a selector to capture a single canvas frame vs consecutive frames
349         https://bugs.webkit.org/show_bug.cgi?id=107688
350
351         Reviewed by Pavel Feldman.
352
353         Allow capturing several canvas frames in a row.
354
355         * English.lproj/localizedStrings.js:
356         * inspector/InjectedScriptCanvasModule.cpp:
357         (WebCore::InjectedScriptCanvasModule::traceLog):
358         * inspector/InjectedScriptCanvasModule.h:
359         (InjectedScriptCanvasModule):
360         * inspector/InjectedScriptCanvasModuleSource.js:
361         (.):
362         * inspector/Inspector.json:
363         * inspector/InspectorCanvasAgent.cpp:
364         (WebCore::InspectorCanvasAgent::getTraceLog):
365         * inspector/InspectorCanvasAgent.h:
366         (InspectorCanvasAgent):
367         * inspector/front-end/CanvasProfileView.js:
368         (WebInspector.CanvasProfileView):
369         (WebInspector.CanvasProfileView.prototype._didReceiveTraceLog):
370         (WebInspector.CanvasProfileView.prototype._requestTraceLog):
371         (WebInspector.CanvasProfileType):
372         (WebInspector.CanvasProfileType.prototype.get statusBarItems):
373         (WebInspector.CanvasProfileType.prototype.get buttonTooltip):
374         (WebInspector.CanvasProfileType.prototype.buttonClicked):
375         (WebInspector.CanvasProfileType.prototype._runSingleFrameCapturing):
376         (WebInspector.CanvasProfileType.prototype._startFrameCapturing):
377         (WebInspector.CanvasProfileType.prototype._stopFrameCapturing.didStopCapturing):
378         (WebInspector.CanvasProfileType.prototype._stopFrameCapturing):
379         (WebInspector.CanvasProfileType.prototype._didStartCapturingFrame):
380         (WebInspector.CanvasProfileType.prototype.setRecordingProfile):
381         (WebInspector.CanvasProfileType.prototype._isSingleFrameMode):
382         (WebInspector.CanvasProfileHeader):
383         (WebInspector.CanvasProfileHeader.prototype._updateCapturingStatus):
384         (WebInspector.CanvasProfileHeader.prototype._requestCapturingStatus):
385         * inspector/front-end/ProfileLauncherView.js:
386         (WebInspector.ProfileLauncherView):
387         * inspector/front-end/ProfilesPanel.js:
388         (WebInspector.ProfileType.prototype.get statusBarItems):
389         (WebInspector.ProfilesPanel):
390         (WebInspector.ProfilesPanel.prototype.get statusBarItems):
391         (WebInspector.ProfilesPanel.prototype._onProfileTypeSelected):
392         (WebInspector.ProfilesPanel.prototype._reset):
393         (WebInspector.ProfilesPanel.prototype._showLauncherView):
394         (WebInspector.ProfilesPanel.prototype.showProfile):
395         (WebInspector.ProfilesPanel.prototype._updateInterface):
396         (WebInspector.ProfilesPanel.prototype._resize):
397
398 2013-01-24  Andreas Kling  <akling@apple.com>
399
400         Add CSSSelectorList::isValid().
401         <http://webkit.org/b/107809>
402
403         Reviewed by Antti Koivisto.
404
405         Add an isValid() method to CSSSelectorList and use that where applicable instead of checking
406         if first() is a null pointer.
407
408         * css/CSSPageRule.cpp:
409         (WebCore::CSSPageRule::setSelectorText):
410         * css/CSSSelectorList.cpp:
411         * css/CSSSelectorList.h:
412         (WebCore::CSSSelectorList::isValid):
413         (WebCore::CSSSelectorList::first):
414         (CSSSelectorList):
415         * css/CSSStyleRule.cpp:
416         (WebCore::CSSStyleRule::setSelectorText):
417         * html/shadow/HTMLContentElement.cpp:
418         (WebCore::HTMLContentElement::validateSelect):
419         * inspector/InspectorStyleSheet.cpp:
420         (WebCore::checkStyleRuleSelector):
421
422 2013-01-24  Kai Koehne  <kai.koehne@digia.com>
423
424         [Qt] Webkit debug build links against release binaries of ANGLE libEGL, libGLESv2
425         https://bugs.webkit.org/show_bug.cgi?id=106217
426
427         Reviewed by Jocelyn Turcotte.
428
429         Use libEGLd, libEGLSv2d if qtbase was compiled with ANGLE.
430
431         * WebCore.pri: Mirror logic of qtbase\mkspecs\features\win32\opengl.prf
432
433 2013-01-24  Sergio Villar Senin  <svillar@igalia.com>
434
435         [GTK] Unreviewed build fix.
436
437         Do not include the header file WebKitDOMPerformanceEntryList.h in
438         the build sources because we do not want the DOM bindings
439         generator to include it in webkitdomdefes.h twice.
440
441         * bindings/gobject/GNUmakefile.am:
442
443 2013-01-24  Julien BRIANCEAU   <jbrianceau@nds.com>
444
445         Fix Qt build (KO since r140610), typo error for QString::fromUtf16 function.
446         https://bugs.webkit.org/show_bug.cgi?id=107803
447
448         Reviewed by Andreas Kling.
449
450         * xml/parser/XMLDocumentParserQt.cpp:
451         (WebCore::decodeNamedEntity):
452
453 2013-01-24  Pavel Feldman  <pfeldman@chromium.org>
454
455         Web Inspector: breakpoints are not restored upon reload for scripts with script mapping.
456         https://bugs.webkit.org/show_bug.cgi?id=107799
457
458         The problem is that source mapping is set after UISourceCode gets into the workspace.
459         Breakpoint manager will now only restore breakpoints upon setting the source maps.
460
461         Reviewed by Alexander Pavlov.
462
463         * inspector/front-end/BreakpointManager.js:
464         (WebInspector.BreakpointManager.prototype._uiSourceCodeAdded):
465         (WebInspector.BreakpointManager.prototype._uiSourceCodeMappingChanged):
466         * inspector/front-end/CompilerScriptMapping.js:
467         (WebInspector.CompilerScriptMapping.prototype.get addScript.get this):
468         (WebInspector.CompilerScriptMapping.prototype.get addScript):
469
470 2013-01-24  Kent Tamura  <tkent@chromium.org>
471
472         Refactoring: Use AtomicString for an InputType::create argument
473         https://bugs.webkit.org/show_bug.cgi?id=107791
474
475         Reviewed by Kentaro Hara.
476
477         A string passed to InputType::create is a 'type' attribute value, which
478         is an AtomicString. Also, InputTypeFactoryMap is created with members of
479         InputTypeName, which are AtomicStrings. We had better use AtomicStrings
480         for them.
481
482         No new tests. This is just a refactoring.
483
484         * html/InputType.cpp:
485         Change the key type of InputTypeFactoryMap from String to AtomicString.
486         (WebCore::InputType::create):
487         Change an argument type from const String& to const AtomicString&.
488         * html/InputType.h:
489         (InputType): Ditto.
490
491 2013-01-24  Kentaro Hara  <haraken@chromium.org>
492
493         Unreviewed. Build fix.
494
495         * bindings/v8/V8DOMWrapper.cpp:
496         (WebCore::V8DOMWrapper::isDOMWrapper):
497
498 2013-01-24  Andreas Kling  <akling@apple.com>
499
500         AX: Fix the debug build after r140658. (Constructor initializer order.)
501
502         * accessibility/AccessibilityNodeObject.cpp:
503         (WebCore::AccessibilityNodeObject::AccessibilityNodeObject):
504
505 2013-01-24  Hajime Morrita  <morrita@google.com>
506
507         There are a few of wrong removeAllChildren() call
508         https://bugs.webkit.org/show_bug.cgi?id=107790
509
510         Reviewed by Ryosuke Niwa.
511
512         removeAllChildren() is designed for trashing deleting children out.
513         It doesn't detach() children and could have possible leak.
514         This change replaces such removeAllChildren() usage with safer removeChildren().
515
516         No new tests. Covered by existing tests.
517
518         * html/HTMLInputElement.cpp:
519         (WebCore::HTMLInputElement::parseAttribute):
520         * html/InputType.cpp:
521         (WebCore::InputType::destroyShadowSubtree):
522         * html/ValidationMessage.cpp:
523         (WebCore::ValidationMessage::setMessageDOMAndStartTimer):
524         * html/parser/HTMLTreeBuilder.cpp:
525         (WebCore::HTMLTreeBuilder::processEndTag):
526
527 2013-01-24  Dominic Mazzoni  <dmazzoni@google.com>
528
529         AX: should init an AXObject only after AXObjectCache has added it
530         https://bugs.webkit.org/show_bug.cgi?id=107533
531
532         Reviewed by Chris Fleizach.
533
534         Initialize each AXObject after the AXObjectCache has
535         finished adding it to its hash maps, so that it's
536         impossible for initialization of an AXObject to result in
537         exploring the tree and creating another AXObject instance
538         that points to the same renderer / node.
539
540         Test: accessibility/duplicate-axrenderobject-crash.html
541
542         * accessibility/AXObjectCache.cpp:
543         (WebCore::AXObjectCache::getOrCreate):
544         * accessibility/AccessibilityARIAGrid.cpp:
545         (WebCore::AccessibilityARIAGrid::create):
546         * accessibility/AccessibilityARIAGridCell.cpp:
547         (WebCore::AccessibilityARIAGridCell::create):
548         * accessibility/AccessibilityARIAGridRow.cpp:
549         (WebCore::AccessibilityARIAGridRow::create):
550         * accessibility/AccessibilityList.cpp:
551         (WebCore::AccessibilityList::create):
552         * accessibility/AccessibilityListBox.cpp:
553         (WebCore::AccessibilityListBox::create):
554         * accessibility/AccessibilityMediaControls.cpp:
555         (WebCore::AccessibilityMediaControl::create):
556         (WebCore::AccessibilityMediaControlsContainer::create):
557         (WebCore::AccessibilityMediaTimeline::create):
558         (WebCore::AccessibilityMediaTimeDisplay::create):
559         * accessibility/AccessibilityMenuList.cpp:
560         (WebCore::AccessibilityMenuList::create):
561         * accessibility/AccessibilityNodeObject.cpp:
562         (WebCore::AccessibilityNodeObject::create):
563         * accessibility/AccessibilityObject.h:
564         (WebCore::AccessibilityObject::init):
565         (AccessibilityObject):
566         * accessibility/AccessibilityProgressIndicator.cpp:
567         (WebCore::AccessibilityProgressIndicator::create):
568         * accessibility/AccessibilityRenderObject.cpp:
569         (WebCore::AccessibilityRenderObject::create):
570         (WebCore::AccessibilityRenderObject::accessibilityIsIgnored):
571             assert that the object has been initialized
572         * accessibility/AccessibilitySVGRoot.cpp:
573         (WebCore::AccessibilitySVGRoot::create):
574         * accessibility/AccessibilitySlider.cpp:
575         (WebCore::AccessibilitySlider::create):
576         * accessibility/AccessibilityTable.cpp:
577         (WebCore::AccessibilityTable::create):
578         * accessibility/AccessibilityTableCell.cpp:
579         (WebCore::AccessibilityTableCell::create):
580         * accessibility/AccessibilityTableRow.cpp:
581         (WebCore::AccessibilityTableRow::create):
582
583 2013-01-23  Kentaro Hara  <haraken@chromium.org>
584
585         Implement MouseEvent constructor
586         https://bugs.webkit.org/show_bug.cgi?id=107630
587
588         Reviewed by Adam Barth.
589
590         Spec: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
591
592         The MouseEvent constructor should be implemented under a DOM4_EVENTS_CONSTRUCTOR flag.
593         This significantly simplifies JavaScript code to construct a MouseEvent.
594
595         Before:
596           event = document.createEvent("MouseEvents");
597           event.initMouseEvent("click", true, true, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
598
599         After:
600           event = new MouseEvent("click");
601
602         Test: fast/events/constructors/mouse-event-constructor.html
603
604         * bindings/scripts/CodeGenerator.pm:
605         (IsSubType):
606         (IsInheritExtendedAttribute):
607         * bindings/scripts/CodeGeneratorV8.pm:
608         (GenerateHeader):
609         (GenerateNamedConstructorCallback):
610         (GenerateImplementation):
611         * bindings/scripts/test/V8/V8Float64Array.cpp:
612         (WebCore):
613         (WebCore::V8Float64Array::createWrapper):
614         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
615         (WebCore):
616         (WebCore::V8TestActiveDOMObject::createWrapper):
617         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
618         (WebCore):
619         (WebCore::V8TestCustomNamedGetter::createWrapper):
620         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
621         (WebCore):
622         (WebCore::V8TestEventConstructor::createWrapper):
623         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
624         (WebCore):
625         (WebCore::V8TestEventTarget::toEventTarget):
626         (WebCore::V8TestEventTarget::createWrapper):
627         * bindings/scripts/test/V8/V8TestEventTarget.h:
628         (V8TestEventTarget):
629         * bindings/scripts/test/V8/V8TestException.cpp:
630         (WebCore):
631         (WebCore::V8TestException::createWrapper):
632         * bindings/scripts/test/V8/V8TestInterface.cpp:
633         (WebCore):
634         (WebCore::V8TestInterface::toActiveDOMObject):
635         (WebCore::V8TestInterface::createWrapper):
636         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
637         (WebCore):
638         (WebCore::V8TestMediaQueryListListener::createWrapper):
639         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
640         (WebCore):
641         (WebCore::V8TestNamedConstructor::toActiveDOMObject):
642         (WebCore::V8TestNamedConstructor::createWrapper):
643         * bindings/scripts/test/V8/V8TestNode.cpp:
644         (WebCore):
645         (WebCore::V8TestNode::toEventTarget):
646         (WebCore::V8TestNode::createWrapper):
647         * bindings/scripts/test/V8/V8TestNode.h:
648         (V8TestNode):
649         * bindings/scripts/test/V8/V8TestObj.cpp:
650         (WebCore):
651         (WebCore::V8TestObj::createWrapper):
652         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
653         (WebCore):
654         (WebCore::V8TestOverloadedConstructors::createWrapper):
655         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
656         (WebCore):
657         (WebCore::V8TestSerializedScriptValueInterface::createWrapper):
658         * bindings/v8/Dictionary.cpp:
659         (WebCore::Dictionary::get):
660         (WebCore):
661         * bindings/v8/Dictionary.h:
662         (Dictionary):
663         * bindings/v8/NPV8Object.cpp:
664         (WebCore::npObjectTypeInfo):
665         * bindings/v8/V8DOMWrapper.cpp:
666         (WebCore::V8DOMWrapper::isDOMWrapper):
667         (WebCore):
668         * bindings/v8/V8DOMWrapper.h:
669         (V8DOMWrapper):
670         * bindings/v8/WrapperTypeInfo.h:
671         (WebCore):
672         (WebCore::WrapperTypeInfo::toEventTarget):
673         (WrapperTypeInfo):
674         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
675         (WebCore):
676         * dom/MouseEvent.cpp:
677         (WebCore::MouseEventInit::MouseEventInit):
678         (WebCore):
679         (WebCore::MouseEvent::create):
680         (WebCore::MouseEvent::MouseEvent):
681         * dom/MouseEvent.h:
682         (MouseEventInit):
683         (WebCore):
684         (MouseEvent):
685         (WebCore::MouseEvent::create):
686         (WebCore::MouseEvent::button):
687         (WebCore::MouseEvent::buttonDown):
688         (WebCore::MouseEvent::relatedTarget):
689         (WebCore::MouseEvent::setRelatedTarget):
690         (WebCore::MouseEvent::clipboard):
691         (WebCore::MouseEvent::dataTransfer):
692         * dom/MouseEvent.idl:
693
694 2013-01-23  Kent Tamura  <tkent@chromium.org>
695
696         Add form-related instrumentations, and support 33+ features in FeatureObserver
697         https://bugs.webkit.org/show_bug.cgi?id=107770
698
699         Reviewed by Kentaro Hara.
700
701         No new tests. This doesn't make behavior changes.
702
703         * page/FeatureObserver.h:
704         - Add form-related features.
705         - Add a Document* version of observe().
706         - Use BitVector to represent features to support 33+ features.
707         (WebCore::FeatureObserver::didObserve):
708         (FeatureObserver):
709         * page/FeatureObserver.cpp:
710         (WebCore::FeatureObserver::FeatureObserver):
711         (WebCore::FeatureObserver::~FeatureObserver):
712         (WebCore::FeatureObserver::observe):
713
714         * html/ColorInputType.cpp:
715         (WebCore::ColorInputType::create): Calls FeatureObserver::observe.
716         * html/DateInputType.cpp:
717         (WebCore::DateInputType::create): Ditto.
718         * html/DateTimeInputType.cpp:
719         (WebCore::DateTimeInputType::create): Ditto.
720         * html/DateTimeLocalInputType.cpp:
721         (WebCore::DateTimeLocalInputType::create): Ditto.
722         * html/EmailInputType.cpp:
723         (WebCore::EmailInputType::create): Ditto.
724         * html/HTMLDataListElement.cpp:
725         (WebCore::HTMLDataListElement::create): Ditto.
726         * html/HTMLFormControlElement.cpp:
727         (WebCore::HTMLFormControlElement::parseAttribute): Ditto.
728         * html/HTMLInputElement.cpp:
729         (WebCore::HTMLInputElement::parseAttribute): Ditto.
730         * html/HTMLTextFormControlElement.cpp:
731         (WebCore::HTMLTextFormControlElement::parseAttribute): Ditto.
732         * html/InputType.cpp:
733         (WebCore::InputType::create):
734         Record type=datetime and type=week even if these types are not enabled.
735         * html/MonthInputType.cpp:
736         (WebCore::MonthInputType::create): Calls FeatureObserver::observe.
737         * html/NumberInputType.cpp:
738         (WebCore::NumberInputType::create): Ditto.
739         * html/RangeInputType.cpp:
740         (WebCore::RangeInputType::create): Ditto.
741         * html/SearchInputType.cpp:
742         (WebCore::SearchInputType::create): Ditto.
743         * html/TelephoneInputType.cpp:
744         (WebCore::TelephoneInputType::create): Ditto.
745         * html/TimeInputType.cpp:
746         (WebCore::TimeInputType::create): Ditto.
747         * html/URLInputType.cpp:
748         (WebCore::URLInputType::create): Ditto.
749         * html/WeekInputType.cpp:
750         (WebCore::WeekInputType::create): Ditto.
751
752 2013-01-23  Ken Kania  <kkania@chromium.org>
753
754         [Inspector] Add events for tracking page loads and scheduled navigations.
755         https://bugs.webkit.org/show_bug.cgi?id=104168
756
757         Reviewed by Pavel Feldman.
758
759         These events are needed for clients who need to be aware of when a page is
760         navigating or about to navigate. Some clients may wish to prevent interaction
761         with the page during this time. Two of the new events track loading start and
762         stop, as measured by the ProgressTracker. The other two events track when a
763         page has a new scheduled navigation and when it no longer has a scheduled
764         navigation. These latter two events won't allow the client to determine if
765         a load is going to happen in all circumstances, but is sufficient for many cases.
766         Make sure we hold a reference to the frame in NavigationScheduler::timerFired
767         in case the redirect causes the frame to be detached.
768
769         Also, minor update to InspectorInputAgent::dispatchMouseEvent to reorder params
770         to match dispatchKeyEvent.
771
772         Tests: inspector-protocol/page/frameScheduledNavigation.html
773                inspector-protocol/page/frameStartedLoading.html
774
775         * inspector/Inspector.json:
776         * inspector/InspectorInputAgent.cpp:
777         (WebCore::InspectorInputAgent::dispatchMouseEvent):
778         * inspector/InspectorInputAgent.h:
779         (InspectorInputAgent):
780         * inspector/InspectorInstrumentation.cpp:
781         (WebCore):
782         (WebCore::InspectorInstrumentation::frameStartedLoadingImpl):
783         (WebCore::InspectorInstrumentation::frameStoppedLoadingImpl):
784         (WebCore::InspectorInstrumentation::frameScheduledNavigationImpl):
785         (WebCore::InspectorInstrumentation::frameClearedScheduledNavigationImpl):
786         * inspector/InspectorInstrumentation.h:
787         (InspectorInstrumentation):
788         (WebCore::InspectorInstrumentation::frameStartedLoading):
789         (WebCore):
790         (WebCore::InspectorInstrumentation::frameStoppedLoading):
791         (WebCore::InspectorInstrumentation::frameScheduledNavigation):
792         (WebCore::InspectorInstrumentation::frameClearedScheduledNavigation):
793         * inspector/InspectorPageAgent.cpp:
794         (WebCore::InspectorPageAgent::frameStartedLoading):
795         (WebCore):
796         (WebCore::InspectorPageAgent::frameStoppedLoading):
797         (WebCore::InspectorPageAgent::frameScheduledNavigation):
798         (WebCore::InspectorPageAgent::frameClearedScheduledNavigation):
799         * inspector/InspectorPageAgent.h:
800         * inspector/front-end/ResourceTreeModel.js:
801         (WebInspector.PageDispatcher.prototype.frameDetached):
802         (WebInspector.PageDispatcher.prototype.frameStartedLoading):
803         (WebInspector.PageDispatcher.prototype.frameStoppedLoading):
804         (WebInspector.PageDispatcher.prototype.frameScheduledNavigation):
805         (WebInspector.PageDispatcher.prototype.frameClearedScheduledNavigation):
806         * loader/NavigationScheduler.cpp:
807         (WebCore::NavigationScheduler::clear):
808         (WebCore::NavigationScheduler::timerFired):
809         (WebCore::NavigationScheduler::startTimer):
810         (WebCore::NavigationScheduler::cancel):
811         * loader/ProgressTracker.cpp:
812         (WebCore::ProgressTracker::progressStarted):
813         (WebCore::ProgressTracker::finalProgressComplete):
814
815 2013-01-23  Simon Fraser  <simon.fraser@apple.com>
816
817         Avoid creating background layers on pages with a fixed background, but no image
818         https://bugs.webkit.org/show_bug.cgi?id=107783
819         <rdar://problem/13074450>
820
821         Reviewed by Beth Dakin.
822         
823         http://www.nme.com has background-attachment: fixed on the <body>, but
824         not background image. In that case there's no point making a layer
825         for the fixed root background.
826
827         Test: platform/mac/tiled-drawing/fixed-background/fixed-background-no-image.html
828
829         * rendering/style/RenderStyle.cpp:
830         (WebCore::allLayersAreFixed): Check to see if we have an image, as well
831         as fixed attachment.
832
833 2013-01-23  Wei Jia  <wjia@chromium.org>
834
835         Enable autoplay when <video>'s src is from media stream
836         https://bugs.webkit.org/show_bug.cgi?id=105224
837
838         Reviewed by Eric Carlson.
839
840         Enable autoplay when <video>'s src is from media stream. This would avoid requesting multiple gestures when <video> is used for WebRTC.
841         The test is done by modifying platform/chromium/media/video-capture-preview.html.
842
843         * html/HTMLMediaElement.cpp:
844         (WebCore::HTMLMediaElement::loadResource):
845
846 2013-01-23  Roger Fong  <roger_fong@apple.com>
847
848         Remove ForwardingHeaders/wtf from WebCore.
849         https://bugs.webkit.org/show_bug.cgi?id=107723
850
851         The folders are empty, nothings actually being copied over anymore from the ForwardingHeaders/wtf folder.
852
853         Reviewed by Benjamin Poulain.
854
855         * ForwardingHeaders/wtf: Removed.
856         * ForwardingHeaders/wtf/dtoa: Removed.
857         * ForwardingHeaders/wtf/text: Removed.
858         * ForwardingHeaders/wtf/unicode: Removed.
859         * ForwardingHeaders/wtf/unicode/icu: Removed.
860         * ForwardingHeaders/wtf/unicode/wince: Removed.
861         * ForwardingHeaders/wtf/url: Removed.
862         * WebCore.vcproj/copyForwardingHeaders.cmd:
863
864 2013-01-23  Hayato Ito  <hayato@chromium.org>
865
866         Group parameters (firstRuleIndex and lastRuleIndex) into a parameter object, RuleRange.
867         https://bugs.webkit.org/show_bug.cgi?id=107095
868
869         Reviewed by Darin Adler.
870
871         This is a continued effort after r139817.
872
873         Factoring, no change in behavior.
874
875         * css/StyleResolver.cpp:
876         (WebCore::StyleResolver::collectMatchingRules):
877         (WebCore::StyleResolver::collectMatchingRulesForRegion):
878         (WebCore::StyleResolver::matchScopedAuthorRules):
879         (WebCore::StyleResolver::matchHostRules):
880         (WebCore::StyleResolver::matchAuthorRules):
881         (WebCore::StyleResolver::matchUserRules):
882         (WebCore::StyleResolver::matchUARules):
883         (WebCore::StyleResolver::collectMatchingRulesForList):
884         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
885         * css/StyleResolver.h:
886         (WebCore::StyleResolver::RuleRange::RuleRange):
887         (RuleRange): Newly introduced to group parameters.
888         (StyleResolver):
889         (WebCore::StyleResolver::MatchRanges::UARuleRange):
890         (WebCore::StyleResolver::MatchRanges::authorRuleRange):
891         (WebCore::StyleResolver::MatchRanges::userRuleRange):
892
893 2013-01-23  Luke Macpherson   <macpherson@chromium.org>
894
895         Support variables inside -webkit-box-reflect CSS property.
896         https://bugs.webkit.org/show_bug.cgi?id=106856
897
898         Reviewed by Tony Chang.
899
900         The primary change is to make the direction parameter a CSSPrimitiveValue style ident,
901         so that it can also be a variable reference.
902
903         Covered by existing LayoutTests/compositing/reflections/ tests.
904         Added Test: fast/css/variables/var-inside-box-reflect.html
905
906         * css/CSSComputedStyleDeclaration.cpp:
907         (WebCore::valueForReflection):
908         * css/CSSParser.cpp:
909         (WebCore::CSSParser::parseReflect):
910         * css/CSSPrimitiveValueMappings.h:
911         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
912         (WebCore):
913         (WebCore::CSSPrimitiveValue::operator CSSReflectionDirection):
914         (WebCore::CSSPrimitiveValue::convertToLength):
915         * css/CSSReflectValue.cpp:
916         (WebCore::CSSReflectValue::customCssText):
917         Use String addition operator instead of StringBuilder.
918         (WebCore):
919         (WebCore::CSSReflectValue::customSerializeResolvingVariables):
920         Use String addition operator instead of StringBuilder.
921         * css/CSSReflectValue.h:
922         (WebCore::CSSReflectValue::create):
923         (WebCore::CSSReflectValue::direction):
924         (CSSReflectValue):
925         (WebCore::CSSReflectValue::CSSReflectValue):
926         * css/CSSValue.cpp:
927         (WebCore::CSSValue::serializeResolvingVariables):
928         * css/StyleResolver.cpp:
929         (WebCore::hasVariableReference):
930         (WebCore::StyleResolver::applyProperty):
931
932 2013-01-23  Abhishek Arya  <inferno@chromium.org>
933
934         Add ASSERT_WITH_SECURITY_IMPLICATION to detect bad casts in rendering
935         https://bugs.webkit.org/show_bug.cgi?id=107743
936
937         Reviewed by Eric Seidel.
938
939         * rendering/InlineFlowBox.h:
940         (WebCore::toInlineFlowBox):
941         * rendering/RenderBR.h:
942         (WebCore::toRenderBR):
943         * rendering/RenderBlock.h:
944         (WebCore::toRenderBlock):
945         * rendering/RenderBox.h:
946         (WebCore::toRenderBox):
947         * rendering/RenderBoxModelObject.h:
948         (WebCore::toRenderBoxModelObject):
949         * rendering/RenderButton.h:
950         (WebCore::toRenderButton):
951         * rendering/RenderCombineText.h:
952         (WebCore::toRenderCombineText):
953         * rendering/RenderCounter.h:
954         (WebCore::toRenderCounter):
955         * rendering/RenderDetailsMarker.h:
956         (WebCore::toRenderDetailsMarker):
957         * rendering/RenderEmbeddedObject.h:
958         (WebCore::toRenderEmbeddedObject):
959         * rendering/RenderFieldset.h:
960         (WebCore::toRenderFieldset):
961         * rendering/RenderFileUploadControl.h:
962         (WebCore::toRenderFileUploadControl):
963         * rendering/RenderFlowThread.h:
964         (WebCore::toRenderFlowThread):
965         * rendering/RenderFrame.h:
966         (WebCore::toRenderFrame):
967         * rendering/RenderFrameSet.h:
968         (WebCore::toRenderFrameSet):
969         * rendering/RenderFullScreen.h:
970         (WebCore::toRenderFullScreen):
971         * rendering/RenderIFrame.h:
972         (WebCore::toRenderIFrame):
973         * rendering/RenderImage.h:
974         (WebCore::toRenderImage):
975         * rendering/RenderInline.h:
976         (WebCore::toRenderInline):
977         * rendering/RenderLayerModelObject.h:
978         (WebCore::toRenderLayerModelObject):
979         * rendering/RenderListBox.h:
980         (WebCore::toRenderListBox):
981         * rendering/RenderListItem.h:
982         (WebCore::toRenderListItem):
983         * rendering/RenderListMarker.h:
984         (WebCore::toRenderListMarker):
985         * rendering/RenderMedia.h:
986         (WebCore::toRenderMedia):
987         * rendering/RenderMenuList.h:
988         (WebCore::toRenderMenuList):
989         * rendering/RenderMeter.h:
990         (WebCore::toRenderMeter):
991         * rendering/RenderMultiColumnBlock.h:
992         (WebCore::toRenderMultiColumnBlock):
993         * rendering/RenderMultiColumnSet.h:
994         (WebCore::toRenderMultiColumnSet):
995         * rendering/RenderNamedFlowThread.h:
996         (WebCore::toRenderNamedFlowThread):
997         * rendering/RenderPart.h:
998         (WebCore::toRenderPart):
999         * rendering/RenderProgress.h:
1000         (WebCore::toRenderProgress):
1001         * rendering/RenderQuote.h:
1002         (WebCore::toRenderQuote):
1003         * rendering/RenderRegion.h:
1004         (WebCore::toRenderRegion):
1005         * rendering/RenderRubyRun.h:
1006         (WebCore::toRenderRubyRun):
1007         * rendering/RenderScrollbarPart.h:
1008         (WebCore::toRenderScrollbarPart):
1009         * rendering/RenderSearchField.h:
1010         (WebCore::toRenderSearchField):
1011         * rendering/RenderSlider.h:
1012         (WebCore::toRenderSlider):
1013         * rendering/RenderSnapshottedPlugIn.h:
1014         (WebCore::toRenderSnapshottedPlugIn):
1015         * rendering/RenderTable.h:
1016         (WebCore::toRenderTable):
1017         * rendering/RenderTableCaption.h:
1018         (WebCore::toRenderTableCaption):
1019         * rendering/RenderTableCell.h:
1020         (WebCore::toRenderTableCell):
1021         * rendering/RenderTableCol.h:
1022         (WebCore::toRenderTableCol):
1023         * rendering/RenderTableRow.h:
1024         (WebCore::toRenderTableRow):
1025         * rendering/RenderTableSection.h:
1026         (WebCore::toRenderTableSection):
1027         * rendering/RenderText.h:
1028         (WebCore::toRenderText):
1029         * rendering/RenderTextControl.h:
1030         (WebCore::toRenderTextControl):
1031         * rendering/RenderTextControlMultiLine.h:
1032         (WebCore::toRenderTextControlMultiLine):
1033         * rendering/RenderTextControlSingleLine.h:
1034         (WebCore::toRenderTextControlSingleLine):
1035         * rendering/RenderVideo.h:
1036         (WebCore::toRenderVideo):
1037         * rendering/RenderView.h:
1038         (WebCore::toRenderView):
1039         * rendering/RenderWidget.h:
1040         (WebCore::toRenderWidget):
1041         * rendering/mathml/RenderMathMLBlock.h:
1042         (WebCore::toRenderMathMLBlock):
1043         * rendering/svg/RenderSVGContainer.h:
1044         (WebCore::toRenderSVGContainer):
1045         * rendering/svg/RenderSVGGradientStop.h:
1046         (WebCore::toRenderSVGGradientStop):
1047         * rendering/svg/RenderSVGImage.h:
1048         (WebCore::toRenderSVGImage):
1049         * rendering/svg/RenderSVGInlineText.h:
1050         (WebCore::toRenderSVGInlineText):
1051         * rendering/svg/RenderSVGRoot.h:
1052         (WebCore::toRenderSVGRoot):
1053         * rendering/svg/RenderSVGShape.h:
1054         (WebCore::toRenderSVGShape):
1055         * rendering/svg/RenderSVGText.h:
1056         (WebCore::toRenderSVGText):
1057
1058 2013-01-23  Elliott Sprehn  <esprehn@gmail.com>
1059
1060         Don't allocate rare data on every Element on removal
1061         https://bugs.webkit.org/show_bug.cgi?id=107756
1062
1063         Reviewed by Eric Seidel.
1064
1065         We should not allocate an ElementRareData for every element
1066         in Element::removedFrom. Previously calls to setIsInTopLayer
1067         would unconditionally call ensureElementRareData(), and this was
1068         called from Element::removedFrom meaning removing an element
1069         made the entire subtree suddenly balloon to huge in size as each
1070         one got an ElementRareData.
1071
1072         This is a regression from my patch on Bug 103912 where I removed a check
1073         that avoided this allocation.
1074
1075         No new tests needed, covered by existing tests.
1076
1077         * dom/Element.cpp:
1078         (WebCore::Element::setIsInTopLayer):
1079
1080 2013-01-23  Adam Barth  <abarth@webkit.org>
1081
1082         BackgroundHTMLParser should use more const references to avoid copy constructors
1083         https://bugs.webkit.org/show_bug.cgi?id=107763
1084
1085         Reviewed by Tony Gentilcore.
1086
1087         I doubt this optimization is visible anywhere, but it's just a nit.
1088
1089         * html/parser/BackgroundHTMLParser.cpp:
1090         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
1091         (WebCore::BackgroundHTMLParser::createPartial):
1092         * html/parser/BackgroundHTMLParser.h:
1093         (WebCore::BackgroundHTMLParser::create):
1094         (BackgroundHTMLParser):
1095
1096 2013-01-23  Abhishek Arya  <inferno@chromium.org>
1097
1098         Add support for ASSERT_WITH_SECURITY_IMPLICATION.
1099         https://bugs.webkit.org/show_bug.cgi?id=107699
1100
1101         Reviewed by Eric Seidel.
1102
1103         * dom/ContainerNode.cpp:
1104         (WebCore::ContainerNode::parserInsertBefore): Use ASSERT_WITH_SECURITY_IMPLICATION
1105         for document confusion ASSERT(document() == newChild->document())
1106         (WebCore::ContainerNode::parserAppendChild): same.
1107
1108 2013-01-23  Ian Vollick  <vollick@chromium.org>
1109
1110         Unreviewed build fix.
1111
1112         * rendering/RenderLayer.cpp:
1113         (WebCore::RenderLayer::rebuildZOrderLists):
1114
1115 2013-01-23  Rafael Weinstein  <rafaelw@chromium.org>
1116
1117         Template element should parse in XHTML just as it does in HTML
1118         https://bugs.webkit.org/show_bug.cgi?id=106491
1119
1120         Reviewed by Ryosuke Niwa.
1121
1122         https://dvcs.w3.org/hg/webcomponents/raw-file/f33622c39c5e/spec/templates/index.html#parsing-xhtml-documents.
1123         https://dvcs.w3.org/hg/webcomponents/raw-file/f33622c39c5e/spec/templates/index.html#serializing-xhtml-documents.
1124
1125         This patch modifies the XML parser in two ways: (1) when nodes are created, their owner document is
1126         the owner document of the current node, rather than the containing document, and (2) when an HTMLTemplateElement
1127         is encountered, its content document fragment is pushed onto the stack, rather than the element itself, so that children
1128         are appended to the template content. Also, because XSLT operates on the serialized input document, transforms consider
1129         template contents to be descendants.
1130
1131         Tests: fast/dom/HTMLTemplateElement/xhtml-parsing-and-serialization.xml
1132                fast/xpath/xpath-template-element.html
1133                fast/xsl/xslt-processor-template.html
1134                fast/xsl/xslt-xhtml-template.xml
1135
1136         * xml/parser/XMLDocumentParser.cpp:
1137         (WebCore::XMLDocumentParser::enterText):
1138         * xml/parser/XMLDocumentParserLibxml2.cpp:
1139         (WebCore::XMLDocumentParser::startElementNs):
1140         (WebCore::XMLDocumentParser::processingInstruction):
1141         (WebCore::XMLDocumentParser::cdataBlock):
1142         (WebCore::XMLDocumentParser::comment):
1143
1144 2013-01-23  Tony Gentilcore  <tonyg@chromium.org>
1145
1146         Teach threaded HTML parser to update InspectorInstrumentation when writing HTML
1147         https://bugs.webkit.org/show_bug.cgi?id=107755
1148
1149         Reviewed by Eric Seidel.
1150
1151         The current length is unused, so it doesn't cause any noticeable behavior difference to not pass it here.
1152
1153         No new tests because covered by existing tests.
1154
1155         * html/parser/HTMLDocumentParser.cpp:
1156         (WebCore::HTMLDocumentParser::processTokensFromBackgroundParser):
1157
1158 2013-01-23  Kentaro Hara  <haraken@chromium.org>
1159
1160         [V8] Make an Isolate parameter mandatory in NativeToJS()
1161         https://bugs.webkit.org/show_bug.cgi?id=107663
1162
1163         Reviewed by Adam Barth.
1164
1165         No tests. No change in behavior.
1166
1167         * bindings/scripts/CodeGeneratorV8.pm:
1168         (GenerateCallbackImplementation):
1169         (NativeToJSValue):
1170         * bindings/scripts/test/V8/V8TestCallback.cpp:
1171         (WebCore::V8TestCallback::callbackWithClass1Param):
1172         (WebCore::V8TestCallback::callbackWithClass2Param):
1173         (WebCore::V8TestCallback::callbackWithStringList):
1174         (WebCore::V8TestCallback::callbackWithBoolean):
1175         (WebCore::V8TestCallback::callbackRequiresThisToPass):
1176
1177 2013-01-23  Stephanie Lewis  <slewis@apple.com>
1178
1179         Add ordering for WebCore __DATA.
1180         https://bugs.webkit.org/show_bug.cgi?id=107765
1181         <rdar://problem/13019603>
1182
1183         Rubber stamped by Oliver Hunt.
1184
1185         No Change in functionality.
1186
1187         * WebCore.order:
1188
1189 2013-01-23  Benjamin Poulain  <bpoulain@apple.com>
1190
1191         RenderProgress does not repaint on value change
1192         https://bugs.webkit.org/show_bug.cgi?id=106977
1193
1194         Reviewed by Joseph Pecoraro.
1195
1196         No test because the ouput depends on the code of RenderTheme, and
1197         we use the platform theme for testing.
1198
1199         * rendering/RenderProgress.cpp:
1200         (WebCore::RenderProgress::updateFromElement):
1201         (WebCore::RenderProgress::updateAnimationState):
1202         Previously, repaint() was only called on two occasions:
1203         -On animationTimerFired().
1204         -In response to updateFromElement() if and only if the RenderTheme start/stop an
1205          animation previously stopped/running.
1206
1207         When changing the value of HTMLProgressElement, no repaint was called until
1208         the next timer fired for the animation.
1209         This is a problem if:
1210         -The animation of RenderTheme is slow.
1211         -If there is no animation (the element is never updated in that case).
1212
1213 2013-01-23  Ian Vollick  <vollick@chromium.org>
1214
1215         Introduce the "stacking container" concept.
1216         https://bugs.webkit.org/show_bug.cgi?id=107734
1217
1218         Reviewed by Simon Fraser.
1219
1220         A stacking container is treated just like a stacking context. That
1221         is, it has z-order lists, it and its descendants are stacked as a
1222         unit, and when the RenderLayerCompositor does its overlap testing,
1223         the composited regions for all layer lists take effect only once the
1224         stacking container is done being processed.
1225
1226         This patch also adds the function RenderLayer::isStackingContainer().
1227         Currently, this is equivalent to RenderLayer::isStackingContext(),
1228         but in future, the definition of stacking container will be broadened
1229         to encompass more than just stacking contexts.
1230
1231         Other than the addition of this extra function, the patch is mostly
1232         comprised of name changes. Any code that used to refer to the
1233         stacking context concept, but didn't necessarily require a stacking
1234         context in the strict, CSS-sense, was switched to refer to stacking
1235         container. No functionality was changed.
1236
1237         No new tests, no change in functionality.
1238
1239         * inspector/InspectorLayerTreeAgent.cpp:
1240         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
1241         * rendering/RenderLayer.cpp:
1242         (WebCore::RenderLayer::RenderLayer):
1243         (WebCore):
1244         (WebCore::RenderLayer::updatePagination):
1245         (WebCore::RenderLayer::canBeStackingContainer):
1246         (WebCore::RenderLayer::setHasVisibleContent):
1247         (WebCore::RenderLayer::dirty3DTransformedDescendantStatus):
1248         (WebCore::RenderLayer::stackingContainer):
1249         (WebCore::compositingContainer):
1250         (WebCore::expandClipRectForDescendantsAndReflection):
1251         (WebCore::RenderLayer::addChild):
1252         (WebCore::RenderLayer::removeChild):
1253         (WebCore::RenderLayer::updateNeedsCompositedScrolling):
1254         (WebCore::RenderLayer::updateCompositingLayersAfterScroll):
1255         (WebCore::RenderLayer::paintPaginatedChildLayer):
1256         (WebCore::RenderLayer::hitTestPaginatedChildLayer):
1257         (WebCore::RenderLayer::calculateLayerBounds):
1258         (WebCore::RenderLayer::dirtyZOrderLists):
1259         (WebCore::RenderLayer::dirtyStackingContainerZOrderLists):
1260         (WebCore::RenderLayer::collectLayers):
1261         (WebCore::RenderLayer::updateCompositingAndLayerListsIfNeeded):
1262         (WebCore::RenderLayer::updateStackingContextsAfterStyleChange):
1263         (WebCore::RenderLayer::styleChanged):
1264         * rendering/RenderLayer.h:
1265         (RenderLayer):
1266         (WebCore::RenderLayer::isStackingContainer):
1267         (WebCore::RenderLayer::posZOrderList):
1268         (WebCore::RenderLayer::negZOrderList):
1269         (WebCore::RenderLayer::isDirtyStackingContainer):
1270         (WebCore::RenderLayer::clearZOrderLists):
1271         (WebCore::RenderLayer::updateZOrderLists):
1272         * rendering/RenderLayerBacking.cpp:
1273         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
1274         (WebCore::RenderLayerBacking::compositingOpacity):
1275         (WebCore::RenderLayerBacking::hasVisibleNonCompositingDescendantLayers):
1276         * rendering/RenderLayerCompositor.cpp:
1277         (WebCore::RenderLayerCompositor::enclosingNonStackingClippingLayer):
1278         (WebCore::RenderLayerCompositor::addToOverlapMapRecursive):
1279         (WebCore::RenderLayerCompositor::computeCompositingRequirements):
1280         (WebCore::RenderLayerCompositor::rebuildCompositingLayerTree):
1281         (WebCore::RenderLayerCompositor::updateLayerTreeGeometry):
1282         (WebCore::RenderLayerCompositor::updateCompositingDescendantGeometry):
1283         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1284         (WebCore::RenderLayerCompositor::layerHas3DContent):
1285         (WebCore::isRootmostFixedOrStickyLayer):
1286
1287 2013-01-23  Simon Fraser  <simon.fraser@apple.com>
1288
1289         Have scrollperf logging log information about wheel event handlers
1290         https://bugs.webkit.org/show_bug.cgi?id=107761
1291         <rdar://problem/12281015>
1292
1293         Reviewed by Tim Horton.
1294
1295         Log when the wheel event handler count of a ScrollingTreeScrollingNodeMac changes.
1296
1297         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1298         (WebCore::ScrollingTreeScrollingNodeMac::update):
1299         (WebCore::logWheelEventHandlerCountChanged):
1300
1301 2013-01-23  Kentaro Hara  <haraken@chromium.org>
1302
1303         [V8] Add an optional Isolate parameter to GetTemplate() and GetRawTemplate()
1304         https://bugs.webkit.org/show_bug.cgi?id=107679
1305
1306         Reviewed by Adam Barth.
1307
1308         It is important to pass an Isolate to GetTemplate() and GetRawTemplate().
1309         To proceed the work incrementally, this patch adds an optional Isolate parameter
1310         to GetTemplate() and GetRawTemplate(). Once all call sites are updated, the
1311         Isolate parameter will be made mandatory.
1312
1313         No tests. No change in behavior.
1314
1315         * bindings/scripts/CodeGeneratorV8.pm:
1316         (GenerateHeader):
1317         (GenerateNamedConstructorCallback):
1318         (GenerateImplementation):
1319         * bindings/scripts/test/V8/V8Float64Array.cpp:
1320         (WebCore::V8Float64Array::GetRawTemplate):
1321         (WebCore::V8Float64Array::GetTemplate):
1322         * bindings/scripts/test/V8/V8Float64Array.h:
1323         (V8Float64Array):
1324         * bindings/scripts/test/V8/V8TestActiveDOMObject.cpp:
1325         (WebCore::V8TestActiveDOMObject::GetRawTemplate):
1326         (WebCore::V8TestActiveDOMObject::GetTemplate):
1327         * bindings/scripts/test/V8/V8TestActiveDOMObject.h:
1328         (V8TestActiveDOMObject):
1329         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
1330         (WebCore::V8TestCustomNamedGetter::GetRawTemplate):
1331         (WebCore::V8TestCustomNamedGetter::GetTemplate):
1332         * bindings/scripts/test/V8/V8TestCustomNamedGetter.h:
1333         (V8TestCustomNamedGetter):
1334         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
1335         (WebCore::V8TestEventConstructor::GetRawTemplate):
1336         (WebCore::V8TestEventConstructor::GetTemplate):
1337         * bindings/scripts/test/V8/V8TestEventConstructor.h:
1338         (V8TestEventConstructor):
1339         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1340         (WebCore::V8TestEventTarget::GetRawTemplate):
1341         (WebCore::V8TestEventTarget::GetTemplate):
1342         * bindings/scripts/test/V8/V8TestEventTarget.h:
1343         (V8TestEventTarget):
1344         * bindings/scripts/test/V8/V8TestException.cpp:
1345         (WebCore::V8TestException::GetRawTemplate):
1346         (WebCore::V8TestException::GetTemplate):
1347         * bindings/scripts/test/V8/V8TestException.h:
1348         (V8TestException):
1349         * bindings/scripts/test/V8/V8TestInterface.cpp:
1350         (WebCore::V8TestInterface::GetRawTemplate):
1351         (WebCore::V8TestInterface::GetTemplate):
1352         * bindings/scripts/test/V8/V8TestInterface.h:
1353         (V8TestInterface):
1354         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
1355         (WebCore::V8TestMediaQueryListListener::GetRawTemplate):
1356         (WebCore::V8TestMediaQueryListListener::GetTemplate):
1357         * bindings/scripts/test/V8/V8TestMediaQueryListListener.h:
1358         (V8TestMediaQueryListListener):
1359         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1360         (WebCore::V8TestNamedConstructorConstructor::GetTemplate):
1361         (WebCore::V8TestNamedConstructor::GetRawTemplate):
1362         (WebCore::V8TestNamedConstructor::GetTemplate):
1363         * bindings/scripts/test/V8/V8TestNamedConstructor.h:
1364         (V8TestNamedConstructorConstructor):
1365         (V8TestNamedConstructor):
1366         * bindings/scripts/test/V8/V8TestNode.cpp:
1367         (WebCore::V8TestNode::GetRawTemplate):
1368         (WebCore::V8TestNode::GetTemplate):
1369         * bindings/scripts/test/V8/V8TestNode.h:
1370         (V8TestNode):
1371         * bindings/scripts/test/V8/V8TestObj.cpp:
1372         (WebCore::V8TestObj::GetRawTemplate):
1373         (WebCore::V8TestObj::GetTemplate):
1374         * bindings/scripts/test/V8/V8TestObj.h:
1375         (V8TestObj):
1376         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
1377         (WebCore::V8TestOverloadedConstructors::GetRawTemplate):
1378         (WebCore::V8TestOverloadedConstructors::GetTemplate):
1379         * bindings/scripts/test/V8/V8TestOverloadedConstructors.h:
1380         (V8TestOverloadedConstructors):
1381         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
1382         (WebCore::V8TestSerializedScriptValueInterface::GetRawTemplate):
1383         (WebCore::V8TestSerializedScriptValueInterface::GetTemplate):
1384         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.h:
1385         (V8TestSerializedScriptValueInterface):
1386         * bindings/v8/WrapperTypeInfo.h:
1387         (WebCore):
1388         (WebCore::WrapperTypeInfo::getTemplate):
1389         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp:
1390         (WebCore::V8HTMLImageElementConstructor::GetTemplate):
1391         * bindings/v8/custom/V8HTMLImageElementConstructor.h:
1392         (V8HTMLImageElementConstructor):
1393
1394 2013-01-23  Kentaro Hara  <haraken@chromium.org>
1395
1396         [V8] Move V8DOMWrapper::getEventListener() to V8EventListerList
1397         https://bugs.webkit.org/show_bug.cgi?id=107683
1398
1399         Reviewed by Adam Barth.
1400
1401         No tests. No change in behavior.
1402
1403         * bindings/scripts/CodeGeneratorV8.pm:
1404         (GenerateNormalAttrSetter):
1405         (GenerateEventListenerCallback):
1406         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
1407         (WebCore::TestEventTargetV8Internal::addEventListenerCallback):
1408         (WebCore::TestEventTargetV8Internal::removeEventListenerCallback):
1409         * bindings/scripts/test/V8/V8TestObj.cpp:
1410         (WebCore::TestObjV8Internal::addEventListenerCallback):
1411         (WebCore::TestObjV8Internal::removeEventListenerCallback):
1412         * bindings/v8/V8DOMWrapper.cpp:
1413         * bindings/v8/V8DOMWrapper.h:
1414         (V8DOMWrapper):
1415         * bindings/v8/V8EventListenerList.cpp:
1416         (WebCore::V8EventListenerList::getEventListener):
1417         (WebCore):
1418         * bindings/v8/V8EventListenerList.h:
1419         (WebCore):
1420         (V8EventListenerList):
1421         (WebCore::V8EventListenerList::findWrapper):
1422         (WebCore::V8EventListenerList::clearWrapper):
1423         (WebCore::V8EventListenerList::doFindWrapper):
1424         (WebCore::V8EventListenerList::getHiddenProperty):
1425         (WebCore::V8EventListenerList::findOrCreateWrapper):
1426         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1427         (WebCore::V8DOMWindow::addEventListenerCallback):
1428         (WebCore::V8DOMWindow::removeEventListenerCallback):
1429
1430 2013-01-23  Dominic Mazzoni  <dmazzoni@google.com>
1431
1432         AX: AXObjectCache should be initialized with topDocument
1433         https://bugs.webkit.org/show_bug.cgi?id=107638
1434
1435         Reviewed by Chris Fleizach.
1436
1437         Initialize AXObjectCache with the top document, not the
1438         document that axObjectCache happened to be called on, which
1439         could be an iframe. Having an AXObjectCache with the wrong
1440         document could cause a heap-use-after-free in
1441         notificationPostTimerFired if the inner document was deleted
1442         while notifications were pending.
1443
1444         * dom/Document.cpp:
1445         (WebCore::Document::axObjectCache):
1446
1447 2012-12-12  Ryosuke Niwa  <rniwa@webkit.org>
1448
1449         REGRESSION: WebKit does not render selection in non-first ruby text nodes.
1450         https://bugs.webkit.org/show_bug.cgi?id=92818
1451
1452         Reviewed by Levi Weintraub.
1453
1454         The patch is based on the one submitted by Sukolsak Sakshuwong.
1455
1456         The bug was caused by the fact isSelectionRoot was returning false on RenderRubyRun even though
1457         it doesn't lay down its children in block direction.
1458
1459         The selection painting code assumes that all blocks in each selection root are laid down in
1460         the containing block direction. In particular, InlineTextBox::paintSelection calls
1461         RootInlineBox::selectionTopAdjustedForPrecedingBlock in order to determine the end of the previous
1462         line, which in turn calls blockBeforeWithinSelectionRoot. blockBeforeWithinSelectionRoot goes
1463         through block nodes that appears before "this" block, and selectionTopAdjustedForPrecedingBlock
1464         assumes that to compute the end of the previous line.
1465
1466         Now suppose we have markup such as <ruby>Ichi<rt>One</rt></ruby><ruby>Ni<rt>Two</rt></ruby>. When
1467         selectionTopAdjustedForPrecedingBlock is called on the line box generated for "Two", it tries to
1468         determine the bottom of the inline box above that of "Two", which blockBeforeWithinSelectionRoot
1469         determines to be that of "One". At this point, everything goes wrong and the selection height is
1470         computed to be 0.
1471
1472         The fix to this problem is to allow RenderRubyRun to be a selection root. Since RenderRubyRun is
1473         already an inline-block, it suffices to bypass the !nonPseudoNode() check. In fact, there is no
1474         need to check this condition anymore as far as I can tell. The check was added in
1475         http://trac.webkit.org/changeset/12986 but all tests added by this change set as well as the rest
1476         of layout tests pass without this condition.
1477
1478         Test: fast/ruby/select-ruby.html
1479
1480         * rendering/RenderBlock.cpp:
1481         (WebCore::RenderBlock::isSelectionRoot):
1482
1483 2013-01-23  Kentaro Hara  <haraken@chromium.org>
1484
1485         [V8] Reduce usage of deprecatedV8String() and deprecatedV8Integer()
1486         https://bugs.webkit.org/show_bug.cgi?id=107674
1487
1488         Reviewed by Adam Barth.
1489
1490         No tests. No change in behavior.
1491
1492         * bindings/v8/JavaScriptCallFrame.cpp:
1493         (WebCore::JavaScriptCallFrame::evaluate):
1494         * bindings/v8/NPV8Object.cpp:
1495         (_NPN_Enumerate):
1496         * bindings/v8/PageScriptDebugServer.cpp:
1497         (WebCore::PageScriptDebugServer::addListener):
1498         * bindings/v8/ScriptController.cpp:
1499         (WebCore::ScriptController::bindToWindowObject):
1500         (WebCore::ScriptController::disableEval):
1501         * bindings/v8/ScriptDebugServer.cpp:
1502         (WebCore::ScriptDebugServer::setBreakpoint):
1503         (WebCore::ScriptDebugServer::removeBreakpoint):
1504         (WebCore::ScriptDebugServer::setScriptSource):
1505         (WebCore::ScriptDebugServer::ensureDebuggerScriptCompiled):
1506         (WebCore::ScriptDebugServer::compileScript):
1507         * bindings/v8/ScriptFunctionCall.cpp:
1508         (WebCore::ScriptCallArgumentHandler::appendArgument):
1509         (WebCore::ScriptFunctionCall::call):
1510         (WebCore::ScriptFunctionCall::construct):
1511         * bindings/v8/ScriptProfiler.cpp:
1512         (WebCore::ScriptProfiler::start):
1513         (WebCore::ScriptProfiler::stop):
1514         * bindings/v8/V8DOMWindowShell.cpp:
1515         (WebCore::V8DOMWindowShell::initializeIfNeeded):
1516         (WebCore::V8DOMWindowShell::namedItemAdded):
1517         (WebCore::V8DOMWindowShell::namedItemRemoved):
1518         * bindings/v8/V8LazyEventListener.cpp:
1519         (WebCore::V8LazyEventListener::prepareListenerObject):
1520         * bindings/v8/V8MutationCallback.cpp:
1521         (WebCore::V8MutationCallback::handleEvent):
1522         * bindings/v8/WorkerScriptController.cpp:
1523         (WebCore::WorkerScriptController::evaluate):
1524         * bindings/v8/WorkerScriptDebugServer.cpp:
1525         (WebCore::WorkerScriptDebugServer::addListener):
1526         * bindings/v8/custom/V8InjectedScriptManager.cpp:
1527         (WebCore::InjectedScriptManager::createInjectedScript):
1528
1529 2013-01-23  Martin Robinson  <mrobinson@igalia.com>
1530
1531         WebKit should support decoding multi-byte entities in XML content
1532         https://bugs.webkit.org/show_bug.cgi?id=107459
1533
1534         Reviewed by Adam Barth.
1535
1536         Test: fast/parser/entities-in-xhtml.xhtml
1537
1538         * html/parser/HTMLEntityParser.cpp:
1539         (WebCore::appendUChar32ToUCharArray): Added this helper function. Later patches
1540         may try to move this code to somewhere that it can be shared more easily.
1541         (WebCore::decodeNamedEntityToUCharArray): Modify this function to work on a UChar
1542         array four elements long, so that multi-byte and multi-character entities can be resolved.
1543         * html/parser/HTMLEntityParser.h: Updated function declaratoin.
1544         * xml/parser/XMLDocumentParserLibxml2.cpp:
1545         (WebCore): Modify the statically allocated entity string memory area to accommodate
1546         up to two UTF-8 characters. Each UTF-8 character can be 4 bytes, so this brings the
1547         total size to 9 bytes.
1548         (WebCore::getXHTMLEntity): Use the new entity decoding API.
1549         * xml/parser/XMLDocumentParserQt.cpp:
1550         (WebCore::EntityResolver::resolveUndeclaredEntity): Ditto.
1551         (WebCore::XMLDocumentParser::parse): Ditto.
1552
1553 2013-01-23  Eric Seidel  <eric@webkit.org>
1554
1555         Stop the background-parser during HTMLDocumentParser::detatch to prevent crashes/asserts
1556         https://bugs.webkit.org/show_bug.cgi?id=107751
1557
1558         Reviewed by Tony Gentilcore.
1559
1560         This appears to fix the 2 intermitent crashers we were seeing while
1561         running fast/parser.  And definitely fixes 8 ASSERTs seen using a Debug build.
1562
1563         * html/parser/HTMLDocumentParser.cpp:
1564         (WebCore::HTMLDocumentParser::detach):
1565
1566 2013-01-23  Hans Muller  <hmuller@adobe.com>
1567
1568         [CSS Exclusions] Add support for computing first included interval position for polygons
1569         https://bugs.webkit.org/show_bug.cgi?id=103429
1570
1571         Reviewed by Dirk Schulze.
1572
1573         Added support for computing the "first fit" location, i.e. the logical shape-inside
1574         location where a line's layout begins. The algorithm for doing so is described here:
1575         http://hansmuller-webkit.blogspot.com/2012/08/revised-algorithm-for-finding-first.html.
1576
1577         Tests: fast/exclusions/shape-inside/shape-inside-first-fit-001.html
1578                fast/exclusions/shape-inside/shape-inside-first-fit-002.html
1579                fast/exclusions/shape-inside/shape-inside-first-fit-003.html
1580
1581         * platform/graphics/FloatSize.h:
1582         (WebCore::operator*): Scale a FloatSize. This simplified the final expression in VertexPair::intersection().
1583         * rendering/ExclusionPolygon.cpp:
1584         (WebCore::isPointOnLineSegment): Returns true if the specified point is collinear and within the line segement's bounds.
1585         (WebCore::leftSide): Return a value > 0 if point is on the left side of the line segment, < 0 if it's on the right, 0 if it's collinear.
1586         (WebCore::ExclusionPolygon::contains): Return true if the point is within the polygon or on an edge.
1587         (WebCore::VertexPair::overlapsRect): Returns true if the line segment from vertex1 to vertex2 overlaps the specified FloatRect.
1588         (WebCore::VertexPair::intersection): Finds the intersection of a pair of line segments defined by VertexPairs.
1589         (WebCore::ExclusionPolygon::firstFitRectInPolygon): Returns true if none of the polygon's edges, except the two used
1590             to define by the offset edges, overlap the FloatRect.
1591         (WebCore::aboveOrToTheLeft): Defines the top/left preference for "first fit" locations.
1592         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Replaced the stub implementation of this method.
1593         * rendering/ExclusionPolygon.h:
1594         (ExclusionPolygon): Added declarations noted above.
1595         (VertexPair): Abstract class that defines a pair of FloatPoints.
1596         (OffsetPolygonEdge): Represents an edge that's horizontally offset from a polygon edge.
1597         (WebCore::OffsetPolygonEdge::edgeIndex): The ExclusionPolygon edge index used to define this OffsetEdge.
1598
1599 2013-01-23  Dirk Schulze  <dschulze@adobe.com>
1600
1601         Implement Canvas Path object
1602         https://bugs.webkit.org/show_bug.cgi?id=97333
1603
1604         Reviewed by Dean Jackson.
1605
1606         The Canvas part of the WHATWG specification defines a Path object. This Path object
1607         shares several path segment functions (path methods) with the CanvasRenderingContext2D
1608         interface. This patch introduces the Path object and shares the path segment functions
1609         in the class CanvasPathMethods.
1610         This patch does just implement the basic path functions that have a general agreement on
1611         the WHAT WG and W3C mailing lists.
1612         This feature is behind a flag and won't be activated by default.
1613
1614         http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#path-objects
1615
1616         Test: fast/canvas/canvas-path-object.html
1617
1618         * CMakeLists.txt: Add DOMPath and CanvasPathMedthods to build system.
1619         * DerivedSources.cpp: Ditto.
1620         * DerivedSources.make: Ditto.
1621         * DerivedSources.pri: Ditto.
1622         * GNUmakefile.list.am: Ditto.
1623         * Target.pri: Ditto.
1624         * WebCore.gypi: Ditto.
1625         * WebCore.vcproj/WebCore.vcproj: Ditto.
1626         * WebCore.xcodeproj/project.pbxproj: Ditto.
1627         * html/canvas/CanvasPathMethods.cpp: Added.
1628         (WebCore): This class shares the path segment functions (moveTo, lineTo, ...) between
1629             DOMPath (the Path object) and CanvasRenderingContext2D.
1630         (WebCore::CanvasPathMethods::closePath):
1631         (WebCore::CanvasPathMethods::moveTo):
1632         (WebCore::CanvasPathMethods::lineTo):
1633         (WebCore::CanvasPathMethods::quadraticCurveTo):
1634         (WebCore::CanvasPathMethods::bezierCurveTo):
1635         (WebCore::CanvasPathMethods::arcTo):
1636         (WebCore::CanvasPathMethods::arc):
1637         (WebCore::CanvasPathMethods::rect):
1638         * html/canvas/CanvasPathMethods.h: Added.
1639         (WebCore):
1640         (CanvasPathMethods):
1641         (WebCore::CanvasPathMethods::~CanvasPathMethods):
1642         (WebCore::CanvasPathMethods::transformIsInvertible):
1643         (WebCore::CanvasPathMethods::CanvasPathMethods):
1644         * html/canvas/CanvasRenderingContext2D.cpp:
1645         * html/canvas/CanvasRenderingContext2D.h: Remove the path segment functions here.
1646         (CanvasRenderingContext2D):
1647         (WebCore::CanvasRenderingContext2D::transformIsInvertible): This checks if the CTM
1648             of the context is still invertible. Drawing should stop if it is not.
1649         * html/canvas/CanvasRenderingContext2D.idl:
1650         * html/canvas/DOMPath.h: Added.
1651         (WebCore):
1652         (DOMPath):
1653         (WebCore::DOMPath::create):
1654         (WebCore::DOMPath::~DOMPath):
1655         (WebCore::DOMPath::DOMPath):
1656         * html/canvas/DOMPath.idl: Added.
1657         * page/DOMWindow.idl: Added CTOR for Path.
1658
1659 2013-01-23  Joshua Bell  <jsbell@chromium.org>
1660
1661         IndexedDB: Remove IDBVersionChangeRequest
1662         https://bugs.webkit.org/show_bug.cgi?id=107711
1663
1664         Reviewed by Tony Chang.
1665
1666         When the setVersion() API was removed from the Indexed DB spec the IDBVersionChangeRequest
1667         interface was replaced with IDBOpenDBRequest. We switched over for open(), this completes
1668         the work by switching over for deleteDatabase() and removing the old code. (On the Event
1669         side we still need to combine IDBVersionChangeEvent and IDBUpgradeNeededEvent.)
1670
1671         Test: storage/indexeddb/intversion-long-queue.html
1672               storage/indexeddb/intversion-upgrades.html
1673
1674         * CMakeLists.txt: Remove references to deleted code.
1675         * DerivedSources.make: Ditto.
1676         * GNUmakefile.list.am: Ditto.
1677         * Modules/indexeddb/IDBCallbacks.h: Remove unused onBlocked() overload.
1678         * Modules/indexeddb/IDBDatabase.cpp: Remove references to deleted code.
1679         * Modules/indexeddb/IDBDatabase.h: Ditto.
1680         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1681         (WebCore::IDBDatabaseBackendImpl::deleteDatabase): Fire onBlocked with current version.
1682         * Modules/indexeddb/IDBFactory.cpp:
1683         (WebCore::IDBFactory::openInternal): Don't need to specify source.
1684         (WebCore::IDBFactory::deleteDatabase): Use an IDBOpenDBRequest.
1685         * Modules/indexeddb/IDBFactory.h: Change return type of deleteDatabase()
1686         * Modules/indexeddb/IDBFactory.idl: Ditto.
1687         * Modules/indexeddb/IDBOpenDBRequest.cpp:
1688         (WebCore::IDBOpenDBRequest::create): Always use a null source.
1689         (WebCore::IDBOpenDBRequest::IDBOpenDBRequest): Pass null source to base class.
1690         (WebCore::IDBOpenDBRequest::dispatchEvent): Don't assume result is a database in existing
1691         special case.
1692         * Modules/indexeddb/IDBOpenDBRequest.h: Don't need a source argument (always null).
1693         * Modules/indexeddb/IDBVersionChangeRequest.cpp: Removed.
1694         * Modules/indexeddb/IDBVersionChangeRequest.h: Removed.
1695         * Modules/indexeddb/IDBVersionChangeRequest.idl: Removed.
1696         * WebCore.gypi: Remove references to deleted code.
1697         * WebCore.xcodeproj/project.pbxproj: Remove references to deleted code.
1698         * dom/EventTarget.h: Remove references to deleted code.
1699         * dom/EventTargetFactory.in: Ditto.
1700
1701 2013-01-23  Scott Graham  <scottmg@chromium.org>
1702
1703         [Chromium] Fix inclusion of pch .cpp in webcore_platform and webcore_rendering
1704         https://bugs.webkit.org/show_bug.cgi?id=107700
1705
1706         Reviewed by Dirk Pranke.
1707
1708         No new tests, Chromium should link on VS 2012.
1709
1710         * WebCore.gyp/WebCore.gyp:
1711
1712 2013-01-23  Jun Jiang  <jun.a.jiang@intel.com>
1713
1714         Avoid unnecessary format conversion for tex{Sub}Image2D() for ImageData of WebGL
1715         https://bugs.webkit.org/show_bug.cgi?id=107532
1716
1717         Reviewed by Kenneth Russell.
1718
1719         This patch removes the unnecessary format conversion in tex{Sub}Image2D() for ImageData in WebGL to improve performance.
1720
1721         Already covered by current tests.
1722
1723         * html/canvas/WebGLRenderingContext.cpp:
1724         (WebCore):
1725         (WebCore::WebGLRenderingContext::texImage2D):
1726         (WebCore::WebGLRenderingContext::texSubImage2D):
1727
1728 2013-01-23  Xianzhu Wang  <wangxianzhu@chromium.org>
1729
1730         Should update compositing state when an out-of-view fixed position element becomes in-view
1731         https://bugs.webkit.org/show_bug.cgi?id=107410
1732
1733         Reviewed by Simon Fraser.
1734
1735         When a non-compositing page contains some not-composited fixed position element because of bounds out-of-view, when the element changes position and RenderLayerCompositor::updateCompositingLayers() is called, the function may return early because of "if (!m_reevaluateCompositingAfterLayout && !m_compositing)" without updating the compositing layers.
1736
1737         Set m_reevaluateCompositingAfterLayout when a fixed position element is not composited because of bounds out-of-view.
1738
1739         Test: compositing/layer-creation/fixed-position-change-out-of-view-in-view.html
1740
1741         * rendering/RenderLayerCompositor.cpp:
1742         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
1743
1744 2013-01-23  Tony Chang  <tony@chromium.org>
1745
1746         Unreviewed, set svn:eol-style to CRLF on Windows .sln files.
1747
1748         * WebCore.vcproj/WebCore.sln: Modified property svn:eol-style.
1749         * WebCore.vcproj/WebCore.submit.sln: Modified property svn:eol-style.
1750
1751 2013-01-23  Adam Barth  <abarth@webkit.org>
1752
1753         BackgroundHTMLParser::sendTokensToMainThread should use bind
1754         https://bugs.webkit.org/show_bug.cgi?id=107637
1755
1756         Reviewed by Eric Seidel.
1757
1758         This patch replaces our hand-written implementation of bind for
1759         didReceiveTokensFromBackgroundParser with bind from Functional.h. To
1760         use the generic version of bind, we need to switch to using WeakPtr to
1761         hold a reference to the main thread parser in the BackgroundHTMLParser.
1762
1763         * html/parser/BackgroundHTMLParser.cpp:
1764         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
1765         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
1766         (WebCore::BackgroundHTMLParser::createPartial):
1767         * html/parser/BackgroundHTMLParser.h:
1768         (WebCore::BackgroundHTMLParser::create):
1769         (BackgroundHTMLParser):
1770         (ParserMap):
1771         * html/parser/HTMLDocumentParser.cpp:
1772         (WebCore::HTMLDocumentParser::HTMLDocumentParser):
1773         (WebCore::HTMLDocumentParser::startBackgroundParser):
1774         (WebCore::HTMLDocumentParser::stopBackgroundParser):
1775         * html/parser/HTMLDocumentParser.h:
1776         (HTMLDocumentParser):
1777
1778 2013-01-23  Roger Fong  <roger_fong@apple.com>
1779
1780         Unreviewed. Cleanup VS2010 WebCore project. 
1781         Lots of files that no longer exist in solution.
1782
1783         * WebCore.vcxproj/WebCore.vcxproj:
1784         * WebCore.vcxproj/WebCore.vcxproj.filters:
1785
1786 2013-01-23  Julien Chaffraix  <jchaffraix@webkit.org>
1787
1788         [CSS Grid Layout] Add support for max-content
1789         https://bugs.webkit.org/show_bug.cgi?id=107604
1790
1791         Reviewed by Tony Chang.
1792
1793         Tests: fast/css-grid-layout/minmax-max-content-resolution-columns.html
1794                fast/css-grid-layout/minmax-max-content-resolution-rows.html
1795
1796         This change implements max-content on top of the infrastructure introduced as part
1797         of implementing min-content (bug 106474). No effort was made to share code, which
1798         is what was done for min-content. The sharing will occur in follow-up refactoring(s)
1799         to benefit from the extra testing but also the extra code to make the direction more
1800         obvious.
1801
1802         * rendering/RenderGrid.cpp:
1803         (WebCore::RenderGrid::maxContentForChild):
1804         Added this helper, similar to minContentForChild.
1805
1806         (WebCore::RenderGrid::resolveContentBasedTrackSizingFunctions):
1807         Patched the function to handle max-content per the specification's algorithm.
1808
1809         * rendering/RenderGrid.h:
1810         Added maxContentForChild.
1811
1812 2013-01-23  Mark Lam  <mark.lam@apple.com>
1813
1814         Assert that Supplementable objects is only used in their creator thread.
1815         https://bugs.webkit.org/show_bug.cgi?id=107717.
1816
1817         Reviewed by Adam Barth.
1818
1819         No new tests.
1820
1821         * platform/Supplementable.h:
1822         (WebCore):
1823         (WebCore::Supplementable::provideSupplement):
1824         (WebCore::Supplementable::removeSupplement):
1825         (WebCore::Supplementable::requireSupplement):
1826         (Supplementable):
1827         (WebCore::Supplementable::Supplementable):
1828
1829 2013-01-23  Tony Chang  <tony@chromium.org>
1830
1831         Incorrect scrollable height during simplified layout
1832         https://bugs.webkit.org/show_bug.cgi?id=107193
1833
1834         Reviewed by David Hyatt.
1835
1836         When computing overflow we need the height of the block before
1837         it was clamped (i.e., before updateLogicalHeight() has been called).
1838
1839         During simplified layout, we don't have this information and we were
1840         using the clamped height by mistake. To fix this, we now store the
1841         pre-clamped height on RenderOverflow so we can properly compute
1842         overflow.
1843
1844         Test: fast/overflow/height-during-simplified-layout.html
1845
1846         * rendering/RenderBlock.cpp:
1847         (WebCore::RenderBlock::computeOverflow): Save the height if we have overflow.
1848         (WebCore::RenderBlock::simplifiedLayout): If we have overflow, use the height that we saved
1849         in computeOverflow.
1850         * rendering/RenderOverflow.h:
1851         (WebCore::RenderOverflow::layoutClientAfterEdge):
1852         (WebCore::RenderOverflow::setLayoutClientAfterEdge):
1853         (RenderOverflow): Add a member variable to save the height.
1854
1855 2013-01-23  Tom Sepez  <tsepez@chromium.org>
1856
1857         [chromium] harden ScriptWrappable::m_wrapper against tampering
1858         https://bugs.webkit.org/show_bug.cgi?id=107318
1859
1860         Reviewed by Adam Barth.
1861
1862         Patch is correct if existing tests past without crashing.
1863
1864         * bindings/v8/ScriptWrappable.h:
1865         (WebCore::ScriptWrappable::ScriptWrappable):
1866         (WebCore::ScriptWrappable::wrapper):
1867         (WebCore::ScriptWrappable::setWrapper):
1868         (WebCore::ScriptWrappable::clearWrapper):
1869         (WebCore::ScriptWrappable::disposeWrapper):
1870         (WebCore::ScriptWrappable::reportMemoryUsage):
1871         (ScriptWrappable):
1872         (WebCore::ScriptWrappable::maskOrUnmaskPointer):
1873
1874 2013-01-22  Roger Fong  <roger_fong@apple.com>
1875
1876         WebCore property sheets, modified build scripts, and project files for compiling in VS2010.
1877         https://bugs.webkit.org/show_bug.cgi?id=106988
1878
1879         Reviewed by Brent Fulgham.
1880
1881         * WebCore.vcproj/WebCore.sln:
1882         * WebCore.vcxproj: Added.
1883         * WebCore.vcxproj/MigrateScripts: Added.
1884         * WebCore.vcxproj/QTMovieWin: Added.
1885         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj: Added.
1886         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj.filters: Added.
1887         * WebCore.vcxproj/QTMovieWin/QTMovieWin.vcxproj.user: Added.
1888         * WebCore.vcxproj/QTMovieWin/QTMovieWinCommon.props: Added.
1889         * WebCore.vcxproj/QTMovieWin/QTMovieWinDebug.props: Added.
1890         * WebCore.vcxproj/QTMovieWin/QTMovieWinRelease.props: Added.
1891         * WebCore.vcxproj/WebCore.vcxproj: Added.
1892         * WebCore.vcxproj/WebCore.vcxproj.filters: Added.
1893         * WebCore.vcxproj/WebCore.vcxproj.user: Added.
1894         * WebCore.vcxproj/WebCoreCFNetwork.props: Added.
1895         * WebCore.vcxproj/WebCoreCG.props: Added.
1896         * WebCore.vcxproj/WebCoreCommon.props: Added.
1897         * WebCore.vcxproj/WebCoreDebug.props: Added.
1898         * WebCore.vcxproj/WebCoreGenerated.make: Added.
1899         * WebCore.vcxproj/WebCoreGenerated.vcxproj: Added.
1900         * WebCore.vcxproj/WebCoreGenerated.vcxproj.filters: Added.
1901         * WebCore.vcxproj/WebCoreGenerated.vcxproj.user: Added.
1902         * WebCore.vcxproj/WebCoreGeneratedCommon.props: Added.
1903         * WebCore.vcxproj/WebCoreGeneratedDebug.props: Added.
1904         * WebCore.vcxproj/WebCoreGeneratedRelease.props: Added.
1905         * WebCore.vcxproj/WebCoreMediaQT.props: Added.
1906         * WebCore.vcxproj/WebCorePostBuild.cmd: Added.
1907         * WebCore.vcxproj/WebCorePreBuild.cmd: Added.
1908         * WebCore.vcxproj/WebCorePreLink.cmd: Added.
1909         * WebCore.vcxproj/WebCorePthreads.props: Added.
1910         * WebCore.vcxproj/WebCoreQuartzCore.props: Added.
1911         * WebCore.vcxproj/WebCoreRelease.props: Added.
1912         * WebCore.vcxproj/build-generated-files.sh: Added.
1913         * WebCore.vcxproj/copyForwardingHeaders.cmd: Added.
1914         * WebCore.vcxproj/copyWebCoreResourceFiles.cmd: Added.
1915         * WebCore.vcxproj/migrate-scripts.sh: Added.
1916         * WebCore.vcxproj/xcopy.excludes: Added.
1917         * WebCorePrefix.h:
1918         * config.h:
1919
1920 2013-01-23  Eric Seidel  <eric@webkit.org>
1921
1922         HTMLCompactToken needs to include the forceQuirks bool from HTMLToken
1923         https://bugs.webkit.org/show_bug.cgi?id=107713
1924
1925         Reviewed by Tony Gentilcore.
1926
1927         Before we were only getting "quirks mode" when the system/public identifiers
1928         were known quirks identifiers.  Now we'll correctly get quirks mode for any
1929         parse error during DOCTYPE parsing.
1930         This passes a bunch more tests.
1931
1932         * html/parser/CompactHTMLToken.cpp:
1933         (WebCore::CompactHTMLToken::CompactHTMLToken):
1934         * html/parser/CompactHTMLToken.h:
1935         (WebCore::CompactHTMLToken::doctypeForcesQuirks):
1936         (CompactHTMLToken):
1937         * html/parser/HTMLToken.h:
1938         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1939
1940 2013-01-23  Brady Eidson  <beidson@apple.com>
1941
1942         Recursion handling cancelled authentication challenges in NetworkProcess
1943         <rdar://problem/13024541> and https://bugs.webkit.org/show_bug.cgi?id=107702
1944
1945         Reviewed by Alexey Proskuryakov.
1946
1947         * WebCore.exp.in:
1948
1949 2013-01-23  Beth Dakin  <bdakin@apple.com>
1950
1951         https://bugs.webkit.org/show_bug.cgi?id=107628
1952         Sometimes scroll position is jerky during rubber-band, affects nytimes.com
1953         -and corresponding-
1954         <rdar://problem/12679549>
1955
1956         Reviewed by Simon Fraser.
1957
1958         The basic problem here is that isRubberBandInProgress() was only implemented for 
1959         main thread scrolling. So when we were actually scrolling on the scrolling thread, 
1960         that function would always return false regardless.
1961
1962         New ScrollableArea virtual function isRubberBandInProgress() will allow us to ask 
1963         the ScrollingCoordinator when the scrolling thread is scrolling, or the 
1964         ScrollAnimator otherwise.
1965         * page/FrameView.cpp:
1966         (WebCore::FrameView::isRubberBandInProgress):
1967         * page/FrameView.h:
1968         (FrameView):
1969         * platform/ScrollableArea.h:
1970         (WebCore::ScrollableArea::isRubberBandInProgress):
1971
1972         New ScrollingCoordinator function isRubberBandInProgress() always returns false 
1973         for non-Mac ports, and is overridden in ScrollingCoordinatorMac to consult the 
1974         ScrollingTree.
1975         * page/scrolling/ScrollingCoordinator.h:
1976         (WebCore::ScrollingCoordinator::isRubberBandInProgress):
1977         * page/scrolling/mac/ScrollingCoordinatorMac.h:
1978         (ScrollingCoordinatorMac):
1979         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
1980         (WebCore::ScrollingCoordinatorMac::isRubberBandInProgress):
1981
1982         New variable m_mainFrameIsRubberBanding keeps track of whether there is currently 
1983         a rubber-band happening on the scrolling thread.
1984         * page/scrolling/ScrollingTree.cpp:
1985         (WebCore::ScrollingTree::ScrollingTree):
1986         (WebCore::ScrollingTree::isRubberBandInProgress):
1987         (WebCore::ScrollingTree::setMainFrameIsRubberBanding):
1988         * page/scrolling/ScrollingTree.h:
1989         (ScrollingTree):
1990         (WebCore::ScrollingTree::rootNode):
1991
1992         Call setMainFrameIsRubberBanding() whenever the stretchAmount is calculated and 
1993         whenever we stop the rubber-band timer.
1994         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
1995         (WebCore::ScrollingTreeScrollingNodeMac::stretchAmount):
1996         (WebCore::ScrollingTreeScrollingNodeMac::stopSnapRubberbandTimer):
1997
1998         Consult FrameView for isRubberBandInProgress().
1999         * platform/ScrollView.cpp:
2000         (WebCore::ScrollView::updateScrollbars):
2001
2002 2013-01-23  Robert Hogan  <robert@webkit.org>
2003
2004         Abspos Inline block not positioned correctly in text-aligned container
2005         https://bugs.webkit.org/show_bug.cgi?id=105695
2006
2007         Reviewed by Ojan Vafai.
2008
2009         Inline positioned elements should still obey the text-alignment of their container
2010         even when we don't do a line layout.
2011
2012         Test: fast/text/container-align-with-inlines.html
2013
2014         * rendering/RenderBlock.cpp:
2015         (WebCore::RenderBlock::adjustPositionedBlock):
2016         (WebCore::RenderBlock::updateStaticInlinePositionForChild):
2017         (WebCore):
2018         * rendering/RenderBlock.h:
2019         (RenderBlock):
2020         * rendering/RenderBlockLineLayout.cpp:
2021         (WebCore::setStaticPositions):
2022
2023 2013-01-23  Eric Seidel  <eric@webkit.org>
2024
2025         Remove DocType support from MarkupTokenBase now that NEW_XML is gone
2026         https://bugs.webkit.org/show_bug.cgi?id=107709
2027
2028         Reviewed by Adam Barth.
2029
2030         Just moving code out of MarkupTokenBase and into HTMLToken.
2031         The test for this change is if it compiles. :)  Which it does.
2032
2033         * html/parser/HTMLToken.h:
2034         (DoctypeData):
2035         (WebCore::DoctypeData::DoctypeData):
2036         (WebCore):
2037         (WebCore::HTMLToken::appendToName):
2038         (WebCore::HTMLToken::name):
2039         (HTMLToken):
2040         (WebCore::HTMLToken::beginDOCTYPE):
2041         (WebCore::HTMLToken::publicIdentifier):
2042         (WebCore::HTMLToken::systemIdentifier):
2043         (WebCore::HTMLToken::setPublicIdentifierToEmptyString):
2044         (WebCore::HTMLToken::setSystemIdentifierToEmptyString):
2045         (WebCore::HTMLToken::appendToPublicIdentifier):
2046         (WebCore::HTMLToken::appendToSystemIdentifier):
2047         (WebCore::HTMLToken::releaseDoctypeData):
2048         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
2049         (AtomicHTMLToken):
2050         * html/parser/HTMLTokenTypes.h:
2051         * xml/parser/MarkupTokenBase.h:
2052         (WebCore):
2053         (MarkupTokenBase):
2054
2055 2013-01-23  Alexis Menard  <alexis@webkit.org>
2056
2057         transition-property accepts incorrect "all, none" as value
2058         https://bugs.webkit.org/show_bug.cgi?id=105428
2059
2060         Reviewed by Dean Jackson.
2061
2062         http://www.w3.org/TR/css3-transitions/#transition-property-property
2063         disallows any value like none, all or all, none as it doesn't make
2064         sense. This patch fixes the problem by rejecting the value if set by
2065         the user.
2066
2067         Test: transitions/transitions-parsing.html
2068
2069         * css/CSSParser.cpp:
2070         (WebCore::CSSParser::parseAnimationProperty):
2071         * css/CSSParser.h:
2072
2073 2013-01-23  Eric Seidel  <eric@webkit.org>
2074
2075         Clarify some usage of shouldUseThreading vs m_haveBackgroundParser, fixing about:blank parsing
2076         https://bugs.webkit.org/show_bug.cgi?id=107664
2077
2078         Reviewed by Adam Barth.
2079
2080         The HTMLDocumentParser can be "supposed" to use a background parser
2081         but not end up ever doing so for blank documents.  It's important
2082         that we spin the forground parser at least once, so we end up
2083         actually creating the about:blank document.
2084
2085         shouldUseThreading() means that threading is enabled and we should use it if we can.
2086         m_haveBackgroundParser means that we actually are already using threading.
2087         When we add full document.write support this will get a bit trickier still as
2088         we'll need to be using both the foreground and background parsers.
2089
2090         This fixes about 20 tests in fast/frames and many others outside of fast/frames. :)
2091
2092         * html/parser/HTMLDocumentParser.cpp:
2093         (WebCore::HTMLDocumentParser::prepareToStopParsing):
2094         (WebCore::HTMLDocumentParser::resumeParsingAfterYield):
2095         (WebCore::HTMLDocumentParser::finish):
2096         (WebCore::HTMLDocumentParser::lineNumber):
2097         (WebCore::HTMLDocumentParser::textPosition):
2098
2099 2013-01-17  Roger Fong  <roger_fong@apple.com>
2100
2101         [Win] Remove dependence on Microsoft Embedded OpenType Font Engine (T2EMBED.DLL)  from FontCustomPlatformData.cpp.
2102         https://bugs.webkit.org/show_bug.cgi?id=107153
2103
2104         Reviewed by Dan Bernstein.
2105
2106         * platform/graphics/win/FontCustomPlatformData.cpp:
2107         (WebCore):
2108         (WebCore::FontCustomPlatformData::~FontCustomPlatformData):
2109         (WebCore::FontCustomPlatformData::fontPlatformData):
2110         (WebCore::createFontCustomPlatformData):
2111
2112 2013-01-23  Andrey Lushnikov  <lushnikov@chromium.org>
2113
2114         Web Inspector: speedup highlight regex API in DefaultTextEditor
2115         https://bugs.webkit.org/show_bug.cgi?id=107238
2116
2117         Reviewed by Pavel Feldman.
2118
2119         Move overlay highlight measurement (highlight regex API) from DefaultTextEditor._paintLine
2120         method to the DefaultTextEditor._paintLines method which allows to relayout dom only
2121         once. This is a significant improvement to the current state of the
2122         art which does relayout on each regex occurence.
2123         In addition, use "left" css attribute instead of "margin-left": this
2124         way it will be possible to avoid an unnecessary relayouting during
2125         appending overlay highlight.
2126
2127         No new tests: no change in behaviour.
2128
2129         * inspector/front-end/DefaultTextEditor.js:
2130         (WebInspector.TextEditorMainPanel.prototype.markAndRevealRange):
2131         (WebInspector.TextEditorMainPanel.prototype._paintLines):
2132         (WebInspector.TextEditorMainPanel.prototype._measureRegexHighlight):
2133         (WebInspector.TextEditorMainPanel.prototype._measureSpans):
2134         (WebInspector.TextEditorMainPanel.prototype._appendOverlayHighlight):
2135         (WebInspector.TextEditorMainPanel.prototype._paintLine):
2136         (WebInspector.TextEditorMainPanel.ElementMetrics):
2137         (WebInspector.TextEditorMainPanel.LineOverlayHighlight):
2138         (WebInspector.TextEditorMainChunk.prototype.expand):
2139
2140 2013-01-23  Ojan Vafai  <ojan@chromium.org>
2141
2142         Assert that computePreferredLogicalWidths never calls setNeedsLayout
2143         https://bugs.webkit.org/show_bug.cgi?id=107613
2144
2145         Reviewed by Eric Seidel.
2146
2147         computePreferredLogicalWidths should only set m_minPreferredLogicalWidth
2148         and m_maxPreferredLogicalWidth. It shouldn't have other side-effects.
2149         The mathml bits can be removed once https://bugs.webkit.org/show_bug.cgi?id=107353
2150         is resolved.
2151
2152         * rendering/RenderBox.cpp:
2153         (WebCore::RenderBox::minPreferredLogicalWidth):
2154         * rendering/mathml/RenderMathMLOperator.cpp:
2155         (WebCore::RenderMathMLOperator::computePreferredLogicalWidths):
2156         * rendering/mathml/RenderMathMLRoot.cpp:
2157         (WebCore::RenderMathMLRoot::computePreferredLogicalWidths):
2158         * rendering/mathml/RenderMathMLRow.cpp:
2159         (WebCore::RenderMathMLRow::computePreferredLogicalWidths):
2160
2161 2013-01-23  Noam Rosenthal  <noam@webkit.org>
2162
2163         REGRESSION(r140518): Broke Chromium Win build (gyp file not updated) (Requested by arv on #webkit).
2164         https://bugs.webkit.org/show_bug.cgi?id=107691
2165
2166         Unreviewed build fix. Removed TextureMapperShaderManager.* from WebCore.gypi.
2167
2168         * WebCore.gypi:
2169
2170 2013-01-23  Sheriff Bot  <webkit.review.bot@gmail.com>
2171
2172         Unreviewed, rolling out r140307, r140411, and r140512.
2173         http://trac.webkit.org/changeset/140307
2174         http://trac.webkit.org/changeset/140411
2175         http://trac.webkit.org/changeset/140512
2176         https://bugs.webkit.org/show_bug.cgi?id=107689
2177
2178         Perf regression on DOMDivWalk (bug 106726) (Requested by
2179         falken on #webkit).
2180
2181         * dom/Element.cpp:
2182         (WebCore::Element::removedFrom):
2183         (WebCore):
2184         (WebCore::Element::isInTopLayer):
2185         (WebCore::Element::setIsInTopLayer):
2186         * dom/Element.h:
2187         * dom/ElementRareData.h:
2188         (ElementRareData):
2189         (WebCore::ElementRareData::isInTopLayer):
2190         (WebCore::ElementRareData::setIsInTopLayer):
2191         (WebCore::ElementRareData::ElementRareData):
2192         * dom/Node.cpp:
2193         * dom/Node.h:
2194         (Node):
2195         * dom/NodeRenderingContext.cpp:
2196         (WebCore::isRendererReparented):
2197         (WebCore::NodeRenderingContext::previousRenderer):
2198         (WebCore::NodeRenderingContext::parentRenderer):
2199         * rendering/RenderLayer.cpp:
2200         (WebCore::RenderLayer::isInTopLayer):
2201         (WebCore::RenderLayer::rebuildZOrderLists):
2202
2203 2013-01-23  Dmitry Gozman  <dgozman@chromium.org>
2204
2205         Web Inspector: allow user to resize inspector window by dragging the toolbar
2206         https://bugs.webkit.org/show_bug.cgi?id=107648
2207
2208         Reviewed by Pavel Feldman.
2209
2210         This did not work before you click dock button once.
2211         Also, last drag position was not respected.
2212
2213         No new tests, because of pure inspector UI change.
2214
2215         * inspector/front-end/DockController.js:
2216         (WebInspector.DockController.prototype.isDockedToBottom):
2217         * inspector/front-end/Toolbar.js:
2218         (WebInspector.Toolbar.prototype._isDockedToBottom):
2219         (WebInspector.Toolbar.prototype._toolbarDragStart):
2220         (WebInspector.Toolbar.prototype._toolbarDragEnd):
2221         (WebInspector.Toolbar.prototype._toolbarDrag):
2222
2223 2013-01-23  Shinya Kawanaka  <shinyak@chromium.org>
2224
2225         shadowAncestorNode() should be renamed to deprecatedShadowAncestorNode()
2226         https://bugs.webkit.org/show_bug.cgi?id=107624
2227
2228         Reviewed by Dimitri Glazkov.
2229
2230         Since Node::shadowAncestorNode() is deprecated, we would like to rename it to prevent from further use.
2231
2232         No new tests, simple refactoring.
2233
2234         * WebCore.order:
2235         * accessibility/AccessibilityRenderObject.cpp:
2236         (WebCore::AccessibilityRenderObject::accessibilityHitTest):
2237         * dom/Document.cpp:
2238         (WebCore::Document::handleZeroPadding):
2239         * dom/Node.cpp:
2240         (WebCore::Node::deprecatedShadowAncestorNode):
2241         * dom/Node.h:
2242         (Node):
2243         * editing/Editor.cpp:
2244         (WebCore::Editor::rangeOfString):
2245         (WebCore::Editor::countMatchesForText):
2246         * editing/ReplaceSelectionCommand.cpp:
2247         (WebCore::ReplacementFragment::ReplacementFragment):
2248         * page/DragController.cpp:
2249         (WebCore::elementUnderMouse):
2250         * page/EventHandler.cpp:
2251         (WebCore::EventHandler::handleMouseReleaseEvent):
2252         (WebCore::EventHandler::bestClickableNodeForTouchPoint):
2253         * page/FocusController.cpp:
2254         (WebCore::clearSelectionIfNeeded):
2255         * platform/blackberry/RenderThemeBlackBerry.cpp:
2256         (WebCore::RenderThemeBlackBerry::paintSearchFieldCancelButton):
2257         * rendering/HitTestResult.cpp:
2258         (WebCore::HitTestResult::setToNonShadowAncestor):
2259         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
2260
2261 2013-01-22  Pavel Feldman  <pfeldman@chromium.org>
2262
2263         Web Inspector: only allow evaluateForTestInFrontend for front-ends under test.
2264         https://bugs.webkit.org/show_bug.cgi?id=107523
2265
2266         Reviewed by Yury Semikhatsky.
2267
2268         * inspector/InspectorController.cpp:
2269         (WebCore::InspectorController::InspectorController):
2270         (WebCore::InspectorController::isUnderTest):
2271         (WebCore):
2272         (WebCore::InspectorController::evaluateForTestInFrontend):
2273         * inspector/InspectorController.h:
2274         (InspectorController):
2275         * inspector/InspectorFrontendClient.h:
2276         (InspectorFrontendClient):
2277         * inspector/InspectorFrontendClientLocal.cpp:
2278         (WebCore::InspectorFrontendClientLocal::canAttachWindow):
2279         (WebCore::InspectorFrontendClientLocal::isUnderTest):
2280         (WebCore):
2281         * inspector/InspectorFrontendClientLocal.h:
2282         (InspectorFrontendClientLocal):
2283         * inspector/InspectorFrontendHost.cpp:
2284         (WebCore::InspectorFrontendHost::isUnderTest):
2285         (WebCore):
2286         * inspector/InspectorFrontendHost.h:
2287         (InspectorFrontendHost):
2288         * inspector/InspectorFrontendHost.idl:
2289         * inspector/front-end/DOMExtension.js:
2290         * inspector/front-end/InspectorFrontendHostStub.js:
2291         (.WebInspector.InspectorFrontendHostStub.prototype.canInspectWorkers):
2292         (.WebInspector.InspectorFrontendHostStub.prototype.isUnderTest):
2293         * inspector/front-end/TestController.js:
2294         (.invokeMethod):
2295         (WebInspector.evaluateForTestInFrontend):
2296         * inspector/front-end/externs.js:
2297
2298 2013-01-23  Andrey Lushnikov  <lushnikov@chromium.org>
2299
2300         Web Inspector: remove invisibleLineRow code from paintLines DTE method
2301         https://bugs.webkit.org/show_bug.cgi?id=107649
2302
2303         Reviewed by Pavel Feldman.
2304
2305         Remove invisibleLineRow logic from TextEditorMainPanel._paintLines method.
2306
2307         No new tests: no change in behaviour.
2308
2309         * inspector/front-end/DefaultTextEditor.js:
2310         (WebInspector.TextEditorMainPanel.prototype._paintLines):
2311
2312 2013-01-23  Rafael Weinstein  <rafaelw@chromium.org>
2313
2314         REGRESSION(r140101): caused debug asserts in fast/forms/associated-element-crash.html and html5lib/run-template.html
2315         https://bugs.webkit.org/show_bug.cgi?id=107237
2316
2317         Reviewed by Adam Barth.
2318
2319         No new tests needed.
2320
2321         When the parser foster-parent's a node out of a table context and the foster parent is a template element, set the Task.parent
2322         to be the template element's content, rather than the element itself. This ensures the foster-parented node isn't errorenously
2323         reparented.
2324
2325         * html/parser/HTMLConstructionSite.cpp:
2326         (WebCore::HTMLConstructionSite::findFosterSite):
2327
2328 2013-01-23  Yury Semikhatsky  <yurys@chromium.org>
2329
2330         Web Inspector: heap profiler shows nodes with distance 0
2331         https://bugs.webkit.org/show_bug.cgi?id=107425
2332
2333         Reviewed by Pavel Feldman.
2334
2335         "Document DOM tree" entities now have distance 1. So if there is a DOM
2336         wrapper that is not referenced from javascript it will anyways be shown
2337         in the heap snapshot and will have distance 2. Also such DOM wrappers
2338         are considered to be reachable from user roots (e.g. global Window objects)
2339         otherwice they are not event shown in the heap snapshots.
2340
2341         * inspector/front-end/HeapSnapshot.js:
2342         (WebInspector.HeapSnapshot.prototype.distanceForUserRoot):
2343         (WebInspector.HeapSnapshot.prototype._calculateDistances):
2344         * inspector/front-end/JSHeapSnapshot.js:
2345         (WebInspector.JSHeapSnapshot.prototype.distanceForUserRoot): distance for 
2346         "(Document DOM trees)" is set to 0 to make sure distance of "Ddocument DOM tree" is 1.
2347         (WebInspector.JSHeapSnapshot.prototype._markPageOwnedNodes):
2348         (WebInspector.JSHeapSnapshotNode.prototype.isDocumentDOMTreesRoot):
2349
2350 2013-01-23  Adrian Perez de Castro  <aperez@igalia.com>
2351
2352         [GStreamer] Add Opus MIME type to the list of supported ones
2353         https://bugs.webkit.org/show_bug.cgi?id=98759
2354
2355         Reviewed by Philippe Normand.
2356
2357         GStreamer has support for the Opus codec (http://opus-codec.org) by
2358         using a plugin present in the "gst-plugins-bad" repository. Opus
2359         streams may be embedded in a Ogg container, or standalone. The case
2360         of the Ogg container is already covered by the "*/ogg" MIME types
2361         declared as supported by the GStreamer media playing code, but for
2362         standalone streams to work, "audio/opus" has to be added.
2363
2364         With this, and the needed GStreamer plugin installed, the GTK+
2365         launcher is able to correctly play the example streams from
2366         http://opus-codec.org/examples
2367
2368         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2369
2370 2013-01-23  Takashi Sakamoto  <tasak@google.com>
2371
2372         [Refactoring] Remove elementParentStyle from SelectorCheckerContext
2373         https://bugs.webkit.org/show_bug.cgi?id=107496
2374
2375         Reviewed by Darin Adler.
2376
2377         Since childrenAffectedBy bits were moved from RenderStyle to element,
2378         now elementParentStyle is not used in SelectorChecker and
2379         StyleResolver. We should remove the member varaiable from
2380         SelectorCheckerContext.
2381
2382         No new tests, because just refactoring.
2383
2384         * css/SelectorChecker.cpp:
2385         (WebCore::SelectorChecker::match):
2386         * css/SelectorChecker.h:
2387         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
2388         (SelectorCheckingContext):
2389         * css/StyleResolver.cpp:
2390         (WebCore::StyleResolver::ruleMatches):
2391         Removed elementParentStyle.
2392
2393 2013-01-23  Andreas Kling  <akling@apple.com>
2394
2395         Pass CSSSelector pointers around as const after parsing stage.
2396         <http://webkit.org/b/107645>
2397
2398         Reviewed by Antti Koivisto.
2399
2400         Have CSSSelectorList vend const CSSSelector* and make the style resolution code
2401         operate on const pointers instead.
2402
2403         This gives us some compile-time confidence that nobody is changing the selectors
2404         after we've parsed them.
2405
2406         * css/CSSSelector.cpp:
2407         (WebCore::CSSSelector::operator==):
2408         (WebCore::CSSSelector::selectorText):
2409         (WebCore::CSSSelector::parseNth):
2410         (WebCore::CSSSelector::matchNth):
2411         * css/CSSSelector.h:
2412         (CSSSelector):
2413         (WebCore::CSSSelector::tagHistory):
2414         (WebCore::CSSSelector::selectorList):
2415         * css/CSSSelectorList.cpp:
2416         (WebCore::CSSSelectorList::selectorsText):
2417         (WebCore::forEachTagSelector):
2418         (WebCore::forEachSelector):
2419         (WebCore::SelectorNeedsNamespaceResolutionFunctor::operator()):
2420         (WebCore::SelectorHasInvalidSelectorFunctor::operator()):
2421         * css/CSSSelectorList.h:
2422         (WebCore::CSSSelectorList::first):
2423         (CSSSelectorList):
2424         (WebCore::CSSSelectorList::selectorAt):
2425         (WebCore::CSSSelectorList::indexOfNextSelectorAfter):
2426         (WebCore::CSSSelectorList::next):
2427         * css/CSSStyleRule.cpp:
2428         (WebCore::CSSStyleRule::generateSelectorText):
2429         * css/RuleSet.cpp:
2430         (WebCore::selectorListContainsUncommonAttributeSelector):
2431         (WebCore::collectFeaturesFromRuleData):
2432         * css/RuleSet.h:
2433         (WebCore::RuleData::selector):
2434         (WebCore::RuleSet::RuleSetSelectorPair::RuleSetSelectorPair):
2435         (RuleSetSelectorPair):
2436         * css/SelectorChecker.cpp:
2437         (WebCore::SelectorChecker::matches):
2438         (WebCore::SelectorChecker::match):
2439         (WebCore::SelectorChecker::checkOne):
2440         (WebCore::SelectorChecker::checkScrollbarPseudoClass):
2441         (WebCore::SelectorChecker::determineLinkMatchType):
2442         * css/SelectorChecker.h:
2443         (WebCore::SelectorChecker::SelectorCheckingContext::SelectorCheckingContext):
2444         (SelectorCheckingContext):
2445         (SelectorChecker):
2446         * css/StyleInvalidationAnalysis.cpp:
2447         (WebCore::determineSelectorScopes):
2448         * css/StyleResolver.cpp:
2449         (WebCore::StyleResolver::collectMatchingRulesForRegion):
2450         (WebCore::StyleResolver::checkRegionSelector):
2451         * css/StyleResolver.h:
2452         (StyleResolver):
2453         * dom/SelectorQuery.cpp:
2454         (WebCore::SelectorDataList::initialize):
2455         (WebCore::SelectorDataList::execute):
2456         * dom/SelectorQuery.h:
2457         (WebCore::SelectorDataList::SelectorData::SelectorData):
2458         (SelectorData):
2459         * html/shadow/ContentDistributor.cpp:
2460         (WebCore::ContentDistributor::collectSelectFeatureSetFrom):
2461         * html/shadow/ContentSelectorQuery.cpp:
2462         (WebCore::ContentSelectorChecker::checkContentSelector):
2463         (WebCore::ContentSelectorDataList::initialize):
2464         * html/shadow/ContentSelectorQuery.h:
2465         (ContentSelectorChecker):
2466         (ContentSelectorDataList):
2467         * html/shadow/HTMLContentElement.cpp:
2468         (WebCore::validateSubSelector):
2469         (WebCore::validateSelector):
2470         (WebCore::HTMLContentElement::validateSelect):
2471         * inspector/InspectorCSSAgent.cpp:
2472         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
2473         * inspector/InspectorStyleSheet.cpp:
2474         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
2475
2476 2013-01-23  Sergio Villar Senin  <svillar@igalia.com>
2477
2478         [GTK] Unreviewed build fix after r140518.
2479
2480         * GNUmakefile.list.am: rename TextureMapperShaderManager to
2481         TextureMapperShaderProgram.
2482
2483 2013-01-23  Yoshifumi Inoue  <yosin@chromium.org>
2484
2485         REGRESSION(r139044): Pan icon remains on screen on Chromium-WinXP
2486         https://bugs.webkit.org/show_bug.cgi?id=107623
2487
2488         Reviewed by Hajime Morita.
2489
2490         The issue is caused by AutoscrollController::stopAutoscrollTimer()
2491         doesn't call View::removePanScrollIcon() because m_autoscrollType
2492         is reset before checking it.
2493
2494         This patch changes to reset m_autoscrollType after all references.
2495
2496         Test: platform/chromium-win/fast/events/panScroll-panIcon.html
2497
2498         * page/AutoscrollController.cpp:
2499         (WebCore::AutoscrollController::stopAutoscrollTimer):
2500
2501 2013-01-23  Sergio Villar Senin  <svillar@igalia.com>
2502
2503         REGRESSION(r140338): WebKitGtk+ trying to allocate a buffer too big
2504         https://bugs.webkit.org/show_bug.cgi?id=107646
2505
2506         Reviewed by Carlos Garcia Campos.
2507
2508         g_input_stream_skip_async() was replaced in r140338 by
2509         g_input_stream_read_async() to workaround a glib buffer. The former
2510         was using G_MAXSSIZE to skip the whole redirect message but we
2511         cannot use it for the latter because it will try to
2512         allocate a buffer of that size. Replaced it by READ_BUFFER_SIZE. No
2513         new tests required, functionality already covered by network tests..
2514
2515         * platform/network/soup/ResourceHandleSoup.cpp:
2516         (WebCore::redirectSkipCallback):
2517         (WebCore::sendRequestCallback):
2518
2519 2013-01-23  Andrey Adaikin  <aandrey@chromium.org>
2520
2521         Web Inspector: use inspectedWindow.document instead of document in InjectedScript
2522         https://bugs.webkit.org/show_bug.cgi?id=107642
2523
2524         Reviewed by Pavel Feldman.
2525
2526         * inspector/InjectedScriptSource.js:
2527         (.):
2528
2529 2013-01-23  Vivek Galatage  <vivek.vg@samsung.com>
2530
2531         xml-stylesheet XSL is not requested with JavaScript disabled
2532         https://bugs.webkit.org/show_bug.cgi?id=103902
2533
2534         Reviewed by Adam Barth.
2535
2536         Currently CachedResourceLoader::canRequest() calls allowScriptFromSource() on
2537         ContentSecurityPolicy and FrameLoaderClient for the given XSLStyleSheet. This
2538         should be restricted to only calling allowScriptFromSource() for the
2539         ContentSecurityPolicy.
2540
2541         Test: http/tests/xsl/xslt-transform-with-javascript-disabled.html
2542
2543         * loader/cache/CachedResourceLoader.cpp:
2544         (WebCore::CachedResourceLoader::canRequest):
2545
2546 2013-01-23  Kentaro Hara  <haraken@chromium.org>
2547
2548         [V8] Remove if(isolate) checks from v8String() and v8Integer()
2549         https://bugs.webkit.org/show_bug.cgi?id=107540
2550
2551         Reviewed by Adam Barth.
2552
2553         Now there is no optional Isolate parameter in the code base
2554         (except for throwError()). We can safely remove if(isolate) checks
2555         from v8String() and v8Integer().
2556
2557         div.id:       17.8 ns => 17.8 ns (no performance change)
2558         div.nodeType:  9.7 ns =>  8.9 ns (+8.9% performance improvement)
2559
2560         No tests. No change in behavior.
2561
2562         * bindings/v8/ScriptDebugServer.cpp:
2563         (WebCore::ScriptDebugServer::handleV8DebugEvent):
2564         * bindings/v8/V8Binding.h:
2565         (WebCore::v8String):
2566         (WebCore::v8Integer):
2567         * bindings/v8/V8WindowErrorHandler.cpp:
2568         (WebCore::V8WindowErrorHandler::callListenerFunction):
2569         * bindings/v8/V8WorkerContextErrorHandler.cpp:
2570         (WebCore::V8WorkerContextErrorHandler::callListenerFunction):
2571
2572 2013-01-23  Hajime Morrita  <morrita@google.com>
2573
2574         Invalidated SVG shadow tree should be always detached.
2575         https://bugs.webkit.org/show_bug.cgi?id=107634
2576
2577         Reviewed by Ryosuke Niwa.
2578
2579         SVGUseElement::clearResourceReferences() uses removeAllChildren() for
2580         clearing its shadow DOM, but this is wrong.
2581         removeAllChildren() is designed for removing children of an out-of-document Node.
2582         For efficiency, it skips a series of cleanup sequences like detach().
2583
2584         For removing SVG shadow tree which is in Document, removeChildren() should be used.
2585         It does proper cleanup for the chilren.
2586
2587         Test: svg/custom/use-invalidate-click-crash.xhtml
2588
2589         * svg/SVGUseElement.cpp:
2590         (WebCore::SVGUseElement::clearResourceReferences):
2591
2592 2013-01-23  Huang Dongsung  <luxtella@company100.net>
2593
2594         [TexMap] Don't call GraphicsLayer::setNeedsDisplay() from TextureMapperLayer.
2595         https://bugs.webkit.org/show_bug.cgi?id=107629
2596
2597         Reviewed by Noam Rosenthal.
2598
2599         We are removing the dependency on GraphicsLayer from TextureMapperLayer.
2600
2601         This is in preparation for refactoring TextureMapper to work in an actor
2602         model (http://webkit.org/b/103854).
2603
2604         No new tests, refactoring only.
2605
2606         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2607         (WebCore::GraphicsLayerTextureMapper::setDrawsContent):
2608         * platform/graphics/texmap/TextureMapperLayer.cpp:
2609         (WebCore::TextureMapperLayer::flushCompositingStateForThisLayerOnly):
2610
2611 2013-01-23  No'am Rosenthal  <noam@webkit.org>
2612
2613         [Texmap] Rename TextureMapperShaderManager.* TextureMapperShaderProgram.*
2614         https://bugs.webkit.org/show_bug.cgi?id=105847
2615
2616         TextureMapperShaderManager contains very little "manager" code.
2617         Moved the map of shaders to TextureMapperGL, and renamed the files containing
2618         the shader implementation TextureMapperShaderProgram.cpp|h.
2619
2620         Reviewed by Kenneth Rohde Christiansen.
2621
2622         No new tests - renames/refactors only.
2623
2624         * GNUmakefile.list.am:
2625         * PlatformEfl.cmake:
2626         * Target.pri:
2627         * platform/graphics/texmap/TextureMapperGL.cpp:
2628         (WebCore::TextureMapperGLData::SharedGLData::getShaderProgram):
2629                 This function is copied from TextureMapperShaderManager.
2630         (SharedGLData):
2631         (WebCore::TextureMapperGLData::SharedGLData::SharedGLData):
2632         (WebCore::TextureMapperGL::drawBorder):
2633         (WebCore::TextureMapperGL::drawTexture):
2634         (WebCore::TextureMapperGL::drawSolidColor):
2635         (WebCore::optionsForFilterType):
2636         (WebCore::TextureMapperGL::drawFiltered):
2637         (WebCore::TextureMapperGL::beginClip):
2638         * platform/graphics/texmap/TextureMapperShaderProgram.cpp: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.cpp.
2639         (WebCore):
2640         (WebCore::compositingLogEnabled):
2641         (WebCore::TextureMapperShaderProgram::TextureMapperShaderProgram):
2642         (WebCore::TextureMapperShaderProgram::setMatrix):
2643         (WebCore::TextureMapperShaderProgram::getLocation):
2644         (WebCore::TextureMapperShaderProgram::~TextureMapperShaderProgram):
2645         (WebCore::TextureMapperShaderProgram::create):
2646         * platform/graphics/texmap/TextureMapperShaderProgram.h: Renamed from Source/WebCore/platform/graphics/texmap/TextureMapperShaderManager.h.
2647         (WebCore):
2648         (TextureMapperShaderProgram):
2649         (WebCore::TextureMapperShaderProgram::programID):
2650         (WebCore::TextureMapperShaderProgram::context):
2651
2652 2013-01-23  Kentaro Hara  <haraken@chromium.org>
2653
2654         [V8] Make an Isolate parameter mandatory in throwError()
2655         https://bugs.webkit.org/show_bug.cgi?id=107636
2656
2657         Reviewed by Adam Barth.
2658
2659         No tests. No change in behavior.
2660
2661         * bindings/v8/NPV8Object.cpp:
2662         (_NPN_SetException):
2663         * bindings/v8/V8Binding.cpp:
2664         (WebCore::handleMaxRecursionDepthExceeded):
2665         * bindings/v8/V8Binding.h:
2666         (WebCore):
2667         * bindings/v8/WorkerScriptController.cpp:
2668         (WebCore::WorkerScriptController::evaluate):
2669         (WebCore::WorkerScriptController::setException):
2670
2671 2013-01-22  Kentaro Hara  <haraken@chromium.org>
2672
2673         [V8] Make an Isolate parameter mandatory in throwTypeError()
2674         https://bugs.webkit.org/show_bug.cgi?id=107632
2675
2676         Reviewed by Adam Barth.
2677
2678         No tests. No change in behavior.
2679
2680         * bindings/scripts/CodeGeneratorV8.pm:
2681         (GenerateParametersCheck):
2682         (GenerateConstructorHeader):
2683         (JSValueToNative):
2684         * bindings/scripts/test/V8/V8TestEventConstructor.cpp:
2685         (WebCore::V8TestEventConstructor::constructorCallback):
2686         * bindings/scripts/test/V8/V8TestInterface.cpp:
2687         (WebCore::V8TestInterface::constructorCallback):
2688         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
2689         (WebCore::V8TestNamedConstructorConstructorCallback):
2690         * bindings/scripts/test/V8/V8TestNode.cpp:
2691         (WebCore::V8TestNode::constructorCallback):
2692         * bindings/scripts/test/V8/V8TestObj.cpp:
2693         (WebCore::TestObjV8Internal::methodWithSequenceArgCallback):
2694         (WebCore::V8TestObj::constructorCallback):
2695         * bindings/scripts/test/V8/V8TestOverloadedConstructors.cpp:
2696         (WebCore::V8TestOverloadedConstructors::constructorCallback):
2697         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2698         (WebCore::TestSerializedScriptValueInterfaceV8Internal::acceptTransferListCallback):
2699         (WebCore::TestSerializedScriptValueInterfaceV8Internal::multiTransferListCallback):
2700         (WebCore::V8TestSerializedScriptValueInterface::constructorCallback):
2701         * bindings/v8/V8Binding.h:
2702         (WebCore):
2703         (WebCore::toRefPtrNativeArray):
2704         (WebCore::toV8Sequence):
2705         * bindings/v8/V8NodeFilterCondition.cpp:
2706         (WebCore::V8NodeFilterCondition::acceptNode):
2707         * bindings/v8/V8Utilities.cpp:
2708         (WebCore::extractTransferables):
2709         (WebCore::getMessagePortArray):
2710
2711 2013-01-22  Matt Falkenhagen  <falken@chromium.org>
2712
2713         20% regression on dom_perf/DomDivWalk
2714         https://bugs.webkit.org/show_bug.cgi?id=106726
2715
2716         Reviewed by Hajime Morita.
2717
2718         This patch moves the checks in Element::removedFrom for Fullscreen and top layer flags
2719         into a slow path. The idea is for the two checks for Fullscreen and top layer
2720         to be replaced by one faster check in the fast path.
2721
2722         The plan is to migrate the Fullscreen implementation to use top layer, so this is just a
2723         short-term fix for the perf regression.
2724
2725         No new tests: no functionality change
2726
2727         * dom/Element.cpp:
2728         (WebCore::Element::removedFrom): Create a slow path to move the Fullscreen and top layer checks into.
2729         * dom/Node.cpp:
2730         (WebCore::Node::setIsInTopLayer): To allow for cleaner code in Element::removedFrom, define
2731         setIsInTopLayer and isInTopLayer even when the feature flag is off.
2732         * dom/Node.h:
2733         (WebCore::Node::isInTopLayer): Ditto.
2734         (Node):
2735
2736 2013-01-22  Mark Lam  <mark.lam@apple.com>
2737
2738         Change the Supplementable class to not use AtomicString.
2739         https://bugs.webkit.org/show_bug.cgi?id=107535.
2740
2741         Reviewed by Adam Barth.
2742
2743         Replaced the use of AtomicString keys with literal const char* keys.
2744         This simplifies the SupplementMap and makes it slightly leaner and faster.
2745
2746         No new tests.
2747
2748         * Modules/battery/BatteryController.cpp:
2749         (WebCore::BatteryController::supplementName):
2750         * Modules/battery/BatteryController.h:
2751         (BatteryController):
2752         * Modules/battery/NavigatorBattery.cpp:
2753         (WebCore::NavigatorBattery::supplementName):
2754         (WebCore):
2755         (WebCore::NavigatorBattery::from):
2756         * Modules/battery/NavigatorBattery.h:
2757         (NavigatorBattery):
2758         * Modules/filesystem/chromium/DraggedIsolatedFileSystem.cpp:
2759         (WebCore::DraggedIsolatedFileSystem::supplementName):
2760         * Modules/filesystem/chromium/DraggedIsolatedFileSystem.h:
2761         (DraggedIsolatedFileSystem):
2762         * Modules/gamepad/NavigatorGamepad.cpp:
2763         (WebCore::NavigatorGamepad::supplementName):
2764         (WebCore):
2765         (WebCore::NavigatorGamepad::from):
2766         * Modules/gamepad/NavigatorGamepad.h:
2767         (NavigatorGamepad):
2768         * Modules/geolocation/GeolocationController.cpp:
2769         (WebCore::GeolocationController::supplementName):
2770         * Modules/geolocation/GeolocationController.h:
2771         (GeolocationController):
2772         * Modules/geolocation/NavigatorGeolocation.cpp:
2773         (WebCore::NavigatorGeolocation::supplementName):
2774         (WebCore):
2775         (WebCore::NavigatorGeolocation::from):
2776         * Modules/geolocation/NavigatorGeolocation.h:
2777         (NavigatorGeolocation):
2778         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
2779         (WebCore::DOMWindowIndexedDatabase::supplementName):
2780         (WebCore):
2781         (WebCore::DOMWindowIndexedDatabase::from):
2782         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
2783         (DOMWindowIndexedDatabase):
2784         * Modules/indexeddb/PageGroupIndexedDatabase.cpp:
2785         (WebCore::PageGroupIndexedDatabase::supplementName):
2786         (WebCore):
2787         (WebCore::PageGroupIndexedDatabase::from):
2788         * Modules/indexeddb/PageGroupIndexedDatabase.h:
2789         (PageGroupIndexedDatabase):
2790         * Modules/indexeddb/WorkerContextIndexedDatabase.cpp:
2791         (WebCore::WorkerContextIndexedDatabase::supplementName):
2792         (WebCore):
2793         (WebCore::WorkerContextIndexedDatabase::from):
2794         * Modules/indexeddb/WorkerContextIndexedDatabase.h:
2795         (WorkerContextIndexedDatabase):
2796         * Modules/intents/DOMWindowIntents.cpp:
2797         (WebCore::DOMWindowIntents::supplementName):
2798         (WebCore):
2799         (WebCore::DOMWindowIntents::from):
2800         * Modules/intents/DOMWindowIntents.h:
2801         (DOMWindowIntents):
2802         * Modules/mediastream/UserMediaController.cpp:
2803         (WebCore::UserMediaController::supplementName):
2804         * Modules/mediastream/UserMediaController.h:
2805         (UserMediaController):
2806         * Modules/navigatorcontentutils/NavigatorContentUtils.cpp:
2807         (WebCore::NavigatorContentUtils::supplementName):
2808         * Modules/navigatorcontentutils/NavigatorContentUtils.h:
2809         (NavigatorContentUtils):
2810         * Modules/networkinfo/NavigatorNetworkInfoConnection.cpp:
2811         (WebCore::NavigatorNetworkInfoConnection::supplementName):
2812         (WebCore):
2813         (WebCore::NavigatorNetworkInfoConnection::from):
2814         * Modules/networkinfo/NavigatorNetworkInfoConnection.h:
2815         (NavigatorNetworkInfoConnection):
2816         * Modules/networkinfo/NetworkInfoController.cpp:
2817         (WebCore::NetworkInfoController::supplementName):
2818         * Modules/networkinfo/NetworkInfoController.h:
2819         (NetworkInfoController):
2820         * Modules/notifications/DOMWindowNotifications.cpp:
2821         (WebCore::DOMWindowNotifications::supplementName):
2822         (WebCore):
2823         (WebCore::DOMWindowNotifications::from):
2824         * Modules/notifications/DOMWindowNotifications.h:
2825         (DOMWindowNotifications):
2826         * Modules/notifications/NotificationController.cpp:
2827         (WebCore::NotificationController::supplementName):
2828         * Modules/notifications/NotificationController.h:
2829         (NotificationController):
2830         * Modules/notifications/WorkerContextNotifications.cpp:
2831         (WebCore::WorkerContextNotifications::supplementName):
2832         (WebCore):
2833         (WebCore::WorkerContextNotifications::from):
2834         * Modules/notifications/WorkerContextNotifications.h:
2835         (WorkerContextNotifications):
2836         * Modules/quota/DOMWindowQuota.cpp:
2837         (WebCore::DOMWindowQuota::supplementName):
2838         (WebCore):
2839         (WebCore::DOMWindowQuota::from):
2840         * Modules/quota/DOMWindowQuota.h:
2841         (DOMWindowQuota):
2842         * Modules/speech/DOMWindowSpeechSynthesis.cpp:
2843         (WebCore::DOMWindowSpeechSynthesis::supplementName):
2844         (WebCore):
2845         (WebCore::DOMWindowSpeechSynthesis::from):
2846         * Modules/speech/DOMWindowSpeechSynthesis.h:
2847         (DOMWindowSpeechSynthesis):
2848         * Modules/speech/SpeechRecognitionController.cpp:
2849         (WebCore::SpeechRecognitionController::supplementName):
2850         * Modules/speech/SpeechRecognitionController.h:
2851         (SpeechRecognitionController):
2852         * Modules/vibration/Vibration.cpp:
2853         (WebCore::Vibration::supplementName):
2854         * Modules/vibration/Vibration.h:
2855         (Vibration):
2856         * Modules/webdatabase/DatabaseContext.cpp:
2857         (WebCore::DatabaseContext::supplementName):
2858         (WebCore):
2859         (WebCore::DatabaseContext::existingDatabaseContextFrom):
2860         (WebCore::DatabaseContext::from):
2861         * Modules/webdatabase/DatabaseContext.h:
2862         (DatabaseContext):
2863         * dom/ContextFeatures.cpp:
2864         (WebCore::ContextFeatures::supplementName):
2865         * dom/ContextFeatures.h:
2866         * dom/DeviceMotionController.cpp:
2867         (WebCore::DeviceMotionController::supplementName):
2868         * dom/DeviceMotionController.h:
2869         (DeviceMotionController):
2870         * dom/DeviceOrientationController.cpp:
2871         (WebCore::DeviceOrientationController::supplementName):
2872         * dom/DeviceOrientationController.h:
2873         (DeviceOrientationController):
2874         * loader/PrerendererClient.cpp:
2875         (WebCore::PrerendererClient::supplementName):
2876         * loader/PrerendererClient.h:
2877         (PrerendererClient):
2878         * page/DOMWindowPagePopup.cpp:
2879         (WebCore::DOMWindowPagePopup::supplementName):
2880         * page/DOMWindowPagePopup.h:
2881         (DOMWindowPagePopup):
2882         * page/SpeechInput.cpp:
2883         (WebCore::SpeechInput::supplementName):
2884         * page/SpeechInput.h:
2885         (SpeechInput):
2886         * platform/RefCountedSupplement.h:
2887         (WebCore::RefCountedSupplement::provideTo):
2888         (WebCore::RefCountedSupplement::from):
2889         * platform/Supplementable.h:
2890         (WebCore):
2891         (WebCore::Supplement::provideTo):
2892         (WebCore::Supplement::from):
2893         (WebCore::Supplementable::provideSupplement):
2894         (WebCore::Supplementable::removeSupplement):
2895         (WebCore::Supplementable::requireSupplement):
2896         (Supplementable):
2897         * testing/InternalSettings.cpp:
2898         (WebCore::InternalSettings::supplementName):
2899         (WebCore):
2900         (WebCore::InternalSettings::from):
2901         * testing/InternalSettings.h:
2902         (InternalSettings):
2903
2904 2013-01-22  Hajime Morrita  <morrita@google.com>
2905
2906         non-ENABLE(DETAILS_ELEMENT) build fails.
2907         https://bugs.webkit.org/show_bug.cgi?id=107626
2908
2909         Reviewed by Kent Tamura.
2910
2911         No new tests, build configuration change.
2912
2913         * rendering/RenderObject.h:
2914         (RenderObject): Added a missing condition.
2915
2916 2013-01-22  Dima Gorbik  <dgorbik@apple.com>
2917
2918         Whitelist should also work for the WebVTT ::cue element without an argument
2919         https://bugs.webkit.org/show_bug.cgi?id=107488
2920
2921         Reviewed by Andreas Kling.
2922         
2923         Apply filtering if the cue shadow pseudoId is set on the selector.
2924
2925         Existing tests were modified to cover this case.
2926
2927         * css/RuleSet.cpp:
2928         (WebCore::determinePropertyWhitelistType):
2929         * html/shadow/MediaControlElements.cpp:
2930         (WebCore::MediaControlTextTrackContainerElement::createSubtrees):
2931         * html/track/TextTrackCue.h:
2932         (WebCore::TextTrackCue::cueShadowPseudoId):
2933
2934 2013-01-22  Hayato Ito  <hayato@chromium.org>
2935
2936         Make MediaQueryEvaluator(bool) constructor explicit.
2937         https://bugs.webkit.org/show_bug.cgi?id=107620
2938
2939         Reviewed by Hajime Morita.
2940
2941         No new tests: no change in behavior.
2942
2943         * css/MediaQueryEvaluator.h:
2944         (MediaQueryEvaluator):
2945
2946 2013-01-22  Anders Carlsson  <andersca@apple.com>
2947
2948         Use a platform strategy for local storage
2949         https://bugs.webkit.org/show_bug.cgi?id=107600
2950
2951         Reviewed by Andreas Kling.
2952
2953         * CMakeLists.txt:
2954         * GNUmakefile.list.am:
2955         * WebCore.exp.in:
2956         * WebCore.gypi:
2957         * WebCore.vcproj/WebCore.vcproj:
2958         * WebCore.xcodeproj/project.pbxproj:
2959         Add new files.
2960
2961         * platform/PlatformStrategies.h:
2962         Add a way to create/get the storage strategy.
2963
2964         * storage/StorageNamespace.cpp:
2965         (WebCore::StorageNamespace::localStorageNamespace):
2966         (WebCore::StorageNamespace::sessionStorageNamespace):
2967         Call the storage strategy.
2968
2969         * storage/StorageNamespace.h:
2970         * storage/StorageStrategy.cpp: Added.
2971         (WebCore::StorageStrategy::localStorageNamespace):
2972         (WebCore::StorageStrategy::sessionStorageNamespace):
2973         Call through to StorageNamespaceImpl.
2974
2975         * storage/StorageStrategy.h: Added.
2976
2977 2013-01-22  Jun Jiang  <jun.a.jiang@intel.com>
2978
2979         Optimize the texture packing for texImage2D() and texSubImage2D() in WebGL
2980         https://bugs.webkit.org/show_bug.cgi?id=105821
2981
2982         Reviewed by Kenneth Russell.
2983
2984         The original texture packing code uses function pointers to denote each unpack and pack operations for different combination of Source formats,
2985         Destination formats and Alpha Operations. It could be made cleaner and simpler. In this patch, template functions are used and try best to avoid
2986         generating useless code for unreachable path to avoid code bloat. Moreover, the flipY operation is moved into the pack operation instead of
2987         operating in a standalone method to improve performance.
2988
2989         Already covered by current test.
2990
2991         * html/canvas/WebGLRenderingContext.cpp:
2992         (WebCore):
2993         (WebCore::WebGLRenderingContext::texImage2DImpl):
2994         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
2995         * platform/graphics/GraphicsContext3D.cpp:
2996         (WebCore::GraphicsContext3D::packImageData):
2997         (WebCore::GraphicsContext3D::extractImageData):
2998         (WebCore::GraphicsContext3D::extractTextureData):
2999         (WebCore):
3000         (WebCore::GraphicsContext3D::packPixels):
3001         * platform/graphics/GraphicsContext3D.h:
3002         (WebCore::GraphicsContext3D::srcFormatComeFromDOMElementOrImageData):
3003         (GraphicsContext3D):
3004         (WebCore::GraphicsContext3D::ImageExtractor::imageSourceFormat):
3005         (ImageExtractor):
3006         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
3007         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3008         * platform/graphics/cg/GraphicsContext3DCG.cpp:
3009         (WebCore::getSourceDataFormat):
3010         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3011         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
3012         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3013         * platform/graphics/qt/GraphicsContext3DQt.cpp:
3014         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3015         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
3016         (WebCore::GraphicsContext3D::ImageExtractor::extractImage):
3017
3018 2013-01-21  Kentaro Hara  <haraken@chromium.org>
3019
3020         Implement UIEvent constructor
3021         https://bugs.webkit.org/show_bug.cgi?id=107430
3022
3023         Reviewed by Adam Barth.
3024
3025         Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm
3026
3027         UIEvent constructor is implemented under a DOM4_EVENTS_CONSTRUCTOR flag,
3028         which is enabled on Safari and Chromium for now.
3029
3030         Test: fast/events/constructors/ui-event-constructor.html
3031
3032         * Configurations/FeatureDefines.xcconfig:
3033         * bindings/scripts/CodeGeneratorV8.pm:
3034         (GenerateHeader):
3035         * bindings/scripts/test/V8/V8TestInterface.h:
3036         (V8TestInterface):
3037         * dom/UIEvent.cpp:
3038         (WebCore::UIEventInit::UIEventInit):
3039         (WebCore):
3040         (WebCore::UIEvent::UIEvent):
3041         * dom/UIEvent.h:
3042         (WebCore):
3043         (UIEventInit):
3044         (UIEvent):
3045         (WebCore::UIEvent::create):
3046         (WebCore::UIEvent::view):
3047         (WebCore::UIEvent::detail):
3048         (FocusInEventDispatchMediator):
3049         (FocusOutEventDispatchMediator):
3050         * dom/UIEvent.idl:
3051
3052 2013-01-22  Joshua Bell  <jsbell@chromium.org>
3053
3054         IndexedDB: Remove IDBKey from WebKitIDL
3055         https://bugs.webkit.org/show_bug.cgi?id=97375
3056
3057         Reviewed by Kentaro Hara.
3058
3059         Now that references to the artificial IDBKey type have been removed from all IDLs, remove
3060         the support code, and move the conversion code into the IDBBindingUtilities. Removes
3061         references to the autogenerated {V8,JS}IDBKey{Custom,}.{cpp,h} from the project files.
3062
3063         No new tests - just code moves/removing unused code. Updated binding reference test results.
3064
3065         * CMakeLists.txt:
3066         * DerivedSources.cpp:
3067         * DerivedSources.make:
3068         * DerivedSources.pri:
3069         * GNUmakefile.list.am:
3070         * Modules/indexeddb/IDBKey.idl: Removed.
3071         * Target.pri:
3072         * UseJSC.cmake:
3073         * UseV8.cmake:
3074         * WebCore.gypi:
3075         * WebCore.vcproj/WebCore.vcproj:
3076         * WebCore.xcodeproj/project.pbxproj:
3077         * bindings/js/IDBBindingUtilities.cpp:
3078         (WebCore::toJS): Moved here from JSIDBKeyCustom.cpp
3079         (WebCore):
3080         * bindings/js/JSIDBKeyCustom.cpp: Removed.
3081         * bindings/scripts/CodeGeneratorJS.pm:
3082         (JSValueToNative):
3083         * bindings/scripts/CodeGeneratorV8.pm:
3084         (GenerateFunctionCallString):
3085         (GetNativeType):
3086         (JSValueToNative):
3087         * bindings/scripts/test/CPP/WebDOMTestObj.cpp:
3088         * bindings/scripts/test/CPP/WebDOMTestObj.h:
3089         * bindings/scripts/test/GObject/WebKitDOMTestObj.cpp:
3090         * bindings/scripts/test/GObject/WebKitDOMTestObj.h:
3091         * bindings/scripts/test/JS/JSTestObj.cpp:
3092         * bindings/scripts/test/JS/JSTestObj.h:
3093         * bindings/scripts/test/ObjC/DOMTestObj.h:
3094         * bindings/scripts/test/ObjC/DOMTestObj.mm:
3095         * bindings/scripts/test/TestObj.idl: Removed IDBKey-specific test.
3096         * bindings/scripts/test/V8/V8TestObj.cpp:
3097         * bindings/v8/IDBBindingUtilities.cpp:
3098         (WebCore::toV8): Moved here from V8IDBKeyCustom.cpp
3099         (WebCore):
3100         * bindings/v8/custom/V8IDBKeyCustom.cpp: Removed.
3101
3102 2013-01-22  Tony Gentilcore  <tonyg@chromium.org>
3103
3104         Fix assertions in make8BitFrom16BitSource() with threaded parser
3105         https://bugs.webkit.org/show_bug.cgi?id=107596
3106
3107         Reviewed by Adam Barth.
3108
3109         This fixes an assertion in several fast/parser tests. We need to keep track of whether the data is all 8bit.
3110         Luckily this doesn't cost us any size on CompactHTMLToken because the bitfields are collapsed (verified by COMPILE_ASSERT).
3111
3112         No new tests because covered by existing fast/parser tests.
3113
3114         * html/parser/CompactHTMLToken.cpp:
3115         (WebCore::CompactHTMLToken::CompactHTMLToken):
3116         * html/parser/CompactHTMLToken.h:
3117         (WebCore::CompactHTMLToken::isAll8BitData):
3118         (CompactHTMLToken):
3119         * html/parser/HTMLToken.h:
3120         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
3121
3122 2013-01-22  Tony Gentilcore  <tonyg@chromium.org>
3123
3124         Fix ASSERT(!hasInsertionPoint()) in threaded HTML parser
3125         https://bugs.webkit.org/show_bug.cgi?id=107593
3126
3127         Reviewed by Adam Barth.
3128
3129         Prior to this patch, several fast/parser tests hit ASSERT(!hasInsertionPoint()) in prepareToStopParsing().
3130         That was because hasInsertionPoint() checks m_input.haveSeenEndOfFile() which was skipped for the threaded
3131         parser case. This patch causes us to call markEndOfFile().
3132
3133         No new tests because covered by existing fast/parser tests.
3134
3135         * html/parser/HTMLDocumentParser.cpp:
3136         (WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser): This FIXME was done in a previous patch.
3137         (WebCore::HTMLDocumentParser::finish):
3138
3139 2013-01-22  Joshua Bell  <jsbell@chromium.org>
3140
3141         Prevent race condition during Worker shutdown
3142         https://bugs.webkit.org/show_bug.cgi?id=107577
3143
3144         Reviewed by Dmitry Titov.
3145
3146         During worker shutdown, from the main thread a cleanup task is posted followed by
3147         terminating the message queue, which prevents further tasks from being processed. It was
3148         possible for another task be posted by another thread between the main thread calls
3149         to postTask and terminate(), which would cause that task to run after cleanup. Expose
3150         a new WTF::MessageQueue::appendAndKill() method which keeps a mutex around the two steps,
3151         and use that during worker shutdown.
3152
3153         No reliable tests for the race - problem identified by inspection of user crash stacks.
3154
3155         * workers/WorkerRunLoop.cpp:
3156         (WebCore::WorkerRunLoop::postTaskAndTerminate): New method, uses MessageQueue::appendAndKill()
3157         * workers/WorkerRunLoop.h:
3158         * workers/WorkerThread.cpp:
3159         (WebCore::WorkerThread::stop): Uses postTaskAndTerminate() to avoid race.
3160
3161 2013-01-22  Tony Chang  <tony@chromium.org>
3162
3163         Unreviewed, rolling out r140171.
3164         http://trac.webkit.org/changeset/140171
3165         https://bugs.webkit.org/show_bug.cgi?id=107193
3166
3167         Regressed scrollable region size in other cases.
3168
3169         * rendering/RenderBlock.cpp:
3170         (WebCore::RenderBlock::simplifiedLayout):
3171
3172 2013-01-22  Alexey Proskuryakov  <ap@apple.com>
3173
3174         [WK2] WebProcessService is not terminated when page is closed
3175         https://bugs.webkit.org/show_bug.cgi?id=107595
3176
3177         Reviewed by Anders Carlsson.
3178
3179         * platform/mac/RunLoopMac.mm: (WebCore::RunLoop::stop): Allow stopping XPC service
3180         run loop. Also, harmonized NSApp vs. [NSApplication sharedApplication] usage.
3181
3182 2013-01-22  Ojan Vafai  <ojan@chromium.org>
3183
3184         REGRESION(r130774): preferred width of tables does not take max-width into account
3185         https://bugs.webkit.org/show_bug.cgi?id=107576
3186
3187         Reviewed by Tony Chang.
3188
3189         Constrain preferred widths by min/max the way we do in other
3190         RenderBlock subclasses. Eventually, we'll shared the code with
3191         RenderBlock, but this is an incremental step in that direction
3192         that we can safely merge into release branches.
3193
3194         Test: fast/table/min-max-width-preferred-size.html
3195
3196         * rendering/RenderTable.cpp:
3197         (WebCore::RenderTable::computePreferredLogicalWidths):
3198
3199 2013-01-22  Adam Barth  <abarth@webkit.org>
3200
3201         The BackgroundHTMLParser shouldn't pause when waiting for scripts
3202         https://bugs.webkit.org/show_bug.cgi?id=107584
3203
3204         Reviewed by Eric Seidel.
3205
3206         Previously, the BackgroundHTMLParser would pause itself when it
3207         encountered a scrip tag and wait for a signal from the main thread to
3208         continue. After this patch, the BackgroundHTMLParser continues ahead
3209         and the main thread keeps a queue of pending tokens.
3210
3211         This patch brings us closer to speculative parsing because when the
3212         BackgroundHTMLParser is continuing ahead, it is speculating that it is
3213         in the correct state. A future patch will let us abort incorret
3214         speculations and resume from an eariler point in the input stream.
3215
3216         * html/parser/BackgroundHTMLParser.cpp:
3217         (WebCore::checkThatTokensAreSafeToSendToAnotherThread):
3218         (WebCore::BackgroundHTMLParser::BackgroundHTMLParser):
3219         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
3220         (WebCore::BackgroundHTMLParser::pumpTokenizer):
3221         (WebCore::TokenDelivery::TokenDelivery):
3222         (TokenDelivery):
3223         (WebCore::TokenDelivery::execute):
3224         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
3225         * html/parser/BackgroundHTMLParser.h:
3226         (BackgroundHTMLParser):
3227         * html/parser/CompactHTMLToken.h:
3228         (WebCore):
3229         * html/parser/HTMLDocumentParser.cpp:
3230         (WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser):
3231         (WebCore):
3232         (WebCore::HTMLDocumentParser::processTokensFromBackgroundParser):
3233         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
3234         * html/parser/HTMLDocumentParser.h:
3235         (HTMLDocumentParser):
3236
3237 2013-01-22  Simon Fraser  <simon.fraser@apple.com>
3238
3239         Fix scrollperf logging
3240         https://bugs.webkit.org/show_bug.cgi?id=107589
3241
3242         Reviewed by Tim Horton.
3243
3244         The scrollperf logging had two issues:
3245
3246         1. It relied on a paint logging a "filled" event, but it's possible
3247         for existing tiles to be moved into the viewport and filling it, so
3248         we need to log from the scrolling thread both when we have unfilled pixels,
3249         and when the last scroll revealed unfilled pixels.
3250         
3251         2. On some pages, z-index:-1 elements behind the body cause the root
3252         TileCache to have drawsContent set to false, so none of its tiles paint. In
3253         that case, the check for a non-zero paintCount in TileCache::blankPixelCountForTiles()
3254         was wrong; we don't think there's a way to have an unpainted tile in the tree.
3255         
3256         Also fix the signature of blankPixelCountForTiles() to take references.
3257
3258         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.h:
3259         (ScrollingTreeScrollingNodeMac):
3260         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
3261         (WebCore::ScrollingTreeScrollingNodeMac::ScrollingTreeScrollingNodeMac):
3262         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
3263         * platform/graphics/ca/mac/TileCache.h:
3264         * platform/graphics/ca/mac/TileCache.mm:
3265         (WebCore::TileCache::blankPixelCountForTiles):
3266
3267 2013-01-22  Eric Seidel  <eric@webkit.org>
3268
3269         Make CompactHTMLToken a little more compact
3270         https://bugs.webkit.org/show_bug.cgi?id=107317
3271
3272         Reviewed by Adam Barth.
3273
3274         The windows builders got sad because MSVC won't combine
3275         adjacent bit-fields with different types.  Changing
3276         bool to unsigned should fix the problem.
3277
3278         * html/parser/CompactHTMLToken.h:
3279         (CompactHTMLToken):
3280
3281 2013-01-22  Anthony Scian  <ascian@rim.com>
3282
3283         [Blackberry] Static code analysis warning fixes
3284         https://bugs.webkit.org/show_bug.cgi?id=107464
3285
3286         Reviewed by Rob Buis.
3287
3288         Klocwork issues: 1367, 2367
3289         - add NULL pointer checks detected by static code analysis
3290
3291         * platform/blackberry/WidgetBlackBerry.cpp:
3292         (WebCore::Widget::setCursor):
3293         * plugins/blackberry/PluginViewBlackBerry.cpp:
3294         (WebCore::PluginView::updatePluginWidget):
3295
3296 2013-01-22  Joseph Pecoraro  <pecoraro@apple.com>
3297
3298         [Mac] Enable Page Visibility (PAGE_VISIBILITY_API)
3299         https://bugs.webkit.org/show_bug.cgi?id=107230
3300
3301         Reviewed by David Kilzer.
3302
3303         No new tests. Covered by existing tests which are now unskipped.
3304
3305         * Configurations/FeatureDefines.xcconfig:
3306
3307 2013-01-22  Tony Gentilcore  <tonyg@chromium.org>
3308
3309         Make BackgroundHTMLParser track line/column numbers
3310         https://bugs.webkit.org/show_bug.cgi?id=107561
3311
3312         Reviewed by Adam Barth.
3313
3314         No new tests because covered by existing fast/parser tests.
3315
3316         * html/parser/BackgroundHTMLParser.cpp:
3317         (WebCore::BackgroundHTMLParser::pumpTokenizer):
3318         * html/parser/CompactHTMLToken.cpp:
3319         (WebCore::CompactHTMLToken::CompactHTMLToken):
3320         * html/parser/CompactHTMLToken.h:
3321         (CompactHTMLToken):
3322         (WebCore::CompactHTMLToken::textPosition):
3323         * html/parser/HTMLDocumentParser.cpp:
3324         (WebCore::HTMLDocumentParser::didReceiveTokensFromBackgroundParser):
3325         (WebCore::HTMLDocumentParser::lineNumber):
3326         (WebCore::HTMLDocumentParser::textPosition):
3327         * html/parser/HTMLDocumentParser.h:
3328         (HTMLDocumentParser):
3329
3330 2013-01-22  Alec Flett  <alecflett@chromium.org>
3331
3332         IndexedDB: Don't assert when deprecated setCallbacks is called
3333         https://bugs.webkit.org/show_bug.cgi?id=107580
3334
3335         Reviewed by Tony Chang.
3336
3337         Remove an assert for IDBTransactionBackendImpl that was deprecated
3338         in a previous commit, but is still called by old chromium code.
3339         After the chromium code is removed, this method will be removed
3340         entirely.
3341
3342         * Modules/indexeddb/IDBTransactionBackendImpl.h:
3343         (WebCore::IDBTransactionBackendImpl::setCallbacks):
3344
3345 2013-01-22  Zan Dobersek  <zandobersek@gmail.com>
3346
3347         [GTK] Disable CSS Regions in release builds
3348         https://bugs.webkit.org/show_bug.cgi?id=106541
3349
3350         Reviewed by Martin Robinson.
3351
3352         The CSS Regions feature is not yet deemed stable enough to be enabled
3353         in release builds, so disable it. It's still enabled for development
3354         builds, via FeatureList.pm.
3355
3356         No new tests - no testable changes.
3357
3358         * GNUmakefile.features.am.in:
3359
3360 2013-01-22  Zan Dobersek  <zandobersek@gmail.com>
3361
3362         [GTK] Enable the <template> element support in development builds
3363         https://bugs.webkit.org/show_bug.cgi?id=106575
3364
3365         Reviewed by Martin Robinson.
3366
3367         Add a missing build target that contains the custom JS bindings.
3368
3369         No new tests - the related tests are being unskipped and mostly pass.
3370
3371         * GNUmakefile.list.am:
3372
3373 2013-01-22  Joshua Bell  <jsbell@chromium.org>
3374
3375         IndexedDB: Remove dependency on IDBKey type from IDLs
3376         https://bugs.webkit.org/show_bug.cgi?id=106912
3377
3378         Reviewed by Kentaro Hara.
3379
3380         This is a preamble to wkbug.com/97375 "Remove IDBKey from WebKitIDL"; IDBKey is
3381         not a concept from the Indexed DB spec but a convenient internal type. It was
3382         exposed in the IDL with custom binding code and special cases in the generator
3383         to map from script values to the WebCore type. To remove those special cases
3384         and match the WebIDL in the spec, the IDLs are changed to use "any" and the
3385         implementations now take ScriptValues. This does mean that each call site must
3386         call into IDBBindingUtilities to map from ScriptValue to IDBKey.
3387
3388         No new tests - just a refactor.
3389
3390         * Modules/indexeddb/IDBAny.cpp: Remove IDBKey as a variant type - just use ScriptValue.
3391         * Modules/indexeddb/IDBAny.h:
3392         (WebCore):
3393         (IDBAny):
3394         * Modules/indexeddb/IDBCursor.cpp:
3395         (WebCore::IDBCursor::continueFunction): Now takes any/ScriptValue.
3396         (WebCore):
3397         * Modules/indexeddb/IDBCursor.h:
3398         (WebCore::IDBCursor::continueFunction):
3399         (IDBCursor):
3400         * Modules/indexeddb/IDBCursor.idl:
3401         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
3402         (WebCore::IDBCursorBackendImpl::deleteFunction):
3403         * Modules/indexeddb/IDBFactory.cpp:
3404         (WebCore::IDBFactory::cmp): Now takes any/ScriptValue.
3405         * Modules/indexeddb/IDBFactory.h:
3406         (IDBFactory):
3407         * Modules/indexeddb/IDBFactory.idl:
3408         * Modules/indexeddb/IDBIndex.cpp:
3409         (WebCore::IDBIndex::openCursor): Now takes any/ScriptValue.
3410         (WebCore::IDBIndex::count): Now takes any/ScriptValue.
3411         (WebCore::IDBIndex::openKeyCursor): Now takes any/ScriptValue.
3412         (WebCore::IDBIndex::get): Now takes any/ScriptValue.
3413         (WebCore::IDBIndex::getKey): Now takes any/ScriptValue.
3414         * Modules/indexeddb/IDBIndex.h:
3415         (WebCore::IDBIndex::openCursor):
3416         (IDBIndex):
3417         (WebCore::IDBIndex::openKeyCursor):
3418         * Modules/indexeddb/IDBIndex.idl:
3419         * Modules/indexeddb/IDBKeyRange.cpp:
3420         (WebCore::IDBKeyRange::create): Add helper for back-end creation of single-key ranges.
3421         (WebCore):
3422         (WebCore::IDBKeyRange::lowerValue): Impl. of new "any" type accessor exposed to script.
3423         (WebCore::IDBKeyRange::upperValue): Ditto.
3424         (WebCore::IDBKeyRange::only): Now takes any/ScriptValue.
3425         (WebCore::IDBKeyRange::lowerBound): Now takes any/ScriptValue.
3426         (WebCore::IDBKeyRange::upperBound): Now takes any/ScriptValue.
3427         (WebCore::IDBKeyRange::bound): Now takes any/ScriptValue.
3428         * Modules/indexeddb/IDBKeyRange.h:
3429         (IDBKeyRange):
3430         (WebCore::IDBKeyRange::lowerBound):
3431         (WebCore::IDBKeyRange::upperBound):
3432         (WebCore::IDBKeyRange::bound):
3433         * Modules/indexeddb/IDBKeyRange.idl:
3434         * Modules/indexeddb/IDBObjectStore.cpp:
3435         (WebCore::IDBObjectStore::get): Now takes any/ScriptValue.
3436         (WebCore::IDBObjectStore::add): Now takes any/ScriptValue.
3437         (WebCore):
3438         (WebCore::IDBObjectStore::put): Now takes any/ScriptValue.
3439         (WebCore::IDBObjectStore::deleteFunction): Now takes any/ScriptValue.
3440         (WebCore::IDBObjectStore::openCursor): Now takes any/ScriptValue.
3441         (WebCore::IDBObjectStore::count): Now takes any/ScriptValue.
3442         * Modules/indexeddb/IDBObjectStore.h:
3443         (IDBObjectStore):
3444         (WebCore::IDBObjectStore::openCursor):
3445         * Modules/indexeddb/IDBObjectStore.idl:
3446         * Modules/indexeddb/IDBRequest.cpp: Result IDBAny type is now ScriptValue.
3447         (WebCore::IDBRequest::onSuccess):
3448         * bindings/js/IDBBindingUtilities.cpp:
3449         (WebCore::scriptValueToIDBKey): The inverse of idbKeyToScriptValue().
3450         (WebCore):
3451         * bindings/js/IDBBindingUtilities.h:
3452         (WebCore):
3453         * bindings/js/JSIDBAnyCustom.cpp:
3454         (WebCore::toJS):
3455         * bindings/v8/IDBBindingUtilities.cpp:
3456         (WebCore::scriptValueToIDBKey): Ditto.
3457         (WebCore):
3458         * bindings/v8/IDBBindingUtilities.h:
3459         (WebCore):
3460         * bindings/v8/custom/V8IDBAnyCustom.cpp:
3461         (WebCore::toV8): Remove IDBKey variant type.
3462
3463 2013-01-22  Justin Schuh  <jschuh@chromium.org>
3464
3465         TRANSFORMATION_MATRIX_USE_X86_64_SSE2 broken for 64-bit Windows builds
3466         https://bugs.webkit.org/show_bug.cgi?id=107498
3467
3468         Reviewed by James Robinson.
3469         
3470         Enable TRANSFORMATION_MATRIX_USE_X86_64_SSE2 for 64-bit Windows.
3471
3472         No new tests. Covered by existing tests.
3473
3474         * platform/graphics/transforms/TransformationMatrix.h:
3475         (WebCore):
3476         (TransformationMatrix):
3477
3478 2013-01-22  Min Qin  <qinmin@chromium.org>
3479
3480         Fix a race condition on SkBitmap::lockPixels()/unlockPixels() for lazy image decoding
3481         https://bugs.webkit.org/show_bug.cgi?id=107404
3482
3483         Reviewed by Stephen White.
3484
3485         Skbitmap::lockPixels()/unlockPixels() are not threadsafe.
3486         unlike SkPixelRef, these 2 calls are not protected by an internal