62beff7eaf9df5b58fa76d918bb1299390fe8a77
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2011-05-20  Abhishek Arya  <inferno@chromium.org>
2
3         Reviewed by Kent Tamura.
4
5         Make auto-focus a post attach callback in
6         HTMLFormControlElement::attach().
7         https://bugs.webkit.org/show_bug.cgi?id=32882
8
9         Original patch by Darin Adler. This one uses a part of it.
10         
11         Test: fast/forms/input-element-attach-crash.html
12
13         * dom/Document.cpp:
14         (WebCore::Document::recalcStyle): Make sure that m_inStyleRecalc is
15         already false by the time post-attach callbacks are done so that
16         layout triggered inside those callbacks can work properly.
17         * html/HTMLFormControlElement.cpp:
18         (WebCore::shouldAutofocus): Helper function that expresses
19         the rule for which form control elements should auto-focus.
20         (WebCore::focusPostAttach): Called post-attach to focus an
21         element if we discover it should be focused during attach.
22         (WebCore::HTMLFormControlElement::attach): Refactored code for
23         which elements need auto-focus into a separate function. Instead
24         of focusing right away, use the focusPostAttach function to focus
25         after attach is done. Also added calls to suspendPostAttachCallbacks
26         and resumePostAttachCallbacks so post-attach callbacks happen late
27         enough. Before, they could run inside the base attach function.
28         * html/HTMLInputElement.cpp:
29         (WebCore::HTMLInputElement::attach): Added calls to
30         suspendPostAttachCallbacks and resumePostAttachCallbacks so
31         post-attach callbacks happen late enough
32
33 2011-05-20  Alok Priyadarshi  <alokp@chromium.org>
34
35         Reviewed by James Robinson.
36
37         [chromium] Remove LayerRendererChromium::useShader
38         https://bugs.webkit.org/show_bug.cgi?id=61143
39
40         GPU compositor tests should be sufficient.
41
42         * platform/graphics/chromium/LayerRendererChromium.cpp:
43         (WebCore::LayerRendererChromium::LayerRendererChromium):
44         * platform/graphics/chromium/LayerRendererChromium.h:
45         * platform/graphics/chromium/LayerTilerChromium.cpp:
46         (WebCore::LayerTilerChromium::draw):
47         * platform/graphics/chromium/RenderSurfaceChromium.cpp:
48         (WebCore::RenderSurfaceChromium::drawSurface):
49         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
50         (WebCore::CCCanvasLayerImpl::draw):
51         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
52         (WebCore::CCHeadsUpDisplay::draw):
53         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
54         (WebCore::CCLayerImpl::drawDebugBorder):
55         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
56         (WebCore::CCPluginLayerImpl::draw):
57         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
58         (WebCore::CCVideoLayerImpl::drawYUV):
59         (WebCore::CCVideoLayerImpl::drawRGBA):
60
61 2011-05-20  Dirk Schulze  <krit@webkit.org>
62
63         Reviewed by Darin Adler.
64
65         SVGPathSegList needs better getTotalLength, getSegmentAtLength path traversal code
66         https://bugs.webkit.org/show_bug.cgi?id=12047
67
68         Right now SVGPathElement::getTotalLength and SVGPathElement::getPointAtLength use toPathData()
69         to transform a SVGPathByteStream to a Path. This Path gets traversed to find the searched value.
70         With this patch both functions use the SVGPathByteStream directly together with the existing
71         traversing code in SVG. This avoids the intermediate transforming to a platform path and gives
72         platform independent results.
73         The traversal code in SVG needed to be extended to support all PathTraversalActions.
74
75         No new tests added. The existing tests cover the changes.
76
77         * svg/SVGPathElement.cpp:
78         (WebCore::SVGPathElement::getTotalLength):
79         (WebCore::SVGPathElement::getPointAtLength):
80         * svg/SVGPathParserFactory.cpp:
81         (WebCore::SVGPathParserFactory::getTotalLengthOfSVGPathByteStream):
82         (WebCore::SVGPathParserFactory::getPointAtLengthOfSVGPathByteStream):
83         * svg/SVGPathParserFactory.h:
84         * svg/SVGPathTraversalStateBuilder.cpp:
85         (WebCore::SVGPathTraversalStateBuilder::continueConsuming):
86         (WebCore::SVGPathTraversalStateBuilder::totalLength):
87         (WebCore::SVGPathTraversalStateBuilder::currentPoint):
88         * svg/SVGPathTraversalStateBuilder.h:
89
90 2011-05-20  Mark Pilgrim  <pilgrim@chromium.org>
91
92         Reviewed by Tony Chang.
93
94         IndexedDB createObjectStore should throw if name is null
95         https://bugs.webkit.org/show_bug.cgi?id=58465
96
97         Test: storage/indexeddb/mozilla/create-objectstore-null-name.html
98
99         * storage/IDBDatabase.idl:
100         * storage/IDBDatabaseBackendImpl.cpp:
101         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
102
103 2011-05-20  Xiaomei Ji  <xji@chromium.org>
104
105         Reviewed by Ryosuke Niwa.
106
107         ctrl-arrow does not work on words separated by multiple spaces.
108         https://bugs.webkit.org/show_bug.cgi?id=57543.
109
110         Add the leftmost boundary of a box in RTL block or the rightmost boundary of a box in LTR
111         block as word break if its inlineBox is the current box and it is a word break.
112
113         * editing/visible_units.cpp:
114         (WebCore::previousWordBreakInBoxInsideBlockWithSameDirectionality): Add the rightmost
115         boundary of a box in LTR block or leftmost boundary of a box in RTL block as visually
116         first word break.
117         (WebCore::nextWordBreakInBoxInsideBlockWithDifferentDirectionality):
118         (WebCore::collectWordBreaksInBoxInsideBlockWithDifferntDirectionality):
119         (WebCore::leftWordBoundary): Fix bug change "box" to "adjacentBox".
120         (WebCore::rightWordBoundary): Fix bug change "box" to "adjacentBox".
121
122 2011-05-19  Evan Martin  <evan@chromium.org>
123
124         Reviewed by Tony Chang.
125
126         [chromium] remove <(library) variable
127         https://bugs.webkit.org/show_bug.cgi?id=61158
128
129         This was for a build experiment; we can just use the correct value now.
130
131         * WebCore.gyp/WebCore.gyp:
132
133 2011-05-20  Pavel Podivilov  <podivilov@chromium.org>
134
135         Reviewed by Pavel Feldman.
136
137         Web Inspector: breakpoints disappear from ui after navigation.
138         https://bugs.webkit.org/show_bug.cgi?id=61133
139
140         * inspector/front-end/DebuggerPresentationModel.js:
141         (WebInspector.DebuggerPresentationModel.prototype._debuggerWasEnabled):
142         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
143
144 2011-05-20  Sheriff Bot  <webkit.review.bot@gmail.com>
145
146         Unreviewed, rolling out r86958.
147         http://trac.webkit.org/changeset/86958
148         https://bugs.webkit.org/show_bug.cgi?id=61195
149
150         broke breakpoints persisting (Requested by podivilov on
151         #webkit).
152
153         * inspector/front-end/DebuggerPresentationModel.js:
154         (WebInspector.DebuggerPresentationModel.prototype._debuggerWasEnabled):
155         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
156
157 2011-05-19  Sergey Vorobyev  <sergeyvorobyev@google.com>
158
159         Reviewed by Yury Semikhatsky.
160
161         Web Inspector: Background network events collection - add GUI to Inspector.
162         https://bugs.webkit.org/show_bug.cgi?id=58652
163
164         Now in WebInspector Network panel avalaible new checkbox item in context menu:
165         "Background events collection". It allows to save all network events when inspector
166         frontend closed. Events that occur before collection enabling are not preserved after
167         frontend reopening. Property unique for each page. Disabled by default.
168
169
170         Tests: http/tests/inspector/network/network-clear-after-disabled.html
171                http/tests/inspector/network/network-close-load-open.html
172                http/tests/inspector/network/network-open-load-reopen.html
173
174         * inspector/EventsCollector.cpp:
175         (WebCore::EventsCollector::clear):
176         * inspector/EventsCollector.h:
177         * inspector/Inspector.json:
178         * inspector/InspectorFrontendProxy.cpp:
179         (WebCore::InspectorFrontendProxy::inspectorFrontendChannel):
180         * inspector/InspectorFrontendProxy.h:
181         * inspector/InspectorResourceAgent.cpp:
182         (WebCore::InspectorResourceAgent::setFrontend):
183         (WebCore::InspectorResourceAgent::clearFrontend):
184         (WebCore::InspectorResourceAgent::isBackgroundEventsCollectionEnabled):
185         (WebCore::InspectorResourceAgent::setBackgroundEventsCollectionEnabled):
186         (WebCore::InspectorResourceAgent::initializeBackgroundCollection):
187         (WebCore::InspectorResourceAgent::InspectorResourceAgent):
188         * inspector/InspectorResourceAgent.h:
189         * inspector/front-end/NetworkPanel.js:
190         (WebInspector.NetworkPanel):
191         (WebInspector.NetworkPanel.prototype._contextMenu):
192         (WebInspector.NetworkPanel.prototype._toggleBackgroundEventsCollection):
193
194 2011-05-20  Pavel Podivilov  <podivilov@chromium.org>
195
196         Reviewed by Pavel Feldman.
197
198         Web Inspector: breakpoints disappear from ui after navigation.
199         https://bugs.webkit.org/show_bug.cgi?id=61133
200
201         * inspector/front-end/DebuggerPresentationModel.js:
202         (WebInspector.DebuggerPresentationModel.prototype._debuggerWasEnabled):
203         (WebInspector.DebuggerPresentationModel.prototype._saveBreakpoints):
204
205 2011-05-20  Jer Noble  <jer.noble@apple.com>
206
207         Reviewed by Maciej Stachowiak.
208
209         Win: non-full-screen content is briefly seen when entering full-screen mode (and vice versa)
210         https://bugs.webkit.org/show_bug.cgi?id=61108
211
212         Instead of repainting the full- and non-full-screen windows in WebCore, delegate that
213         responsibility to the FullScreenControllerClient.  Because the repaint operation may 
214         be asynchronous, add a new method for clients to use to indicate repainting has completed.
215
216         * platform/graphics/win/FullScreenController.cpp:
217         (FullScreenController::Private::Private): Added new ivars.
218         (FullScreenController::enterFullScreen): Split into two functions (pre-and post repaint)
219         (FullScreenController::enterFullScreenRepaintCompleted): Ditto.
220         (FullScreenController::exitFullScreen): Ditto.
221         (FullScreenController::exitFullScreenRepaintCompleted): Ditto.
222         (FullScreenController::repaintCompleted): Call the appropriated repaint completed function.
223         * platform/graphics/win/FullScreenController.h:
224         * platform/graphics/win/FullScreenControllerClient.h:
225
226 2011-05-20  Yury Semikhatsky  <yurys@chromium.org>
227
228         Reviewed by Pavel Feldman.
229
230         Web Inspector: use RefPtr instead of OwnPtr to store InspectorBackendDispatcher
231         https://bugs.webkit.org/show_bug.cgi?id=61188
232
233         * inspector/WorkerInspectorController.cpp:
234         (WebCore::WorkerInspectorController::connectFrontend):
235         (WebCore::WorkerInspectorController::disconnectFrontend):
236         * inspector/WorkerInspectorController.h:
237
238 2011-05-20  Tonis Tiigi  <tonistiigi@gmail.com>
239
240         Reviewed by Pavel Feldman.
241
242         Web Inspector: Network panel should only show pointer cursor over valid resources
243         https://bugs.webkit.org/show_bug.cgi?id=55240
244
245         Cursor style removed from filler area.
246
247         * inspector/front-end/networkPanel.css:
248         (.network-sidebar .data-grid tr:not(.filler) td.name-column):
249
250 2011-05-20  Peter Varga  <pvarga@webkit.org>
251
252         Reviewed by Simon Hausmann.
253
254         [Qt][V8] Use qtscript-staging's shipped version of V8 when building with --v8
255         https://bugs.webkit.org/show_bug.cgi?id=56649
256
257         Use the provided V8 and functionality of
258         http://qt.gitorious.org/+qt-developers/qt/qtscript-staging to build QtWebKit+V8.
259         Based on the original patch of Andras Becsi <abecsi@webkit.org>.
260
261         No new tests needed.
262
263         * CodeGenerators.pri: Add generating of DebuggerScriptSource.h
264         * WebCore.pri: Fix the options for V8 build.
265         * WebCore.pro: Ditto.
266         * bindings/v8/NPV8Object.cpp:
267         (WebCore::npObjectTypeInfo): Add missing initializer.
268         * bindings/v8/ScriptController.cpp:
269         (WebCore::ScriptController::disableEval): Temporarily disable
270         unsupported feature on Qt.
271         * bindings/v8/ScriptControllerQt.cpp:
272         (WebCore::ScriptController::qtScriptEngine): use the QtScriptEngine
273         constructor of qtscript-staging.
274         * bindings/v8/custom/V8HTMLAudioElementConstructor.cpp: Add missing
275         initializer.
276         * bindings/v8/custom/V8HTMLImageElementConstructor.cpp: Ditto.
277         * bindings/v8/custom/V8HTMLOptionElementConstructor.cpp: Ditto.
278         * loader/appcache/ApplicationCacheGroup.cpp: Add missing header.
279         * loader/cache/CachedResourceRequest.cpp: Ditto.
280         * page/PageSerializer.cpp: Ditto.
281         * page/qt/FrameQt.cpp: Ditto.
282         * storage/StorageEventDispatcher.cpp: Ditto.
283
284 2011-05-20  Tonis Tiigi  <tonistiigi@gmail.com>
285
286         Reviewed by Pavel Feldman.
287
288         Web Inspector: console.log(XMLDocument) should be case preserving
289         https://bugs.webkit.org/show_bug.cgi?id=60765
290
291         Changes the XML document checking from base documents MIME type
292         to xmlVersion parameter.
293
294         * inspector/InspectorDOMAgent.cpp:
295         (WebCore::InspectorDOMAgent::buildObjectForNode):
296         * inspector/front-end/DOMAgent.js:
297         (WebInspector.DOMNode):
298         * inspector/front-end/ElementsTreeOutline.js:
299         (WebInspector.ElementsTreeOutline.prototype.set rootDOMNode):
300
301 2011-05-20  Mikhail Naganov  <mnaganov@chromium.org>
302
303         Reviewed by Yury Semikhatsky.
304
305         Web Inspector: [Chromium] Use bottom-up CPU profile tree built in VM,
306         instead of building it on Inspector's side.
307         https://bugs.webkit.org/show_bug.cgi?id=61185
308
309         * bindings/js/ScriptProfile.cpp:
310         (WebCore::ScriptProfile::bottomUpHead):
311         (WebCore::ScriptProfile::buildInspectorObjectForBottomUpHead):
312         * bindings/js/ScriptProfile.h:
313         * bindings/v8/ScriptProfile.cpp:
314         (WebCore::ScriptProfile::bottomUpHead):
315         (WebCore::ScriptProfile::buildInspectorObjectForBottomUpHead):
316         * bindings/v8/ScriptProfile.h:
317         * inspector/InspectorProfilerAgent.cpp:
318         (WebCore::InspectorProfilerAgent::getProfile):
319         * inspector/front-end/ProfileView.js:
320         (WebInspector.CPUProfileView.prototype.get bottomUpProfileDataGridTree):
321
322 2011-05-20  Adam Roben  <aroben@apple.com>
323
324         Mac build fix after r86936
325
326         * WebCore.xcodeproj/project.pbxproj: Added preprocessor.pm like the
327         other .pm files.
328
329 2011-05-20  Kent Tamura  <tkent@chromium.org>
330
331         Try to fix Windows CE build.
332         Touch html.css to kick UA style sheet generation.
333
334         * css/html.css:
335
336 2011-05-20  Kent Tamura  <tkent@chromium.org>
337
338         Try to fix Windows CE build. 
339
340         * CMakeLists.txt: Add --preprocessor flag.
341
342 2011-05-20  Kent Tamura  <tkent@chromium.org>
343
344         Reviewed by Hajime Morita.
345
346         Apply feature flags to user-agent style sheets
347         https://bugs.webkit.org/show_bug.cgi?id=52612
348
349         A user-agent style sheet should not have style definitions for disabled
350         features because such definitions makes feature detection harder and
351         causes incorrect behavior (See Bug 52214).
352
353         We have handled such feature-dependent style definitions by providing
354         separated CSS files and selecting them in build files. Adding such style
355         definition was hard because we need to update each of build files. This
356         change simplifies the process to add such style definitions by applying
357         preprocessor to the CSS files.
358
359         Implementation:
360         make-css-file-arrays.pl invokes a preprocessor if it has --defines
361         option. Otherwise, it just remove lines beginning with #.
362         In this change, we pass --defines on Mac, Windows, Chromium, GTK, and
363         CMake platforms. Qt and Android have no behavior change.
364
365         * CMakeLists.txt:
366           - IDL handling depends on preprocessor.pm.
367           - Pass --defines option to make-css-file-arrays.pl
368           - Add WebCore/bindings/scripts to @INC for make-css-file-arrays.pl
369         * CodeGenerators.pri: IDL handling depends on preprocessor.pm.
370         * DerivedSources.make: ditto.
371         * GNUmakefile.am: ditto.
372         * WebCore.gyp/WebCore.gyp: ditto.
373         * WebCore.gyp/scripts/action_useragentstylesheets.py:
374           Change parameter order to support perl modules and options.
375           Many code is taken from rule_bindings.py.
376         * WebCore.vcproj/MigrateScripts: Handles preprocessor.pm.
377         * bindings/scripts/IDLParser.pm:
378           Move the preprocessor code to preprocessor.pm.
379         * bindings/scripts/preprocessor.pm:
380           Added. The code was moved from IDLParser.pm
381         * css/html.css: Enclose some style definitions with #if-#endif.
382         * css/make-css-file-arrays.pl:
383           - Add --defines and --preprocessor options.
384           - Invoke a preprocessor if --defines is specified.
385
386 2011-05-20  Dirk Schulze  <krit@webkit.org>
387
388         Rubber-stamped by Nikolas Zimmermann.
389
390         Remove unnecessary class Path inlcude from PathTraversalState.
391
392         * platform/graphics/PathTraversalState.h:
393
394 2011-05-19  Pavel Podivilov  <podivilov@chromium.org>
395
396         Reviewed by Pavel Feldman.
397
398         Web Inspector: ctrl+s should not switch source frame to read only mode.
399         https://bugs.webkit.org/show_bug.cgi?id=61125
400
401         * inspector/front-end/SourceFrame.js:
402         (WebInspector.SourceFrame.prototype.commitEditing.didEditContent):
403         (WebInspector.SourceFrame.prototype.commitEditing):
404         * inspector/front-end/inspector.js:
405         (WebInspector.documentKeyDown):
406
407 2011-05-20  Piroska András  <Piroska.Andras@stud.u-szeged.hu>
408
409         Reviewed by Nikolas Zimmermann.
410
411         Apply the ParallelJobs support to FEConvolveMatrix
412         https://bugs.webkit.org/show_bug.cgi?id=61171
413
414         The FEConvolveMatrix filter of SVG can consume lots of resources if it is
415         applied to a large area. The computation can be distributed to multiple
416         cores if the architecture supports.
417         The average performance progression is 20-30% on dual-core machines.
418
419         Developed in cooperation with Gabor Loki.
420
421         * platform/graphics/filters/FEConvolveMatrix.cpp:
422         (WebCore::FEConvolveMatrix::fastSetInteriorPixels):
423         (WebCore::FEConvolveMatrix::setInteriorPixels):
424         (WebCore::FEConvolveMatrix::setInteriorPixelsWorker):
425         (WebCore::FEConvolveMatrix::apply):
426         * platform/graphics/filters/FEConvolveMatrix.h:
427
428 2011-05-20  Sheriff Bot  <webkit.review.bot@gmail.com>
429
430         Unreviewed, rolling out r86920.
431         http://trac.webkit.org/changeset/86920
432         https://bugs.webkit.org/show_bug.cgi?id=61173
433
434         It cause compile error on some buildbot in chromium. e.g.
435         http://build.chromium.org/p/chromium.memory/builders/Chromium%20Mac%20Builder%20%28valgrind%29/builds/12336/steps/compile/logs/stdio#error1
436         (Requested by ukai_ on #webkit).
437
438         * WebCore.xcodeproj/project.pbxproj:
439         * css/CSSComputedStyleDeclaration.cpp:
440         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
441         * css/CSSParser.cpp:
442         (WebCore::CSSParser::parseValue):
443         * css/CSSPrimitiveValueMappings.h:
444         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
445         (WebCore::CSSPrimitiveValue::operator EImageRendering):
446         * css/CSSPropertyNames.in:
447         * css/CSSStyleSelector.cpp:
448         (WebCore::CSSStyleSelector::applyProperty):
449         * css/CSSValueKeywords.in:
450         * css/SVGCSSComputedStyleDeclaration.cpp:
451         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
452         * css/SVGCSSPropertyNames.in:
453         * css/SVGCSSStyleSelector.cpp:
454         (WebCore::CSSStyleSelector::applySVGProperty):
455         * css/SVGCSSValueKeywords.in:
456         * html/HTMLCanvasElement.cpp:
457         (WebCore::HTMLCanvasElement::paint):
458         * html/HTMLCanvasElement.h:
459         * platform/graphics/ImageRenderingMode.h: Removed.
460         * rendering/RenderBoxModelObject.cpp:
461         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
462         * rendering/RenderHTMLCanvas.cpp:
463         (WebCore::RenderHTMLCanvas::paintReplaced):
464         * rendering/style/RenderStyle.cpp:
465         (WebCore::RenderStyle::diff):
466         * rendering/style/RenderStyle.h:
467         * rendering/style/RenderStyleConstants.h:
468         * rendering/style/SVGRenderStyle.cpp:
469         (WebCore::SVGRenderStyle::diff):
470         * rendering/style/SVGRenderStyle.h:
471         (WebCore::SVGRenderStyle::initialImageRendering):
472         (WebCore::SVGRenderStyle::setImageRendering):
473         (WebCore::SVGRenderStyle::imageRendering):
474         (WebCore::SVGRenderStyle::InheritedFlags::operator==):
475         (WebCore::SVGRenderStyle::setBitDefaults):
476         * rendering/style/SVGRenderStyleDefs.h:
477         * rendering/style/StyleRareInheritedData.cpp:
478         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
479         (WebCore::StyleRareInheritedData::operator==):
480         * rendering/style/StyleRareInheritedData.h:
481         * rendering/svg/SVGRenderTreeAsText.cpp:
482         (WebCore::writeStyle):
483
484 2011-05-20  Dirk Schulze  <krit@webkit.org>
485
486         Reviewed by Eric Seidel.
487
488         SVG Large curve path segment OOM crash
489         https://bugs.webkit.org/show_bug.cgi?id=42079
490
491         Limit the depth of repeatedly splitting a segment on length calculation to 20. The limitation
492         is necessary for very big segments that would be splitter into millions of parts otherwise.
493         The limitation just cause a less accurate approximation.
494         At the moment the limit is fixed to 20. This is comparable with splitting the segment into 
495         ~1 million parts as a worst case. We might want to be more flexible later.
496
497         Test: svg/custom/path-getTotalLength-on-big-segment-crash.svg
498
499         * platform/graphics/PathTraversalState.cpp:
500         (WebCore::midPoint):
501         (WebCore::curveLength):
502         (WebCore::PathTraversalState::PathTraversalState):
503         (WebCore::PathTraversalState::moveTo):
504         (WebCore::PathTraversalState::quadraticBezierTo):
505         (WebCore::PathTraversalState::cubicBezierTo):
506         * platform/graphics/PathTraversalState.h:
507
508 2011-05-20  Leo Yang  <leo.yang@torchmobile.com.cn>
509
510         Reviewed by Nikolas Zimmermann.
511
512         SVGRootInlineBox triggers calculateBoundaries twice in layout
513         https://bugs.webkit.org/show_bug.cgi?id=60979
514
515         SVGRootInlineBox was calculating boundaries for children twice
516         in computePerCharacterLayoutInformation(). The first time of
517         calculation was in layoutChildBoxes() which is called by
518         computePerCharacterLayoutInformation(), and the second time of
519         calculation was in layoutRootBox() following layoutChildBoxes().
520
521         This patch calculates rectangle of children in layoutChildBoxes()
522         and then uses the rectange in layoutRootBox() to reduce a pass
523         of calculating child boundaries.
524
525         No functionality change, no new tests.
526
527         * rendering/svg/SVGRootInlineBox.cpp:
528         (WebCore::SVGRootInlineBox::computePerCharacterLayoutInformation):
529         (WebCore::SVGRootInlineBox::layoutChildBoxes):
530         (WebCore::SVGRootInlineBox::layoutRootBox):
531         * rendering/svg/SVGRootInlineBox.h:
532
533 2011-05-19  Naoki Takano  <takano.naoki@gmail.com>
534
535         Reviewed by Kent Tamura.
536
537         Fix a problem that updating HTMLInputElement::value sets the cursor to a wrong position.
538         https://bugs.webkit.org/show_bug.cgi?id=61163
539
540         Manual test input-number-localization.html.
541         Because we can't assume any number formats in various WebKit ports.
542
543         * html/HTMLInputElement.cpp:
544         (WebCore::HTMLInputElement::setValue): The cursor must be the last position of visibleValue(), not m_value.
545         * manual-tests/input-number-localization.html: Added manual test to check the cursor correctly moved to the last poisition of the input.
546
547 2011-05-19  Jer Noble  <jer.noble@apple.com>
548
549         Reviewed by Maciej Stachowiak.
550
551         WebKit2: Flashing when entering and exiting full screen mode
552         https://bugs.webkit.org/show_bug.cgi?id=56957
553
554         Guard against the parameter of setAnimating() matching the ivar value it's 
555         setting, thus avoiding tearing down the renderer's layer backing.
556
557         * rendering/RenderFullScreen.cpp:
558         (RenderFullScreen::setAnimating):
559
560 2011-05-19  Julien Chaffraix  <jchaffraix@codeaurora.org>
561
562         Reviewed by Adam Barth.
563
564         Remove Node::deprecatedParserAddChild
565         https://bugs.webkit.org/show_bug.cgi?id=60818
566
567         Refactoring only so no new tests.
568
569         This patch fails short of one instance of deprecatedParserAddChild which will
570         require a refactoring of <input> shadow DOM to be removed.
571
572         * dom/XMLDocumentParser.cpp:
573         (WebCore::XMLDocumentParser::pushCurrentNode): Updated to use a ContainerNode.
574         (WebCore::XMLDocumentParser::clearCurrentNodeStack): We now need to clear
575         up m_leafTextNode too.
576
577         (WebCore::XMLDocumentParser::enterText):
578         (WebCore::XMLDocumentParser::exitText):
579         Those methods were updated to use m_leafTextNode instead of m_currentNode.
580
581         * dom/XMLDocumentParser.h:
582         Changed the currentNode logic to use ContainerNode. Also fixed the style of the
583         forward declarations.
584
585         * dom/XMLDocumentParserLibxml2.cpp:
586         (WebCore::XMLDocumentParser::startElementNs):
587         (WebCore::XMLDocumentParser::endElementNs):
588         (WebCore::XMLDocumentParser::characters):
589         (WebCore::XMLDocumentParser::processingInstruction):
590         (WebCore::XMLDocumentParser::cdataBlock):
591         (WebCore::XMLDocumentParser::comment):
592         * dom/XMLDocumentParserQt.cpp:
593         (WebCore::XMLDocumentParser::parse):
594         (WebCore::XMLDocumentParser::parseStartElement):
595         (WebCore::XMLDocumentParser::parseEndElement):
596         (WebCore::XMLDocumentParser::parseCharacters):
597         (WebCore::XMLDocumentParser::parseProcessingInstruction):
598         (WebCore::XMLDocumentParser::parseCdata):
599         (WebCore::XMLDocumentParser::parseComment):
600         Removed the calls to deprecatedParserAddChild, changed the code to use
601         m_leafTextNode when it made sense and used ContainerNode instead of
602         Node for m_currentNode.
603
604 2011-05-19  Mike Lawther  <mikelawther@chromium.org>
605
606         Reviewed by Simon Fraser.
607
608         implement image-rendering: optimize-contrast (with a vendor prefix) as defined in CSS3 image values
609         https://bugs.webkit.org/show_bug.cgi?id=56627
610
611         Tests: css3/images/optimize-contrast-canvas.html
612                css3/images/optimize-contrast-image.html
613
614         * WebCore.xcodeproj/project.pbxproj:
615         * css/CSSComputedStyleDeclaration.cpp:
616         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
617         * css/CSSParser.cpp:
618         (WebCore::CSSParser::parseValue):
619         * css/CSSPrimitiveValueMappings.h:
620         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
621         (WebCore::CSSPrimitiveValue::operator EImageRendering):
622         * css/CSSPropertyNames.in:
623         * css/CSSStyleSelector.cpp:
624         (WebCore::CSSStyleSelector::applyProperty):
625         * css/CSSValueKeywords.in:
626         * css/SVGCSSComputedStyleDeclaration.cpp:
627         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
628         * css/SVGCSSPropertyNames.in:
629         * css/SVGCSSStyleSelector.cpp:
630         (WebCore::CSSStyleSelector::applySVGProperty):
631         * css/SVGCSSValueKeywords.in:
632         * html/HTMLCanvasElement.cpp:
633         (WebCore::HTMLCanvasElement::paint):
634         * html/HTMLCanvasElement.h:
635         * platform/graphics/ImageRenderingMode.h: Added.
636         * rendering/RenderBoxModelObject.cpp:
637         (WebCore::ImageQualityController::shouldPaintAtLowQuality):
638         * rendering/RenderHTMLCanvas.cpp:
639         (WebCore::RenderHTMLCanvas::paintReplaced):
640         * rendering/style/RenderStyle.cpp:
641         (WebCore::RenderStyle::diff):
642         * rendering/style/RenderStyle.h:
643         (WebCore::InheritedFlags::imageRendering):
644         (WebCore::InheritedFlags::setImageRendering):
645         (WebCore::InheritedFlags::initialImageRendering):
646         * rendering/style/RenderStyleConstants.h:
647         * rendering/style/SVGRenderStyle.cpp:
648         (WebCore::SVGRenderStyle::diff):
649         * rendering/style/SVGRenderStyle.h:
650         (WebCore::SVGRenderStyle::InheritedFlags::operator==):
651         (WebCore::SVGRenderStyle::setBitDefaults):
652         * rendering/style/SVGRenderStyleDefs.h:
653         * rendering/svg/SVGRenderTreeAsText.cpp:
654         (WebCore::writeStyle):
655
656 2011-05-18  Kenneth Russell  <kbr@google.com>
657
658         Reviewed by James Robinson.
659
660         [chromium] Disable blending in compositor for WebGL layers with alpha=false
661         https://bugs.webkit.org/show_bug.cgi?id=61091
662
663         Test: compositing/webgl/webgl-no-alpha.html
664
665         * platform/graphics/chromium/CanvasLayerChromium.cpp:
666         (WebCore::CanvasLayerChromium::CanvasLayerChromium):
667         (WebCore::CanvasLayerChromium::pushPropertiesTo):
668         * platform/graphics/chromium/CanvasLayerChromium.h:
669         * platform/graphics/chromium/WebGLLayerChromium.cpp:
670         (WebCore::WebGLLayerChromium::setContext):
671         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
672         (WebCore::CCCanvasLayerImpl::CCCanvasLayerImpl):
673         (WebCore::CCCanvasLayerImpl::draw):
674         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
675         (WebCore::CCCanvasLayerImpl::setHasAlpha):
676
677 2011-05-18  Jeremy Noble  <jer.noble@apple.com>
678
679         Reviewed by Darin Adler.
680
681         Poster is not shown in Safari for video element with no playable source elements.
682         https://bugs.webkit.org/show_bug.cgi?id=61109
683
684         Test: media/video-src-invalid-poster.html
685
686         In the case where no video sources are playable, update the display state and 
687         renderer, allowing the poster image to display.
688
689         * html/HTMLMediaElement.cpp:
690         (WebCore::HTMLMediaElement::waitForSourceChange): 
691
692 2011-05-19  Andrew Wilson  <atwilson@chromium.org>
693
694         Reviewed by Darin Adler.
695
696         MessagePortArray cloning code needs to verify source before copying.
697         https://bugs.webkit.org/show_bug.cgi?id=61130
698
699         * bindings/js/JSMessagePortCustom.cpp:
700         (WebCore::fillMessagePortArray):
701         Changed code to not pre-allocate the destination array.
702         * bindings/v8/custom/V8MessagePortCustom.cpp:
703         (WebCore::getMessagePortArray):
704         Changed code to not pre-allocate the destination array.
705
706 2011-05-19  Sheriff Bot  <webkit.review.bot@gmail.com>
707
708         Unreviewed, rolling out r86869, r86873, r86875, and r86877.
709         http://trac.webkit.org/changeset/86869
710         http://trac.webkit.org/changeset/86873
711         http://trac.webkit.org/changeset/86875
712         http://trac.webkit.org/changeset/86877
713         https://bugs.webkit.org/show_bug.cgi?id=61139
714
715         broke builds and debug DRT (Requested by rniwa on #webkit).
716
717         * DerivedSources.make:
718         * WebCore.exp.in:
719         * WebCore.gyp/WebCore.gyp:
720         * WebCore.gypi:
721         * WebCore.xcodeproj/project.pbxproj:
722         * testing/Internals.cpp: Removed.
723         * testing/Internals.h: Removed.
724         * testing/Internals.idl: Removed.
725         * testing/js/WebCoreTestSupport.cpp: Removed.
726         * testing/js/WebCoreTestSupport.h: Removed.
727         * testing/v8/WebCoreTestSupport.cpp: Removed.
728         * testing/v8/WebCoreTestSupport.h: Removed.
729
730 2011-05-19  Dimitri Glazkov  <dglazkov@chromium.org>
731
732         One more fix after r86869.
733
734         * WebCore.exp.in: Made __ZN7WebCore12JSDOMWrapperD2Ev only export for debug builds.
735
736 2011-05-19  Anders Carlsson  <andersca@apple.com>
737
738         Add two more symbols needed by the window.internals library.
739
740         * WebCore.exp.in:
741
742 2011-05-19  Dimitri Glazkov  <dglazkov@chromium.org>
743
744         Fix Leopard build after r86869.
745
746         * WebCore.exp.in: Moved now-always-used exported symbols out of the conditional guard.
747
748 2011-05-19  Robert Hogan  <robert@webkit.org>
749
750         Reviewed by Andreas Kling.
751
752         [Qt] Fix plugins/windowless_plugin_paint_test.html
753         https://bugs.webkit.org/show_bug.cgi?id=60992
754
755         Call gdk_init_check before gdk_display_get_default().
756         If we don't do this, gdk_display_get_default() will hang
757         the next time it's called.
758
759         * plugins/qt/PluginViewQt.cpp:
760         (WebCore::getPluginDisplay):
761
762 2011-05-18  Dimitri Glazkov  <dglazkov@chromium.org>
763
764         Reviewed by Darin Adler.
765
766         Add build logistics and plumbing for window.internals object.
767         https://bugs.webkit.org/show_bug.cgi?id=60313
768
769         Test: fast/harness/internals-object.html
770
771         * DerivedSources.make: Added support for generating from Internals.idl.
772         * WebCore.gyp/WebCore.gyp: Added new webcore_test_support library.
773         * WebCore.gypi: Ditto.
774         * WebCore.xcodeproj/project.pbxproj: Added WebCoreTestSupport library.
775         * testing/Internals.cpp: Added.
776         * testing/Internals.h: Added.
777         * testing/Internals.idl: Added.
778         * testing/js/WebCoreTestSupport.cpp: Added.
779         * testing/js/WebCoreTestSupport.h: Added.
780         * testing/v8/WebCoreTestSupport.cpp: Added.
781         * testing/v8/WebCoreTestSupport.h: Added.
782
783 2011-05-19  Dimitri Glazkov  <dglazkov@chromium.org>
784
785         Accept XCode's decisions to keep modifying WebCore.xcodeproj.
786
787         * WebCore.xcodeproj/project.pbxproj: Opened in XCode then closed.
788
789 2011-05-19  Andrew Wason  <rectalogic@rectalogic.com>
790
791         Reviewed by Darin Adler.
792
793         Fix GraphicsContext3DQt.cpp compile error
794         https://bugs.webkit.org/show_bug.cgi?id=61128
795
796         * platform/graphics/qt/GraphicsContext3DQt.cpp:
797         (WebCore::GraphicsContext3D::GraphicsContext3D):
798          clear() m_internal OwnPtr.
799
800 2011-05-19  Tonis Tiigi  <tonistiigi@gmail.com>
801
802         Reviewed by Pavel Feldman.
803
804         Web Inspector: Resizing columns in the network panel is weird
805         https://bugs.webkit.org/show_bug.cgi?id=55238
806
807         Makes network panel column resizing more usable by adding "first only" and "last only"
808         resizing methods to WebInspector.DataGrid. Current behavior is named "nearest" and
809         remains default. Network panels datagrid is set to use method "last".
810
811         * inspector/front-end/DataGrid.js:
812         (WebInspector.DataGrid.prototype.get resizeMethod):
813         (WebInspector.DataGrid.prototype.set resizeMethod):
814         (WebInspector.DataGrid.prototype._resizerDragging):
815         * inspector/front-end/NetworkPanel.js:
816         (WebInspector.NetworkPanel.prototype._createTable):
817
818 2011-05-19  Ryosuke Niwa  <rniwa@webkit.org>
819
820         Reviewed by Darin Adler.
821
822         JoinTextNodesCommand is never used
823         https://bugs.webkit.org/show_bug.cgi?id=61089
824
825         Deleted JoinTextNodesCommand because it's never used.
826
827         * CMakeLists.txt:
828         * GNUmakefile.list.am:
829         * WebCore.gypi:
830         * WebCore.pro:
831         * WebCore.vcproj/WebCore.vcproj:
832         * WebCore.xcodeproj/project.pbxproj:
833         * editing/CompositeEditCommand.cpp:
834         * editing/CompositeEditCommand.h:
835         * editing/EditingAllInOne.cpp:
836         * editing/JoinTextNodesCommand.cpp: Removed.
837         * editing/JoinTextNodesCommand.h: Removed.
838
839 2011-05-19  Ryosuke Niwa  <rniwa@webkit.org>
840
841         Reviewed by Darin Adler.
842
843         REGRESSION (r83322): Many crashes in Mail.app in WebCore::Node::nodeIndex
844         https://bugs.webkit.org/show_bug.cgi?id=61012
845
846         The crash was caused by ReplaceSelectionCommand's inserting content into a middle of the paragraph
847         being moved when the insertion position's container node is the node to split to. Fixed the crash
848         by not changing the insertion position in such a case.
849
850         Unfortunately, this fix caused markup to bloat in some tests but we'll take this regression since
851         it's much better than crashing.
852
853         Test: editing/pasteboard/paste-after-inline-style-element.html
854
855         * editing/ReplaceSelectionCommand.cpp:
856         (WebCore::ReplaceSelectionCommand::doApply):
857
858 2011-05-19  Brady Eidson  <beidson@apple.com>
859
860         Try to fix SUPPORT_AUTOCORRECTION_PANEL build.
861
862         * editing/SpellingCorrectionController.cpp:
863         (WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
864         (WebCore::SpellingCorrectionController::processMarkersOnTextToBeReplacedByResult):
865
866 2011-05-19  Darin Adler  <darin@apple.com>
867
868         Try to fix SUPPORT_AUTOCORRECTION_PANEL build.
869
870         * editing/SpellingCorrectionController.cpp:
871         (WebCore::markersHaveIdenticalDescription): Call description() function.
872
873 2011-05-19  Andrey Adaikin  <aandrey@google.com>
874
875         Reviewed by Pavel Feldman.
876
877         Web Inspector: switch to Scripts panel is too slow
878         https://bugs.webkit.org/show_bug.cgi?id=61030
879
880         - It is very expensive to listen to the DOM mutation events, thus we remove the listeners whenever we do any internal
881         DOM manipulations (such as expand/collapse line rows) and set the listeners back when we are finished.
882         - Also, when we switch to the Scripts panel that have a non-zero scrollTop offset, we would do the rendering work twice.
883
884         * inspector/front-end/SourceFrame.js:
885         (WebInspector.SourceFrame.prototype.show):
886         * inspector/front-end/TextViewer.js:
887         (WebInspector.TextEditorMainPanel):
888         (WebInspector.TextEditorMainPanel.prototype.beginDomUpdates):
889         (WebInspector.TextEditorMainPanel.prototype.endDomUpdates):
890         (WebInspector.TextEditorMainPanel.prototype._enableDOMNodeRemovedListener):
891         (WebInspector.TextEditorMainChunk):
892         (WebInspector.TextEditorMainChunk.prototype.set expanded):
893         (WebInspector.TextEditorMainChunk.prototype._createRow):
894
895 2011-05-19  Pavel Feldman  <pfeldman@google.com>
896
897         Not reviewed: inspector protocol tests fixed.
898
899         * inspector/InjectedScriptSource.js:
900
901 2011-05-19  David Grogan  <dgrogan@chromium.org>
902
903         Reviewed by David Levin.
904
905         Make EventQueue post a Task to the task queue for each asynchronous event
906         https://bugs.webkit.org/show_bug.cgi?id=60790
907
908         Currently EventQueue queues up events to be fired asynchronously and
909         fires each of them when a single DOMTimer goes off.  In the words of
910         dimich, "Having 2 queues will sooner or later cause problems with
911         ordering of tasks, termination, suspension and other things that all
912         require some control on how queues operate."
913
914         No new tests; this is just a refactoring to avoid potential future
915         problems.
916
917         * dom/EventQueue.cpp:
918         (WebCore::EventQueue::EventQueue):
919         (WebCore::EventQueue::EventDispatcherTask::create):
920         (WebCore::EventQueue::EventDispatcherTask::dispatchEvent):
921         (WebCore::EventQueue::EventDispatcherTask::performTask):
922         (WebCore::EventQueue::EventDispatcherTask::cancel):
923         (WebCore::EventQueue::EventDispatcherTask::EventDispatcherTask):
924         (WebCore::EventQueue::removeEvent):
925         (WebCore::EventQueue::enqueueEvent):
926         (WebCore::EventQueue::enqueueOrDispatchScrollEvent):
927         (WebCore::EventQueue::cancelEvent):
928         (WebCore::EventQueue::cancelQueuedEvents):
929         * dom/EventQueue.h:
930
931 2011-05-18  Yury Semikhatsky  <yurys@chromium.org>
932
933         Reviewed by Pavel Feldman.
934
935         InjectedScriptSource.js - "Don't be eval()."
936         https://bugs.webkit.org/show_bug.cgi?id=60800
937
938         Thanks to Adam Barth for providing JSC implementation!
939
940         InjectedScriptHost.evaluate is used to perform script evaluations for
941         inspector needs. This method is not affected by CSP and should fix inspector
942         on pages with CSP restrictions.
943
944         Test: inspector/console/console-eval-blocked.html
945
946         * bindings/js/JSInjectedScriptHostCustom.cpp:
947         (WebCore::JSInjectedScriptHost::evaluate):
948         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
949         (WebCore::V8InjectedScriptHost::evaluateCallback):
950         (WebCore::V8InjectedScriptHost::inspectedNodeCallback):
951         * inspector/InjectedScriptHost.idl:
952         * inspector/InjectedScriptSource.js:
953         (.):
954
955 2011-05-19  Pavel Feldman  <pfeldman@google.com>
956
957         Reviewed by Yury Semikhatsky.
958
959         Web Inspector: expose object class name as a part of RemoteObject mirror.
960         https://bugs.webkit.org/show_bug.cgi?id=61067
961
962         * inspector/InjectedScriptSource.js:
963         * inspector/Inspector.json:
964
965 2011-05-19  Pavel Feldman  <pfeldman@google.com>
966
967         Reviewed by Yury Semikhatsky.
968
969         Web Inspector: make "this" a part of callFrame, not scope in the protocol.
970         https://bugs.webkit.org/show_bug.cgi?id=61057
971
972         * inspector/InjectedScriptSource.js:
973         * inspector/Inspector.json:
974         * inspector/front-end/ScopeChainSidebarPane.js:
975         (WebInspector.ScopeChainSidebarPane.prototype.update):
976
977 2011-05-19  Kent Tamura  <tkent@chromium.org>
978
979         Reviewed by Hajime Morita.
980
981         tooLong validity should not be true for a value set by a script
982         https://bugs.webkit.org/show_bug.cgi?id=60948
983
984         The specification has been updated so that tooLong should be true only
985         for user-edit values.
986         
987         Introduce m_wasModifiedByUser flag to HTMLInputElement and
988         HTMLTextAreaElemnt. It is set to true when a renderer updates the
989         value, and is cleared when the value is updated by others.
990
991         * html/HTMLInputElement.cpp:
992         (WebCore::HTMLInputElement::HTMLInputElement):
993           Initialize m_wasModifiedByUser.
994         (WebCore::HTMLInputElement::tooLong):
995           Skip the check if m_wasModifiedByUser is false.
996         (WebCore::HTMLInputElement::updateType): Clear m_wasModifiedByUser.
997         (WebCore::HTMLInputElement::copyNonAttributeProperties):
998         (WebCore::HTMLInputElement::setValue): If sendChange is true,
999           m_wasModifiedByUser should be true because sendChange is set in a case
1000           of form auto-fill.  We assume a value set by form auto-fill is a kind
1001           of user-edit.
1002         (WebCore::HTMLInputElement::setValueFromRenderer):
1003           m_wasModifiedByUser should be true for the update by a renderer.
1004         * html/HTMLInputElement.h: Declare m_wasModifiedByUser.
1005         * html/HTMLTextAreaElement.cpp:
1006         (WebCore::HTMLTextAreaElement::HTMLTextAreaElement):
1007           Initialize m_wasModifiedByUser.
1008         (WebCore::HTMLTextAreaElement::updateValue):
1009           m_wasModifiedByUser should be true for the update by a renderer.
1010         (WebCore::HTMLTextAreaElement::setValueCommon): Clear m_wasModifiedByUser.
1011         (WebCore::HTMLTextAreaElement::tooLong):
1012           Skip the check if m_wasModifiedByUser is false.
1013         * html/HTMLTextAreaElement.h: Declare m_wasModifiedByUser.
1014
1015 2011-05-19  David Barr  <davidbarr@chromium.org>
1016
1017         Reviewed by Simon Fraser.
1018
1019         CSS3: We fail 'border radius sum of radii' test
1020         https://bugs.webkit.org/show_bug.cgi?id=38788
1021
1022         Ignore border-radius properties with negative values.
1023
1024         Test: fast/css/border-radius-non-negative.html
1025
1026         * WebCore.xcodeproj/project.pbxproj:
1027         * css/CSSParser.cpp:
1028         (WebCore::CSSParser::parseValue):
1029         (WebCore::CSSParser::parseBorderRadius):
1030
1031 2011-05-19  Yuta Kitamura  <yutak@chromium.org>
1032
1033         Reviewed by Kent Tamura.
1034
1035         WebSocket: Use ScriptContext::Task to hold pending events of ThreadableWebSocketChannelClientWrapper
1036         https://bugs.webkit.org/show_bug.cgi?id=61034
1037
1038         Refactoring only. No new tests.
1039
1040         * websockets/ThreadableWebSocketChannelClientWrapper.cpp:
1041         (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
1042         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
1043         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
1044         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
1045         (WebCore::ThreadableWebSocketChannelClientWrapper::resume):
1046         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingTasks):
1047         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnectCallback):
1048         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessageCallback):
1049         (WebCore::ThreadableWebSocketChannelClientWrapper::didCloseCallback):
1050         * websockets/ThreadableWebSocketChannelClientWrapper.h:
1051         Remove m_pendingConnected, m_pendingMessages and m_pendingClosed, and use ScriptContext::Task
1052         to hold these pending events.
1053
1054 2011-05-19  Emil A Eklund  <eae@chromium.org>
1055
1056         Reviewed by Alexey Proskuryakov.
1057
1058         REGRESSION (r80808): Multiple <select> - Selection reset to first element from multiple selected ones
1059         https://bugs.webkit.org/show_bug.cgi?id=60986
1060
1061         * html/HTMLSelectElement.cpp:
1062         (WebCore::HTMLSelectElement::setMultiple):
1063         Don't restore selection if the multiple attribute hasn't changed.
1064
1065 2011-05-18  Fumitoshi Ukai  <ukai@chromium.org>
1066
1067         Reviewed by Alexey Proskuryakov.
1068
1069         http/tests/websocket/tests/workers/worker-handshake-challenge-randomness.html crashed once on Windows XP Debug (Tests)
1070         https://bugs.webkit.org/show_bug.cgi?id=57048
1071
1072         * platform/network/cf/SocketStreamHandleCFNet.cpp:
1073         (WebCore::SocketStreamHandle::platformClose): use loaderRunLoop to schedule streams on platform WIN
1074
1075 2011-05-18  MORITA Hajime  <morrita@google.com>
1076
1077         Unreviewed attempt to fix clang build.
1078
1079         * rendering/InlineTextBox.h:
1080
1081 2011-05-18  Nat Duca  <nduca@chromium.org>
1082
1083         Reviewed by James Robinson.
1084
1085         [chromium] Add histograms for paint times
1086         https://bugs.webkit.org/show_bug.cgi?id=61010
1087
1088         * platform/graphics/chromium/ContentLayerChromium.cpp:
1089         (WebCore::ContentLayerPainter::paint):
1090
1091 2011-05-18  Adrienne Walker  <enne@google.com>
1092
1093         Reviewed by James Robinson.
1094
1095         [chromium] Fix incorrect size when clipping image layer upload rects
1096         https://bugs.webkit.org/show_bug.cgi?id=61105
1097
1098         The clipped destination and source rects should have the same size.
1099
1100         * platform/graphics/chromium/ImageLayerChromium.cpp:
1101         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
1102
1103 2011-05-17  MORITA Hajime  <morrita@google.com>
1104
1105         Reviewed by Tony Chang.
1106
1107         [Refactoring] Member variables of DocumentMarker should be encapsulated.
1108         https://bugs.webkit.org/show_bug.cgi?id=56814
1109
1110         - Moved DocumentMarker's member variables to private and added getters for them.
1111         - Added DocumentMarker setters and constructors, which contain assertions against m_type values
1112           because description and activeMatch are used with specific type of MarkerType.
1113         - Moved chromium's WebKit::WebFrameImpl::addMarker() to DocumentMarkerController::addTextMatchMarker()
1114           because it accesses DocumentMarker internals.
1115         - Moved a version of DMC::addMarker() to private and add alternatives that hide
1116           internals of DocumentMarker. (The internal will be renewed by upcoming change.)
1117         
1118         * dom/DocumentMarker.h:
1119         (WebCore::DocumentMarker::type):
1120         (WebCore::DocumentMarker::startOffset):
1121         (WebCore::DocumentMarker::endOffset):
1122         (WebCore::DocumentMarker::description):
1123         (WebCore::DocumentMarker::hasDescription):
1124         (WebCore::DocumentMarker::activeMatch):
1125         (WebCore::DocumentMarker::clearDescription):
1126         (WebCore::DocumentMarker::setStartOffset):
1127         (WebCore::DocumentMarker::setEndOffset):
1128         (WebCore::DocumentMarker::operator==):
1129         (WebCore::DocumentMarker::DocumentMarker):
1130         (WebCore::DocumentMarker::shiftOffsets):
1131         (WebCore::DocumentMarker::setActiveMatch):
1132         * dom/DocumentMarkerController.cpp:
1133         (WebCore::DocumentMarkerController::addMarker):
1134         (WebCore::DocumentMarkerController::addTextMatchMarker):
1135         (WebCore::DocumentMarkerController::copyMarkers):
1136         (WebCore::DocumentMarkerController::removeMarkers):
1137         (WebCore::DocumentMarkerController::markerContainingPoint):
1138         (WebCore::DocumentMarkerController::markersInRange):
1139         (WebCore::DocumentMarkerController::renderedRectsForMarkers):
1140         (WebCore::DocumentMarkerController::removeMarkersFromList):
1141         (WebCore::DocumentMarkerController::repaintMarkers):
1142         (WebCore::DocumentMarkerController::shiftMarkers):
1143         (WebCore::DocumentMarkerController::setMarkersActive):
1144         (WebCore::DocumentMarkerController::hasMarkers):
1145         (WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
1146         (WebCore::DocumentMarkerController::showMarkers):
1147         * dom/DocumentMarkerController.h:
1148         * editing/CompositeEditCommand.cpp:
1149         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
1150         * editing/DeleteSelectionCommand.cpp:
1151         (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
1152         * editing/Editor.cpp:
1153         (WebCore::Editor::selectionStartHasMarkerFor):
1154         * editing/SpellingCorrectionController.cpp:
1155         (WebCore::SpellingCorrectionController::respondToChangedSelection):
1156         * editing/SpellingCorrectionController.h:
1157         (WebCore::SpellingCorrectionController::shouldStartTimerFor):
1158         * rendering/HitTestResult.cpp:
1159         (WebCore::HitTestResult::spellingToolTip):
1160         (WebCore::HitTestResult::replacedString):
1161         * rendering/InlineTextBox.cpp:
1162         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
1163         (WebCore::InlineTextBox::paintTextMatchMarker):
1164         (WebCore::InlineTextBox::computeRectForReplacementMarker):
1165         (WebCore::InlineTextBox::paintDocumentMarkers):
1166         * rendering/svg/SVGInlineFlowBox.cpp:
1167         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
1168
1169 2011-05-18  Oliver Hunt  <oliver@apple.com>
1170
1171         Reviewed by Geoffrey Garen.
1172
1173         +[WebScriptObject throwException:] doesn't work when invoked from obj-c field access
1174         https://bugs.webkit.org/show_bug.cgi?id=61100
1175
1176         The objc bindings were written to assume exceptions would
1177         come from obj-c style exceptions, rather than throwException:
1178         This code simply calls the global ObjcInstance mechanism for
1179         transferring the reported exception.
1180
1181         * bridge/objc/objc_instance.h:
1182         * bridge/objc/objc_runtime.mm:
1183         (JSC::Bindings::ObjcField::valueFromInstance):
1184         (JSC::Bindings::ObjcField::setValueToInstance):
1185
1186 2011-05-16  Adrienne Walker  <enne@google.com>
1187
1188         Reviewed by James Robinson.
1189
1190         [chromium] Robustly handle mapTexSubImage2D returning NULL
1191         https://bugs.webkit.org/show_bug.cgi?id=60934
1192
1193         Also, lazily create the temp buffer so that both the map and non-map
1194         cases can use it.
1195
1196         * platform/graphics/chromium/LayerTextureSubImage.cpp:
1197         (WebCore::LayerTextureSubImage::setSubImageSize):
1198         (WebCore::LayerTextureSubImage::uploadWithTexSubImage):
1199         (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
1200
1201 2011-05-18  Emil A Eklund  <eae@chromium.org>
1202
1203         Reviewed by Darin Adler.
1204
1205         Change RenderTextControl::hitInnerTextElement to use IntPoint
1206         https://bugs.webkit.org/show_bug.cgi?id=61003
1207
1208         Covered by existing tests.
1209
1210         * rendering/RenderTextControl.cpp:
1211         (WebCore::RenderTextControl::hitInnerTextElement):
1212         * rendering/RenderTextControl.h:
1213         * rendering/RenderTextControlMultiLine.cpp:
1214         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
1215         * rendering/RenderTextControlSingleLine.cpp:
1216         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
1217
1218 2011-05-18  Chris Fleizach  <cfleizach@apple.com>
1219
1220         Reviewed by Maciej Stachowiak.
1221
1222         WK2: VoiceOver cannot move focus into a web area programmatically
1223         https://bugs.webkit.org/show_bug.cgi?id=60661
1224
1225         Accessibility code relies on the ability to bring focus to the containing widget view.
1226         In WK2, that message needs to be propagated to the UI process.
1227
1228         * page/ChromeClient.h:
1229         (WebCore::ChromeClient::makeFirstResponder):
1230         * page/mac/ChromeMac.mm:
1231         (WebCore::Chrome::focusNSView):
1232         * platform/mac/WidgetMac.mm:
1233         (WebCore::Widget::setFocus):
1234
1235 2011-05-18  Alok Priyadarshi  <alokp@chromium.org> and Adrienne Walker  <enne@google.com>
1236
1237         Reviewed by James Robinson.
1238
1239         [chromium] Split canvas from LayerTilerChromium
1240         https://bugs.webkit.org/show_bug.cgi?id=60719
1241
1242         LayerTilerChromium now just does tiling. It delegates the task of painting and updating textures to LayerTextureUpdater.
1243         Also abstracted LayerTextureSubImage to upload texture pixels.
1244
1245         * WebCore.gypi:
1246         * platform/chromium/TraceEvent.h:
1247         * platform/graphics/chromium/ContentLayerChromium.cpp:
1248         (WebCore::ContentLayerChromium::create):
1249         (WebCore::ContentLayerChromium::ContentLayerChromium):
1250         (WebCore::ContentLayerChromium::~ContentLayerChromium):
1251         (WebCore::ContentLayerChromium::paintContentsIfDirty):
1252         (WebCore::ContentLayerChromium::cleanupResources):
1253         (WebCore::ContentLayerChromium::setLayerRenderer):
1254         (WebCore::ContentLayerChromium::createTextureUpdater):
1255         (WebCore::ContentLayerChromium::drawsContent):
1256         (WebCore::ContentLayerChromium::createTilerIfNeeded):
1257         (WebCore::ContentLayerChromium::updateCompositorResources):
1258         * platform/graphics/chromium/ContentLayerChromium.h:
1259         * platform/graphics/chromium/ImageLayerChromium.cpp:
1260         (WebCore::ImageLayerTextureUpdater::ImageLayerTextureUpdater):
1261         (WebCore::ImageLayerTextureUpdater::~ImageLayerTextureUpdater):
1262         (WebCore::ImageLayerTextureUpdater::orientation):
1263         (WebCore::ImageLayerTextureUpdater::prepareToUpdate):
1264         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
1265         (WebCore::ImageLayerTextureUpdater::imageRect):
1266         (WebCore::ImageLayerChromium::paintContentsIfDirty):
1267         (WebCore::ImageLayerChromium::updateCompositorResources):
1268         (WebCore::ImageLayerChromium::createTextureUpdater):
1269         * platform/graphics/chromium/ImageLayerChromium.h:
1270         * platform/graphics/chromium/LayerPainterChromium.h: Added.
1271         * platform/graphics/chromium/LayerRendererChromium.cpp:
1272         (WebCore::LayerRendererChromium::create):
1273         (WebCore::LayerRendererChromium::LayerRendererChromium):
1274         (WebCore::LayerRendererChromium::updateRootLayerContents):
1275         (WebCore::LayerRendererChromium::drawRootLayer):
1276         (WebCore::LayerRendererChromium::updateAndDrawLayers):
1277         (WebCore::LayerRendererChromium::updateLayers):
1278         * platform/graphics/chromium/LayerRendererChromium.h:
1279         * platform/graphics/chromium/LayerTextureSubImage.cpp: Added.
1280         (WebCore::LayerTextureSubImage::LayerTextureSubImage):
1281         (WebCore::LayerTextureSubImage::~LayerTextureSubImage):
1282         (WebCore::LayerTextureSubImage::setSubImageSize):
1283         (WebCore::LayerTextureSubImage::upload):
1284         (WebCore::LayerTextureSubImage::uploadWithTexSubImage):
1285         (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
1286         * platform/graphics/chromium/LayerTextureSubImage.h: Copied from Source/WebCore/platform/chromium/TraceEvent.h.
1287         * platform/graphics/chromium/LayerTextureUpdater.h: Copied from Source/WebCore/platform/chromium/TraceEvent.h.
1288         (WebCore::LayerTextureUpdater::LayerTextureUpdater):
1289         (WebCore::LayerTextureUpdater::~LayerTextureUpdater):
1290         (WebCore::LayerTextureUpdater::context):
1291         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: Added.
1292         (WebCore::LayerTextureUpdaterCanvas::LayerTextureUpdaterCanvas):
1293         (WebCore::LayerTextureUpdaterCanvas::paintContents):
1294         (WebCore::LayerTextureUpdaterBitmap::LayerTextureUpdaterBitmap):
1295         (WebCore::LayerTextureUpdaterBitmap::prepareToUpdate):
1296         (WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
1297         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: Added.
1298         (WebCore::LayerTextureUpdaterCanvas::~LayerTextureUpdaterCanvas):
1299         (WebCore::LayerTextureUpdaterCanvas::contentRect):
1300         (WebCore::LayerTextureUpdaterBitmap::~LayerTextureUpdaterBitmap):
1301         (WebCore::LayerTextureUpdaterBitmap::orientation):
1302         * platform/graphics/chromium/LayerTilerChromium.cpp:
1303         (WebCore::LayerTilerChromium::create):
1304         (WebCore::LayerTilerChromium::LayerTilerChromium):
1305         (WebCore::LayerTilerChromium::setTileSize):
1306         (WebCore::LayerTilerChromium::prepareToUpdate):
1307         (WebCore::LayerTilerChromium::updateRect):
1308         (WebCore::LayerTilerChromium::draw):
1309         * platform/graphics/chromium/LayerTilerChromium.h:
1310         (WebCore::LayerTilerChromium::Tile::Tile):
1311         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1312         (WebCore::CCHeadsUpDisplay::draw):
1313
1314 2011-05-18  Mark Pilgrim  <pilgrim@chromium.org>
1315
1316         Reviewed by Tony Chang.
1317
1318         IndexedDB put() should fail adding to object store that uses
1319         out-of-line keys and has no key generator and the key parameter
1320         was not provided
1321         https://bugs.webkit.org/show_bug.cgi?id=58609
1322
1323         Out-of-line keys means that objectStore->m_keyPath is null in ::put(),
1324         no key generator means that objectStore->autoIncrement() is false, and
1325         key parameter was not provided means that prpKey will be a null pointer.
1326         The combination of these 3 should throw a DATA_ERR.
1327
1328         Test: storage/indexeddb/mozilla/key-requirements-put-no-key.html
1329
1330         * storage/IDBObjectStoreBackendImpl.cpp:
1331         (WebCore::IDBObjectStoreBackendImpl::put):
1332
1333 2011-05-18  Chris Rogers  <crogers@google.com>
1334
1335         Reviewed by James Robinson.
1336
1337         EqualPowerPanner is not using the correct azimuth range for stereo panning
1338         https://bugs.webkit.org/show_bug.cgi?id=61085
1339
1340         No new tests since audio API is not yet implemented.
1341
1342         * platform/audio/EqualPowerPanner.cpp:
1343         (WebCore::EqualPowerPanner::pan):
1344
1345 2011-05-18  Yi Shen  <yi.4.shen@nokia.com>
1346
1347         Reviewed by Andreas Kling.
1348
1349         [Qt] Enterkey to go to Newline does not work in the text area(in HTML form)
1350         https://bugs.webkit.org/show_bug.cgi?id=33179
1351
1352         Fill the missing key text for the EnterKey event.
1353
1354         Tests: fast/events/onsearch-enter.html
1355
1356         * platform/qt/PlatformKeyboardEventQt.cpp:
1357         (WebCore::keyTextForKeyEvent):
1358
1359 2011-05-17  Timothy Hatcher  <timothy@apple.com>
1360
1361         Update the the context menu to reflect the system search provider on Mac.
1362
1363         <rdar://problem/9198419>
1364
1365         Reviewed by Sam Weinig.
1366
1367         * English.lproj/Localizable.strings: Updated.
1368         * Source/WebCore/WebCore.exp.in: Added _wkCopyDefaultSearchProviderDisplayName.
1369         * platform/DefaultLocalizationStrategy.cpp:
1370         (WebCore::DefaultLocalizationStrategy::contextMenuItemTagSearchWeb): Use wkCopyDefaultSearchProviderDisplayName to
1371         create the string.
1372         * platform/mac/WebCoreSystemInterface.h: Added wkCopyDefaultSearchProviderDisplayName.
1373         * platform/mac/WebCoreSystemInterface.mm: Ditto.
1374
1375 2011-05-18  Rob Buis  <rbuis@rim.com>
1376
1377         Reviewed by Nikolas Zimmermann.
1378
1379         Marker test from ietestcenter fails
1380         https://bugs.webkit.org/show_bug.cgi?id=60721
1381
1382         Change <marker> renderer creation behaviour to always create the renderer. This fixes
1383         the problem that no marker is rendered when display=none is set on the <marker>. The
1384         specification states that display=none should have no influence on <marker> usage:
1385         "The ‘display’ property does not apply to the ‘marker’ element; thus, ..., and ‘marker’
1386         elements are available for referencing even when the ‘display’ property on the ‘marker’
1387         element or any of its ancestors is set to none."
1388
1389         Tests: svg/W3C-SVG-1.1-SE/painting-marker-07-f.svg
1390                svg/custom/painting-marker-07-f-inherit.svg
1391
1392         * svg/SVGMarkerElement.h:
1393         (WebCore::SVGMarkerElement::rendererIsNeeded):
1394
1395 2011-05-18  Alexis Menard  <alexis.menard@openbossa.org>, Simon Hausmann  <simon.hausmann@nokia.com>
1396
1397         Reviewed by Eric Carlson.
1398
1399         MediaElements fails to load the data in some cases.
1400         https://bugs.webkit.org/show_bug.cgi?id=60760
1401
1402         WebKitWebSourceGStreamer is the interface between WebKit and GStreamer
1403         that uses the ResourceHandle API to request data and pass it down. For
1404         our builds it is absolutely essential that we have a NetworkingContext
1405         available there, in order to get access to the QNetworkAccessManager.
1406         No access means we basically cannot load the video. The WebSource gains
1407         access to the NetworkingContext through a WebCore::Frame pointer it has.
1408
1409         MediaPlayerPrivateGStreamer is responsible for propagating a pointer of
1410         the WebCore::Frame to the WebKitWebSource in
1411         mediaPlayerPrivateSourceChangedCallback. In there we used the MediaPlayer's
1412         frameView() accessor to access the frame. However the frameView() member
1413         is only set through the render tree's RenderVideo, which is rather unreliable
1414         given that some sites create "fake" video tags initially that only become
1415         visible later (or never).
1416
1417         A more reliable way is to simply use the document of the MediaPlayerClient,
1418         which is provided at constructor time.
1419
1420         Test: http/tests/media/media-can-load-when-hidden.html
1421
1422         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1423         (WebCore::MediaPlayerPrivateGStreamer::sourceChanged):
1424
1425 2011-05-18  Adrienne Walker  <enne@google.com>
1426
1427         Reviewed by James Robinson.
1428
1429         [chromium] Check HUD texture reserve status before using texture
1430         https://bugs.webkit.org/show_bug.cgi?id=61082
1431
1432         This only changes behavior behind a flag, so shouldn't impact any tests.
1433
1434         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
1435         (WebCore::CCHeadsUpDisplay::draw):
1436
1437 2011-05-18  Oliver Hunt  <oliver@apple.com>
1438
1439         Reviewed by Sam Weinig.
1440
1441         JSGlobalObject and some others do GC allocation during initialization, which can cause heap corruption
1442         https://bugs.webkit.org/show_bug.cgi?id=61090
1443
1444         Rather than having Constructor objects create their structure
1445         as part of initialisation, we now pass their expected structure
1446         in as an argument.  This required fixing the few custom Constructors
1447         and the code generator.
1448
1449         * bindings/js/JSAudioConstructor.cpp:
1450         (WebCore::JSAudioConstructor::JSAudioConstructor):
1451         * bindings/js/JSAudioConstructor.h:
1452         * bindings/js/JSDOMGlobalObject.h:
1453         (WebCore::getDOMConstructor):
1454           Pass the Constructor objects structure in as an argument
1455         * bindings/js/JSImageConstructor.cpp:
1456         (WebCore::JSImageConstructor::JSImageConstructor):
1457         * bindings/js/JSImageConstructor.h:
1458         * bindings/js/JSOptionConstructor.cpp:
1459         (WebCore::JSOptionConstructor::JSOptionConstructor):
1460         * bindings/js/JSOptionConstructor.h:
1461         * bindings/scripts/CodeGeneratorJS.pm:
1462
1463 2011-05-18  Abhishek Arya  <inferno@chromium.org>
1464
1465         Reviewed by Beth Dakin.
1466
1467         Remove removeChild on table caption since destroy call
1468         already does that.
1469         https://bugs.webkit.org/show_bug.cgi?id=61083
1470
1471         Test: fast/table/table-captions-child-visible-crash.html
1472
1473         * rendering/RenderTable.cpp:
1474         (WebCore::RenderTable::recalcCaption):
1475
1476 2011-05-18  Evan Martin  <evan@chromium.org>
1477
1478         Reviewed by Tony Chang.
1479
1480         [chromium] make action_derivedsourcesallinone.py quiet
1481         https://bugs.webkit.org/show_bug.cgi?id=61081
1482
1483         In gyp, it's the responsibility of the build system to print what actions are doing;
1484         for example, the compile command is generally silent, while the build system prints
1485         "compiling".
1486
1487         Make this program behave like a compiler: silent on success.
1488
1489         * WebCore.gyp/scripts/action_derivedsourcesallinone.py:
1490         delete a print statement.
1491
1492 2011-05-18  David Kilzer  <ddkilzer@apple.com>
1493
1494         <http://webkit.org/b/61078> Use toHTTPPipeliningPriority() in initializeMaximumHTTPConnectionCountPerHost()
1495
1496         Reviewed by Joseph Pecoraro.
1497
1498         * platform/network/cf/ResourceRequestCFNet.cpp:
1499         (WebCore::initializeMaximumHTTPConnectionCountPerHost): Use
1500         toHTTPPipeliningPriority() to convert arguments passed to
1501         wkSetHTTPPipeliningMaximumPriority() and
1502         wkSetHTTPPipeliningMinimumFastLanePriority().
1503
1504 2011-05-18  Erik Arvidsson  <arv@chromium.org>
1505
1506         Reviewed by Ojan Vafai.
1507
1508         event.clientX/clientY is 0/0 in a click generated through a label
1509         https://bugs.webkit.org/show_bug.cgi?id=56606
1510
1511         This copies the coordinates from the underlying event to the simulated mouse event if the underlying event
1512         is a mouse event.
1513
1514         This makes us match Firefox and IE.
1515
1516         Test: fast/events/simulated-click-coords.html
1517
1518         * dom/MouseEvent.cpp:
1519         (WebCore::SimulatedMouseEvent::SimulatedMouseEvent):
1520
1521 2011-05-18  Nikolas Zimmermann  <nzimmermann@rim.com>
1522
1523         Not reviewed. Sorted XCode project file.
1524
1525         * WebCore.xcodeproj/project.pbxproj:
1526
1527 2011-05-18  Alexander Pavlov  <apavlov@chromium.org>
1528
1529         Reviewed by Pavel Feldman.
1530
1531         Web Inspector: Non-color CSS property values can get a color-picker
1532         https://bugs.webkit.org/show_bug.cgi?id=61056
1533
1534         * inspector/front-end/CSSKeywordCompletions.js:
1535         (WebInspector.CSSKeywordCompletions.forProperty):
1536         (WebInspector.CSSKeywordCompletions.isColorAwareProperty):
1537         * inspector/front-end/StylesSidebarPane.js:
1538         (WebInspector.StylePropertyTreeElement.prototype.updateTitle):
1539
1540 2011-05-18  Pratik Solanki  <psolanki@apple.com>
1541
1542         Reviewed by Dan Bernstein.
1543
1544         Don't use DEFINE_STATIC_LOCAL with an unsigned
1545         https://bugs.webkit.org/show_bug.cgi?id=61026
1546
1547         * storage/StorageTracker.cpp:
1548         (WebCore::StorageTracker::syncFileSystemAndTrackerDatabase): DEFINE_STATIC_LOCAL is meant
1549         for objects, not unsigned ints. We can just use static here.
1550
1551 2011-05-18  Rob Buis  <rbuis@rim.com>
1552
1553         Reviewed by Nikolas Zimmermann.
1554
1555         NULL deref when SVG elements have table styles 
1556         https://bugs.webkit.org/show_bug.cgi?id=45561
1557
1558         Restrict computed CSS values for SVG display property to block, inline or none.
1559
1560         Tests: svg/custom/display-table-caption-foreignObject.svg
1561                svg/custom/display-table-caption-inherit-foreignObject.xhtml
1562                svg/custom/display-table-caption-inherit-text.xhtml
1563                svg/custom/display-table-caption-text.svg
1564
1565         * css/CSSStyleSelector.cpp:
1566         (WebCore::SVGDisplayPropertyGuard::SVGDisplayPropertyGuard):
1567         (WebCore::SVGDisplayPropertyGuard::~SVGDisplayPropertyGuard):
1568         (WebCore::isAcceptableForSVGElement):
1569         (WebCore::CSSStyleSelector::applyProperty):
1570
1571 2011-05-18  Pavel Feldman  <pfeldman@google.com>
1572
1573         Reviewed by Yury Semikhatsky.
1574
1575         Web Inspector: [REGRESSION] Completion while on a breakpoint is not working.
1576         https://bugs.webkit.org/show_bug.cgi?id=60811
1577
1578         Test: inspector/debugger/debugger-completions-on-call-frame.html
1579
1580         * inspector/InjectedScriptSource.js:
1581         * inspector/front-end/ConsoleView.js:
1582         (WebInspector.ConsoleView.prototype.completions.else.evaluated):
1583         * inspector/front-end/DebuggerPresentationModel.js:
1584         (WebInspector.PresenationCallFrame.prototype.get variables):
1585         * inspector/front-end/ScriptsPanel.js:
1586         (WebInspector.ScriptsPanel.prototype.selectedCallFrameVariables):
1587
1588 2011-05-18  Nikolas Zimmermann  <nzimmermann@rim.com>
1589
1590         Reviewed by Rob Buis.
1591
1592         All animated SVG enum properties are now ints
1593         https://bugs.webkit.org/show_bug.cgi?id=10749
1594
1595         DECLARE/DEFINE_ANIMATED_ENUMERATION created fooBaseVal()/setFooBaseVal() methods that take int parameters, and stored all enum types as integers.
1596         Modify the SVG DOM API to store real enums, and get rid of any int<->enum conversions. It's now impossible to change any enum values to undefined
1597         types, which is the root of several filter security bugs in the past, that were fixed by adding workarounds.
1598         (Usual workaround: svgAttributeChanged(): if fooAttr has been changed from SVG DOM, and if it's an enum, check whether the enum is in range, or fix it up.)
1599
1600         Using a type-safe internal representation for these enum values we can get rid of ugly int<->enum conversions.
1601         A lot of parseMappedAttribute() functions duplicated the code for parsing enum values (eg. userSpaceOnUse/objectBoundingBox unit values, in pattern/filter/mask/etc..)
1602         Add dozens of new SVGPropertyTraits<EnumType> specializations for all enums we expose to JS, and offer static fromString/toString conversion methods in single places.
1603         Use the new SVGPropertyTraits everywhere in svg/.
1604
1605         This also fixes SVG DOM <-> XML DOM synchronization for SVGAnimatedEnumeration types.
1606         Example: <clipPath clipPathUnits="objectBoundingBox">
1607         myClipPath.clipPathUnits.baseVal = SVGUnitTypes.SVG_UNIT_TYPE_USERSPACEONUSE;
1608         alert(myClipPath.getAttribute('clipPathUnits')); <- without this patch it says "1", now it says "userSpaceOnUse" as expected, and as other browsers do.
1609         We're now properly converting the enum values to strings.
1610
1611         Add testcases for all SVGAnimatedEnumeration objects used in the SVG DOM API. Found several small bugs:
1612         - SVGFEConvolveMatrix 'edgeMode' SVG DOM <-> XML DOM synchronization was not working, because of a typo: s/operatorAttr/edgeModeAttr
1613         - SVGFEConvolveMatrix was missing an synchronizeProperty() implementation, disabling SVG <-> XML DOM synchronization completly.
1614
1615         Tests: svg/dom/SVGAnimatedEnumeration-SVGClipPathElement.html
1616                svg/dom/SVGAnimatedEnumeration-SVGComponentTransferFunctionElement.html
1617                svg/dom/SVGAnimatedEnumeration-SVGFEBlendElement.html
1618                svg/dom/SVGAnimatedEnumeration-SVGFEColorMatrixElement.html
1619                svg/dom/SVGAnimatedEnumeration-SVGFECompositeElement.html
1620                svg/dom/SVGAnimatedEnumeration-SVGFEConvolveMatrixElement.html
1621                svg/dom/SVGAnimatedEnumeration-SVGFEDisplacementMapElement.html
1622                svg/dom/SVGAnimatedEnumeration-SVGFEMorphologyElement.html
1623                svg/dom/SVGAnimatedEnumeration-SVGFETurbulenceElement.html
1624                svg/dom/SVGAnimatedEnumeration-SVGFilterElement.html
1625                svg/dom/SVGAnimatedEnumeration-SVGGradientElement.html
1626                svg/dom/SVGAnimatedEnumeration-SVGMarkerElement.html
1627                svg/dom/SVGAnimatedEnumeration-SVGMaskElement.html
1628                svg/dom/SVGAnimatedEnumeration-SVGPatternElement.html
1629                svg/dom/SVGAnimatedEnumeration-SVGTextContentElement.html
1630                svg/dom/SVGAnimatedEnumeration-SVGTextPathElement.html
1631
1632         Fixes existing svg/dynamic-update/SVGTextContentElement-svgdom-lengthAdjust-prop.html where I found the bug initially.
1633
1634         * GNUmakefile.list.am: Add svg/properties/SVGAnimatedEnumerationPropertyTearOff.h to build.
1635         * WebCore.gypi: Ditto.
1636         * WebCore.pro: Ditto.
1637         * WebCore.vcproj/WebCore.vcproj: Ditto.
1638         * WebCore.xcodeproj/project.pbxproj: Ditto.
1639         * bindings/scripts/CodeGeneratorV8.pm: Add V8 magic, to avoid ambigious conversion warning in toV8(PassRefPtr<SVGAnimatedEnumeration>).
1640         * platform/graphics/GraphicsTypes.h: Cleanup GradientSpreadMethod, as the SVG dependency is gone.
1641         * platform/graphics/filters/FEBlend.cpp:
1642         (WebCore::FEBlend::apply): Turn early-returns (introduce in security patches a while ago) into ASSERTs, as the underlying bug has been fixed.
1643         * platform/graphics/filters/FEDisplacementMap.cpp:
1644         (WebCore::FEDisplacementMap::apply): Ditto.
1645         * rendering/svg/RenderSVGResourceClipper.h: Remove toUnitType() usage, the clipPathUnits() provided by SVGClipPathElement have the correct enum type now.
1646         (WebCore::RenderSVGResourceClipper::clipPathUnits):
1647         * rendering/svg/RenderSVGResourceFilter.h: Remove toUnitType() usage, the filterUnits()/primitiveUnits() provided by SVGFilterElement have the correct enum type now.
1648         (WebCore::RenderSVGResourceFilter::filterUnits):
1649         (WebCore::RenderSVGResourceFilter::primitiveUnits):
1650         * rendering/svg/RenderSVGResourceGradient.cpp: Add helper method platformSpreadMethodFromSVGType() converting from SVGGradientElement::SVGSpreadMethodType to GradientSpreadMethod (platform).
1651         (WebCore::RenderSVGResourceGradient::applyResource):
1652         * rendering/svg/RenderSVGResourceGradient.h: Ditto.
1653         * rendering/svg/RenderSVGResourceLinearGradient.cpp:
1654         (WebCore::RenderSVGResourceLinearGradient::buildGradient): Use platformSpreadMethodFromSVGType().
1655         * rendering/svg/RenderSVGResourceMarker.h: Remove toUnitType() usage, the markerUnits() provided by SVGMarkerElement have the correct enum type now.
1656         (WebCore::RenderSVGResourceMarker::markerUnits):
1657         * rendering/svg/RenderSVGResourceMasker.h: Remove toUnitType() usage, the maskUnits()/maskContentUnits() provided by SVGMaskElement have the correct enum type now.
1658         (WebCore::RenderSVGResourceMasker::maskUnits):
1659         (WebCore::RenderSVGResourceMasker::maskContentUnits):
1660         * rendering/svg/RenderSVGResourceRadialGradient.cpp:
1661         (WebCore::RenderSVGResourceRadialGradient::buildGradient): Use platformSpreadMethodFromSVGType().
1662         * rendering/svg/SVGRenderTreeAsText.cpp:
1663         (WebCore::operator<<): Use SVGPropertyTraits<SomeSVGEnumType>::toString() to convert from enum to string, remove code duplication.
1664         (WebCore::writeCommonGradientProperties):
1665         * rendering/svg/SVGTextChunkBuilder.cpp:
1666         (WebCore::SVGTextChunkBuilder::addTextChunk): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
1667         * rendering/svg/SVGTextLayoutEngine.cpp:
1668         (WebCore::SVGTextLayoutEngine::parentDefinesTextLength): Ditto.
1669         (WebCore::SVGTextLayoutEngine::beginTextPathLayout): Ditto.
1670         * svg/GradientAttributes.h: Change spread method type from platform GradientSpreadMethod to SVGSpreadMethodType.
1671         (WebCore::GradientAttributes::GradientAttributes):
1672         (WebCore::GradientAttributes::spreadMethod):
1673         (WebCore::GradientAttributes::setSpreadMethod):
1674         * svg/SVGAnimatedBoolean.idl: Enable potential exception raising on baseVal setting for the primitive types.
1675         * svg/SVGAnimatedEnumeration.h: Switch from generic SVGAnimatedStaticPropertyTearOff<int> to new SVGAnimatedEnumerationPropertyTearOff<EnumType>.
1676         * svg/SVGAnimatedEnumeration.idl: Enable potential exception raising on baseVal setting for the primitive types.
1677                                           Only SVGAnimatedEnumeration makes use of this if the assigned value is out of range.
1678         * svg/SVGAnimatedInteger.idl: Ditto.
1679         * svg/SVGAnimatedNumber.idl: Ditto.
1680         * svg/SVGAnimatedString.idl: Ditto.
1681         * svg/SVGClipPathElement.cpp:
1682         (WebCore::SVGClipPathElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<EnumType>::fromString(attr->value()).
1683         * svg/SVGClipPathElement.h:
1684         * svg/SVGComponentTransferFunctionElement.cpp:
1685         (WebCore::SVGComponentTransferFunctionElement::SVGComponentTransferFunctionElement): Initialize type to identity, not unknown, as per spec.
1686         (WebCore::SVGComponentTransferFunctionElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<EnumType>::fromString(attr->value()).
1687         (WebCore::SVGComponentTransferFunctionElement::transferFunction): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
1688         * svg/SVGComponentTransferFunctionElement.h: Remove svgAttributeChanged() method, that verified the enum value is not out of range.
1689                                                      It's not possible anymore for these values to go out of range.
1690         * svg/SVGFEBlendElement.cpp:
1691         (WebCore::SVGFEBlendElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<BlendModeType>::fromString(attr->value()).
1692         (WebCore::SVGFEBlendElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
1693         (WebCore::SVGFEBlendElement::build): Ditto.
1694         * svg/SVGFEBlendElement.h: Add SVGPropertyTraits<BlendModeType> specializations.
1695         * svg/SVGFEColorMatrixElement.cpp:
1696         (WebCore::SVGFEColorMatrixElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<ColorMatrixType>::fromString(attr->value()).
1697         (WebCore::SVGFEColorMatrixElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now..
1698         (WebCore::SVGFEColorMatrixElement::build): Ditto.
1699         * svg/SVGFEColorMatrixElement.h: Add SVGPropertyTraits<ColorMatrixType> specializations.
1700         * svg/SVGFECompositeElement.cpp:
1701         (WebCore::SVGFECompositeElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<CompositeOperationType>::fromString(attr->value()).
1702         (WebCore::SVGFECompositeElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
1703         (WebCore::SVGFECompositeElement::build): Ditto.
1704         * svg/SVGFECompositeElement.h: Add SVGPropertyTraits<CompositeOperationType> specializations.
1705         * svg/SVGFEConvolveMatrixElement.cpp: Fix typo, edgeMode needs to be associated with SVGNames::edgeModeAttr, not SVGNames::operatorAttr.
1706         (WebCore::SVGFEConvolveMatrixElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<EdgeModeType>::fromString(attr->value()).
1707         (WebCore::SVGFEConvolveMatrixElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
1708         (WebCore::SVGFEConvolveMatrixElement::synchronizeProperty): Add missing synchronizeProperty() implementation, otherwhise SVG DOM <-> XML DOM is not in sync.
1709         (WebCore::SVGFEConvolveMatrixElement::build): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
1710         * svg/SVGFEConvolveMatrixElement.h: Add SVGPropertyTraits<EdgeModeType> specializations.
1711         * svg/SVGFEDisplacementMapElement.cpp:
1712         (WebCore::SVGFEDisplacementMapElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<ChannelSelectorType>::fromString(attr->value()).
1713         (WebCore::SVGFEDisplacementMapElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
1714         (WebCore::SVGFEDisplacementMapElement::svgAttributeChanged): Remove range validation for enum types, they are always in range now.
1715         (WebCore::SVGFEDisplacementMapElement::build): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
1716         * svg/SVGFEDisplacementMapElement.h: Add SVGPropertyTraits<ChannelSelectorType> specializations.
1717         * svg/SVGFEMorphologyElement.cpp:
1718         (WebCore::SVGFEMorphologyElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<MorphologyOperatorType>::fromString(attr->value()).
1719         (WebCore::SVGFEMorphologyElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
1720         (WebCore::SVGFEMorphologyElement::build): Ditto.
1721         * svg/SVGFEMorphologyElement.h: Add SVGPropertyTraits<MorphologyOperatorType> specializations.
1722         * svg/SVGFETurbulenceElement.cpp:
1723         (WebCore::SVGFETurbulenceElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<SVGStitchOptions/TurbulenceType>::fromString(attr->value()).
1724         (WebCore::SVGFETurbulenceElement::setFilterEffectAttribute): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
1725         (WebCore::SVGFETurbulenceElement::build): Ditto.
1726         * svg/SVGFETurbulenceElement.h: Add SVGPropertyTraits<SVGStitchOptions/TurbulenceType> specializations.
1727         * svg/SVGFilterElement.cpp:
1728         (WebCore::SVGFilterElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<SVGUnitType>::fromString(attr->value()).
1729         * svg/SVGFilterElement.h:
1730         * svg/SVGGradientElement.cpp:
1731         (WebCore::SVGGradientElement::SVGGradientElement): Missing spread method default initialization: set it to 'pad' as per spec.
1732         (WebCore::SVGGradientElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<SVGUnitType/SVGSpreadMethodType>::fromString(attr->value()).
1733         * svg/SVGGradientElement.h: Add SVGPropertyTraits<SVGSpreadMethodType> specializations.
1734         * svg/SVGLinearGradientElement.cpp:
1735         (WebCore::SVGLinearGradientElement::collectGradientAttributes): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
1736         * svg/SVGMarkerElement.cpp:
1737         (WebCore::SVGMarkerElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<EnumType>::fromString(attr->value()).
1738         (WebCore::SVGMarkerElement::synchronizeOrientType): Add a custom synchronization method, that handles orientType/orientAngle -> orientAttr synchronization, which is special
1739                                                             as it depends on to other SVG DOM objects (SVGAnimatedAngle and SVGAnimatedEnumeration). All covered by new tests.
1740         (WebCore::SVGMarkerElement::orientTypeAnimated): Custom tear off creation method, which would usually be generated by the DECLARE_ANIMATED_... macros.
1741         * svg/SVGMarkerElement.h: Add SVGPropertyTraits<SVGMarkerUnitsType/SVGMarkerOrientType> specializations.
1742         (WebCore::SVGMarkerElement::orientType): Add custom property handling for the 'orientType' SVGAnimatedEnumeration object, as it has special demands, based on 'orientAngle'.
1743         (WebCore::SVGMarkerElement::orientTypeBaseValue): Ditto.
1744         (WebCore::SVGMarkerElement::setOrientTypeBaseValue): Ditto.
1745         * svg/SVGMaskElement.cpp:
1746         (WebCore::SVGMaskElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<EnumType>::fromString(attr->value()).
1747         * svg/SVGMaskElement.h:
1748         * svg/SVGPatternElement.cpp:
1749         (WebCore::SVGPatternElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<EnumType>::fromString(attr->value()).
1750         * svg/SVGPatternElement.h:
1751         * svg/SVGRadialGradientElement.cpp:
1752         (WebCore::SVGRadialGradientElement::collectGradientAttributes): Remove int->enum casting for SVGAnimatedEnumeration types, they are enums now.
1753         * svg/SVGTextContentElement.cpp:
1754         (WebCore::SVGTextContentElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<SVGLengthAdjustType>::fromString(attr->value()).
1755         * svg/SVGTextContentElement.h: Add SVGPropertyTraits<SVGLengthAdjustType> specializations.
1756         * svg/SVGTextPathElement.cpp:
1757         (WebCore::SVGTextPathElement::parseMappedAttribute): Convert attribute parsing to use SVGPropertyTraits<SVGTextPathMethodType/SVGTextPathSpacingType>::fromString(attr->value()).
1758         * svg/SVGTextPathElement.h: Add SVGPropertyTraits<SVGTextPathMethodType/SVGTextPathSpacingType> specializations.
1759         * svg/SVGUnitTypes.h: Add SVGPropertyTraits<SVGUnitType> specializations.
1760         * svg/properties/SVGAnimatedEnumerationPropertyTearOff.h: Added. SVGAnimatedEnumerationPropertyTearOff inherits from SVGAnimatedStaticPropertyTearOff<int>.
1761                                                                   SVGAnimatedEnumeration remains a typedef to SVGAnimatedStaticPropertyTearOff<int>, to have a common base
1762                                                                   class for all enum types. This special tear off object, overrides setBaseVal, to verify the incoming int
1763                                                                   is within the enum range, otherwhise raise an SVG DOM exception. This makes it impossible to make any of
1764                                                                   the enums go out of range anymore (which lead to security bugs in the past).
1765         (WebCore::SVGAnimatedEnumerationPropertyTearOff::setBaseVal):
1766         (WebCore::SVGAnimatedEnumerationPropertyTearOff::create):
1767         (WebCore::SVGAnimatedEnumerationPropertyTearOff::SVGAnimatedEnumerationPropertyTearOff):
1768         * svg/properties/SVGAnimatedStaticPropertyTearOff.h:
1769         (WebCore::SVGAnimatedStaticPropertyTearOff::setBaseVal): Made this method virtual, to SVGAnimatedEnumerationPropertyTearOff can override the default behaviour. Also added an ExceptionCode param.
1770         (WebCore::SVGAnimatedStaticPropertyTearOff::~SVGAnimatedStaticPropertyTearOff):
1771
1772 2011-05-18  Kinuko Yasuda  <kinuko@chromium.org>
1773
1774         Reviewed by David Levin.
1775
1776         Expose webkitStorageInfo.requestQuota() for Quota API if QUOTA flag is enabled
1777         https://bugs.webkit.org/show_bug.cgi?id=59681
1778
1779         Test: storage/storageinfo-request-quota.html
1780
1781         * CMakeLists.txt:
1782         * CodeGenerators.pri:
1783         * DerivedSources.cpp:
1784         * DerivedSources.make:
1785         * GNUmakefile.am:
1786         * GNUmakefile.list.am:
1787         * WebCore.gypi:
1788         * WebCore.vcproj/WebCore.vcproj:
1789         * WebCore.xcodeproj/project.pbxproj:
1790         * storage/StorageInfo.idl: Added requestQuota().
1791         * storage/StorageInfoQuotaCallback.idl: Added.
1792
1793 2011-05-18  Renata Hodovan  <reni@webkit.org>
1794
1795         Reviewed by Nikolas Zimmermann.
1796
1797         Apply the ParallelJobs support to FEGaussianBlur
1798         https://bugs.webkit.org/show_bug.cgi?id=61049
1799
1800         The Gaussian blur filter of SVG can consume lots of resources if it is
1801         applied to a large area. The computation can be distributed to multiple
1802         cores if the architecture supports.
1803         The average performance progression is about 15% on dual-core machines.
1804
1805         Developed in cooperation with Gabor Loki and Zoltan Herczeg.
1806
1807
1808         * platform/graphics/filters/FEGaussianBlur.cpp:
1809         (WebCore::FEGaussianBlur::platformApplyWorker):
1810         (WebCore::FEGaussianBlur::platformApply):
1811         * platform/graphics/filters/FEGaussianBlur.h:
1812
1813 2011-05-18  Pavel Feldman  <pfeldman@google.com>
1814
1815         Reviewed by Yury Semikhatsky.
1816
1817         Web Inspector: make parentId for frame optional.
1818         https://bugs.webkit.org/show_bug.cgi?id=61032
1819
1820         * inspector/Inspector.json:
1821         * inspector/InspectorPageAgent.cpp:
1822         (WebCore::InspectorPageAgent::buildObjectForFrame):
1823         * inspector/front-end/ResourceTreeModel.js:
1824         (WebInspector.ResourceTreeModel.prototype._addFrame):
1825
1826 2011-05-18  Gabor Loki  <loki@webkit.org>
1827
1828         Reviewed by Nikolas Zimmermann.
1829
1830         Apply the ParallelJobs support to FELighting
1831         https://bugs.webkit.org/show_bug.cgi?id=61048
1832
1833         The lighting filter of SVG can consume lots of resources if it is
1834         applied to a large area. The computation can be distributed to multiple
1835         cores if the architecture supports.
1836         The average performance progression is 10-20% on dual-core machines.
1837
1838         Developed in cooperation with Zoltan Herczeg.
1839
1840         * platform/graphics/filters/FELighting.cpp:
1841         (WebCore::FELighting::platformApplyGenericPaint):
1842         (WebCore::FELighting::platformApplyGenericWorker):
1843         (WebCore::FELighting::platformApplyGeneric):
1844         * platform/graphics/filters/FELighting.h:
1845         * platform/graphics/filters/arm/FELightingNEON.cpp:
1846         (WebCore::FELighting::platformApplyNeonWorker):
1847         * platform/graphics/filters/arm/FELightingNEON.h:
1848         (WebCore::FELighting::platformApplyNeon):
1849
1850 2011-05-18  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
1851
1852         Reviewed by Andreas Kling.
1853
1854         [Qt] Fix tst_QWebFrame::getSetStaticProperty() autotest
1855         https://bugs.webkit.org/show_bug.cgi?id=60984
1856
1857         The code for converting objects to QVariantMap was causing exception,
1858         that was "leaking" to the next evaluation. One situation was reading
1859         the property 'localStorage' when we do not have a proper security
1860         origin, which throws a SECURITY_ERR.
1861
1862         Now, we will simply not include on the QVariantMap those properties,
1863         and make sure that we clean the exception if necessary.
1864
1865         * bridge/qt/qt_runtime.cpp:
1866         (JSC::Bindings::convertValueToQVariantMap):
1867         Extracted function that performs conversion from JSObject to a QVariantMap. This
1868         functions makes sure that exception is clean after its execution.
1869
1870         (JSC::Bindings::convertValueToQVariant):
1871         Use the previous function. Add a comment explaining the choice of distance value.
1872
1873 2011-05-18  Ilya Tikhonovsky  <loislo@chromium.org>
1874
1875         Reviewed by Yury Semikhatsky.
1876
1877         Web Inspector: scripts panel file selector element doesn't track keyboard events 
1878         https://bugs.webkit.org/show_bug.cgi?id=61047
1879
1880         * inspector/front-end/ScriptsPanel.js:
1881         (WebInspector.ScriptsPanel):
1882
1883 2011-05-16  Pavel Podivilov  <podivilov@chromium.org>
1884
1885         Reviewed by Yury Semikhatsky.
1886
1887         Web Inspector: refactoring: ScriptDebugListener::didParseSource has too many parameters.
1888         https://bugs.webkit.org/show_bug.cgi?id=60900
1889
1890         * bindings/js/ScriptDebugServer.cpp:
1891         (WebCore::ScriptDebugServer::dispatchDidParseSource):
1892         * bindings/v8/ScriptDebugServer.cpp:
1893         (WebCore::ScriptDebugServer::dispatchDidParseSource):
1894         * inspector/InspectorDebuggerAgent.cpp:
1895         (WebCore::InspectorDebuggerAgent::getScriptSource):
1896         (WebCore::InspectorDebuggerAgent::didParseSource):
1897         * inspector/InspectorDebuggerAgent.h:
1898         * inspector/ScriptDebugListener.h:
1899         (WebCore::ScriptDebugListener::Script::Script):
1900
1901 2011-05-18  Alexander Pavlov  <apavlov@chromium.org>
1902
1903         Reviewed by Pavel Feldman.
1904
1905         Web Inspector: model-based CSS editing does not update @import-ed stylesheet resources
1906         https://bugs.webkit.org/show_bug.cgi?id=60966
1907
1908         Imported stylesheets didn't use to be returned by InspectorCSSAgent.
1909
1910         * inspector/InspectorCSSAgent.cpp:
1911         (WebCore::InspectorCSSAgent::getAllStyleSheets):
1912         (WebCore::InspectorCSSAgent::collectStyleSheets):
1913         * inspector/InspectorCSSAgent.h:
1914
1915 2011-05-18  Pavel Feldman  <pfeldman@google.com>
1916
1917         Reviewed by Yury Semikhatsky.
1918
1919         Web Inspector: make "Id" suffixes use consistent case.
1920         https://bugs.webkit.org/show_bug.cgi?id=61028
1921
1922         * inspector/InjectedScriptSource.js:
1923         * inspector/Inspector.json:
1924         * inspector/InspectorConsoleAgent.cpp:
1925         (WebCore::InspectorConsoleAgent::addMessageToConsole):
1926         * inspector/InspectorConsoleAgent.h:
1927         * inspector/InspectorConsoleInstrumentation.h:
1928         (WebCore::InspectorInstrumentation::addMessageToConsole):
1929         * inspector/InspectorDebuggerAgent.cpp:
1930         (WebCore::parseLocation):
1931         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
1932         (WebCore::InspectorDebuggerAgent::editScriptSource):
1933         (WebCore::InspectorDebuggerAgent::getScriptSource):
1934         (WebCore::InspectorDebuggerAgent::didParseSource):
1935         * inspector/InspectorDebuggerAgent.h:
1936         * inspector/InspectorInstrumentation.cpp:
1937         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
1938         * inspector/InspectorInstrumentation.h:
1939         * inspector/InspectorResourceAgent.cpp:
1940         (WebCore::buildObjectForResourceResponse):
1941         * inspector/ScriptDebugListener.h:
1942         * inspector/front-end/DebuggerModel.js:
1943         (WebInspector.DebuggerModel.prototype.scriptForSourceID):
1944         (WebInspector.DebuggerModel.prototype.queryScripts):
1945         (WebInspector.DebuggerModel.prototype.editScriptSource):
1946         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
1947         (WebInspector.DebuggerModel.prototype._parsedScriptSource):
1948         (WebInspector.DebuggerDispatcher.prototype.scriptParsed):
1949         (WebInspector.DebuggerDispatcher.prototype.breakpointResolved):
1950         * inspector/front-end/DebuggerPresentationModel.js:
1951         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didReceiveSource):
1952         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
1953         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
1954         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
1955         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
1956         (WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript):
1957         (WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId):
1958         (WebInspector.DebuggerPresentationModel.prototype._createSourceFileId):
1959         (WebInspector.PresenationCallFrame):
1960         * inspector/front-end/NetworkManager.js:
1961         (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
1962         * inspector/front-end/Script.js:
1963         (WebInspector.Script):
1964         (WebInspector.Script.prototype.requestSource):
1965         (WebInspector.Script.prototype.editSource):
1966         * inspector/front-end/SourceFile.js:
1967         (WebInspector.SourceFile.prototype.forceLoadContent):
1968         (WebInspector.SourceFile.prototype._concatenateScriptsContent):
1969         (WebInspector.SourceMapping.prototype._sourceLocationToScriptLocation):
1970         (WebInspector):
1971
1972 2011-05-18  Sheriff Bot  <webkit.review.bot@gmail.com>
1973
1974         Unreviewed, rolling out r86747.
1975         http://trac.webkit.org/changeset/86747
1976         https://bugs.webkit.org/show_bug.cgi?id=61039
1977
1978         Breaks JSC debugger tests. (Requested by pfeldman on #webkit).
1979
1980         * inspector/InjectedScriptSource.js:
1981         ():
1982         * inspector/Inspector.json:
1983         * inspector/InspectorConsoleAgent.cpp:
1984         (WebCore::InspectorConsoleAgent::addMessageToConsole):
1985         * inspector/InspectorConsoleAgent.h:
1986         * inspector/InspectorConsoleInstrumentation.h:
1987         (WebCore::InspectorInstrumentation::addMessageToConsole):
1988         * inspector/InspectorDebuggerAgent.cpp:
1989         (WebCore::parseLocation):
1990         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
1991         (WebCore::InspectorDebuggerAgent::editScriptSource):
1992         (WebCore::InspectorDebuggerAgent::getScriptSource):
1993         (WebCore::InspectorDebuggerAgent::didParseSource):
1994         * inspector/InspectorDebuggerAgent.h:
1995         * inspector/InspectorInstrumentation.cpp:
1996         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
1997         * inspector/InspectorInstrumentation.h:
1998         * inspector/InspectorResourceAgent.cpp:
1999         (WebCore::buildObjectForResourceResponse):
2000         * inspector/ScriptDebugListener.h:
2001         * inspector/front-end/DebuggerModel.js:
2002         (WebInspector.DebuggerModel.prototype.scriptForSourceID):
2003         (WebInspector.DebuggerModel.prototype.queryScripts):
2004         (WebInspector.DebuggerModel.prototype.editScriptSource):
2005         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
2006         (WebInspector.DebuggerModel.prototype._parsedScriptSource):
2007         (WebInspector.DebuggerDispatcher.prototype.scriptParsed):
2008         (WebInspector.DebuggerDispatcher.prototype.breakpointResolved):
2009         * inspector/front-end/DebuggerPresentationModel.js:
2010         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didReceiveSource):
2011         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
2012         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
2013         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
2014         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
2015         (WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript):
2016         (WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId):
2017         (WebInspector.DebuggerPresentationModel.prototype._createSourceFileId):
2018         (WebInspector.PresenationCallFrame):
2019         * inspector/front-end/NetworkManager.js:
2020         (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
2021         * inspector/front-end/Script.js:
2022         (WebInspector.Script):
2023         (WebInspector.Script.prototype.requestSource):
2024         (WebInspector.Script.prototype.editSource):
2025         * inspector/front-end/SourceFile.js:
2026         (WebInspector.SourceFile.prototype.forceLoadContent):
2027         (WebInspector.SourceFile.prototype._concatenateScriptsContent):
2028         (WebInspector.SourceMapping.prototype._sourceLocationToScriptLocation):
2029         (WebInspector):
2030
2031 2011-05-18  Abhishek Arya  <inferno@chromium.org>
2032
2033         Reviewed by Dirk Schulze.
2034
2035         When SMIL element is getting removed, make sure to remove it
2036         from target's animation elements list.
2037         https://bugs.webkit.org/show_bug.cgi?id=60980
2038
2039         Test: svg/animations/smil-element-not-removed-crash.html
2040
2041         * svg/animation/SVGSMILElement.cpp:
2042         (WebCore::SVGSMILElement::~SVGSMILElement):
2043
2044 2011-05-18  Pavel Feldman  <pfeldman@google.com>
2045
2046         Reviewed by Yury Semikhatsky.
2047
2048         Web Inspector: make "Id" suffixes use consistent case.
2049         https://bugs.webkit.org/show_bug.cgi?id=61028
2050
2051         * inspector/InjectedScriptSource.js:
2052         * inspector/Inspector.json:
2053         * inspector/InspectorConsoleAgent.cpp:
2054         (WebCore::InspectorConsoleAgent::addMessageToConsole):
2055         * inspector/InspectorConsoleAgent.h:
2056         * inspector/InspectorConsoleInstrumentation.h:
2057         (WebCore::InspectorInstrumentation::addMessageToConsole):
2058         * inspector/InspectorDebuggerAgent.cpp:
2059         (WebCore::parseLocation):
2060         (WebCore::InspectorDebuggerAgent::resolveBreakpoint):
2061         (WebCore::InspectorDebuggerAgent::editScriptSource):
2062         (WebCore::InspectorDebuggerAgent::getScriptSource):
2063         (WebCore::InspectorDebuggerAgent::didParseSource):
2064         * inspector/InspectorDebuggerAgent.h:
2065         * inspector/InspectorInstrumentation.cpp:
2066         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
2067         * inspector/InspectorInstrumentation.h:
2068         * inspector/InspectorResourceAgent.cpp:
2069         (WebCore::buildObjectForResourceResponse):
2070         * inspector/ScriptDebugListener.h:
2071         * inspector/front-end/DebuggerModel.js:
2072         (WebInspector.DebuggerModel.prototype.scriptForSourceID):
2073         (WebInspector.DebuggerModel.prototype.queryScripts):
2074         (WebInspector.DebuggerModel.prototype.editScriptSource):
2075         (WebInspector.DebuggerModel.prototype._didEditScriptSource):
2076         (WebInspector.DebuggerModel.prototype._parsedScriptSource):
2077         (WebInspector.DebuggerDispatcher.prototype.scriptParsed):
2078         (WebInspector.DebuggerDispatcher.prototype.breakpointResolved):
2079         * inspector/front-end/DebuggerPresentationModel.js:
2080         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource.didReceiveSource):
2081         (WebInspector.DebuggerPresentationModel.prototype.editScriptSource):
2082         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger.didRequestSourceMapping):
2083         (WebInspector.DebuggerPresentationModel.prototype._setBreakpointInDebugger):
2084         (WebInspector.DebuggerPresentationModel.prototype._debuggerPaused):
2085         (WebInspector.DebuggerPresentationModel.prototype._sourceFileForScript):
2086         (WebInspector.DebuggerPresentationModel.prototype._scriptForSourceFileId):
2087         (WebInspector.DebuggerPresentationModel.prototype._createSourceFileId):
2088         (WebInspector.PresenationCallFrame):
2089         * inspector/front-end/NetworkManager.js:
2090         (WebInspector.NetworkDispatcher.prototype._updateResourceWithResponse):
2091         * inspector/front-end/Script.js:
2092         (WebInspector.Script):
2093         (WebInspector.Script.prototype.requestSource):
2094         (WebInspector.Script.prototype.editSource):
2095         * inspector/front-end/SourceFile.js:
2096         (WebInspector.SourceFile.prototype.forceLoadContent):
2097         (WebInspector.SourceFile.prototype._concatenateScriptsContent):
2098         (WebInspector.SourceMapping.prototype._sourceLocationToScriptLocation):
2099         (WebInspector):
2100
2101 2011-05-18  Pavel Feldman  <pfeldman@google.com>
2102
2103         Reviewed by Yury Semikhatsky.
2104
2105         Web Inspector: do not reveal line -1 when navigating to anchor without line specified.
2106         https://bugs.webkit.org/show_bug.cgi?id=60971
2107
2108         * inspector/front-end/ResourcesPanel.js:
2109         (WebInspector.ResourcesPanel.prototype.showAnchorLocation):
2110         * inspector/front-end/ScriptsPanel.js:
2111         (WebInspector.ScriptsPanel.prototype.showAnchorLocation.):
2112         (WebInspector.ScriptsPanel.prototype.showAnchorLocation):
2113         * inspector/front-end/inspector.js:
2114         (WebInspector._showAnchorLocation):
2115
2116 2011-05-18  Kent Tamura  <tkent@chromium.org>
2117
2118         Reviewed by Hajime Morita.
2119
2120         valueMissing validity for <select> is lame when selecting a value by a key operation
2121         https://bugs.webkit.org/show_bug.cgi?id=61021
2122
2123         We missed updating validity in case that SelectElement::defaultEventHandler
2124         update selections.  So, SelectElement::setSelectedIndex() updates validity.
2125
2126         * dom/SelectElement.cpp:
2127         (WebCore::SelectElement::setSelectedIndex): Call SelectElement::updateValidity().
2128         * html/HTMLSelectElement.cpp:
2129         (WebCore::HTMLSelectElement::setSelectedIndex):
2130           Remove unnecessary setNeedsValidityCheck() call.
2131           SelectElement::setSlectedIndex() calls it.
2132         (WebCore::HTMLSelectElement::setSelectedIndexByUser): ditto.
2133
2134 2011-05-17  Mikhail Naganov  <mnaganov@chromium.org>
2135
2136         Reviewed by Pavel Feldman.
2137
2138         Web Inspector: [Chromium] Enable detailed heap snapshots by default.
2139         https://bugs.webkit.org/show_bug.cgi?id=60286
2140
2141         * inspector/front-end/ProfilesPanel.js:
2142
2143 2011-05-17  Mikhail Naganov  <mnaganov@chromium.org>
2144
2145         Reviewed by Pavel Feldman.
2146
2147         Web Inspector: [Chromium] Make retaining paths list of the Detailed
2148         heap snapshots view resizable.
2149         https://bugs.webkit.org/show_bug.cgi?id=60960
2150
2151         * inspector/front-end/DetailedHeapshotView.js:
2152         (WebInspector.DetailedHeapshotView.prototype.resize):
2153         (WebInspector.DetailedHeapshotView.prototype._startRetainersHeaderDragging):
2154         (WebInspector.DetailedHeapshotView.prototype._retainersHeaderDragging):
2155         (WebInspector.DetailedHeapshotView.prototype._endRetainersHeaderDragging):
2156         (WebInspector.DetailedHeapshotView.prototype._updateRetainmentViewHeight):
2157         * inspector/front-end/heapProfiler.css:
2158
2159 2011-05-16  Jeremy Noble  <jer.noble@apple.com>
2160
2161         Reviewed by Darin Adler.
2162
2163         Disable keyboard input (with exceptions) in full-screen mode.
2164         https://bugs.webkit.org/show_bug.cgi?id=60943
2165
2166         Tests: fullscreen/full-screen-keyboard-disabled.html
2167                fullscreen/full-screen-keyboard-enabled.html
2168
2169         * page/EventHandler.cpp:
2170         (WebCore::EventHandler::isKeyEventAllowedInFullScreen): Added.  Implements the 
2171             list of allowed keyboard events in the proposed API.
2172         (WebCore::EventHandler::keyEvent): Discard events which are not allowed in
2173             full-screen mode.
2174         * page/EventHandler.h:
2175
2176 2011-05-17  Nikolas Zimmermann  <nzimmermann@rim.com>
2177
2178         Reviewed by Dirk Schulze.
2179
2180         Refactor TextRun creation
2181         https://bugs.webkit.org/show_bug.cgi?id=60255
2182
2183         Add constructTextRun() methods to RenderBlock/InlineTextBox and use it in various places in rendering/.
2184         The long-term goal is to remove the ugly eight parameters catch-it-all TextRun constructor, and
2185         replace it with explicit setters/getters. To avoid expanding dozens of callsites, when removing
2186         the catch-it-all constructor, these helper functions are introduced, which hide the details of
2187         creating a TextRun.
2188
2189         Furthermore it will be used to remove the platform layering violation, that TextRun stores
2190         RenderObject pointers for the sake of SVG Fonts support, see bug 60254.
2191
2192         No change in functionaliy, no new tests.
2193
2194         * rendering/EllipsisBox.cpp:
2195         (WebCore::EllipsisBox::paint):
2196         (WebCore::EllipsisBox::selectionRect):
2197         (WebCore::EllipsisBox::paintSelection):
2198         * rendering/InlineTextBox.cpp:
2199         (WebCore::InlineTextBox::selectionRect):
2200         (WebCore::InlineTextBox::paint):
2201         (WebCore::InlineTextBox::paintSelection):
2202         (WebCore::InlineTextBox::paintCompositionBackground):
2203         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
2204         (WebCore::InlineTextBox::paintTextMatchMarker):
2205         (WebCore::InlineTextBox::computeRectForReplacementMarker):
2206         (WebCore::InlineTextBox::offsetForPosition):
2207         (WebCore::InlineTextBox::positionForOffset):
2208         (WebCore::InlineTextBox::constructTextRun):
2209         * rendering/InlineTextBox.h:
2210         * rendering/RenderBlock.cpp:
2211         (WebCore::RenderBlock::constructTextRunAllowTrailingExpansion):
2212         * rendering/RenderBlock.h:
2213         * rendering/RenderEmbeddedObject.cpp:
2214         (WebCore::RenderEmbeddedObject::getReplacementTextGeometry):
2215         * rendering/RenderFileUploadControl.cpp:
2216         (WebCore::RenderFileUploadControl::paintObject):
2217         (WebCore::RenderFileUploadControl::computePreferredLogicalWidths):
2218         * rendering/RenderImage.cpp:
2219         (WebCore::RenderImage::setImageSizeForAltText):
2220         (WebCore::RenderImage::paintReplaced):
2221         * rendering/RenderListBox.cpp:
2222         (WebCore::RenderListBox::updateFromElement):
2223         * rendering/RenderTextControl.cpp:
2224         (WebCore::RenderTextControl::getAvgCharWidth):
2225
2226 2011-05-17  Jeremy Noble  <jer.noble@apple.com>
2227
2228         Reviewed by Darin Adler.
2229
2230         Removing a full-screen element or ancestor from the DOM should trigger exiting full-screen mode.
2231         https://bugs.webkit.org/show_bug.cgi?id=60997
2232
2233         Tests: fullscreen/full-screen-remove-ancestor.html
2234                fullscreen/full-screen-remove-children.html
2235                fullscreen/full-screen-remove.html
2236
2237         * dom/Document.cpp:
2238         (WebCore::Document::fullScreenChangeDelayTimerFired): If the target node was removed from the document
2239             make sure to message the documentElement() as well.
2240         (WebCore::Document::fullScreenElementRemoved): Cancel full screen mode.
2241
2242 2011-05-17  Yuta Kitamura  <yutak@chromium.org>
2243
2244         Reviewed by Kent Tamura.
2245
2246         WebSocket: Add CLOSING state
2247         https://bugs.webkit.org/show_bug.cgi?id=60878
2248
2249         No new tests are added because there is no change in functionality.
2250
2251         * platform/network/SocketStreamHandleBase.h:
2252         * websockets/WebSocket.h:
2253         * websockets/WebSocket.idl:
2254
2255 2011-05-16  MORITA Hajime  <morrita@google.com>
2256
2257         Reviewed by Dimitri Glazkov.
2258
2259         [Refactoring] ShadowContentElement should be part of dom/
2260         https://bugs.webkit.org/show_bug.cgi?id=59117
2261
2262         - Moved html/shadow/ShadowContentElement.h to dom/ShadowContentElement.h
2263         - Pulled ShadowContentElement up to a subclass of StyledElement, from HTMLDivElement
2264         - Added ShadowContentElement.cpp
2265         - Extracted ShadowContentSelector.{cpp,h} from ShadowRoot.{cpp,h}
2266         
2267         No new tests, no behavior change.
2268
2269         * CMakeLists.txt:
2270         * GNUmakefile.list.am:
2271         * WebCore.gypi:
2272         * WebCore.pro:
2273         * WebCore.vcproj/WebCore.vcproj:
2274         * WebCore.xcodeproj/project.pbxproj:
2275         * dom/DOMAllInOne.cpp: Added new ShadowContentSelector.cpp and ShadowContentElement.cpp.
2276         * dom/Node.h: 
2277         (WebCore::Node::forceReattach): Moved from static local function to share between classes.
2278         * dom/ShadowContentElement.cpp: Copied from Source/WebCore/html/shadow/ShadowContentElement.h.
2279         (WebCore::ShadowContentElement::attach):
2280         * dom/ShadowContentElement.h: Copied from Source/WebCore/html/shadow/ShadowContentElement.h.
2281         (WebCore::ShadowContentElement::ShadowContentElement):
2282         (WebCore::ShadowContentElement::isShadowBoundary):
2283         (WebCore::ShadowContentElement::rendererIsNeeded):
2284         (WebCore::ShadowContentElement::createRenderer):
2285         * dom/ShadowContentSelector.cpp: Copied from Source/WebCore/html/shadow/ShadowContentElement.h.
2286         (WebCore::ShadowContentSelector::ShadowContentSelector):
2287         (WebCore::ShadowContentSelector::~ShadowContentSelector):
2288         (WebCore::ShadowContentSelector::attachChildrenFor):
2289         * dom/ShadowContentSelector.h: Renamed from Source/WebCore/html/shadow/ShadowContentElement.h.
2290         (WebCore::ShadowContentSelector::shadowRoot):
2291         (WebCore::ShadowContentSelector::activeElement):
2292         (WebCore::ShadowContentSelector::currentInstance):
2293         * dom/ShadowRoot.cpp:
2294         (WebCore::ShadowRoot::recalcStyle):
2295         * html/HTMLDetailsElement.cpp:
2296         (WebCore::DetailsContentElement::DetailsContentElement):
2297         (WebCore::DetailsSummaryElement::DetailsSummaryElement):
2298         * html/HTMLSummaryElement.cpp:
2299         (WebCore::SummaryContentElement::SummaryContentElement):
2300
2301 2011-05-17  Cris Neckar  <cdn@chromium.org>
2302
2303         Reviewed by Adam Barth.
2304
2305         Clear the image from ImageLoader rather than clearing the ImageLoader in HTMLObjectElement::renderFallbackContent.
2306         https://bugs.webkit.org/show_bug.cgi?id=61005
2307
2308         Test: http/tests/loading/nested_bad_objects.php
2309
2310         * html/HTMLObjectElement.cpp:
2311         (WebCore::HTMLObjectElement::renderFallbackContent):
2312
2313 2011-05-17  Chris Rogers  <crogers@google.com>
2314
2315         Reviewed by Kenneth Russell.
2316
2317         Make sure that AudioNode gets re-enabled after having been disconnected and re-connected.
2318         https://bugs.webkit.org/show_bug.cgi?id=60995
2319
2320         No new tests since audio API is not yet implemented.
2321
2322         * webaudio/AudioNode.cpp:
2323         (WebCore::AudioNode::ref):
2324
2325 2011-05-17  Brady Eidson  <beidson@apple.com>
2326
2327         Reviewed by Darin Adler.
2328
2329         <rdar://problem/9366728> and https://webkit.org/b/60796
2330         Crash when code inside a ResourceLoadDelegate method calls [WebView stopLoading:]
2331
2332         Break up ResourceLoader::didCancel() into willCancel() and didCancel(), and making them pure virtual.
2333         This change has the following benefits:
2334           - Managing ResourceLoader state can be in the base class; Subclasses no longer need to protect
2335             themselves, check these variables as often, or ASSERT them.
2336           - ResourceLoader subclasses no longer have to call the base class ::didCancel
2337           - ResourceLoader::cancel becomes more capable of handling reentrancy with the design that the 
2338             cancellation is completed inside the last call.
2339
2340         No new tests - No change in behavior for previous tests, and new test would require API usage outside
2341         the scope of DumpRenderTree.
2342
2343         * loader/ResourceLoader.cpp:
2344         (WebCore::ResourceLoader::ResourceLoader):
2345         (WebCore::ResourceLoader::cancel): Moved from ResourceLoader::didCancel, and does all of that same work
2346           except it interposes calls to "willCancel" and "didCancel" as required to maintain the same behavior.
2347         * loader/ResourceLoader.h: Added pure virtual didCancel() and willCancel().
2348
2349         Split-up into willCancel() and didCancel(), based on when the base class didCancel() used to be called:
2350         * loader/MainResourceLoader.cpp:
2351         (WebCore::MainResourceLoader::willCancel):
2352         (WebCore::MainResourceLoader::didCancel):
2353         * loader/MainResourceLoader.h:
2354
2355         Split-up into willCancel() and didCancel(), based on when the "reached terminal state" flag used to be checked:
2356         * loader/NetscapePlugInStreamLoader.cpp:
2357         (WebCore::NetscapePlugInStreamLoader::didReceiveResponse): Call the entry point cancel() instead of the old didCancel()
2358         (WebCore::NetscapePlugInStreamLoader::willCancel):
2359         (WebCore::NetscapePlugInStreamLoader::didCancel):
2360         * loader/NetscapePlugInStreamLoader.h:
2361
2362         Split-up into willCancel() and didCancel(), based on when the "reached terminal state" flag used to be checked:
2363         * loader/SubresourceLoader.cpp:
2364         (WebCore::SubresourceLoader::willCancel):
2365         (WebCore::SubresourceLoader::didCancel):
2366         * loader/SubresourceLoader.h:
2367
2368 2011-05-17  Nat Duca  <nduca@chromium.org>
2369
2370         Reviewed by James Robinson.
2371
2372         [chromium] Always set layerRenderer, even on non-drawn-layers
2373         https://bugs.webkit.org/show_bug.cgi?id=60977
2374
2375         This is a defensive fixe for crbug.com/82799, in which
2376         a RenderLayer could not prepare itself because its owning layerImpl
2377         had no associated layerRenderer. The underlying issue is that we
2378         sometimes put renderSurfaces onto the list that won't actually render.
2379         For now, the priority is to reduce fragility so that invisible layers
2380         dont lead to crashers. We do this by being more agressive about 
2381         binding CCLayerImpls to the LayerRenderer, doing it all the time rather
2382         than only when we think it will get rendered.
2383
2384         * platform/graphics/chromium/LayerRendererChromium.cpp:
2385         (WebCore::LayerRendererChromium::paintLayerContents):
2386
2387 2011-05-17  Anders Carlsson  <andersca@apple.com>
2388
2389         Fix the clang build.
2390
2391         * rendering/RenderText.h:
2392         (WebCore::RenderText::nodeAtPoint):
2393         nodeAtPoint should take a const IntPoint reference.
2394
2395 2011-05-17  Erik Arvidsson  <arv@chromium.org>
2396
2397         Reviewed by Ryosuke Niwa.
2398
2399         document.activeElement doesn't point to the focused frame
2400         https://bugs.webkit.org/show_bug.cgi?id=49509
2401
2402         This makes us match IE and Firefox and there is an ongoing WHATWG discussion to make the spec match this.
2403
2404         Test: fast/dom/HTMLDocument/active-element-frames.html
2405
2406         * html/HTMLDocument.cpp:
2407         (WebCore::HTMLDocument::activeElement): Walk up the frame tree from the focusedFrame to find the active frame if any.
2408
2409 2011-05-17  Emil A Eklund  <eae@chromium.org>
2410
2411         Reviewed by Eric Seidel.
2412
2413         Change nodeAtPoint to take IntPoint instead of int x, int y
2414         https://bugs.webkit.org/show_bug.cgi?id=60663
2415
2416         Change nodeAtPoint to take a single const IntPoint& instead of a pair of
2417         ints for the location.
2418
2419         Covered by existing tests.
2420
2421         * platform/graphics/FloatPoint.h:
2422         (WebCore::flooredIntPoint):
2423         * rendering/EllipsisBox.cpp:
2424         (WebCore::EllipsisBox::nodeAtPoint):
2425         * rendering/EllipsisBox.h:
2426         * rendering/InlineBox.cpp:
2427         (WebCore::InlineBox::nodeAtPoint):
2428         * rendering/InlineBox.h:
2429         * rendering/InlineFlowBox.cpp:
2430         (WebCore::InlineFlowBox::nodeAtPoint):
2431         * rendering/InlineFlowBox.h:
2432         * rendering/InlineTextBox.cpp:
2433         (WebCore::InlineTextBox::nodeAtPoint):
2434         * rendering/InlineTextBox.h:
2435         * rendering/RenderBlock.cpp:
2436         (WebCore::RenderBlock::nodeAtPoint):
2437         (WebCore::RenderBlock::hitTestContents):
2438         * rendering/RenderBlock.h:
2439         * rendering/RenderBox.cpp:
2440         (WebCore::RenderBox::nodeAtPoint):
2441         * rendering/RenderBox.h:
2442         * rendering/RenderFrameSet.cpp:
2443         (WebCore::RenderFrameSet::nodeAtPoint):
2444         * rendering/RenderFrameSet.h:
2445         * rendering/RenderImage.cpp:
2446         (WebCore::RenderImage::nodeAtPoint):
2447         * rendering/RenderImage.h:
2448         * rendering/RenderInline.cpp:
2449         (WebCore::RenderInline::nodeAtPoint):
2450         * rendering/RenderInline.h:
2451         * rendering/RenderLineBoxList.cpp:
2452         (WebCore::RenderLineBoxList::hitTest):
2453         * rendering/RenderListBox.cpp:
2454         (WebCore::RenderListBox::nodeAtPoint):
2455         * rendering/RenderListBox.h:
2456         * rendering/RenderObject.cpp:
2457         (WebCore::RenderObject::hitTest):
2458         (WebCore::RenderObject::nodeAtPoint):
2459         * rendering/RenderObject.h:
2460         * rendering/RenderTable.cpp:
2461         (WebCore::RenderTable::nodeAtPoint):
2462         * rendering/RenderTable.h:
2463         * rendering/RenderTableRow.cpp:
2464         (WebCore::RenderTableRow::nodeAtPoint):
2465         * rendering/RenderTableRow.h:
2466         * rendering/RenderTableSection.cpp:
2467         (WebCore::RenderTableSection::nodeAtPoint):
2468         * rendering/RenderTableSection.h:
2469         * rendering/RenderText.h:
2470         (WebCore::RenderText::nodeAtPoint):
2471         * rendering/RenderTextControlMultiLine.cpp:
2472         (WebCore::RenderTextControlMultiLine::nodeAtPoint):
2473         * rendering/RenderTextControlMultiLine.h:
2474         * rendering/RenderTextControlSingleLine.cpp:
2475         (WebCore::RenderTextControlSingleLine::nodeAtPoint):
2476         * rendering/RenderTextControlSingleLine.h:
2477         * rendering/RenderWidget.cpp:
2478         (WebCore::RenderWidget::nodeAtPoint):
2479         * rendering/RenderWidget.h:
2480         * rendering/RootInlineBox.cpp:
2481         (WebCore::RootInlineBox::nodeAtPoint):
2482         * rendering/RootInlineBox.h:
2483         * rendering/svg/RenderSVGForeignObject.cpp:
2484         (WebCore::RenderSVGForeignObject::nodeAtFloatPoint):
2485         (WebCore::RenderSVGForeignObject::nodeAtPoint):
2486         * rendering/svg/RenderSVGForeignObject.h:
2487         * rendering/svg/RenderSVGModelObject.cpp:
2488         (WebCore::RenderSVGModelObject::nodeAtPoint):
2489         * rendering/svg/RenderSVGModelObject.h:
2490         * rendering/svg/RenderSVGRoot.cpp:
2491         (WebCore::RenderSVGRoot::nodeAtPoint):
2492         * rendering/svg/RenderSVGRoot.h:
2493         * rendering/svg/RenderSVGText.cpp:
2494         (WebCore::RenderSVGText::nodeAtFloatPoint):
2495         (WebCore::RenderSVGText::nodeAtPoint):
2496         * rendering/svg/RenderSVGText.h:
2497
2498 2011-05-17  Andrew Wilson  <atwilson@chromium.org>
2499
2500         Unreviewed, rolling out r86647.
2501         http://trac.webkit.org/changeset/86647
2502         https://bugs.webkit.org/show_bug.cgi?id=56814
2503
2504         Broke tests downstream in Chromium
2505
2506         * dom/DocumentMarker.h:
2507         (WebCore::DocumentMarker::operator==):
2508         (WebCore::DocumentMarker::operator!=):
2509         * dom/DocumentMarkerController.cpp:
2510         (WebCore::DocumentMarkerController::addMarker):
2511         (WebCore::DocumentMarkerController::copyMarkers):
2512         (WebCore::DocumentMarkerController::removeMarkers):
2513         (WebCore::DocumentMarkerController::markerContainingPoint):
2514         (WebCore::DocumentMarkerController::markersInRange):
2515         (WebCore::DocumentMarkerController::renderedRectsForMarkers):
2516         (WebCore::DocumentMarkerController::removeMarkersFromList):
2517         (WebCore::DocumentMarkerController::repaintMarkers):
2518         (WebCore::DocumentMarkerController::shiftMarkers):
2519         (WebCore::DocumentMarkerController::setMarkersActive):
2520         (WebCore::DocumentMarkerController::hasMarkers):
2521         (WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
2522         (WebCore::DocumentMarkerController::showMarkers):
2523         * dom/DocumentMarkerController.h:
2524         * editing/CompositeEditCommand.cpp:
2525         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
2526         * editing/DeleteSelectionCommand.cpp:
2527         (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
2528         * editing/Editor.cpp:
2529         (WebCore::Editor::selectionStartHasMarkerFor):
2530         * editing/SpellingCorrectionController.cpp:
2531         (WebCore::SpellingCorrectionController::respondToChangedSelection):
2532         * editing/SpellingCorrectionController.h:
2533         (WebCore::SpellingCorrectionController::shouldStartTimerFor):
2534         * rendering/HitTestResult.cpp:
2535         (WebCore::HitTestResult::spellingToolTip):
2536         (WebCore::HitTestResult::replacedString):
2537         * rendering/InlineTextBox.cpp:
2538         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
2539         (WebCore::InlineTextBox::paintTextMatchMarker):
2540         (WebCore::InlineTextBox::computeRectForReplacementMarker):
2541         (WebCore::InlineTextBox::paintDocumentMarkers):
2542         * rendering/svg/SVGInlineFlowBox.cpp:
2543         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
2544
2545 2011-05-17  Andrew Wilson  <atwilson@chromium.org>
2546
2547         Unreviewed, rolling out r86656.
2548         http://trac.webkit.org/changeset/86656
2549
2550         Broke tests downstream in Chromium
2551
2552         * editing/SpellingCorrectionController.cpp:
2553         (WebCore::markersHaveIdenticalDescription):
2554         (WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
2555         (WebCore::SpellingCorrectionController::processMarkersOnTextToBeReplacedByResult):
2556
2557 2011-05-17  Yufeng Shen  <miletus@chromium.org>
2558
2559         Reviewed by Darin Fisher.
2560
2561         Make WebKit expose extra touch information
2562         https://bugs.webkit.org/show_bug.cgi?id=59030
2563
2564         * dom/Document.cpp:
2565         (WebCore::Document::createTouch):
2566         * dom/Document.h:
2567         * dom/Document.idl:
2568         * dom/Touch.cpp:
2569         (WebCore::Touch::Touch):
2570         * dom/Touch.h:
2571         (WebCore::Touch::create):
2572         (WebCore::Touch::webkitRadiusX):
2573         (WebCore::Touch::webkitRadiusY):
2574         (WebCore::Touch::webkitRotationAngle):
2575         * dom/Touch.idl:
2576         * page/EventHandler.cpp:
2577         (WebCore::EventHandler::handleTouchEvent):
2578         * platform/PlatformTouchPoint.h:
2579         (WebCore::PlatformTouchPoint::radiusX):
2580         (WebCore::PlatformTouchPoint::radiusY):
2581         (WebCore::PlatformTouchPoint::rotationAngle):
2582
2583 2011-05-17  Eric Seidel  <eric@webkit.org>
2584
2585         Reviewed by Ryosuke Niwa.
2586
2587         Add a LineLayoutState object to hold global state during line layout
2588         https://bugs.webkit.org/show_bug.cgi?id=60113
2589
2590         Like LayoutState for layout(), LineLayoutState keeps track of global information
2591         during an entire linebox tree layout pass (aka layoutInlineChildren).
2592
2593         For now it just holds isFullLayout and the logicalRepaintTop/Bottom.
2594         It's possible we should hold the useRepaintBounds bool as well as
2595         the startLine and endLine RootInlineBox pointers.
2596
2597         No change in behavior, thus no tests.
2598
2599         * rendering/RenderBlock.cpp:
2600         (WebCore::RenderBlock::layoutBlock):
2601         * rendering/RenderBlock.h:
2602         * rendering/RenderBlockLineLayout.cpp:
2603         (WebCore::LineLayoutState::LineLayoutState):
2604         (WebCore::LineLayoutState::markForFullLayout):
2605         (WebCore::LineLayoutState::isFullLayout):
2606         (WebCore::LineLayoutState::setRepaintRange):
2607         (WebCore::LineLayoutState::updateRepaintRangeFromBox):
2608         (WebCore::LineLayoutState::startLine):
2609         (WebCore::LineLayoutState::endLine):
2610         (WebCore::deleteLineRange):
2611         (WebCore::RenderBlock::layoutRunsAndFloats):
2612         (WebCore::RenderBlock::layoutInlineChildren):
2613         (WebCore::RenderBlock::checkFloatsInCleanLine):
2614         (WebCore::RenderBlock::determineStartPosition):
2615         (WebCore::RenderBlock::determineEndPosition):
2616         (WebCore::RenderBlock::matchedEndLine):
2617
2618 2011-05-17  Andreas Kling  <kling@webkit.org>
2619
2620         Reviewed by Kenneth Rohde Christiansen.
2621
2622         Area element doesn't update region when dynamically altered.
2623         https://bugs.webkit.org/show_bug.cgi?id=54636
2624
2625         Recompute the clickable region after the "shape" or "coords" attribute
2626         of an area element is changed.
2627
2628         Test: fast/images/imagemap-dynamic-area-updates.html
2629
2630         * html/HTMLAreaElement.cpp:
2631         (WebCore::HTMLAreaElement::parseMappedAttribute):
2632         (WebCore::HTMLAreaElement::invalidateCachedRegion):
2633         * html/HTMLAreaElement.h:
2634
2635 2011-05-09  Luiz Agostini  <luiz.agostini@openbossa.org>
2636
2637         Reviewed by Kenneth Rohde Christiansen.
2638
2639         [Qt] Redirection of HTTP POST (3xx) incorrectly includes original POST data
2640         https://bugs.webkit.org/show_bug.cgi?id=60440
2641
2642         Makes sure that the HTTP headers Content-type and Content-length are not included in
2643         the requests that do not have any content.
2644
2645         Tests: http/tests/navigation/post-301-response.html
2646                http/tests/navigation/post-302-response.html
2647                http/tests/navigation/post-303-response.html
2648                http/tests/navigation/post-307-response.html
2649
2650         * platform/network/qt/QNetworkReplyHandler.cpp:
2651         (WebCore::QNetworkReplyHandler::sendNetworkRequest):
2652
2653 2011-05-17  Andreas Kling  <kling@webkit.org>
2654
2655         Reviewed by Benjamin Poulain.
2656
2657         [Qt] GraphicsLayerQtImpl: Remove an unused variable.
2658
2659         * platform/graphics/qt/GraphicsLayerQt.cpp:
2660         (WebCore::GraphicsLayerQtImpl::paint):
2661
2662 2011-05-17  Pavel Feldman  <pfeldman@google.com>
2663
2664         Reviewed by Yury Semikhatsky.
2665
2666         Web Inspector: navigating from elements panel does not show source view.
2667         https://bugs.webkit.org/show_bug.cgi?id=60970
2668
2669         * inspector/front-end/TextViewer.js:
2670         (WebInspector.TextViewer.prototype.highlightLine):
2671         (WebInspector.TextEditorChunkedPanel.prototype.makeLineAChunk):
2672
2673 2011-05-17  Sam Magnuson  <smagnuson@netflix.com>
2674
2675         Reviewed by Kenneth Rohde Christiansen.
2676
2677         [Qt] Node that have both an opacity and a transform animation on them seem not to fire.
2678         https://bugs.webkit.org/show_bug.cgi?id=40841
2679
2680         Test: compositing/animation/busy-indicator.html
2681
2682         * platform/graphics/qt/GraphicsLayerQt.cpp:
2683         (WebCore::GraphicsLayerQtImpl::recache):
2684         (WebCore::GraphicsLayerQtImpl::flushChanges):
2685         (WebCore::GraphicsLayerQt::setContentsToImage):
2686         (WebCore::TransformAnimationQt::getAnimatedProperty):
2687         (WebCore::OpacityAnimationQt::getAnimatedProperty):
2688         (WebCore::GraphicsLayerQt::addAnimation):
2689
2690 2011-05-17  Grace Kloba  <klobag@chromium.org>
2691
2692         Reviewed by Kenneth Russell.
2693
2694         GraphicsContext3DSkia needs to honor the platform Sk_x_SHIFT value instead of assuming BGRA color
2695         https://bugs.webkit.org/show_bug.cgi?id=60965
2696
2697         * platform/graphics/skia/GraphicsContext3DSkia.cpp:
2698         (WebCore::GraphicsContext3D::getImageData):
2699
2700 2011-05-17  Alexander Pavlov  <apavlov@chromium.org>
2701
2702         Reviewed by Yury Semikhatsky.
2703
2704         Web Inspector: Enter/Tab after editing a CSS property does not invoke editor on next field
2705         https://bugs.webkit.org/show_bug.cgi?id=60962
2706
2707         * inspector/front-end/ElementsPanel.js:
2708         (WebInspector.ElementsPanel.prototype.updateStyles):
2709
2710 2011-05-17  Sheriff Bot  <webkit.review.bot@gmail.com>
2711
2712         Unreviewed, rolling out r86660.
2713         http://trac.webkit.org/changeset/86660
2714         https://bugs.webkit.org/show_bug.cgi?id=60958
2715
2716         broke search in console panel (Requested by podivilov on
2717         #webkit).
2718
2719         * inspector/front-end/ConsoleView.js:
2720         (WebInspector.ConsoleView.prototype.show):
2721         (WebInspector.ConsoleView.prototype.afterShow):
2722         (WebInspector.ConsoleView.prototype.hide):
2723         (WebInspector.ConsoleView.prototype.addMessage):
2724         (WebInspector.ConsoleView.prototype.clearMessages):
2725         * inspector/front-end/DebuggerPresentationModel.js:
2726         (WebInspector.DebuggerPresentationModel):
2727         * inspector/front-end/Drawer.js:
2728         (WebInspector.Drawer.prototype.set visibleView):
2729         (WebInspector.Drawer.prototype.show.animationFinished):
2730         (WebInspector.Drawer.prototype.show):
2731         * inspector/front-end/Panel.js:
2732         (WebInspector.Panel):
2733         * inspector/front-end/ResourceTreeModel.js:
2734         (WebInspector.ResourceTreeModel):
2735         * inspector/front-end/inspector.html:
2736         * inspector/front-end/inspector.js:
2737         (WebInspector._createPanels):
2738
2739 2011-05-17  Alexis Menard  <alexis.menard@openbossa.org>
2740
2741         Unreviewed warning fix introduced by r86377.
2742
2743         * rendering/RenderFieldset.cpp:
2744         (WebCore::RenderFieldset::paintMask):
2745
2746 2011-05-17  Yuta Kitamura  <yutak@chromium.org>
2747
2748         Reviewed by Kent Tamura.
2749
2750         WebSocket: Uninline methods in ThreadableWebSocketChannelClientWrapper
2751         https://bugs.webkit.org/show_bug.cgi?id=60945
2752
2753         Add ThreadableWebSocketChannelClientWrapper.cpp. Uninline methods in this class and
2754         move these definitions into .cpp in order to allow further modifications in this class.
2755
2756         No new tests, as this is just refactoring.
2757
2758         * CMakeLists.txt:
2759         * GNUmakefile.list.am:
2760         * WebCore.gypi:
2761         * WebCore.pro:
2762         * WebCore.vcproj/WebCore.vcproj:
2763         * WebCore.xcodeproj/project.pbxproj:
2764         * websockets/ThreadableWebSocketChannelClientWrapper.cpp: Added.
2765         (WebCore::ThreadableWebSocketChannelClientWrapper::ThreadableWebSocketChannelClientWrapper):
2766         (WebCore::ThreadableWebSocketChannelClientWrapper::create):
2767         (WebCore::ThreadableWebSocketChannelClientWrapper::clearSyncMethodDone):
2768         (WebCore::ThreadableWebSocketChannelClientWrapper::setSyncMethodDone):
2769         (WebCore::ThreadableWebSocketChannelClientWrapper::syncMethodDone):
2770         (WebCore::ThreadableWebSocketChannelClientWrapper::sent):
2771         (WebCore::ThreadableWebSocketChannelClientWrapper::setSent):
2772         (WebCore::ThreadableWebSocketChannelClientWrapper::bufferedAmount):
2773         (WebCore::ThreadableWebSocketChannelClientWrapper::setBufferedAmount):
2774         (WebCore::ThreadableWebSocketChannelClientWrapper::clearClient):
2775         (WebCore::ThreadableWebSocketChannelClientWrapper::didConnect):
2776         (WebCore::ThreadableWebSocketChannelClientWrapper::didReceiveMessage):
2777         (WebCore::ThreadableWebSocketChannelClientWrapper::didClose):
2778         (WebCore::ThreadableWebSocketChannelClientWrapper::suspend):
2779         (WebCore::ThreadableWebSocketChannelClientWrapper::resume):
2780         (WebCore::ThreadableWebSocketChannelClientWrapper::processPendingEvents):
2781         * websockets/ThreadableWebSocketChannelClientWrapper.h:
2782
2783 2011-05-17  Andreas Kling  <andreas.kling@nokia.com>
2784
2785         Reviewed by Kenneth Rohde Christiansen.
2786
2787         [Qt] Support shadowed text in fast font path.
2788         https://bugs.webkit.org/show_bug.cgi?id=60462
2789
2790         * platform/graphics/Font.cpp:
2791         (WebCore::Font::drawText): Remove complex path shortcut for shadowed text.
2792
2793         * platform/graphics/qt/FontQt.cpp:
2794         (WebCore::Font::drawGlyphs): Paint shadows for simple text.
2795
2796 2011-05-17  Andreas Kling  <kling@webkit.org>
2797
2798         Reviewed by Kenneth Rohde Christiansen.
2799
2800         [Qt] Construct GraphicsLayerQtImpl::State with correct values.
2801         https://bugs.webkit.org/show_bug.cgi?id=60902
2802
2803         The GraphicsLayerQtImpl initial state should match the initial values
2804         of the corresponding GraphicsLayer flags.
2805
2806         * platform/graphics/qt/GraphicsLayerQt.cpp:
2807         (WebCore::GraphicsLayerQtImpl::State::State):
2808
2809 2011-05-12  Hans Wennborg  <hans@chromium.org>
2810
2811         Reviewed by Steve Block.
2812
2813         IndexedDB: Index population should ignore records without key for index
2814         https://bugs.webkit.org/show_bug.cgi?id=60697
2815
2816         When populating a new index, records which do not have a key on the
2817         index's key path should be ignored.
2818
2819         * storage/IDBObjectStoreBackendImpl.cpp:
2820
2821 2011-05-17  Young Han Lee  <joybro@company100.net>
2822
2823         Reviewed by Csaba Osztrogonác.
2824
2825         [Texmap][Qt] Enable strict PassOwnPtr for Qt with texmap enabled.
2826         https://bugs.webkit.org/show_bug.cgi?id=60947
2827
2828         No new tests. Build fix.
2829
2830         * platform/graphics/qt/TextureMapperQt.cpp:
2831         (WebCore::TextureMapper::create):
2832         * platform/graphics/qt/TextureMapperQt.h:
2833         (WebCore::TextureMapperQt::create):
2834         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
2835         (WebCore::GraphicsLayer::create):
2836
2837 2011-05-17  Alexander Pavlov  <apavlov@chromium.org>
2838
2839         Reviewed by Yury Semikhatsky.
2840
2841         Web Inspector: Increment/decrement of very big CSS numeric values results in invalid CSS
2842         https://bugs.webkit.org/show_bug.cgi?id=60890
2843
2844         * inspector/front-end/MetricsSidebarPane.js:
2845         (WebInspector.MetricsSidebarPane.prototype._handleKeyDown):
2846         * inspector/front-end/StylesSidebarPane.js:
2847         (WebInspector.StylesSidebarPane.alteredFloatNumber):
2848         (WebInspector.StylePropertyTreeElement.prototype):
2849
2850 2011-05-17  Pavel Podivilov  <podivilov@chromium.org>
2851
2852         Reviewed by Yury Semikhatsky.
2853
2854         Web Inspector: merge ConsoleView into ConsolePanel.
2855         https://bugs.webkit.org/show_bug.cgi?id=54670
2856
2857         Console view in drawer looks exactly the same as console panel. Merging ConsoleView and ConsolePanel together
2858         will allow us to reuse panel's functionality (e.g. resizable sidebar) even when console is docked.
2859
2860         * inspector/front-end/ConsoleView.js:
2861         (WebInspector.ConsolePanel.prototype.get toolbarItemLabel):
2862         (WebInspector.ConsolePanel.prototype.show):
2863         (WebInspector.ConsolePanel.prototype.hide):
2864         (WebInspector.ConsolePanel.prototype.showInDrawer):
2865         (WebInspector.ConsolePanel.prototype.afterShowInDrawer):
2866         (WebInspector.ConsolePanel.prototype.hideInDrawer):
2867         (WebInspector.ConsolePanel.prototype.addMessage):
2868         (WebInspector.ConsolePanel.prototype.clearMessages):
2869         * inspector/front-end/DebuggerPresentationModel.js:
2870         (WebInspector.DebuggerPresentationModel):
2871         * inspector/front-end/Drawer.js:
2872         (WebInspector.Drawer.prototype.set visibleView):
2873         (WebInspector.Drawer.prototype.show.animationFinished):
2874         (WebInspector.Drawer.prototype.show):
2875         * inspector/front-end/Panel.js:
2876         (WebInspector.Panel):
2877         * inspector/front-end/ResourceTreeModel.js:
2878         (WebInspector.ResourceTreeModel):
2879         * inspector/front-end/inspector.html:
2880         * inspector/front-end/inspector.js:
2881         (WebInspector._createPanels):
2882
2883 2011-05-16  Yuta Kitamura  <yutak@chromium.org>
2884
2885         Reviewed by Kent Tamura.
2886
2887         WebSocket: WebSocketHandshake prints a carriage return to console
2888         https://bugs.webkit.org/show_bug.cgi?id=60880
2889
2890         * websockets/WebSocketHandshake.cpp:
2891         (WebCore::WebSocketHandshake::readStatusLine):
2892         WebSocketHandshake should not print a carriage return to console. To fix this,
2893         we first check whether the status line ends with CRLF. After that,
2894         we can print the first (lineLength - 2) characters of the status line
2895         which do not contain a carriage return.
2896
2897 2011-05-16  MORITA Hajime  <morrita@google.com>
2898
2899         Unreviewed build fix for r86647, which broke SUPPORT_AUTOCORRECTION_PANEL.
2900
2901         * editing/SpellingCorrectionController.cpp:
2902         (WebCore::markersHaveIdenticalDescription):
2903         (WebCore::SpellingCorrectionController::recordSpellcheckerResponseForModifiedCorrection):
2904         (WebCore::SpellingCorrectionController::processMarkersOnTextToBeReplacedByResult):
2905
2906 2011-05-16  Kent Tamura  <tkent@chromium.org>
2907
2908         Fix Leopard build.
2909
2910         * html/HTMLInputElement.cpp:
2911         (WebCore::HTMLInputElement::stepUpFromRenderer): Use double instead of int.
2912
2913 2011-05-16  James Robinson  <jamesr@chromium.org>
2914
2915         Reviewed by Kenneth Russell.
2916
2917         [chromium] Decouple LayerChromium/CCLayerImpl trees
2918         https://bugs.webkit.org/show_bug.cgi?id=58830
2919
2920         Makes the CCLayerImpl tree self-hosting and provides an explicit step
2921         to synchronize the LayerChromium tree to the CCLayerImpl tree.
2922         Tested by compositing/ layout tests and by unit tests in WebKit/chromium.
2923
2924         * WebCore.gypi:
2925         * platform/graphics/chromium/CanvasLayerChromium.cpp:
2926         (WebCore::CanvasLayerChromium::createCCLayerImpl):
2927         * platform/graphics/chromium/LayerChromium.cpp:
2928         (WebCore::LayerChromium::LayerChromium):
2929         (WebCore::LayerChromium::~LayerChromium):
2930         (WebCore::LayerChromium::cleanupResources):
2931         (WebCore::LayerChromium::dumpLayer):
2932         (WebCore::LayerChromium::dumpLayerProperties):
2933         (WebCore::LayerChromium::createCCLayerImpl):
2934         (WebCore::LayerChromium::ccLayerImpl):
2935         * platform/graphics/chromium/LayerChromium.h:
2936         (WebCore::LayerChromium::id):
2937         (WebCore::LayerChromium::setCCLayerImpl):
2938         * platform/graphics/chromium/LayerRendererChromium.cpp:
2939         (WebCore::LayerRendererChromium::updateAndDrawLayers):
2940         (WebCore::LayerRendererChromium::updateLayers):
2941         (WebCore::LayerRendererChromium::updatePropertiesAndRenderSurfaces):
2942         (WebCore::LayerRendererChromium::updateCompositorResourcesRecursive):
2943         * platform/graphics/chromium/LayerRendererChromium.h:
2944         * platform/graphics/chromium/PluginLayerChromium.cpp:
2945         (WebCore::PluginLayerChromium::createCCLayerImpl):
2946         * platform/graphics/chromium/TreeSynchronizer.cpp: Added.
2947         (WebCore::TreeSynchronizer::addCCLayerImplsToMapRecursive):
2948         (WebCore::TreeSynchronizer::synchronizeTreeRecursive):
2949         (WebCore::TreeSynchronizer::synchronizeTrees):
2950         * platform/graphics/chromium/TreeSynchronizer.h:
2951         * platform/graphics/chromium/VideoLayerChromium.cpp:
2952         (WebCore::VideoLayerChromium::createCCLayerImpl):
2953         * platform/graphics/chromium/cc/CCCanvasLayerImpl.cpp:
2954         (WebCore::CCCanvasLayerImpl::CCCanvasLayerImpl):
2955         * platform/graphics/chromium/cc/CCCanvasLayerImpl.h:
2956         (WebCore::CCCanvasLayerImpl::create):
2957         * platform/graphics/chromium/cc/CCLayerImpl.cpp:
2958         (WebCore::CCLayerImpl::CCLayerImpl):
2959         (WebCore::CCLayerImpl::addChild):
2960         (WebCore::CCLayerImpl::removeFromParent):
2961         (WebCore::CCLayerImpl::removeAllChildren):
2962         (WebCore::CCLayerImpl::clearChildList):
2963         (WebCore::CCLayerImpl::descendantsDrawsContent):
2964         (WebCore::CCLayerImpl::drawsContent):
2965         (WebCore::CCLayerImpl::updateCompositorResources):
2966         * platform/graphics/chromium/cc/CCLayerImpl.h:
2967         (WebCore::CCLayerImpl::create):
2968         (WebCore::CCLayerImpl::parent):
2969         (WebCore::CCLayerImpl::children):
2970         (WebCore::CCLayerImpl::setMaskLayer):
2971         (WebCore::CCLayerImpl::maskLayer):
2972         (WebCore::CCLayerImpl::setReplicaLayer):
2973         (WebCore::CCLayerImpl::replicaLayer):
2974         (WebCore::CCLayerImpl::id):
2975         (WebCore::CCLayerImpl::owner):
2976         (WebCore::CCLayerImpl::setParent):
2977         * platform/graphics/chromium/cc/CCPluginLayerImpl.cpp:
2978         (WebCore::CCPluginLayerImpl::CCPluginLayerImpl):
2979         * platform/graphics/chromium/cc/CCPluginLayerImpl.h:
2980         (WebCore::CCPluginLayerImpl::create):
2981         * platform/graphics/chromium/cc/CCVideoLayerImpl.cpp:
2982         (WebCore::CCVideoLayerImpl::CCVideoLayerImpl):
2983         * platform/graphics/chromium/cc/CCVideoLayerImpl.h:
2984         (WebCore::CCVideoLayerImpl::create):
2985
2986 2011-05-16  Naoki Takano  <takano.naoki@gmail.com>
2987
2988         Reviewed by Kent Tamura.
2989
2990         HTML5 Number Spinbox displays a 0 in situations where a 0 is not between the min and max.
2991         https://bugs.webkit.org/show_bug.cgi?id=60871
2992
2993         Test: fast/forms/input-stepup-stepdown-from-renderer.html
2994
2995         In number input type, if the value is not a number, including empty, the currect valued is assumed 0.
2996         But we have to handle it separately from the case when the value is actuall "0".
2997
2998         * html/HTMLInputElement.cpp:
2999         (WebCore::HTMLInputElement::stepUpFromRenderer): Added cliping for default value.
3000
3001 2011-05-16  Adam Barth  <abarth@webkit.org>
3002
3003         Reviewed by Eric Seidel.
3004
3005         Remove bogus ASSERT in Document::setCompatibilityMode
3006         https://bugs.webkit.org/show_bug.cgi?id=60935
3007
3008         The ASSERT is invalid when the parser is in the initial state and the
3009         document is non-empty, which is strange but not impossible.
3010
3011         Test: fast/parser/append-child-followed-by-document-write.html
3012
3013         * dom/Document.cpp:
3014         (WebCore::Document::setCompatibilityMode):
3015
3016 2011-05-16  MORITA Hajime  <morrita@google.com>
3017
3018         Reviewed by Tony Chang.
3019
3020         [Refactoring] Member variables of DocumentMarker should be encapsulated.        
3021         https://bugs.webkit.org/show_bug.cgi?id=56814
3022
3023         - Moved DocumentMarker's member variables to private and added getters for them.
3024         - Added DocumentMarker setters and constructors, which contain assertions against m_type values
3025           because description and activeMatch are used with specific type of MarkerType.
3026         - Moved chromium's WebKit::WebFrameImpl::addMarker() to DocumentMarkerController because
3027           it accesses DocumentMarker internals.
3028         - Moved a version of DMC::addMarker() to private and add alternatives that hide
3029           internals of DocumentMarker. (The internal will be renewed by upcoming change.)
3030         
3031         * dom/DocumentMarker.h:
3032         (WebCore::DocumentMarker::type):
3033         (WebCore::DocumentMarker::startOffset):
3034         (WebCore::DocumentMarker::endOffset):
3035         (WebCore::DocumentMarker::description):
3036         (WebCore::DocumentMarker::hasDescription):
3037         (WebCore::DocumentMarker::activeMatch):
3038         (WebCore::DocumentMarker::clearDescription):
3039         (WebCore::DocumentMarker::setStartOffset):
3040         (WebCore::DocumentMarker::setEndOffset):
3041         (WebCore::DocumentMarker::operator==):
3042         (WebCore::DocumentMarker::DocumentMarker):
3043         (WebCore::DocumentMarker::shiftOffsets):
3044         (WebCore::DocumentMarker::setActiveMatch):
3045         * dom/DocumentMarkerController.cpp:
3046         (WebCore::DocumentMarkerController::addMarker):
3047         (WebCore::DocumentMarkerController::addTextMatchMarker):
3048         (WebCore::DocumentMarkerController::copyMarkers):
3049         (WebCore::DocumentMarkerController::removeMarkers):
3050         (WebCore::DocumentMarkerController::markerContainingPoint):
3051         (WebCore::DocumentMarkerController::markersInRange):
3052         (WebCore::DocumentMarkerController::renderedRectsForMarkers):
3053         (WebCore::DocumentMarkerController::removeMarkersFromList):
3054         (WebCore::DocumentMarkerController::repaintMarkers):
3055         (WebCore::DocumentMarkerController::shiftMarkers):
3056         (WebCore::DocumentMarkerController::setMarkersActive):
3057         (WebCore::DocumentMarkerController::hasMarkers):
3058         (WebCore::DocumentMarkerController::clearDescriptionOnMarkersIntersectingRange):
3059         (WebCore::DocumentMarkerController::showMarkers):
3060         * dom/DocumentMarkerController.h:
3061         * editing/CompositeEditCommand.cpp:
3062         (WebCore::CompositeEditCommand::replaceTextInNodePreservingMarkers):
3063         * editing/DeleteSelectionCommand.cpp:
3064         (WebCore::DeleteSelectionCommand::originalStringForAutocorrectionAtBeginningOfSelection):
3065         * editing/Editor.cpp:
3066         (WebCore::Editor::selectionStartHasMarkerFor):
3067         * editing/SpellingCorrectionController.cpp:
3068         (WebCore::SpellingCorrectionController::respondToChangedSelection):
3069         * editing/SpellingCorrectionController.h:
3070         (WebCore::SpellingCorrectionController::shouldStartTimerFor):
3071         * rendering/HitTestResult.cpp:
3072         (WebCore::HitTestResult::spellingToolTip):
3073         (WebCore::HitTestResult::replacedString):
3074         * rendering/InlineTextBox.cpp:
3075         (WebCore::InlineTextBox::paintSpellingOrGrammarMarker):
3076         (WebCore::InlineTextBox::paintTextMatchMarker):
3077         (WebCore::InlineTextBox::computeRectForReplacementMarker):
3078         (WebCore::InlineTextBox::paintDocumentMarkers):
3079         * rendering/svg/SVGInlineFlowBox.cpp:
3080         (WebCore::SVGInlineFlowBox::computeTextMatchMarkerRectForRenderer):
3081
3082 2011-05-16  Martin Robinson  <mrobinson@igalia.com>
3083
3084         Fix the Cairo build for older versions of GTK+.
3085
3086         * platform/gtk/GtkWidgetBackingStoreX11.cpp: Include GtkVersioning.h to
3087         satisfy older versions of GTK+ 2.x.
3088
3089 2011-05-16  Ian Henderson  <ianh@apple.com>
3090
3091         Reviewed by Joseph Pecoraro.
3092
3093         Page::goToItem doesn't work while loading is deferred
3094         https://bugs.webkit.org/show_bug.cgi?id=60412
3095
3096         If goToItem is called while loading is deferred, save the arguments
3097         and try again later instead of doing nothing.
3098
3099         Test: loader/navigation-while-deferring-loads.html
3100
3101         * loader/FrameLoader.cpp:
3102         (WebCore::FrameLoader::setDefersLoading):
3103         Pipe the "defersLoading" state into HistoryController.
3104         * loader/HistoryController.cpp:
3105         (WebCore::HistoryController::HistoryController):
3106         (WebCore::HistoryController::goToItem):
3107         Save the HistoryItem and FrameLoadType if loading is deferred.
3108         (WebCore::HistoryController::setDefersLoading):
3109         If we have a saved HistoryItem after resuming, try going to it.
3110         * loader/HistoryController.h:
3111         * page/Page.cpp:
3112         (WebCore::Page::goToItem):
3113         No longer bail early if loading is deferred, since HistoryController
3114         now handles this case.
3115
3116 2011-05-16  Andrew Wilson  <atwilson@chromium.org>
3117
3118         Unreviewed, rolling out r86625.
3119         http://trac.webkit.org/changeset/86625
3120         https://bugs.webkit.org/show_bug.cgi?id=60719
3121
3122         Caused failed assertion on Chromium gpu canary bots
3123
3124         * WebCore.gypi:
3125         * platform/chromium/TraceEvent.h:
3126         * platform/graphics/chromium/ContentLayerChromium.cpp:
3127         (WebCore::ContentLayerChromium::create):
3128         (WebCore::ContentLayerChromium::ContentLayerChromium):
3129         (WebCore::ContentLayerChromium::~ContentLayerChromium):
3130         (WebCore::ContentLayerChromium::paintContentsIfDirty):
3131         (WebCore::ContentLayerChromium::setLayerRenderer):
3132         (WebCore::ContentLayerChromium::createTilerIfNeeded):
3133         (WebCore::ContentLayerChromium::updateCompositorResources):
3134         * platform/graphics/chromium/ContentLayerChromium.h:
3135         (WebCore::ContentLayerChromium::drawsContent):
3136         * platform/graphics/chromium/ImageLayerChromium.cpp:
3137         (WebCore::ImageLayerChromium::paintContentsIfDirty):
3138         (WebCore::ImageLayerChromium::updateCompositorResources):
3139         * platform/graphics/chromium/ImageLayerChromium.h:
3140         * platform/graphics/chromium/LayerPainterChromium.h: Removed.
3141         * platform/graphics/chromium/LayerRendererChromium.cpp:
3142         (WebCore::LayerRendererChromium::create):
3143         (WebCore::LayerRendererChromium::LayerRendererChromium):
3144         (WebCore::LayerRendererChromium::updateRootLayerContents):
3145         (WebCore::LayerRendererChromium::drawRootLayer):
3146         (WebCore::LayerRendererChromium::updateAndDrawLayers):
3147         (WebCore::LayerRendererChromium::updateLayers):
3148         * platform/graphics/chromium/LayerRendererChromium.h:
3149         * platform/graphics/chromium/LayerTextureSubImage.cpp: Removed.
3150         * platform/graphics/chromium/LayerTextureSubImage.h: Removed.
3151         * platform/graphics/chromium/LayerTextureUpdater.h: Removed.
3152         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: Removed.
3153         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: Removed.
3154         * platform/graphics/chromium/LayerTilerChromium.cpp:
3155         (WebCore::LayerTilerChromium::create):
3156         (WebCore::LayerTilerChromium::LayerTilerChromium):
3157         (WebCore::LayerTilerChromium::setLayerRenderer):
3158         (WebCore::LayerTilerChromium::setTileSize):
3159         (WebCore::LayerTilerChromium::update):
3160         (WebCore::LayerTilerChromium::uploadCanvas):
3161         (WebCore::LayerTilerChromium::updateFromPixels):
3162         (WebCore::LayerTilerChromium::draw):
3163         * platform/graphics/chromium/LayerTilerChromium.h:
3164         (WebCore::LayerTilerChromium::Tile::Tile):
3165         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
3166         (WebCore::CCHeadsUpDisplay::draw):
3167
3168 2011-05-16  Antti Koivisto  <antti@apple.com>
3169
3170         Reviewed by Dave Kilzer.
3171
3172         https://bugs.webkit.org/show_bug.cgi?id=60927
3173         fastCheckSelector() does not inline correctly in all cases
3174
3175         Use anonymous namespace instead of static qualifier to get internal linkage.
3176         Use functions as template arguments instead of classes.
3177
3178         * css/CSSStyleSelector.cpp:
3179         (WebCore::CSSStyleSelector::SelectorChecker::fastCheckSelector):
3180
3181 2011-05-16  Chris Rogers  <crogers@google.com>
3182
3183         Unreviewed build fix.
3184
3185         Just return "nullptr" to fix compile errors
3186         https://bugs.webkit.org/show_bug.cgi?id=60932
3187
3188         * platform/audio/mac/AudioBusMac.mm:
3189         (WebCore::AudioBus::loadPlatformResource):
3190         * platform/audio/mac/AudioFileReaderMac.cpp:
3191         (WebCore::AudioFileReader::createBus):
3192
3193 2011-05-16  Emil A Eklund  <eae@chromium.org>
3194
3195         Reviewed by Eric Seidel.
3196
3197         Replace docTop/Right/Bottom/Left/Width/Height with documentRect
3198         https://bugs.webkit.org/show_bug.cgi?id=60743
3199
3200         Change RenderView::documentRect to compute rect once rather than four times.
3201         Replace all uses of docTop/Right/Bottom/Left/Width/Height with documentRect to
3202         simplify the code and reduce complexity.
3203
3204         Covered by existing tests.
3205
3206         * WebCore.exp.in:
3207         * page/FrameView.cpp:
3208         (WebCore::FrameView::adjustViewSize):
3209         (WebCore::FrameView::forceLayoutForPagination):
3210         * page/PrintContext.cpp:
3211         (WebCore::PrintContext::computePageRects):
3212         * rendering/RenderBox.cpp:
3213         (WebCore::RenderBox::paintRootBoxFillLayers):
3214         * rendering/RenderLayerCompositor.cpp:
3215         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
3216         * rendering/RenderView.cpp:
3217         (WebCore::RenderView::documentRect):
3218         * rendering/RenderView.h:
3219
3220 2011-05-16  Tony Chang  <tony@chromium.org>
3221
3222         Reviewed by Adam Barth.
3223
3224         [chromium] shard V8DerivedSources into 19 files
3225         https://bugs.webkit.org/show_bug.cgi?id=60926
3226
3227         This reduces the clobber build time by 4s on my machine.  It helps
3228         by making the slowest to compile V8DerivedSources faster (and thus
3229         more parallelizable).  With 8 files, the 3 slowest are 23s, 18s and
3230         10s.  With 19 files, the 3 slowest are 16s, 10s, and 10s.
3231
3232         * WebCore.gyp/WebCore.gyp:
3233         * storage/IDBObjectStore.h: Fix a missing include that was working
3234           because a different .cpp file before it was including the header.
3235
3236 2011-05-16  Chris Rogers  <crogers@google.com>
3237
3238         Unreviewed build fix.
3239
3240         Fix web audio enabled mac port compile errors
3241         https://bugs.webkit.org/show_bug.cgi?id=60930
3242
3243         * platform/audio/mac/AudioBusMac.mm:
3244         (WebCore::AudioBus::loadPlatformResource):
3245         * platform/audio/mac/AudioFileReaderMac.cpp:
3246         (WebCore::AudioFileReader::createBus):
3247
3248 2011-05-16  Eric Seidel  <eric@webkit.org>
3249
3250         Reviewed by Adam Barth.
3251
3252         Document why RenderBlockLineLayout has its own deleteLineBoxTree implementation
3253         https://bugs.webkit.org/show_bug.cgi?id=60925
3254
3255         I suspect this difference is really just papering over other bugs
3256         but now that I finally understand the difference, I should at least
3257         document it for others.
3258
3259         * rendering/RenderBlockLineLayout.cpp:
3260         (WebCore::deleteLineRange):
3261         (WebCore::RenderBlock::determineStartPosition):
3262
3263 2011-05-16  Alok Priyadarshi  <alokp@chromium.org>
3264
3265         Reviewed by James Robinson.
3266
3267         [chromium] Split canvas from LayerTilerChromium
3268         https://bugs.webkit.org/show_bug.cgi?id=60719
3269
3270         LayerTilerChromium now just does tiling. It delegates the task of painting and updating textures to LayerTextureUpdater.
3271         Also abstracted LayerTextureSubImage to upload texture pixels.
3272
3273         * WebCore.gypi:
3274         * platform/chromium/TraceEvent.h:
3275         * platform/graphics/chromium/ContentLayerChromium.cpp:
3276         (WebCore::ContentLayerChromium::create):
3277         (WebCore::ContentLayerChromium::ContentLayerChromium):
3278         (WebCore::ContentLayerChromium::~ContentLayerChromium):
3279         (WebCore::ContentLayerChromium::paintContentsIfDirty):
3280         (WebCore::ContentLayerChromium::cleanupResources):
3281         (WebCore::ContentLayerChromium::setLayerRenderer):
3282         (WebCore::ContentLayerChromium::createTextureUpdater):
3283         (WebCore::ContentLayerChromium::drawsContent):
3284         (WebCore::ContentLayerChromium::createTilerIfNeeded):
3285         (WebCore::ContentLayerChromium::updateCompositorResources):
3286         * platform/graphics/chromium/ContentLayerChromium.h:
3287         * platform/graphics/chromium/ImageLayerChromium.cpp:
3288         (WebCore::ImageLayerTextureUpdater::ImageLayerTextureUpdater):
3289         (WebCore::ImageLayerTextureUpdater::~ImageLayerTextureUpdater):
3290         (WebCore::ImageLayerTextureUpdater::orientation):
3291         (WebCore::ImageLayerTextureUpdater::prepareToUpdate):
3292         (WebCore::ImageLayerTextureUpdater::updateTextureRect):
3293         (WebCore::ImageLayerTextureUpdater::imageRect):
3294         (WebCore::ImageLayerChromium::paintContentsIfDirty):
3295         (WebCore::ImageLayerChromium::updateCompositorResources):
3296         (WebCore::ImageLayerChromium::createTextureUpdater):
3297         * platform/graphics/chromium/ImageLayerChromium.h:
3298         * platform/graphics/chromium/LayerPainterChromium.h: Added.
3299         * platform/graphics/chromium/LayerRendererChromium.cpp:
3300         (WebCore::LayerRendererChromium::create):
3301         (WebCore::LayerRendererChromium::LayerRendererChromium):
3302         (WebCore::LayerRendererChromium::updateRootLayerContents):
3303         (WebCore::LayerRendererChromium::drawRootLayer):
3304         (WebCore::LayerRendererChromium::updateAndDrawLayers):
3305         (WebCore::LayerRendererChromium::updateLayers):
3306         * platform/graphics/chromium/LayerRendererChromium.h:
3307         * platform/graphics/chromium/LayerTextureSubImage.cpp: Added.
3308         (WebCore::LayerTextureSubImage::LayerTextureSubImage):
3309         (WebCore::LayerTextureSubImage::~LayerTextureSubImage):
3310         (WebCore::LayerTextureSubImage::setSubImageSize):
3311         (WebCore::LayerTextureSubImage::upload):
3312         (WebCore::LayerTextureSubImage::uploadWithTexSubImage):
3313         (WebCore::LayerTextureSubImage::uploadWithMapTexSubImage):
3314         * platform/graphics/chromium/LayerTextureSubImage.h: Added.
3315         * platform/graphics/chromium/LayerTextureUpdater.h: Added.
3316         (WebCore::LayerTextureUpdater::LayerTextureUpdater):
3317         (WebCore::LayerTextureUpdater::~LayerTextureUpdater):
3318         (WebCore::LayerTextureUpdater::context):
3319         * platform/graphics/chromium/LayerTextureUpdaterCanvas.cpp: Added.
3320         (WebCore::LayerTextureUpdaterCanvas::LayerTextureUpdaterCanvas):
3321         (WebCore::LayerTextureUpdaterCanvas::paintContents):
3322         (WebCore::LayerTextureUpdaterBitmap::LayerTextureUpdaterBitmap):
3323         (WebCore::LayerTextureUpdaterBitmap::prepareToUpdate):
3324         (WebCore::LayerTextureUpdaterBitmap::updateTextureRect):
3325         * platform/graphics/chromium/LayerTextureUpdaterCanvas.h: Added.
3326         (WebCore::LayerTextureUpdaterCanvas::~LayerTextureUpdaterCanvas):
3327         (WebCore::LayerTextureUpdaterCanvas::contentRect):
3328         (WebCore::LayerTextureUpdaterBitmap::~LayerTextureUpdaterBitmap):
3329         (WebCore::LayerTextureUpdaterBitmap::orientation):
3330         * platform/graphics/chromium/LayerTilerChromium.cpp:
3331         (WebCore::LayerTilerChromium::create):
3332         (WebCore::LayerTilerChromium::LayerTilerChromium):
3333         (WebCore::LayerTilerChromium::setTileSize):
3334         (WebCore::LayerTilerChromium::prepareToUpdate):
3335         (WebCore::LayerTilerChromium::updateRect):
3336         (WebCore::LayerTilerChromium::draw):
3337         * platform/graphics/chromium/LayerTilerChromium.h:
3338         (WebCore::LayerTilerChromium::Tile::Tile):
3339         * platform/graphics/chromium/cc/CCHeadsUpDisplay.cpp:
3340         (WebCore::CCHeadsUpDisplay::draw):
3341
3342 2011-05-16  Andrew Wilson  <atwilson@chromium.org>
3343
3344         Unreviewed prospective build fix/workaround for chromium ARM compiler error.
3345
3346         * platform/graphics/GraphicsLayer.cpp:
3347         (WebCore::GraphicsLayer::animationNameForTransition):
3348
3349 2011-05-16  Martin Robinson  <mrobinson@igalia.com>
3350
3351         Reviewed by Anders Carlsson.
3352
3353         [GTK] [WebKit2] Provide a fast version of the backing store for X11
3354         https://bugs.webkit.org/show_bug.cgi?id=60912
3355
3356         No new tests. This will be covered by WebKit2 pixel tests.
3357
3358         * GNUmakefile.list.am: Added new GtkWidgetBackingStore source and header files.
3359         * platform/gtk/GtkWidgetBackingStore.h: Added.
3360         * platform/gtk/GtkWidgetBackingStoreCairo.cpp: Added this implementation of the backing
3361         store that uses Cairo and has the same performance characteristics as the WebKit2 implementaiton.
3362         * platform/gtk/GtkWidgetBackingStoreX11.cpp: Added this implementation of the backing
3363         store that uses X11 directly and has better performance than the Cairo version.
3364
3365 2011-05-16  Chris Rogers  <crogers@google.com>
3366
3367         Reviewed by senorblanco@chromium.org.
3368
3369         Add DynamicsCompressorNode implementation
3370         https://bugs.webkit.org/show_bug.cgi?id=60682
3371
3372         No new tests since audio API is not yet implemented.
3373
3374         * DerivedSources.make:
3375         * WebCore.gypi:
3376         * WebCore.xcodeproj/project.pbxproj:
3377         * platform/audio/DynamicsCompressor.cpp: Added.
3378         (WebCore::DynamicsCompressor::DynamicsCompressor):
3379         (WebCore::DynamicsCompressor::initializeParameters):
3380         (WebCore::DynamicsCompressor::parameterValue):
3381         (WebCore::DynamicsCompressor::setEmphasisStageParameters):
3382         (WebCore::DynamicsCompressor::setEmphasisParameters):
3383         (WebCore::DynamicsCompressor::process):
3384         (WebCore::DynamicsCompressor::reset):
3385         * platform/audio/DynamicsCompressor.h: Added.
3386         (WebCore::DynamicsCompressor::isStereo):
3387         (WebCore::DynamicsCompressor::sampleRate):
3388         (WebCore::DynamicsCompressor::nyquist):
3389         * platform/audio/DynamicsCompressorKernel.cpp: Added.
3390         (WebCore::saturate):
3391         (WebCore::DynamicsCompressorKernel::DynamicsCompressorKernel):
3392         (WebCore::DynamicsCompressorKernel::setPreDelayTime):
3393         (WebCore::DynamicsCompressorKernel::process):
3394         (WebCore::DynamicsCompressorKernel::reset):
3395         * platform/audio/DynamicsCompressorKernel.h: Added.
3396         (WebCore::DynamicsCompressorKernel::latencyFrames):
3397         (WebCore::DynamicsCompressorKernel::sampleRate):
3398         * platform/audio/ZeroPole.cpp: Added.
3399         (WebCore::ZeroPole::process):
3400         * platform/audio/ZeroPole.h: Added.
3401         (WebCore::ZeroPole::ZeroPole):
3402         (WebCore::ZeroPole::reset):
3403         (WebCore::ZeroPole::setZero):
3404         (WebCore::ZeroPole::setPole):
3405         (WebCore::ZeroPole::zero):
3406         (WebCore::ZeroPole::pole):
3407         * webaudio/AudioContext.cpp:
3408         (WebCore::AudioContext::createDynamicsCompressor):
3409         * webaudio/AudioContext.h:
3410         * webaudio/AudioContext.idl:
3411         * webaudio/AudioNode.h:
3412         * webaudio/DynamicsCompressorNode.cpp: Added.
3413         (WebCore::DynamicsCompressorNode::DynamicsCompressorNode):
3414         (WebCore::DynamicsCompressorNode::~DynamicsCompressorNode):
3415         (WebCore::DynamicsCompressorNode::process):
3416         (WebCore::DynamicsCompressorNode::reset):
3417         (WebCore::DynamicsCompressorNode::initialize):
3418         (WebCore::DynamicsCompressorNode::uninitialize):
3419         * webaudio/DynamicsCompressorNode.h: Added.
3420         (WebCore::DynamicsCompressorNode::create):
3421         * webaudio/DynamicsCompressorNode.idl: Added.
3422
3423 2011-05-16  Yuzo Fujishima  <yuzo@google.com>
3424
3425         Reviewed by Antti Koivisto.
3426
3427         Fix for Bug 43704 - Web font is printed as blank if it is not cached
3428         https://bugs.webkit.org/show_bug.cgi?id=43704
3429
3430         In setting printing, we should not validate resources already cached
3431         for the document. If we do, web fonts used for screen are revalidated
3432         and possiby reloaded. Then the fonts can be shown as blank on print.
3433         This patch won't save the case where screen and print use different web
3434         fonts. Nonetheless, this is an improvement.
3435
3436         No new tests because there seems to be no good way to test print images.
3437
3438         * editing/Editor.cpp:
3439         (WebCore::Editor::paste): Use ResourceCacheValidationSuppressor instead of explicitly allowing/disallowing stale resources.
3440         * loader/cache/CachedResourceLoader.h:
3441         (WebCore::ResourceCacheValidationSuppressor::ResourceCacheValidationSuppressor): RAII class for allowing/disallowing stale resources.
3442         (WebCore::ResourceCacheValidationSuppressor::~ResourceCacheValidationSuppressor):
3443         * page/DragController.cpp:
3444         (WebCore::DragController::concludeEditDrag): Use ResourceCacheValidationSuppressor instead of explicitly allowing/disallowing stale resources.
3445         * page/Frame.cpp:
3446         (WebCore::Frame::setPrinting): Use ResourceCacheValidationSuppressor to allow stale resources in printing.
3447
3448 2011-05-16  Dan Bernstein  <mitz@apple.com>
3449
3450         Reviewed by Darin Adler.
3451
3452         <rdar://problem/9446653> REGRESSION (r84750): Moving by word stops at apostrophe mid-word
3453         https://bugs.webkit.org/show_bug.cgi?id=60915
3454
3455         CFStringTokenizer’s kCFStringTokenizerUnitWord considers “Here’s” as two separate tokens.
3456         Switching to CFStringTokenizer in r84750 was an attempt to address an issue with Japanese word
3457         boundaries for searches with WebFindOptionsAtWordStarts, but it turned out to be insufficient,
3458         and in r86387 the Japanese word issue was addressed independently of text boundaries, so just
3459         revert r84750.
3460
3461         * platform/text/mac/TextBoundaries.mm:
3462         (WebCore::findNextWordFromIndex):
3463
3464 2011-05-16  David Kilzer  <ddkilzer@apple.com>
3465
3466         <http://webkit.org/b/60913> C++ exceptions should not be enabled when building with llvm-gcc-4.2
3467         <rdar://problem/9446430>
3468
3469         Reviewed by Mark Rowe.
3470
3471         * Configurations/Base.xcconfig: Fixed typo.
3472
3473 2011-05-16  Jon Lee  <jonlee@apple.com>
3474
3475         Fix for broken regression tests. Adding null pointer check
3476
3477         * page/FrameView.cpp:
3478         (WebCore::FrameView::didAddHorizontalScrollbar):
3479         (WebCore::FrameView::willRemoveHorizontalScrollbar):
3480
3481 2011-05-16  Adrienne Walker  <enne@google.com>
3482
3483         Reviewed by James Robinson.
3484
3485         [chromium] Remove unused member variables from LayerRendererChromium
3486         https://bugs.webkit.org/show_bug.cgi?id=60899
3487
3488         These should have been removed when tiling was enabled for root
3489         layers.
3490
3491         * platform/graphics/chromium/LayerRendererChromium.h:
3492
3493 2011-05-16  Andrew Wilson  <atwilson@chromium.org>
3494
3495         Unreviewed, rolling out r86589.
3496         http://trac.webkit.org/changeset/86589
3497         https://bugs.webkit.org/show_bug.cgi?id=54670
3498
3499         Broke chromium inspector tests.
3500
3501         * inspector/front-end/ConsoleView.js:
3502         (WebInspector.ConsoleView.prototype.show):
3503         (WebInspector.ConsoleView.prototype.afterShow):
3504         (WebInspector.ConsoleView.prototype.hide):
3505         (WebInspector.ConsoleView.prototype.addMessage):
3506         (WebInspector.ConsoleView.prototype.clearMessages):
3507         * inspector/front-end/DebuggerPresentationModel.js:
3508         (WebInspector.DebuggerPresentationModel):
3509         * inspector/front-end/Drawer.js:
3510         (WebInspector.Drawer.prototype.set visibleView):
3511         (WebInspector.Drawer.prototype.show.animationFinished):
3512         (WebInspector.Drawer.prototype.show):
3513         * inspector/front-end/Panel.js:
3514         (WebInspector.Panel):
3515         * inspector/front-end/ResourceTreeModel.js:
3516         (WebInspector.ResourceTreeModel):
3517         * inspector/front-end/inspector.html:
3518         * inspector/front-end/inspector.js:
3519         (WebInspector._createPanels):
3520
3521 2011-05-16  Brian Weinstein  <bweinstein@apple.com>
3522
3523         Reviewed by Enrica Casucci.
3524
3525         REGRESSION (r86542): Dropping URL onto Desktop creates broken Internet Shortcut file.
3526         
3527         r86477 fixed this bug by using latin1 as the CString's encoding instead of ascii, but r86542
3528         undid this change.
3529         
3530         Change it back to latin1 to fix the bug.
3531
3532         * platform/win/ClipboardWin.cpp:
3533         (WebCore::ClipboardWin::writeURL):
3534
3535 2011-05-16  Jeremy Noble  <jer.noble@apple.com>
3536
3537         Unreviewed; build fix for non-SnowLeopard builds.
3538
3539         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm: Wrap definition 
3540             of layerIsDescendentOf in a #if check.
3541
3542 2011-05-16  Pavel Podivilov  <podivilov@chromium.org>
3543
3544         Reviewed by Yury Semikhatsky.
3545
3546         Web Inspector: merge ConsoleView into ConsolePanel.
3547         https://bugs.webkit.org/show_bug.cgi?id=54670
3548
3549         Console view in drawer looks exactly the same as console panel. Merging ConsoleView and ConsolePanel together
3550         will allow us to reuse panel's functionality (e.g. resizable sidebar) even when console is docked.
3551
3552         * inspector/front-end/ConsoleView.js:
3553         (WebInspector.ConsolePanel.prototype.get toolbarItemLabel):
3554         (WebInspector.ConsolePanel.prototype.show):
3555         (WebInspector.ConsolePanel.prototype.hide):
3556         (WebInspector.ConsolePanel.prototype.showInDrawer):
3557         (WebInspector.ConsolePanel.prototype.afterShowInDrawer):
3558         (WebInspector.ConsolePanel.prototype.hideInDrawer):
3559         (WebInspector.ConsolePanel.prototype.addMessage):
3560         (WebInspector.ConsolePanel.prototype.clearMessages):
3561         * inspector/front-end/DebuggerPresentationModel.js:
3562         (WebInspector.DebuggerPresentationModel):
3563         * inspector/front-end/Drawer.js:
3564         (WebInspector.Drawer.prototype.set visibleView):
3565         (WebInspector.Drawer.prototype.show.animationFinished):
3566         (WebInspector.Drawer.prototype.show):
3567         * inspector/front-end/Panel.js:
3568         (WebInspector.Panel):
3569         * inspector/front-end/ResourceTreeModel.js:
3570         (WebInspector.ResourceTreeModel):
3571         * inspector/front-end/inspector.html:
3572         * inspector/front-end/inspector.js:
3573         (WebInspector._createPanels):
3574
3575 2011-05-13  Jer Noble  <jer.noble@apple.com>
3576
3577         Reviewed by Simon Fraser.
3578
3579         Video is blank, controller is misplaced on trailers.apple.com movie in fullscreen (with two screens)
3580         https://bugs.webkit.org/show_bug.cgi?id=60826
3581
3582         Listen for a WebKitLayerHostChanged notification and, if the affected layer is an
3583         ancestor layer of the qtMovieLayer, tear down the layer and recreate it the
3584         next time setVisible(true) is called.
3585
3586         * dom/Document.cpp:
3587         (WebCore::Document::webkitDidEnterFullScreenForElement):  Call setFullScreenRootLayer(0) 
3588             before disabling animation on the full screen renderer.
3589         * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
3590         * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
3591         (WebCore::MediaPlayerPrivateQTKit::createQTMovie): Register an observer for the new 
3592             WebKitLayerHostChanged notification.
3593         (WebCore::layerIsDescendentOf): Added.
3594         (WebCore::MediaPlayerPrivateQTKit::layerHostChanged): Added.  If the changed
3595             layer is an ancestor of the movie layer, tear down rendering and re-
3596             create the next time setVisible(true) is called.
3597         (-[WebCoreMovieObserver layerHostChanged:]):  Added ObjC listener wrapper.
3598
3599 2011-05-16  Adam Barth  <abarth@webkit.org>
3600
3601         Reviewed by Darin Adler.
3602
3603         Remove disable-javascript-urls CSP directive
3604         https://bugs.webkit.org/show_bug.cgi?id=60874
3605
3606         After talking this out with various folks in the CSP working group, we
3607         decided that this syntax isn't the right way to approach this issue.
3608         If we want to address the use case of enabling JavaScript URLs
3609         separately from inline script, we'll probably just make
3610
3611           script-src javascript:
3612
3613         work that way.
3614
3615         * page/ContentSecurityPolicy.cpp:
3616         (WebCore::ContentSecurityPolicy::ContentSecurityPolicy):
3617         (WebCore::ContentSecurityPolicy::allowJavaScriptURLs):
3618         (WebCore::ContentSecurityPolicy::addDirective):
3619         * page/ContentSecurityPolicy.h:
3620
3621 2011-05-16  Jon Lee  <jonlee@apple.com>
3622
3623        Reviewed by Simon Fraser.
3624
3625        Can't horizontally scroll iframes and overflow because wheel events are always accepted
3626        https://bugs.webkit.org/show_bug.cgi?id=60779
3627
3628        * dom/Document.cpp:
3629        (WebCore::Document::Document): Initialize wheel event handler count
3630        (WebCore::Document::didAddWheelEventHandler): Increment count, and tell the main frame
3631        to recalculate the total number of wheel event handlers in all of its frames' documents
3632        (WebCore::Document::didRemoveWheelEventHandler): Reverse of previous method
3633        * dom/Document.h:
3634        (WebCore::Document::wheelEventHandlerCount): Access the count
3635        * dom/Node.cpp:
3636        (WebCore::tryAddEventListener): If the event listener is a mouse wheel event, then
3637        tell the document to increment its count
3638        (WebCore::tryRemoveEventListener): Reverse of previous method
3639
3640        * page/ChromeClient.h: Two new methods:
3641          numWheelEventHandlersChanged: WebProcess tells UIProcess to update its cached
3642            count of total wheel event handlers, which in this case only include horizontal
3643            scrollbars and mouse wheel JS handlers
3644          shouldRubberBandInDirection: allow the UIProcess to provide some control over
3645            whether rubber banding is allowed when scrolling in a particular direction
3646        * loader/EmptyClients.h:
3647        (WebCore::EmptyChromeClient::numWheelEventHandlersChanged): Default empty impl
3648        (WebCore::EmptyChromeClient::shouldRubberBandInDirection): Default empty impl
3649        * page/EventHandler.cpp:
3650        (WebCore::EventHandler::handleWheelEvent): Remove a redundant pointer check
3651        * page/Frame.cpp:
3652        (WebCore::Frame::setDocument): When the frame's document changes, calculate that
3653        document's total wheel event handlers, and notify the UIProcess
3654        (WebCore::Frame::notifyChromeClientWheelEventHandlerCountChanged): Performs a crawl
3655        of the frame tree to aggregate the count
3656        * page/Frame.h:
3657
3658        * platform/ScrollableArea.h: Virtualize didAddHorizontalScrollbar and
3659        willRemoveHorizontalScrollbar for overriding in RenderLayer and FrameView
3660        (WebCore::ScrollableArea::isHorizontalScrollerPinnedToMinimumPosition): Returns true if there is
3661        no scrollbar or the scroller position is in the minimum scroll position.
3662        (WebCore::ScrollableArea::isHorizontalScrollerPinnedToMaximumPosition): Converse of the above.
3663        (WebCore::ScrollableArea::shouldRubberBandInDirection): Default impl
3664        * page/FrameView.cpp:
3665        (WebCore::FrameView::didAddHorizontalScrollbar): Updates the frame's document's count
3666        (WebCore::FrameView::willRemoveHorizontalScrollbar): Updates the frame's document's
3667        count
3668        (WebCore::FrameView::shouldRubberBandInDirection): Connective glue
3669        * page/FrameView.h: Adding overriding methods from ScrollableArea
3670        * rendering/RenderLayer.cpp: Similar functionality to FrameView
3671        (WebCore::RenderLayer::didAddHorizontalScrollbar):
3672        (WebCore::RenderLayer::willRemoveHorizontalScrollbar):
3673        * rendering/RenderLayer.h:
3674        
3675        * platform/mac/ScrollAnimatorMac.h: Fix typo of "momentum"
3676        * platform/mac/ScrollAnimatorMac.mm:
3677        (WebCore::ScrollAnimatorMac::ScrollAnimatorMac): Fix typo of "momentum"
3678        (WebCore::ScrollAnimatorMac::smoothScrollWithEvent): Fix typo of "coalesced"
3679        (WebCore::ScrollAnimatorMac::beginScrollGesture): Fix typo of "coalesced"
3680        (WebCore::ScrollAnimatorMac::snapRubberBand): Fix typo of "momentum"
3681        
3682        (WebCore::ScrollAnimatorMac::handleWheelEvent): New logic for determining whether
3683        to allow rubber-banding based on the area's scroll position and the wheel event.
3684        Could prevent accepting the wheel event. Also, fix typo of "momentum"
3685        (WebCore::isScrollingLeftAndShouldNotRubberBand): Inline helper function for logic
3686        (WebCore::isScrollingRightAndShouldNotRubberBand): Inline helper function for logic
3687
3688 2011-05-16  Leandro Gracia Gil  <leandrogracia@chromium.org>
3689
3690         Reviewed by Tony Gentilcore.
3691
3692         Media Stream API: add local stream requests.
3693         https://bugs.webkit.org/show_bug.cgi?id=60177
3694
3695         Add the code and messages for requesting the generation of local streams and getting the reply back.
3696
3697         Tests for the Media Stream API will be provided by the bug 56587.
3698         One test is re-enabled with this patch.
3699
3700         Test: fast/dom/MediaStream/argument-types.html
3701
3702         * GNUmakefile.list.am:
3703         * WebCore.gypi:
3704         * WebCore.pro:
3705         * WebCore.vcproj/WebCore.vcproj:
3706         * WebCore.xcodeproj/project.pbxproj:
3707         * page/CallbackTask.h: Added.
3708         (WebCore::CallbackTask1::create):
3709         (WebCore::CallbackTask1::performTask):
3710         (WebCore::CallbackTask1::Scheduler::scheduleCallback):
3711         (WebCore::CallbackTask1::CallbackTask1):
3712         * page/MediaStreamClient.h:
3713         * page/MediaStreamController.cpp:
3714         (WebCore::MediaStreamController::isClientAvailable):
3715         (WebCore::MediaStreamController::unregisterFrameController):
3716         (WebCore::MediaStreamController::registerRequest):
3717         (WebCore::MediaStreamController::registerStream):
3718         (WebCore::MediaStreamController::generateStream):
3719         (WebCore::MediaStreamController::streamGenerated):
3720         (WebCore::MediaStreamController::streamGenerationFailed):
3721         * page/MediaStreamController.h:
3722         * page/MediaStreamFrameController.cpp:
3723         (WebCore::MediaStreamFrameController::GenerateStreamRequest::GenerateStreamRequest):
3724         (WebCore::MediaStreamFrameController::GenerateStreamRequest::~GenerateStreamRequest):
3725         (WebCore::MediaStreamFrameController::GenerateStreamRequest::isGenerateStreamRequest):
3726         (WebCore::MediaStreamFrameController::GenerateStreamRequest::abort):
3727         (WebCore::MediaStreamFrameController::GenerateStreamRequest::successCallback):
3728         (WebCore::MediaStreamFrameController::GenerateStreamRequest::errorCallback):
3729         (WebCore::::unregisterAll):
3730         (WebCore::::detachEmbedder):
3731         (WebCore::MediaStreamFrameController::MediaStreamFrameController):
3732         (WebCore::MediaStreamFrameController::pageController):
3733         (WebCore::MediaStreamFrameController::unregister):
3734         (WebCore::MediaStreamFrameController::enterDetachedState):
3735         (WebCore::MediaStreamFrameController::isClientAvailable):
3736         (WebCore::MediaStreamFrameController::disconnectFrame):
3737         (WebCore::MediaStreamFrameController::parseGenerateStreamOptions):
3738         (WebCore::MediaStreamFrameController::generateStream):
3739         (WebCore::MediaStreamFrameController::streamGenerated):
3740         (WebCore::MediaStreamFrameController::streamGenerationFailed):
3741         * page/MediaStreamFrameController.h:
3742         (WebCore::MediaStreamFrameController::ClientBase::ClientBase):
3743         (WebCore::MediaStreamFrameController::ClientBase::~ClientBase):
3744         (WebCore::MediaStreamFrameController::ClientBase::mediaStreamFrameController):
3745         (WebCore::MediaStreamFrameController::ClientBase::clientId):
3746         (WebCore::MediaStreamFrameController::ClientBase::isStream):
3747         (WebCore::MediaStreamFrameController::ClientBase::isGeneratedStream):
3748         (WebCore::MediaStreamFrameController::ClientBase::detachEmbedder):
3749         (WebCore::MediaStreamFrameController::ClientBase::associateFrameController):
3750         (WebCore::MediaStreamFrameController::ClientBase::unregisterClient):
3751         (WebCore::MediaStreamFrameController::StreamClient::StreamClient):
3752         (WebCore::MediaStreamFrameController::StreamClient::~StreamClient):
3753         (WebCore::MediaStreamFrameController::StreamClient::isStream):
3754         (WebCore::MediaStreamFrameController::StreamClient::unregister):
3755         (WebCore::MediaStreamFrameController::IdGenerator::IdGenerator):
3756         (WebCore::MediaStreamFrameController::IdGenerator::getNextId):
3757         (WebCore::MediaStreamFrameController::ClientMapBase::ClientMapBase):
3758         * page/Navigator.cpp:
3759         (WebCore::Navigator::webkitGetUserMedia):
3760         * page/NavigatorUserMediaErrorCallback.h:
3761
3762 2011-05-16  Pavel Podivilov  <podivilov@chromium.org>
3763
3764         Reviewed by Yury Semikhatsky.
3765
3766         Web Inspector: debuggerWasEnabled notification should not be send to front-end on navigation.
3767         https://bugs.webkit.org/show_bug.cgi?id=60888
3768
3769         * inspector/InspectorController.cpp:
3770         (WebCore::InspectorController::disableDebugger):
3771         * inspector/InspectorDebuggerAgent.cpp:
3772         (WebCore::InspectorDebuggerAgent::enable):
3773         (WebCore::InspectorDebuggerAgent::disable):
3774         (WebCore::InspectorDebuggerAgent::restore):
3775         (WebCore::InspectorDebuggerAgent::clearFrontend):
3776         * inspector/InspectorDebuggerAgent.h:
3777
3778 2011-05-16  Yury Semikhatsky  <yurys@chromium.org>
3779
3780         Unreviewed. Windows build fix.
3781
3782         * inspector/InspectorConsoleInstrumentation.h:
3783         (WebCore::InspectorInstrumentation::consoleMarkTimeline):
3784
3785 2011-05-16  Yury Semikhatsky  <yurys@chromium.org>
3786
3787         Unreviewed. Build fix.
3788
3789         * inspector/InspectorInstrumentation.h:
3790         (WebCore::InspectorInstrumentation::willStartWorkerContext):
3791
3792 2011-05-11  Yury Semikhatsky  <yurys@chromium.org>
3793
3794         Reviewed by Pavel Feldman.
3795
3796         Web Inspector: use InstrumentingAgents to access agents from InspectorInstrumentation
3797         https://bugs.webkit.org/show_bug.cgi?id=60624
3798
3799         InspectorInstrumentation retrieves inspector agents from corresponding InstrumentingAgents
3800         instance. Each agent notifies InstrumentingAgents whenever it wants to receive notifications
3801         about changes in WebCore.
3802
3803         * inspector/InspectorAgent.cpp:
3804         (WebCore::InspectorAgent::InspectorAgent):
3805         (WebCore::InspectorAgent::inspectedPageDestroyed):
3806         * inspector/InspectorAgent.h:
3807         * inspector/InspectorConsoleInstrumentation.h:
3808         (WebCore::InspectorInstrumentation::addMessageToConsole):
3809         (WebCore::InspectorInstrumentation::consoleCount):
3810         (WebCore::InspectorInstrumentation::startConsoleTiming):
3811         (WebCore::InspectorInstrumentation::stopConsoleTiming):
3812         (WebCore::InspectorInstrumentation::consoleMarkTimeline):
3813         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsole):
3814         (WebCore::InspectorInstrumentation::addProfile):
3815         (WebCore::InspectorInstrumentation::profilerEnabled):
3816         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileName):
3817         * inspector/InspectorController.cpp:
3818         (WebCore::InspectorController::InspectorController):
3819         (WebCore::InspectorController::inspectedPageDestroyed):
3820         (WebCore::InspectorController::didClearWindowObjectInWorld):
3821         (WebCore::InspectorController::inspectedPage):
3822         * inspector/InspectorController.h:
3823         * inspector/InspectorDatabaseInstrumentation.h: FAST_RETURN_IF_NO_FRONTENDS macros
3824         is used for early return in common case when inspector is not opened. In this
3825         case inspector instrumentation costs one additional check of a static field.
3826         (WebCore::InspectorInstrumentation::didOpenDatabase):
3827         * inspector/InspectorInstrumentation.cpp:
3828         (WebCore::InspectorInstrumentation::instrumentingAgents):
3829         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorldImpl):
3830         (WebCore::InspectorInstrumentation::inspectedPageDestroyedImpl):
3831         (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):
3832         (WebCore::InspectorInstrumentation::didInsertDOMNodeImpl):
3833         (WebCore::InspectorInstrumentation::willRemoveDOMNodeImpl):
3834         (WebCore::InspectorInstrumentation::didRemoveDOMNodeImpl):
3835         (WebCore::InspectorInstrumentation::willModifyDOMAttrImpl):
3836         (WebCore::InspectorInstrumentation::didModifyDOMAttrImpl):
3837         (WebCore::InspectorInstrumentation::didInvalidateStyleAttrImpl):
3838         (WebCore::InspectorInstrumentation::mouseDidMoveOverElementImpl):
3839         (WebCore::InspectorInstrumentation::handleMousePressImpl):
3840         (WebCore::InspectorInstrumentation::characterDataModifiedImpl):
3841         (WebCore::InspectorInstrumentation::willSendXMLHttpRequestImpl):
3842         (WebCore::InspectorInstrumentation::didScheduleResourceRequestImpl):
3843         (WebCore::InspectorInstrumentation::didInstallTimerImpl):
3844         (WebCore::InspectorInstrumentation::didRemoveTimerImpl):
3845         (WebCore::InspectorInstrumentation::willCallFunctionImpl):
3846         (WebCore::InspectorInstrumentation::willChangeXHRReadyStateImpl):
3847         (WebCore::InspectorInstrumentation::willDispatchEventImpl):
3848         (WebCore::InspectorInstrumentation::willDispatchEventOnWindowImpl):
3849         (WebCore::InspectorInstrumentation::willEvaluateScriptImpl):
3850         (WebCore::InspectorInstrumentation::willFireTimerImpl):
3851         (WebCore::InspectorInstrumentation::willLayoutImpl):
3852         (WebCore::InspectorInstrumentation::willLoadXHRImpl):
3853         (WebCore::InspectorInstrumentation::willPaintImpl):
3854         (WebCore::InspectorInstrumentation::willRecalculateStyleImpl):
3855         (WebCore::InspectorInstrumentation::applyUserAgentOverrideImpl):
3856         (WebCore::InspectorInstrumentation::willSendRequestImpl):
3857         (WebCore::InspectorInstrumentation::continueAfterPingLoaderImpl):
3858         (WebCore::InspectorInstrumentation::markResourceAsCachedImpl):
3859         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCacheImpl):
3860         (WebCore::InspectorInstrumentation::willReceiveResourceDataImpl):
3861         (WebCore::InspectorInstrumentation::willReceiveResourceResponseImpl):
3862         (WebCore::InspectorInstrumentation::didReceiveResourceResponseImpl):
3863         (WebCore::InspectorInstrumentation::didReceiveContentLengthImpl):
3864         (WebCore::InspectorInstrumentation::didFinishLoadingImpl):
3865         (WebCore::InspectorInstrumentation::didFailLoadingImpl):
3866         (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequestImpl):
3867         (WebCore::InspectorInstrumentation::scriptImportedImpl):
3868         (WebCore::InspectorInstrumentation::domContentLoadedEventFiredImpl):
3869         (WebCore::InspectorInstrumentation::loadEventFiredImpl):
3870         (WebCore::InspectorInstrumentation::frameDetachedFromParentImpl):
3871         (WebCore::InspectorInstrumentation::didCommitLoadImpl):
3872         (WebCore::InspectorInstrumentation::willWriteHTMLImpl):
3873         (WebCore::InspectorInstrumentation::addMessageToConsoleImpl):
3874         (WebCore::InspectorInstrumentation::consoleCountImpl):
3875         (WebCore::InspectorInstrumentation::startConsoleTimingImpl):
3876         (WebCore::InspectorInstrumentation::stopConsoleTimingImpl):
3877         (WebCore::InspectorInstrumentation::consoleMarkTimelineImpl):
3878         (WebCore::InspectorInstrumentation::addStartProfilingMessageToConsoleImpl):
3879         (WebCore::InspectorInstrumentation::addProfileImpl):
3880         (WebCore::InspectorInstrumentation::getCurrentUserInitiatedProfileNameImpl):
3881         (WebCore::InspectorInstrumentation::profilerEnabledImpl):
3882         (WebCore::InspectorInstrumentation::didOpenDatabaseImpl):
3883         (WebCore::InspectorInstrumentation::didUseDOMStorageImpl):
3884         (WebCore::InspectorInstrumentation::didStartWorkerContextImpl):
3885         (WebCore::InspectorInstrumentation::didCreateWorkerImpl):
3886         (WebCore::InspectorInstrumentation::didDestroyWorkerImpl):
3887         (WebCore::InspectorInstrumentation::didCreateWebSocketImpl):
3888         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequestImpl):
3889         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponseImpl):
3890         (WebCore::InspectorInstrumentation::didCloseWebSocketImpl):
3891         (WebCore::InspectorInstrumentation::networkStateChangedImpl):
3892         (WebCore::InspectorInstrumentation::updateApplicationCacheStatusImpl):
3893         (WebCore::InspectorInstrumentation::hasFrontend):
3894         (WebCore::InspectorInstrumentation::pauseOnNativeEventIfNeeded):
3895         (WebCore::InspectorInstrumentation::cancelPauseOnNativeEvent):
3896         (WebCore::InspectorInstrumentation::retrieveTimelineAgent):
3897         * inspector/InspectorInstrumentation.h:
3898         (WebCore::InspectorInstrumentation::bindInstrumentingAgents):
3899         (WebCore::InspectorInstrumentation::unbindInstrumentingAgents):
3900         (WebCore::InspectorInstrumentation::didClearWindowObjectInWorld):
3901         (WebCore::InspectorInstrumentation::inspectedPageDestroyed):
3902         (WebCore::InspectorInstrumentation::willInsertDOMNode):
3903         (WebCore::InspectorInstrumentation::didInsertDOMNode):
3904         (WebCore::InspectorInstrumentation::willRemoveDOMNode):
3905         (WebCore::InspectorInstrumentation::willModifyDOMAttr):
3906         (WebCore::InspectorInstrumentation::didModifyDOMAttr):
3907         (WebCore::InspectorInstrumentation::didInvalidateStyleAttr):
3908         (WebCore::InspectorInstrumentation::mouseDidMoveOverElement):
3909         (WebCore::InspectorInstrumentation::handleMousePress):
3910         (WebCore::InspectorInstrumentation::characterDataModified):
3911         (WebCore::InspectorInstrumentation::willSendXMLHttpRequest):
3912         (WebCore::InspectorInstrumentation::didScheduleResourceRequest):
3913         (WebCore::InspectorInstrumentation::didInstallTimer):
3914         (WebCore::InspectorInstrumentation::didRemoveTimer):
3915         (WebCore::InspectorInstrumentation::willCallFunction):
3916         (WebCore::InspectorInstrumentation::willChangeXHRReadyState):
3917         (WebCore::InspectorInstrumentation::willDispatchEvent):
3918         (WebCore::InspectorInstrumentation::willDispatchEventOnWindow):
3919         (WebCore::InspectorInstrumentation::willEvaluateScript):
3920         (WebCore::InspectorInstrumentation::willFireTimer):
3921         (WebCore::InspectorInstrumentation::willLayout):
3922         (WebCore::InspectorInstrumentation::willLoadXHR):
3923         (WebCore::InspectorInstrumentation::willPaint):
3924         (WebCore::InspectorInstrumentation::willRecalculateStyle):
3925         (WebCore::InspectorInstrumentation::applyUserAgentOverride):
3926         (WebCore::InspectorInstrumentation::willSendRequest):
3927         (WebCore::InspectorInstrumentation::continueAfterPingLoader):
3928         (WebCore::InspectorInstrumentation::markResourceAsCached):
3929         (WebCore::InspectorInstrumentation::didLoadResourceFromMemoryCache):
3930         (WebCore::InspectorInstrumentation::willReceiveResourceData):
3931         (WebCore::InspectorInstrumentation::willReceiveResourceResponse):
3932         (WebCore::InspectorInstrumentation::continueAfterXFrameOptionsDenied):
3933         (WebCore::InspectorInstrumentation::continueWithPolicyDownload):
3934         (WebCore::InspectorInstrumentation::continueWithPolicyIgnore):
3935         (WebCore::InspectorInstrumentation::didReceiveContentLength):
3936         (WebCore::InspectorInstrumentation::didFinishLoading):
3937         (WebCore::InspectorInstrumentation::didFailLoading):
3938         (WebCore::InspectorInstrumentation::resourceRetrievedByXMLHttpRequest):
3939         (WebCore::InspectorInstrumentation::scriptImported):
3940         (WebCore::InspectorInstrumentation::domContentLoadedEventFired):
3941         (WebCore::InspectorInstrumentation::loadEventFired):
3942         (WebCore::InspectorInstrumentation::frameDetachedFromParent):
3943         (WebCore::InspectorInstrumentation::didCommitLoad):
3944         (WebCore::InspectorInstrumentation::willWriteHTML):
3945         (WebCore::InspectorInstrumentation::didUseDOMStorage):
3946         (WebCore::InspectorInstrumentation::willStartWorkerContext):
3947         (WebCore::InspectorInstrumentation::didStartWorkerContext):
3948         (WebCore::InspectorInstrumentation::didCreateWorker):
3949         (WebCore::InspectorInstrumentation::didDestroyWorker):
3950         (WebCore::InspectorInstrumentation::didCreateWebSocket):
3951         (WebCore::InspectorInstrumentation::willSendWebSocketHandshakeRequest):
3952         (WebCore::InspectorInstrumentation::didReceiveWebSocketHandshakeResponse):
3953         (WebCore::InspectorInstrumentation::didCloseWebSocket):
3954         (WebCore::InspectorInstrumentation::networkStateChanged):
3955         (WebCore::InspectorInstrumentation::updateApplicationCacheStatus):
3956         (WebCore::InspectorInstrumentation::hasFrontend):
3957         (WebCore::InspectorInstrumentation::instrumentingAgentsForContext):
3958         (WebCore::InspectorInstrumentation::instrumentingAgentsForPage):
3959         (WebCore::InspectorInstrumentation::instrumentingAgentsForFrame):
3960         (WebCore::InspectorInstrumentation::instrumentingAgentsWithFrontendForFrame):
3961         (WebCore::InspectorInstrumentation::instrumentingAgentsWithFrontendForPage):
3962         (WebCore::InspectorInstrumentation::instrumentingAgentsWithFrontendForContext):
3963         (WebCore::InspectorInstrumentation::instrumentingAgentsWithFrontendForDocument):
3964
3965 2011-05-16  Vsevolod Vlasov  <vsevik@chromium.org>
3966
3967         Reviewed by Pavel Feldman.
3968
3969         Web Inspector: Move Resources Panel search to backend
3970         https://bugs.webkit.org/show_bug.cgi?id=59596
3971
3972         * inspector/Inspector.json:
3973         * inspector/InspectorPageAgent.cpp:
3974         (WebCore::decodeMainResource):
3975         (WebCore::InspectorPageAgent::resourceContent):
3976         (WebCore::cachedResourcesForFrame):
3977         (WebCore::InspectorPageAgent::getCookies):
3978         (WebCore::InspectorPageAgent::deleteCookie):
3979         (WebCore::createSearchRegexSource):
3980         (WebCore::countRegularExpressionMatches):
3981         (WebCore::buildObjectForSearchMatch):
3982         (WebCore::InspectorPageAgent::searchInResources):
3983         (WebCore::InspectorPageAgent::domContentEventFired):
3984         (WebCore::InspectorPageAgent::loadEventFired):
3985         (WebCore::InspectorPageAgent::frameNavigated):
3986         (WebCore::InspectorPageAgent::frameDetached):
3987         (WebCore::InspectorPageAgent::buildObjectForFrameTree):
3988         * inspector/InspectorPageAgent.h:
3989         * inspector/front-end/ResourcesPanel.js:
3990         (WebInspector.ResourcesPanel.prototype._showResourceView):
3991         (WebInspector.ResourcesPanel.prototype.performSearch.searchInEditedResource):
3992         (WebInspector.ResourcesPanel.prototype.performSearch.callback):
3993         (WebInspector.ResourcesPanel.prototype.performSearch):
3994         (WebInspector.ResourcesPanel.prototype._ensureViewSearchPerformed):
3995         (WebInspector.ResourcesPanel.prototype._showSearchResult.callback):
3996         (WebInspector.ResourcesPanel.prototype._showSearchResult):
3997         (WebInspector.ResourcesPanel.prototype._resetSearchResults):
3998         (WebInspector.ResourcesPanel.prototype.searchCanceled):
3999         (WebInspector.ResourcesPanel.prototype.jumpToNextSearchResult):
4000         (WebInspector.ResourcesPanel.prototype.jumpToPreviousSearchResult):
4001         (WebInspector.FrameTreeElement.prototype.resourceByURL):
4002         (WebInspector.FrameResourceTreeElement.prototype._resetSearchResults):
4003         (WebInspector.FrameResourceTreeElement.prototype.get searchMatchesCount):
4004         (WebInspector.FrameResourceTreeElement.prototype.searchMatchesFound