XSSAuditor::decodedSnippetForJavaScript stopping when comma encountered.
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-11-20  Tom Sepez  <tsepez@chromium.org>
2
3         XSSAuditor::decodedSnippetForJavaScript stopping when comma encountered.
4         https://bugs.webkit.org/show_bug.cgi?id=102587
5
6         Reviewed by Adam Barth.
7
8         Rather than returning an empty fragment, continue processing the body
9         of a script tag when the decoded fragment reduces to nothing.
10
11         Test: http/tests/security/xssAuditor/script-tag-with-actual-comma.html
12
13         * html/parser/XSSAuditor.cpp:
14         (WebCore::XSSAuditor::decodedSnippetForJavaScript):
15
16 2012-11-20  James Simonsen  <simonjam@chromium.org>
17
18         Consolidate FrameLoader::load() into one function taking a FrameLoadRequest
19         https://bugs.webkit.org/show_bug.cgi?id=102151
20
21         Reviewed by Adam Barth.
22
23         There's a FIXME that we have too many FrameLoader::load*() functions. This patch consolidates 3 into 1.
24         There are still a few more load functions that will be consolidated later. Using FrameLoadRequest as
25         the interface into FrameLoader will also provide a place to pass in the initiator. Finally, this matches
26         the refactoring done with CachedResourceRequest and CachedResourceLoader.
27
28         No new tests. No change in functionality.
29
30         * WebCore.exp.in:
31         * loader/FrameLoadRequest.h:
32         (WebCore::FrameLoadRequest::FrameLoadRequest):
33         (WebCore::FrameLoadRequest::setLockHistory): These are former arguments to load().
34         (WebCore::FrameLoadRequest::lockHistory): Ditto.
35         (FrameLoadRequest):
36         (WebCore::FrameLoadRequest::setShouldCheckNewWindowPolicy): Ditto.
37         (WebCore::FrameLoadRequest::shouldCheckNewWindowPolicy): Ditto.
38         (WebCore::FrameLoadRequest::substituteData): Ditto.
39         (WebCore::FrameLoadRequest::setSubstituteData): Ditto.
40         (WebCore::FrameLoadRequest::hasSubstituteData): Ditto.
41         * loader/FrameLoader.cpp:
42         (WebCore::FrameLoader::load): No change in behavior, just merged it all into one function.
43         * loader/FrameLoader.h:
44         (FrameLoader):
45         * page/DragController.cpp:
46         (WebCore::DragController::performDrag):
47
48 2012-11-20  Dan Carney  <dcarney@google.com>
49
50         Remove V8DOMWindowShell::getEntered
51         https://bugs.webkit.org/show_bug.cgi?id=96637
52
53         Reviewed by Adam Barth.
54
55         V8DOMWindowShell::getEntered was refactored so that the window shell
56         no longer has to be kept alive by a v8 context. Instead, only
57         the DOMWrapperWorld will be kept alive.
58
59         No new tests. No change in functionality.
60
61         * bindings/v8/DOMDataStore.cpp:
62         (WebCore::DOMDataStore::current):
63         * bindings/v8/DOMWrapperWorld.cpp:
64         (WebCore::isolatedWorldWeakCallback):
65         (WebCore):
66         (WebCore::DOMWrapperWorld::makeContextWeak):
67         (WebCore::DOMWrapperWorld::setIsolatedWorldField):
68         * bindings/v8/DOMWrapperWorld.h:
69         (DOMWrapperWorld):
70         (WebCore::DOMWrapperWorld::isolated):
71         * bindings/v8/ScriptController.cpp:
72         (WebCore::ScriptController::existingWindowShell):
73         (WebCore::ScriptController::windowShell):
74         (WebCore::ScriptController::evaluateInIsolatedWorld):
75         (WebCore::ScriptController::currentWorldContext):
76         (WebCore::ScriptController::collectIsolatedContexts):
77         * bindings/v8/ScriptController.h:
78         (ScriptController):
79         * bindings/v8/V8Binding.h:
80         (WebCore::worldForEnteredContextIfIsolated):
81         * bindings/v8/V8DOMWindowShell.cpp:
82         (WebCore::V8DOMWindowShell::destroyIsolatedShell):
83         (WebCore::V8DOMWindowShell::disposeContext):
84         (WebCore::V8DOMWindowShell::initializeIfNeeded):
85         * bindings/v8/V8DOMWindowShell.h:
86         (V8DOMWindowShell):
87         * bindings/v8/V8PerContextData.h:
88         * bindings/v8/WorldContextHandle.cpp:
89         (WebCore::WorldContextHandle::WorldContextHandle):
90
91 2012-11-20  Mike West  <mkwst@chromium.org>
92
93         Remove '#include "ScriptCallStackFactory.h"' include when unnecessary.
94         https://bugs.webkit.org/show_bug.cgi?id=102812
95
96         Reviewed by Jochen Eisinger.
97
98         "ScriptCallStackFactory.h" is included in a few files where it doesn't
99         seem to be required. Since I'm in the process of centralizing stack
100         trace generation anyway, I'll just clean this up as a drive-by.
101
102         * bindings/js/JSConsoleCustom.cpp:
103         * bindings/v8/custom/V8DOMWindowCustom.cpp:
104         * bindings/v8/custom/V8WorkerContextCustom.cpp:
105         * loader/FrameLoader.cpp:
106             Removed "ScriptCallStackFactory.h".
107         * bindings/js/ScheduledAction.cpp:
108             This also included (but didn't use) "ScriptCallStack.h". I've
109             removed it as well.
110
111 2012-11-20  Elliott Sprehn  <esprehn@chromium.org>
112
113         Merge checks for creating renderers into shouldCreateRenderer
114         https://bugs.webkit.org/show_bug.cgi?id=102768
115
116         Reviewed by Ojan Vafai.
117
118         Merge the checks for if renderers should be created into shouldCreateRenderer
119         so simplify the code and ensure correctness if doing
120         NodeRenderingContext(node).shouldCreateRenderer() in other places in webkit.
121
122         No new tests, just refactoring.
123
124         * dom/NodeRenderingContext.cpp:
125         (WebCore::NodeRenderingContext::shouldCreateRenderer):
126         (WebCore::NodeRendererFactory::createRendererIfNeeded):
127
128 2012-11-19  Pavel Feldman  <pfeldman@chromium.org>
129
130         Web Inspector: simplify? damaged region computation in the editor
131         https://bugs.webkit.org/show_bug.cgi?id=102688
132
133         Reviewed by Vsevolod Vlasov.
134
135         This change simplifies the damaged region computation. Drive-by make _getSelection work properly.
136
137         * inspector/front-end/DefaultTextEditor.js:
138         (WebInspector.DefaultTextEditor):
139         (WebInspector.DefaultTextEditor.prototype._handleCut):
140         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleLineNumber.compareLineRowOffsetTops):
141         (WebInspector.TextEditorChunkedPanel.prototype._findFirstVisibleLineNumber):
142         (WebInspector.TextEditorMainPanel.prototype.handleEnterKey.get var):
143         (WebInspector.TextEditorMainPanel.prototype.handleEnterKey):
144         (WebInspector.TextEditorMainPanel.prototype._paintLineChunks):
145         (WebInspector.TextEditorMainPanel.prototype._getSelection):
146         (WebInspector.TextEditorMainPanel.prototype._restoreSelection):
147         (WebInspector.TextEditorMainPanel.prototype._selectionToPosition):
148         (WebInspector.TextEditorMainPanel.prototype._positionToSelection):
149         (WebInspector.TextEditorMainPanel.prototype._handleMutations):
150         (WebInspector.TextEditorMainPanel.prototype._collectDirtyLines):
151         (WebInspector.TextEditorMainPanel.prototype._applyDomUpdates):
152         (WebInspector.TextEditorMainPanel.prototype._guessEditRangeBasedOnSelection):
153         (WebInspector.TextEditorMainPanel.prototype._assertDOMMatchesTextModel):
154         (WebInspector.TextEditorMainPanel.prototype._updateChunksForRanges):
155         (WebInspector.TextEditorMainPanel.prototype._collectLinesFromDOM):
156         (WebInspector.TextEditorMainChunk):
157         (WebInspector.TextEditorMainChunk.prototype.addDecoration):
158         (WebInspector.TextEditorMainChunk.prototype.get endLine):
159         (WebInspector.TextEditorMainChunk.prototype.lineRowContainingLine):
160         (WebInspector.TextEditorMainChunk.prototype.expandedLineRow):
161
162 2012-11-19  Erik Arvidsson  <arv@chromium.org>
163
164         Remove historical enums from ExceptionCode.h
165         https://bugs.webkit.org/show_bug.cgi?id=102095
166
167         Reviewed by Ojan Vafai.
168
169         Remove unused enums from ExceptionCode.
170
171         No new tests. No tests affected.
172
173         * Modules/intents/NavigatorIntents.cpp:
174         (WebCore::NavigatorIntents::webkitStartActivity): The error type for this is unspecified.
175         * dom/DOMCoreException.cpp:
176         * dom/ExceptionCode.h:
177
178 2012-11-20  Keishi Hattori  <keishi@webkit.org>
179
180         Week picker width is too small
181         https://bugs.webkit.org/show_bug.cgi?id=102766
182
183         Reviewed by Kent Tamura.
184
185         The width of week picker was too small because we were forgetting about
186         the week number column when calculating the desired width.
187
188         No new tests. Covered by week-picker-appearance*.html.
189
190         * Resources/pagepopups/calendarPicker.css:
191         (.week-mode .week-column): Needs to be table-cell.
192         * Resources/pagepopups/calendarPicker.js:
193         (CalendarPicker.prototype.fixWindowSize):
194
195 2012-11-20  Xabier Rodriguez Calvar  <calvaris@igalia.com>
196
197         [GTK] no volume slider in HTML5 media element controls
198         https://bugs.webkit.org/show_bug.cgi?id=97192
199
200         Reviewed by Philippe Normand.
201
202         r115829 was causing this regression so it was partially
203         reverted. The revert causes some small regressions, in the tests
204         but it is better to have the volume slider shown.
205
206         * css/mediaControlsGtk.css:
207         (audio::-webkit-media-controls-panel)
208         (video::-webkit-media-controls-panel): Partially reverted
209         r115829.
210
211 2012-11-19  Antti Koivisto  <antti@apple.com>
212
213         Collect user style sheets in DocumentStyleSheetCollection
214         https://bugs.webkit.org/show_bug.cgi?id=102683
215
216         Reviewed by Andreas Kling.
217
218         Move the user stylesheet collection logic from StyleResolver to DocumentStyleSheetCollection.
219         
220         * css/StyleResolver.cpp:
221         (WebCore::StyleResolver::StyleResolver):
222         (WebCore::StyleResolver::collectRulesFromUserStyleSheets):
223         (WebCore::collectCSSOMWrappers):
224         * css/StyleResolver.h:
225         (StyleResolver):
226         * dom/DocumentStyleSheetCollection.cpp:
227         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
228         (WebCore::DocumentStyleSheetCollection::pageUserStyleSheet):
229         (WebCore::DocumentStyleSheetCollection::clearPageUserStyleSheet):
230         (WebCore::DocumentStyleSheetCollection::updatePageUserStyleSheet):
231         (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
232         (WebCore::collectActiveStyleSheetsFromSeamlessParents):
233         (WebCore::DocumentStyleSheetCollection::updateStyleResolver):
234         
235             Factor the StyleResolver updating code to function.
236
237         (WebCore):
238         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
239         
240             Collect the user style sheets. Some renaming and other minor refactoring.
241
242         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
243         * dom/DocumentStyleSheetCollection.h:
244         (WebCore::DocumentStyleSheetCollection::activeUserStyleSheets):
245         
246             Add activeUserStyleSheets vector that contains all user stylesheets from different sources,
247             similar to activeAuthorStyleSheets.
248
249         (DocumentStyleSheetCollection):
250         (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets):
251
252 2012-11-20  Elliott Sprehn  <esprehn@chromium.org>
253
254         Remove unneeded optimization in Element::isInTopLayer
255         https://bugs.webkit.org/show_bug.cgi?id=102772
256
257         Reviewed by Andreas Kling.
258
259         There's no reason to worry about calling elementRareData() multiple
260         times in this non performance sensitive code path as it's only used
261         in HTMLDialogElement's showModal and close methods.
262
263         No new tests, just simplification.
264
265         * dom/Element.cpp:
266         (WebCore::Element::setIsInTopLayer):
267
268 2012-11-20  Elliott Sprehn  <esprehn@chromium.org>
269
270         Simplify Element::isSpellCheckingEnabled
271         https://bugs.webkit.org/show_bug.cgi?id=102779
272
273         Reviewed by Andreas Kling.
274
275         isSpellCheckingEnabled contains logic that duplicates parentOrHostElement
276         and can be simplified by just calling that.
277
278         No new tests, just simplification.
279
280         * dom/Element.cpp:
281         (WebCore::Element::isSpellCheckingEnabled):
282
283 2012-11-20  Kihong Kwon  <kihong.kwon@samsung.com>
284
285         Apply DeviceController as parent class of DeviceMotionController.
286         https://bugs.webkit.org/show_bug.cgi?id=102578
287
288         Reviewed by Hajime Morita.
289
290         DeviceController needs to be applied as parent class of DeviceMotionController
291         because DeviceController which is extracted as parent class of
292         DeviceMotionController and DeviceOrientationController is already added.
293         Therefore duplicated implementation can be removed.
294
295         Covered by existing tests.
296
297         * dom/DeviceMotionClient.h:
298         * dom/DeviceMotionController.cpp:
299         (WebCore::DeviceMotionController::DeviceMotionController):
300         (WebCore::DeviceMotionController::didChangeDeviceMotion):
301         (WebCore::DeviceMotionController::deviceMotionClient):
302         (WebCore::DeviceMotionController::hasLastData):
303         (WebCore::DeviceMotionController::getLastEvent):
304         (WebCore::DeviceMotionController::from):
305         (WebCore):
306         * dom/DeviceMotionController.h:
307         (WebCore):
308         (WebCore::DeviceMotionController::~DeviceMotionController):
309         (DeviceMotionController):
310         * dom/Document.cpp:
311         Remove all implementations which are related DeviceOrientationEvnet and DeviceMotionEvent.
312         Because DeviceController checks suspend and stop status of active dom object before dispatchEvent.
313         (WebCore::Document::suspendActiveDOMObjects):
314         (WebCore::Document::resumeActiveDOMObjects):
315         * loader/EmptyClients.h:
316         * page/DOMWindow.cpp:
317         (WebCore::DOMWindow::addEventListener):
318         (WebCore::DOMWindow::removeEventListener):
319         (WebCore::DOMWindow::removeAllEventListeners):
320
321 2012-11-20  Kentaro Hara  <haraken@chromium.org>
322
323         [V8] Remove V8ParameterBase
324         https://bugs.webkit.org/show_bug.cgi?id=102774
325
326         Reviewed by Adam Barth.
327
328         V8ParameterBase is a redundant indirection.
329         We can flatten methods of V8ParameterBase to V8Parameter.
330
331         No tests. No change in behavior.
332
333         * bindings/v8/V8StringResource.h:
334         (WebCore::V8Parameter::V8Parameter):
335         (V8Parameter):
336         (WebCore::V8Parameter::toString):
337         (WebCore::::prepare):
338
339 2012-11-20  Kunihiko Sakamoto  <ksakamoto@chromium.org>
340
341         Use localized date-time format in datetime input
342         https://bugs.webkit.org/show_bug.cgi?id=102769
343
344         Reviewed by Kent Tamura.
345
346         Move the implementation of Locale::dateTimeFormatWithSeconds and Locale::dateTimeFormatWithoutSeconds
347         to its subclasses and use platform-specific methods to get date-time pattern.
348         Because Windows does not provide an API to get date-time pattern. We use fixed "{date} {time}"
349         pattern for Windows.
350
351         Test: fast/forms/datetime/datetime-appearance-l10n.html
352
353         * platform/text/LocaleICU.cpp:
354         (WebCore::LocaleICU::initializeDateTimeFormat): Retrieve datetime formats too.
355         (WebCore::LocaleICU::dateTimeFormatWithSeconds): Added.
356         (WebCore):
357         (WebCore::LocaleICU::dateTimeFormatWithoutSeconds): Added.
358         * platform/text/LocaleICU.h:
359         (LocaleICU): Add m_dateTimeFormatWithSeconds and m_dateTimeFormatWithoutSeconds.
360         * platform/text/LocaleNone.cpp:
361         (LocaleNone):
362         (WebCore::LocaleNone::dateTimeFormatWithSeconds): Added. Always returns "dd/MM/yyyyy HH:mm:ss".
363         (WebCore):
364         (WebCore::LocaleNone::dateTimeFormatWithoutSeconds): Added. Always returns "dd/MM/yyyyy HH:mm".
365         * platform/text/PlatformLocale.cpp:
366         (WebCore): Remove dateTimeFormatWithSeconds() and dateTimeFormatWithoutSeconds() as these are now pure virtual.
367         * platform/text/PlatformLocale.h:
368         (Locale): Make dateTimeFormatWithSeconds() and dateTimeFormatWithoutSeconds() pure virtual.
369         * platform/text/mac/LocaleMac.h:
370         (LocaleMac): Add m_dateTimeFormatWithSeconds and m_dateTimeFormatWithoutSeconds.
371         * platform/text/mac/LocaleMac.mm:
372         (WebCore::LocaleMac::dateTimeFormatterWithSeconds): Added.
373         (WebCore):
374         (WebCore::LocaleMac::dateTimeFormatterWithoutSeconds): Added.
375         (WebCore::LocaleMac::dateTimeFormatWithSeconds): Added.
376         (WebCore::LocaleMac::dateTimeFormatWithoutSeconds): Added.
377         * platform/text/win/LocaleWin.cpp:
378         (WebCore::LocaleWin::dateTimeFormatWithSeconds): Copied from original Locale::dateTimeFormatWithSeconds().
379         (WebCore):
380         (WebCore::LocaleWin::dateTimeFormatWithoutSeconds): Copied from original Locale::dateTimeFormatWithoutSeconds().
381         * platform/text/win/LocaleWin.h:
382         (LocaleWin): Add m_dateTimeFormatWithSeconds and m_dateTimeFormatWithoutSeconds.
383
384 2012-11-20  Sheriff Bot  <webkit.review.bot@gmail.com>
385
386         Unreviewed, rolling out r135257.
387         http://trac.webkit.org/changeset/135257
388         https://bugs.webkit.org/show_bug.cgi?id=102777
389
390         Broke Chromium Debug compilation (Requested by yurys on
391         #webkit).
392
393         * bindings/v8/DOMDataStore.h:
394         (WebCore::DOMDataStore::getNode):
395
396 2012-11-20  Vsevolod Vlasov  <vsevik@chromium.org>
397
398         Web Inspector: Revert r133149: breaks revision reverting
399         https://bugs.webkit.org/show_bug.cgi?id=102672
400
401         Reviewed by Yury Semikhatsky.
402
403         * inspector/front-end/JavaScriptSourceFrame.js:
404         (WebInspector.JavaScriptSourceFrame):
405         (WebInspector.JavaScriptSourceFrame.prototype._onFormattedChanged):
406         (WebInspector.JavaScriptSourceFrame.prototype._onWorkingCopyCommitted):
407         (WebInspector.JavaScriptSourceFrame.prototype._innerSetContent):
408
409 2012-11-19  Csaba Osztrogonác  <ossy@webkit.org>
410
411         [Qt][Win] Unreviewed speculative buildfix after r135217.
412
413         * platform/win/WindowsExtras.h:
414
415 2012-11-19  Yury Semikhatsky  <yurys@chromium.org>
416
417         Unreviewed. Fix Chromium Win compilation after r135255.
418         https://bugs.webkit.org/show_bug.cgi?id=97803
419
420         * WebCore.gypi: removed reference to platform/wince/DragDataWince.cpp which
421         was deleted in the aforementioned change.
422
423 2012-11-19  Kentaro Hara  <haraken@chromium.org>
424
425         [V8] Merge getCachedWrapper(Node*) into DOMDataStore
426         https://bugs.webkit.org/show_bug.cgi?id=102158
427
428          Reviewed by Adam Barth.
429
430         A follow-up patch for r135230. This patch adds a correct ASSERTION.
431
432         No tests. No change in behavior.
433
434         * bindings/v8/DOMDataStore.h:
435         (WebCore::DOMDataStore::getNode):
436
437 2012-11-19  Kentaro Hara  <haraken@chromium.org>
438
439         [JSC] Replace $implClassName with $interfaceName in CodeGeneratorJS.pm
440         https://bugs.webkit.org/show_bug.cgi?id=102757
441
442         Reviewed by Adam Barth.
443
444         In CodeGeneratorJS.pm $implClassName and $interfaceName are
445         equivalent. We're using them interchangeably. We should replace
446         $implClassName with $interfaceName.
447
448         No tests. No change in behavior.
449
450         * bindings/scripts/CodeGeneratorJS.pm:
451         (AddClassForwardIfNeeded):
452         (GenerateGetOwnPropertySlotBody):
453         (GenerateGetOwnPropertyDescriptorBody):
454         (GenerateHeader):
455         (GenerateOverloadedFunction):
456         (GenerateImplementation):
457         (GenerateParametersCheck):
458         (GenerateImplementationFunctionCall):
459         (NativeToJSValue):
460
461 2012-11-19  Patrick Gansterer  <paroga@webkit.org>
462
463         Port DragDataWin.cpp to WinCE
464         https://bugs.webkit.org/show_bug.cgi?id=97803
465
466         Reviewed by Brent Fulgham.
467
468         Add two simple #if OS(WINCE) to DragDataWin.cpp, so it can be used by the WinCE port too.
469
470         * PlatformWinCE.cmake:
471         * platform/win/DragDataWin.cpp:
472         (WebCore::DragData::containsFiles):
473         (WebCore::DragData::numberOfFiles):
474         (WebCore::DragData::asFilenames):
475         * platform/wince/DragDataWinCE.cpp: Removed.
476
477 2012-11-19  Pan Deng  <pan.deng@intel.com>
478
479         [Web Inspector] This patch makes script line number search-able in Timeline panel.
480         https://bugs.webkit.org/show_bug.cgi?id=101910.
481
482         Reviewed by Pavel Feldman.
483
484         Script line number is visible in Timeline panel, however, not search-able. This patch makes it search-able.
485
486         No new tests. 
487
488         * inspector/front-end/TimelinePanel.js:
489         (WebInspector.TimelineRecordListRow.prototype.update):
490         (WebInspector.TimelineRecordListRow.testContentMatching):
491         * inspector/front-end/TimelinePresentationModel.js:
492         (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview):
493         (WebInspector.TimelinePresentationModel.Record.prototype._refreshDetails):
494         (WebInspector.TimelinePresentationModel.Record.prototype.detailsNode):
495         (WebInspector.TimelinePresentationModel.Record.prototype._createSpanWithText):
496         (WebInspector.TimelinePresentationModel.Record.prototype._getRecordDetails):
497
498 2012-11-19  Elliott Sprehn  <esprehn@chromium.org>
499
500         Remove unneeded null check in NodeRendererFactory::createRendererIfNeeded
501         https://bugs.webkit.org/show_bug.cgi?id=102765
502
503         Reviewed by Ojan Vafai.
504
505         If parentRenderer() was null then we return early from
506         createRendererIfNeeded() because shouldCreateRenderer() will return false
507         so there's no reason to check for it again.
508
509         Additionally if either parentRenderer() or style() is null then
510         implementations of rendererIsNeeded() will crash, so add asserts to
511         make this assumption more clear.
512
513         No new tests, just simplification.
514
515         * dom/NodeRenderingContext.cpp:
516         (WebCore::NodeRendererFactory::createRendererIfNeeded):
517
518 2012-11-19  Shinya Kawanaka  <shinyak@chromium.org>
519
520         [Refactoring] Remove WebCore::isInsertionPoint(Node*)
521         https://bugs.webkit.org/show_bug.cgi?id=102756
522
523         Reviewed by Hajime Morita.
524
525         Now that WebCore::isInsertionPoint(Node* node) does nothing special. We can remove this.
526
527         No new tests, simple refactoring.
528
529         * dom/ComposedShadowTreeWalker.cpp:
530         (WebCore::ComposedShadowTreeWalker::traverseNodeEscapingFallbackContents):
531         * dom/ContainerNode.cpp:
532         (WebCore::childAttachedAllowedWhenAttachingChildren):
533         * html/shadow/ContentDistributor.cpp:
534         (WebCore::ContentDistributor::invalidate):
535         * html/shadow/InsertionPoint.cpp:
536         (WebCore::InsertionPoint::isActive):
537         * html/shadow/InsertionPoint.h:
538         (WebCore::toInsertionPoint):
539         (WebCore::isActiveInsertionPoint):
540         (WebCore::isLowerEncapsulationBoundary):
541         (WebCore::parentNodeForDistribution):
542         * testing/Internals.cpp:
543         (WebCore::Internals::isValidContentSelect):
544
545 2012-11-19  Shinya Kawanaka  <shinyak@chromium.org>
546
547         [Refactoring] Remove shadowPseudoId() and use setPseudo() in <progress> ElementShadow.
548         https://bugs.webkit.org/show_bug.cgi?id=101703
549
550         Reviewed by Hajime Morita.
551
552         We're migrating shadowPseudoId() to pseudo(). We remove shadowPseudoId() from HTMLKeygenElement and use
553         setPseudo()/pseudo() instead.
554
555         No new tests, simple refactoring.
556
557         * html/shadow/ProgressShadowElement.cpp:
558         (WebCore::ProgressInnerElement::ProgressInnerElement):
559         * html/shadow/ProgressShadowElement.h:
560         (ProgressInnerElement):
561         (WebCore::ProgressBarElement::ProgressBarElement):
562         (ProgressBarElement):
563         (WebCore::ProgressValueElement::ProgressValueElement):
564
565 2012-11-19  Yury Semikhatsky  <yurys@chromium.org>
566
567         Unreviewed. Fix Chromium Debug compilation after r135230.
568         https://bugs.webkit.org/show_bug.cgi?id=102158
569
570         Removed ASSERT that used instance field in a static method.
571
572         * bindings/v8/DOMDataStore.h:
573         (WebCore::DOMDataStore::getWrapperFromObject):
574
575 2012-11-19  Chris Guan  <chris.guan@torchmobile.com.cn>
576
577         [Blackberry] When a frame is being detached, cancel all its network jobs.
578         https://bugs.webkit.org/show_bug.cgi?id=102758
579
580         Reviewed by George Staikos.
581
582         I use FrameDestructionObserver to refactor Networkjob code.
583         NetworkJob is inheriting from FrameDestructionObserver to be
584         aware of frame's destroyed. When a frame is being detached,
585         the willDetachPage() can be called in which we can cancel 
586         the job. This patch reverted the fix for RIM PR134207 as well.
587
588         Manually test is on 
589         "http://www.reuters.com/article/2012/01/27/us-greece-idUSTRE80P0DE20120127"
590         which triggers a ping loader.
591
592         No behavior changed, no new layout tests.
593
594         * platform/network/blackberry/NetworkJob.cpp:
595         (WebCore::NetworkJob::NetworkJob):
596         (WebCore::NetworkJob::initialize):
597         (WebCore::NetworkJob::handleNotifyHeaderReceived):
598         (WebCore::NetworkJob::startNewJobWithRequest):
599         (WebCore::NetworkJob::frameDestroyed):
600         (WebCore):
601         (WebCore::NetworkJob::willDetachPage):
602         * platform/network/blackberry/NetworkJob.h:
603         (NetworkJob):
604         * platform/network/blackberry/NetworkManager.cpp:
605         (WebCore::NetworkManager::startJob):
606         * platform/network/blackberry/NetworkManager.h:
607         (NetworkManager):
608         * platform/network/blackberry/ResourceHandleBlackBerry.cpp:
609         (WebCore::ResourceHandle::start):
610         (WebCore::ResourceHandle::loadResourceSynchronously):
611
612 2012-11-19  Matt Falkenhagen  <falken@chromium.org>
613
614         Implement the new stacking layer needed by the Fullscreen API and the new <dialog> element
615         https://bugs.webkit.org/show_bug.cgi?id=84796
616
617         Reviewed by Julien Chaffraix.
618
619         This adds the top layer element stack to Document. The Fullscreen
620         specification mandates that we track the ordering of the DOM nodes in
621         the top layer, not the renderers. That makes it hard to implement on
622         the rendering side only.
623
624         Elements in the top layer get a layer. Layers in the top layer are
625         added to the root layer's child list after normal layers and in the
626         order of the top layer stack. This way, the top layer appears above
627         all other stacking contexts and in the desired order.
628
629         In addition, top layer renderers are added as children of RenderView
630         in top layer order. This is to satisfy requirements such as the
631         containing block of an element in the top layer is the initial
632         containing block. It also allows RenderLayer to know the proper
633         stacking order of the layers without going directly from the top layer
634         elements to their layers.
635
636         So far, only modal dialog elements can be added to the top layer.
637         The plan is to make the Fullscreen API also use the top layer.
638
639         Tests: fast/dom/HTMLDialogElement/top-layer-containing-block.html
640                fast/dom/HTMLDialogElement/top-layer-display-none.html
641                fast/dom/HTMLDialogElement/top-layer-nesting.html
642                fast/dom/HTMLDialogElement/top-layer-stacking-dynamic.html
643                fast/dom/HTMLDialogElement/top-layer-stacking.html
644
645         * WebCore.exp.in:
646         * css/StyleResolver.cpp:
647         (WebCore::StyleResolver::adjustRenderStyle): Elements in the top layer have a stacking context.
648         * dom/Document.cpp:
649         (WebCore):
650         (WebCore::Document::addToTopLayer):
651         (WebCore::Document::removeFromTopLayer):
652         * dom/Document.h:
653         (Document):
654         (WebCore::Document::topLayerElements): Add the top layer element stack to Document.
655         * dom/Element.cpp:
656         (WebCore::Element::removedFrom):
657         (WebCore):
658         (WebCore::Element::isInTopLayer):
659         (WebCore::Element::setIsInTopLayer):
660         * dom/Element.h:
661         * dom/ElementRareData.h:
662         (ElementRareData):
663         * dom/Node.cpp:
664         (WebCore::Node::detach): Add an exception to the assert since top layer elements and their descendants are moved from their
665         regular position in the render tree.
666         * dom/NodeRareData.h:
667         (WebCore::NodeRareData::NodeRareData):
668         (NodeRareData):
669         (WebCore::NodeRareData::isInTopLayer):
670         (WebCore::NodeRareData::setIsInTopLayer):
671         * dom/NodeRenderingContext.cpp:
672         (WebCore):
673         (WebCore::adjustInsertionPointForTopLayerElement):
674         (WebCore::NodeRendererFactory::createRendererIfNeeded): Add renderers for top layer elements as children of RenderView, and
675         in top layer stacking order.
676         * html/HTMLDialogElement.cpp:
677         (WebCore::HTMLDialogElement::close):
678         (WebCore::HTMLDialogElement::showModal):
679         * rendering/RenderLayer.cpp:
680         (WebCore):
681         (WebCore::RenderLayer::isInTopLayer):
682         (WebCore::RenderLayer::isInTopLayerSubtree):
683         (WebCore::RenderLayer::rebuildZOrderLists): Add the top layer stack after normal layer collection.
684         (WebCore::RenderLayer::collectLayers): Avoid adding layers for top layer elements during normal layer collection.
685         * rendering/RenderLayer.h:
686         (RenderLayer):
687
688 2012-11-19  Kentaro Hara  <haraken@chromium.org>
689
690         In CodeGeneratorObj.pm we should rename $dataNode to $interface.
691         https://bugs.webkit.org/show_bug.cgi?id=102749
692
693         Reviewed by Adam Barth.
694
695         $dataNode is misnamed. It should be renamed to $interface.
696
697         No tests. No change in behavior.
698
699         * bindings/scripts/CodeGeneratorObjC.pm:
700         (GenerateInterface):
701         (GetParentImplClassName):
702         (GetParentAndProtocols):
703         (GenerateHeader):
704         (GenerateImplementation):
705
706 2012-11-19  Kentaro Hara  <haraken@chromium.org>
707
708         In CodeGeneratorV8.pm, we should rename $dataNode to $interface
709         https://bugs.webkit.org/show_bug.cgi?id=102747
710
711         Reviewed by Adam Barth.
712
713         $dataNode is misnamed. It should be $interface.
714
715         No tests. No change in behavior.
716
717         * bindings/scripts/CodeGeneratorV8.pm:
718         (GenerateInterface):
719         (NeedsCustomOpaqueRootForGC):
720         (GetGenerateIsReachable):
721         (GetCustomIsReachable):
722         (GenerateOpaqueRootForGC):
723         (GenerateHeader):
724         (GetInternalFields):
725         (GenerateHeaderCustomInternalFieldIndices):
726         (GenerateHeaderNamedAndIndexedPropertyAccessors):
727         (GenerateHeaderCustomCall):
728         (IsConstructable):
729         (GenerateConstructorGetter):
730         (GenerateNormalAttrGetter):
731         (GenerateReplaceableAttrSetter):
732         (GenerateNormalAttrSetter):
733         (GenerateOverloadedFunctionCallback):
734         (GenerateFunctionCallback):
735         (GenerateArgumentsCountCheck):
736         (GenerateOverloadedConstructorCallback):
737         (GenerateSingleConstructorCallback):
738         (GenerateConstructorCallback):
739         (GenerateEventConstructorCallback):
740         (GenerateTypedArrayConstructorCallback):
741         (GenerateNamedConstructorCallback):
742         (GenerateBatchedAttributeData):
743         (IsStandardFunction):
744         (GenerateNonStandardFunction):
745         (GenerateImplementationIndexer):
746         (GenerateImplementationNamedPropertyGetter):
747         (GenerateImplementationCustomCall):
748         (GenerateImplementationMasqueradesAsUndefined):
749         (GenerateImplementation):
750         (GenerateHeaderContentHeader):
751         (GenerateImplementationContentHeader):
752         (GenerateCallbackHeader):
753         (GenerateCallbackImplementation):
754         (BaseInterfaceName):
755         (GenerateToV8Converters):
756         (GetNativeTypeForConversions):
757         (GetTypeNameOfExternalTypedArray):
758         (WriteData):
759
760 2012-11-19  Keishi Hattori  <keishi@webkit.org>
761
762         Move in animation should be disabled until the calendar picker is loaded.
763         https://bugs.webkit.org/show_bug.cgi?id=102661
764
765         Reviewed by Kent Tamura.
766
767         On weeks where the first day is in the previous month (e.x. 2013-W01)
768         the move in animation happens when you open the calendar picker. This
769         patch disables the move in animation until the calendar picker is fully
770         loaded.
771
772         No new tests.
773
774         * Resources/pagepopups/calendarPicker.js:
775         (CalendarPicker):
776         (CalendarPicker.prototype._handleWindowResize):
777         (DaysTable.prototype._startMoveInAnimation):
778
779 2012-11-19  Elliott Sprehn  <esprehn@chromium.org>
780
781         Clean up loop in NodeRenderingContext::nextRenderer and previousRenderer
782         https://bugs.webkit.org/show_bug.cgi?id=102743
783
784         Reviewed by Hajime Morita.
785
786         Clean up while (true) loops in NodeRenderingContext reducing the
787         amount of code and the need for ASSERT_NOT_REACHED.
788
789         No new tests, just simplifcation.
790
791         * dom/NodeRenderingContext.cpp:
792         (WebCore::NodeRenderingContext::nextRenderer):
793         (WebCore::NodeRenderingContext::previousRenderer):
794
795 2012-11-19  Shinya Kawanaka  <shinyak@chromium.org>
796
797         [Shadow] attribute pseudo should return empty string instead of null when nothing is specified.
798         https://bugs.webkit.org/show_bug.cgi?id=102753
799
800         Reviewed by Hajime Morita.
801
802         The ShadowDOM spec is changed so that attribute 'pseudo' returns empty string instead of null when
803         no value is set.
804
805         Test: fast/dom/shadow/pseudo-attribute.html
806
807         * dom/Element.idl:
808
809 2012-11-19  Kentaro Hara  <haraken@chromium.org>
810
811         In CodeGeneratorGObject.pm we should rename $dataNode to $interface
812         https://bugs.webkit.org/show_bug.cgi?id=102751
813
814         Reviewed by Adam Barth.
815
816         $dataNode is misnamed. It should be $interface.
817
818         No tests. No change in behavior.
819
820         * bindings/scripts/CodeGeneratorGObject.pm:
821         (GetParentClassName):
822         (GetParentGObjType):
823         (GenerateProperties):
824         (GenerateFunctions):
825         (GenerateCFile):
826         (GenerateEventTargetIface):
827         (Generate):
828         (WriteData):
829         (GenerateInterface):
830
831 2012-11-19  Kentaro Hara  <haraken@chromium.org>
832
833         In CodeGenerator.pm we should rename $dataNode to $interface
834         https://bugs.webkit.org/show_bug.cgi?id=102754
835
836         Reviewed by Adam Barth.
837
838         $dataNode is misnamed. It should be $interface.
839
840         No tests. No change in behavior.
841
842         * bindings/scripts/CodeGenerator.pm:
843         (ForAllParents):
844         (AddMethodsConstantsAndAttributesFromParentInterfaces):
845         (FindSuperMethod):
846         (IsConstructorTemplate):
847         (LinkOverloadedFunctions):
848         (GenerateCompileTimeCheckForEnumsIfNeeded):
849         (GetVisibleInterfaceName):
850         (IsSubType):
851
852 2012-11-19  Kentaro Hara  <haraken@chromium.org>
853
854         In CodeGeneratorCPP.pm we should rename $dataNode to $interface
855         https://bugs.webkit.org/show_bug.cgi?id=102752
856
857         Reviewed by Adam Barth.
858
859         $dataNode is misnamed. It should be $interface.
860
861         No tests. No change in behavior.
862
863         * bindings/scripts/CodeGeneratorCPP.pm:
864         (GenerateInterface):
865         (GetParentImplClassName):
866         (GetParent):
867         (GenerateHeader):
868         (GenerateImplementation):
869
870 2012-11-19  Kentaro Hara  <haraken@chromium.org>
871
872         In CodeGeneratorJS.pm we should rename $dataNode to $interface
873         https://bugs.webkit.org/show_bug.cgi?id=102748
874
875         Reviewed by Adam Barth.
876
877         $dataNode is misnamed. It should be $interface.
878
879         No tests. No change in behavior.
880
881         * bindings/scripts/CodeGeneratorJS.pm:
882         (GenerateInterface):
883         (GetParentClassName):
884         (GetGenerateIsReachable):
885         (GetCustomIsReachable):
886         (GenerateGetOwnPropertySlotBody):
887         (GenerateGetOwnPropertyDescriptorBody):
888         (GenerateHeaderContentHeader):
889         (GenerateImplementationContentHeader):
890         (ShouldGenerateToJSDeclaration):
891         (ShouldGenerateToJSImplementation):
892         (GenerateHeader):
893         (GenerateAttributesHashTable):
894         (GenerateOverloadedFunction):
895         (GenerateImplementation):
896         (GenerateArgumentsCountCheck):
897         (GenerateParametersCheck):
898         (GenerateCallbackHeader):
899         (GenerateCallbackImplementation):
900         (WriteData):
901         (GenerateConstructorDeclaration):
902         (GenerateConstructorDefinition):
903         (IsConstructable):
904
905 2012-11-19  Adam Barth  <abarth@webkit.org>
906
907         [V8] Merge getCachedWrapper(Node*) into DOMDataStore
908         https://bugs.webkit.org/show_bug.cgi?id=102158
909
910         Reviewed by Eric Seidel.
911
912         This patch is an incremental step towards fully merging the Node code
913         path with the general code path. After this patch, at least Nodes flow
914         through the same class.
915
916         * Modules/indexeddb/IDBTransactionCoordinator.h:
917         * bindings/scripts/CodeGeneratorV8.pm:
918         (GenerateHeader):
919         (GenerateToV8Converters):
920         * bindings/v8/DOMDataStore.h:
921         (WebCore::DOMDataStore::getNode):
922         (DOMDataStore):
923         (WebCore::DOMDataStore::getWrapperFromObject):
924         * bindings/v8/DOMWrapperWorld.cpp:
925         (WebCore::DOMWrapperWorld::DOMWrapperWorld):
926         (WebCore):
927         * bindings/v8/DOMWrapperWorld.h:
928         (WebCore):
929         (DOMWrapperWorld):
930         * bindings/v8/V8DOMWrapper.h:
931         (V8DOMWrapper):
932
933 2012-11-19  Kentaro Hara  <haraken@chromium.org>
934
935         In the IDL parser, we should rename $dataNode to $interface
936         https://bugs.webkit.org/show_bug.cgi?id=102746
937
938         Reviewed by Adam Barth.
939
940         $dataNode is misnamed. It should be $interface.
941
942         No tests. No change in behavior.
943
944         * bindings/scripts/IDLParser.pm:
945         (parseInterface):
946         (parseException):
947         (parseAttributeOrOperationRest):
948         (parseOperationOrIterator):
949         (parseSpecialOperation):
950         (parseInterfaceOld):
951         (parseExceptionOld):
952         (parseAttributeOrOperationOrIteratorOld):
953         (parseAttributeOrOperationRestOld):
954         (applyMemberList):
955         (applyExtendedAttributeList):
956         * bindings/scripts/generate-bindings.pl:
957         * bindings/scripts/preprocess-idls.pl:
958         (checkIDLAttributes):
959
960 2012-11-19  Adam Klein  <adamk@chromium.org>
961
962         MutationObserver wrapper should not be collected while still observing
963         https://bugs.webkit.org/show_bug.cgi?id=102328
964
965         Reviewed by Adam Barth.
966
967         Use the new opaqueRootForGC helper in V8GCController to put each
968         MutationObserver wrapper in the same object group as the nodes it's
969         observing.
970
971         Only includes V8 impl for now, JSC impl coming soon.
972
973         Tests: fast/mutation/observer-wrapper-dropoff-transient.html
974                fast/mutation/observer-wrapper-dropoff.html
975
976         * bindings/v8/V8GCController.cpp: Add custom code for MutationObserver
977         with a FIXME to move this out once we update the opaque roots API.
978         * dom/MutationObserver.cpp:
979         (WebCore::MutationObserver::getObservedNodes): Plumbing to expose the observed nodes
980         to the GC controller.
981         (WebCore):
982         * dom/MutationObserver.h:
983         * dom/MutationObserverRegistration.cpp:
984         (WebCore::MutationObserverRegistration::addRegistrationNodesToSet): More plumbing.
985         (WebCore):
986         * dom/MutationObserverRegistration.h:
987         (MutationObserverRegistration):
988
989 2012-11-19  Tony Chang  <tony@chromium.org>
990
991         Move more non-settings out of InternalSettings
992         https://bugs.webkit.org/show_bug.cgi?id=102711
993
994         Reviewed by Adam Barth.
995
996         Remove userPreferredLanguages, setUserPreferredLanguages and allowRoundingHacks
997         from internal.settings since they are already exposed by window.internals (in
998         fact, no one calls the internal.settings version).
999
1000         Move setUsesOverlayScrollbars from internals.settings to internals because it is
1001         a global (static) setting and not tied to the lifetime of the Settings object.
1002
1003         No new tests, there should be no behavior change since this is a refactor.
1004
1005         * testing/InternalSettings.cpp:
1006         (WebCore::InternalSettings::reset): Remove custom reset code.
1007         (WebCore::InternalSettings::setUsesOverlayScrollbars): Add exception code handling to make it more consistent with other settings setters.
1008         * testing/InternalSettings.h:
1009         * testing/InternalSettings.idl: Remove unnecessary methods.
1010         * testing/Internals.cpp:
1011         (WebCore::Internals::resetToConsistentState): Reset userPreferredLanguages, allowRoundingHacks and overlay scrollbars.
1012         (WebCore::Internals::userPreferredLanguages): Don't go through InternalSettings.
1013         (WebCore::Internals::setUserPreferredLanguages): Don't go through InternalSettings.
1014         (WebCore::Internals::setUsesOverlayScrollbars): Moved from InternalsSettings.
1015         (WebCore::Internals::allowRoundingHacks): Don't go through InternalSettings.
1016
1017 2012-11-19  David Grogan  <dgrogan@chromium.org>
1018
1019         IndexedDB: Complex series of opens/deleteDatabase fails an ASSERT
1020         https://bugs.webkit.org/show_bug.cgi?id=101810
1021
1022         Reviewed by Tony Chang.
1023
1024         Tests - storage/indexeddb/deletedatabase-delayed-by-versionchange.html
1025
1026         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1027         (WebCore::IDBDatabaseBackendImpl::processPendingCalls):
1028         The condition tested by this assert is a valid state.
1029
1030 2012-11-19  Peter Wang  <peter.wang@torchmobile.com.cn>
1031
1032         Web Inspector: [JSC] worker debugger shouldn't stop for "willExecuteProgram" instruction
1033         https://bugs.webkit.org/show_bug.cgi?id=102637
1034
1035         Reviewed by Timothy Hatcher.
1036
1037         Override the interface "willExecuteProgram" to let WorkerScriptDebugServer to avoid to stop for it.
1038
1039         No new DRT test case. Sorry, so far it seems impossible to write a case to controle the popupped
1040         worker inspector window.
1041
1042         * bindings/js/ScriptDebugServer.cpp:
1043         (WebCore::ScriptDebugServer::createCallFrame):
1044         (WebCore::ScriptDebugServer::callEvent):
1045         (WebCore::ScriptDebugServer::willExecuteProgram):
1046         * bindings/js/ScriptDebugServer.h:
1047         (ScriptDebugServer):
1048         * bindings/js/WorkerScriptDebugServer.cpp:
1049         (WebCore::WorkerScriptDebugServer::willExecuteProgram):
1050         (WebCore):
1051         * bindings/js/WorkerScriptDebugServer.h:
1052         (WorkerScriptDebugServer):
1053
1054 2012-11-19  Pratik Solanki  <psolanki@apple.com>
1055
1056         For single element arrays use the pointer into the CFDataRef instead of copying data
1057         https://bugs.webkit.org/show_bug.cgi?id=102306
1058
1059         Reviewed by Brent Fulgham.
1060
1061         Address review comments for slightly nicer code.
1062
1063         * platform/SharedBuffer.cpp:
1064         (WebCore::SharedBuffer::data):
1065         * platform/cf/SharedBufferCF.cpp:
1066         (WebCore::SharedBuffer::singleDataArrayBuffer):
1067
1068 2012-11-19  Chris Rogers  <crogers@google.com>
1069
1070         Remove empirical bass-boost for HRTF spatialization
1071         https://bugs.webkit.org/show_bug.cgi?id=102745
1072
1073         Reviewed by Kenneth Russell.
1074
1075         Some empirically-based post-processing is being removed so that we'll
1076         now process with the exact HRTF impulse response measurements.
1077         Listening tests have determined that this post-processing is not necessary.
1078
1079         * platform/audio/HRTFElevation.cpp:
1080         (WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
1081         * platform/audio/HRTFKernel.cpp:
1082         (WebCore::HRTFKernel::HRTFKernel):
1083         * platform/audio/HRTFKernel.h:
1084         (WebCore::HRTFKernel::create):
1085         (HRTFKernel):
1086
1087 2012-11-19  Adam Barth  <abarth@webkit.org>
1088
1089         DISALLOW_COPY_AND_ASSIGN is not a WebKit macro
1090         https://bugs.webkit.org/show_bug.cgi?id=102755
1091
1092         Reviewed by Sam Weinig.
1093
1094         WTF_MAKE_NONCOPYABLE is the idiom we use in WebKit.  I don't understand
1095         how this compiles.
1096
1097         * Modules/indexeddb/IDBBackingStore.h:
1098         (RecordIdentifier):
1099
1100 2012-11-19  Chris Rogers  <crogers@google.com>
1101
1102         Implement .detune attribute for BiquadFilterNode
1103         https://bugs.webkit.org/show_bug.cgi?id=102737
1104
1105         Reviewed by Kenneth Russell.
1106
1107         Similar to OscillatorNode, BiquadFilterNode must have a .detune attribute
1108
1109         Tests changed: webaudio/biquad-lowpass.html
1110
1111         * Modules/webaudio/BiquadDSPKernel.cpp:
1112         (WebCore::BiquadDSPKernel::updateCoefficientsIfNecessary):
1113         * Modules/webaudio/BiquadFilterNode.h:
1114         (WebCore::BiquadFilterNode::detune):
1115         * Modules/webaudio/BiquadFilterNode.idl:
1116         * Modules/webaudio/BiquadProcessor.cpp:
1117         (WebCore::BiquadProcessor::BiquadProcessor):
1118         (WebCore::BiquadProcessor::checkForDirtyCoefficients):
1119         * Modules/webaudio/BiquadProcessor.h:
1120         (WebCore::BiquadProcessor::parameter4):
1121         (BiquadProcessor):
1122
1123 2012-11-19  Patrick Gansterer  <paroga@webkit.org>
1124
1125         [WIN] Add WebCore::getRegistryValue()
1126         https://bugs.webkit.org/show_bug.cgi?id=97828
1127
1128         Reviewed by Brent Fulgham.
1129
1130         The new function adds an abstraction to SHGetValue(), which isn't available on WinCE.
1131         Changing the existing files allows us to share more code between WinCE and WinNT in a next step.
1132
1133         * platform/win/MIMETypeRegistryWin.cpp:
1134         (WebCore::mimeTypeForExtension):
1135         (WebCore):
1136         (WebCore::MIMETypeRegistry::getPreferredExtensionForMIMEType):
1137         * platform/win/WindowsExtras.h:
1138         (WebCore::getRegistryValue):
1139         (WebCore):
1140         * plugins/win/PluginDatabaseWin.cpp:
1141         (WebCore::addPluginPathsFromRegistry):
1142         (WebCore::addWindowsMediaPlayerPluginDirectory):
1143         (WebCore::addQuickTimePluginDirectory):
1144         (WebCore::addAdobeAcrobatPluginDirectory):
1145         (WebCore::addJavaPluginDirectory):
1146
1147 2012-11-19  Alpha Lam  <hclam@chromium.org>
1148
1149         Not reviewed. Build fix for Chromium.
1150
1151         Added SkTypes.h includes for Windows.
1152
1153         * platform/graphics/chromium/ImageDecodingStore.h:
1154         * platform/graphics/chromium/ImageFrameGenerator.h:
1155         * platform/graphics/chromium/LazyDecodingPixelRef.h:
1156
1157 2012-11-19  Adam Barth  <abarth@webkit.org>
1158
1159         [V8] Simplify V8DOMWindowShell::getEntered
1160         https://bugs.webkit.org/show_bug.cgi?id=102156
1161
1162         Reviewed by Eric Seidel.
1163
1164         This patch is an incremental step towards merging
1165         V8DOMWrapper::getCachedWrapper(Node*) with the general case for looking
1166         up DOM wrappers. In order to merge with the general case, we need to
1167         get down to calling v8::Context::GetCurrent once, which means we need
1168         to factor the call to v8::Context::GetEntered out of V8DOMWindowShell.
1169
1170         As a side-benefit to this change, we can remove some redundant checks
1171         for isolatedWorldsExist and v8::Context::InContext from callers of
1172         V8DOMWindowShell::getEntered, including in getCachedWrapper.
1173
1174         * bindings/v8/DOMDataStore.cpp:
1175         (WebCore::DOMDataStore::current):
1176         * bindings/v8/ScriptController.cpp:
1177         (WebCore::ScriptController::shouldBypassMainWorldContentSecurityPolicy):
1178         (WebCore::ScriptController::currentWorldContext):
1179         * bindings/v8/V8DOMWindowShell.h:
1180         (WebCore::V8DOMWindowShell::isolated):
1181         (WebCore::V8DOMWindowShell::perContextData):
1182         (WebCore::V8DOMWindowShell::world):
1183         (V8DOMWindowShell):
1184         * bindings/v8/V8DOMWrapper.h:
1185         (WebCore::V8DOMWrapper::getCachedWrapper):
1186         * bindings/v8/WorldContextHandle.cpp:
1187         (WebCore::WorldContextHandle::WorldContextHandle):
1188         * bindings/v8/custom/V8DocumentCustom.cpp:
1189         (WebCore::V8Document::dispatchWrapCustom):
1190         * bindings/v8/custom/V8HTMLDocumentCustom.cpp:
1191         (WebCore::V8HTMLDocument::dispatchWrapCustom):
1192         * bindings/v8/custom/V8SVGDocumentCustom.cpp:
1193         (WebCore::V8SVGDocument::dispatchWrapCustom):
1194         * bindings/v8/custom/V8XMLHttpRequestConstructor.cpp:
1195         (WebCore::V8XMLHttpRequest::constructorCallback):
1196
1197 2012-11-19  Kentaro Hara  <haraken@chromium.org>
1198
1199         Rename idlDocument::classes to idlDocument::interfaces in the IDL parser
1200         https://bugs.webkit.org/show_bug.cgi?id=102671
1201
1202         Reviewed by Adam Barth.
1203
1204         Most part of code generators use 'interface'. The spec uses 'interface'.
1205         Thus, the IDL parser should use 'interface' instead of 'class'.
1206
1207         No tests. No change in behavior.
1208
1209         * bindings/scripts/CodeGenerator.pm:
1210         (ProcessDocument):
1211         (AddMethodsConstantsAndAttributesFromParentInterfaces):
1212         (ParseInterface):
1213         * bindings/scripts/CodeGeneratorCPP.pm:
1214         (GenerateImplementation):
1215         * bindings/scripts/CodeGeneratorJS.pm:
1216         (GenerateHeader):
1217         * bindings/scripts/CodeGeneratorObjC.pm:
1218         (GenerateImplementation):
1219         * bindings/scripts/CodeGeneratorV8.pm:
1220         (GenerateHeader):
1221         (GenerateFunctionCallback):
1222         * bindings/scripts/IDLParser.pm:
1223         (Parse):
1224         (parseModule):
1225         * bindings/scripts/generate-bindings.pl:
1226
1227 2012-11-19  Eric Carlson  <eric.carlson@apple.com>
1228
1229         HTMLMediaElement::configureTextTracks should configure all text tracks
1230         https://bugs.webkit.org/show_bug.cgi?id=102561
1231
1232         Reviewed by Philippe Normand.
1233
1234         No new tests, track-mode-not-changed-by-new-track.html was updated to test the changes.
1235
1236         * html/HTMLMediaElement.cpp:
1237         (WebCore::HTMLMediaElement::textTrackModeChanged): HTMLTrackElement -> TextTrack.
1238         (WebCore::HTMLMediaElement::willRemoveTrack): Ditto.
1239         (WebCore::HTMLMediaElement::configureTextTrackGroup): Ditto.
1240         (WebCore::HTMLMediaElement::configureTextTracks): Ditto.
1241         (WebCore::HTMLMediaElement::markCaptionAndSubtitleTracksAsUnconfigured): Ditto.
1242         * html/HTMLMediaElement.h:
1243
1244         * html/HTMLTrackElement.cpp:
1245         (WebCore::HTMLTrackElement::HTMLTrackElement): Move hasBeenConfigured down to TextTrack.
1246         (WebCore::HTMLTrackElement::parseAttribute): isDefault is stored on TextTrack.
1247         (WebCore::HTMLTrackElement::ensureTrack): LoadableTextTrack constructor doesn't take 
1248             "default" argument.
1249         * html/HTMLTrackElement.h:
1250
1251         * html/track/LoadableTextTrack.cpp:
1252         (WebCore::LoadableTextTrack::LoadableTextTrack): Initialize m_isDefault to false.
1253         * html/track/LoadableTextTrack.h: 
1254         (WebCore::TextTrack::isDefault): Override base class implementation, because a track element
1255             can be flagged as default.
1256         (WebCore::TextTrack::setIsDefault): Ditto.
1257
1258         * html/track/TextTrack.cpp:
1259         (WebCore::TextTrack::TextTrack): Initialize m_hasBeenConfigured.
1260         * html/track/TextTrack.h:
1261         (WebCore::TextTrack::hasBeenConfigured): New, moved from HTMLTrackElement so other code doesn't
1262             need know what type of track it is calling.
1263         (WebCore::TextTrack::setHasBeenConfigured): Ditto.
1264         (WebCore::TextTrack::isDefault): Base, do nothing, implementation because only LoadableTextTrack
1265             can be "default".
1266         (WebCore::TextTrack::setIsDefault): Ditto.
1267
1268 2012-11-19  Huang Dongsung  <luxtella@company100.net>
1269
1270         Coordinated Graphics: refactor syncCanvas to handle the lifecycle clearly.
1271         https://bugs.webkit.org/show_bug.cgi?id=102664
1272
1273         Reviewed by Noam Rosenthal.
1274
1275         As refactoring Coordinated Graphics in WebKit2, code related to
1276         TextureMapper is changed.
1277
1278         No new tests. Refactoring only.
1279
1280         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1281         (GraphicsContext3DPrivate):
1282         (WebCore::GraphicsContext3DPrivate::platformLayerSize):
1283             We need to know the size of a texture mapper platform layer.
1284         (WebCore):
1285         * platform/graphics/texmap/TextureMapperBackingStore.cpp:
1286           Because CoordinatedGraphicsLayer handles the canvas GraphicsSurface
1287           lifecycle, TextureMapperSurfaceBackingStore does not need to know
1288           GraphicsSurfaceToken.
1289         (WebCore::TextureMapperSurfaceBackingStore::setGraphicsSurface):
1290         (WebCore::TextureMapperSurfaceBackingStore::swapBuffersIfNeeded):
1291         (WebCore::TextureMapperSurfaceBackingStore::paintToTextureMapper):
1292         * platform/graphics/texmap/TextureMapperBackingStore.h:
1293         (TextureMapperSurfaceBackingStore):
1294         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
1295         (WebCore::TextureMapperPlatformLayer::platformLayerSize):
1296
1297 2012-11-19  Alpha Lam  <hclam@chromium.org>
1298
1299         [chromium] Lazy image decoding without cache
1300         https://bugs.webkit.org/show_bug.cgi?id=102021
1301
1302         Reviewed by Stephen White.
1303
1304         Goal of this change is to make image decoding in ImageFrameGenerator
1305         completely lazy without caching. Image decoding logic is then removed
1306         from ImageDecodingStore.
1307
1308         These methods are removed.
1309         - ImageDecodingStore::lockPixels
1310         - ImageDecodingStore::unlockPixels
1311
1312         Instead image decoding and scaling is done in
1313         ImageFrameGenerator::decodeAndScale().
1314
1315         Unit tests are updated:
1316         DeferredImageDecoderTest::drawIntoSkPicture
1317         DeferredImageDecoderTest::drawScaledIntoSkPicture
1318
1319         Also covered by layout tests:
1320         platform/chromium/virtual/deferred
1321
1322         * platform/graphics/chromium/DeferredImageDecoder.cpp:
1323         (WebCore::DeferredImageDecoder::createLazyDecodingBitmap):
1324         * platform/graphics/chromium/ImageDecodingStore.h:
1325         (ImageDecodingStore):
1326         * platform/graphics/chromium/ImageFrameGenerator.cpp:
1327         (WebCore::ImageFrameGenerator::ImageFrameGenerator):
1328         (WebCore::ImageFrameGenerator::~ImageFrameGenerator):
1329         (WebCore::ImageFrameGenerator::setData):
1330         (WebCore::ImageFrameGenerator::decodeAndScale):
1331         * platform/graphics/chromium/ImageFrameGenerator.h:
1332         (WebCore::ImageFrameGenerator::create):
1333         (ImageFrameGenerator):
1334         * platform/graphics/chromium/LazyDecodingPixelRef.cpp:
1335         (WebCore::LazyDecodingPixelRef::onLockPixels):
1336         (WebCore::LazyDecodingPixelRef::onUnlockPixels):
1337         * platform/graphics/chromium/LazyDecodingPixelRef.h:
1338         (LazyDecodingPixelRef):
1339
1340 2012-11-19  Abhishek Arya  <inferno@chromium.org>
1341
1342         Crash in ApplyStyleCommand::cleanupUnstyledAppleStyleSpans.
1343         https://bugs.webkit.org/show_bug.cgi?id=100150
1344
1345         Reviewed by Ryosuke Niwa.
1346
1347         RefPtr startDummySpanAncestor and endDummySpanAncestor since
1348         they can go away inside fixRangeAndApplyInlineStyle call.
1349
1350         Test: editing/style/apply-style-crash.html
1351
1352         * editing/ApplyStyleCommand.cpp:
1353         (WebCore::ApplyStyleCommand::applyInlineStyle):
1354
1355 2012-11-19  Sheriff Bot  <webkit.review.bot@gmail.com>
1356
1357         Unreviewed, rolling out r135172.
1358         http://trac.webkit.org/changeset/135172
1359         https://bugs.webkit.org/show_bug.cgi?id=102710
1360
1361         Broke some WebKit2 api tests :( (Requested by japhet on
1362         #webkit).
1363
1364         * loader/DocumentLoader.cpp:
1365         (WebCore::DocumentLoader::DocumentLoader):
1366         (WebCore::DocumentLoader::~DocumentLoader):
1367         (WebCore::DocumentLoader::finishedLoading):
1368         (WebCore::DocumentLoader::clearMainResourceLoader):
1369         (WebCore::DocumentLoader::isLoadingInAPISense):
1370         (WebCore::DocumentLoader::documentURL):
1371         (WebCore::DocumentLoader::isLoadingMainResource):
1372         (WebCore::DocumentLoader::startLoadingMainResource):
1373         * loader/DocumentLoader.h:
1374         (DocumentLoader):
1375         * loader/FrameLoader.cpp:
1376         (WebCore::FrameLoader::FrameLoader):
1377         (WebCore::FrameLoader::init):
1378         * loader/FrameLoaderStateMachine.cpp:
1379         (WebCore::FrameLoaderStateMachine::FrameLoaderStateMachine):
1380         * loader/FrameLoaderStateMachine.h:
1381         * loader/MainResourceLoader.cpp:
1382         (WebCore::shouldLoadAsEmptyDocument):
1383         (WebCore):
1384         (WebCore::MainResourceLoader::continueAfterContentPolicy):
1385         (WebCore::MainResourceLoader::didReceiveResponse):
1386         (WebCore::MainResourceLoader::didFinishLoading):
1387         (WebCore::MainResourceLoader::handleEmptyLoad):
1388         (WebCore::MainResourceLoader::loadNow):
1389         (WebCore::MainResourceLoader::load):
1390         * loader/MainResourceLoader.h:
1391         (MainResourceLoader):
1392
1393 2012-11-19  Tony Chang  <tony@chromium.org>
1394
1395         Remove 'is' prefix from WebSettings::isWebSecurityEnabled and WebSettings::isSpatialNavigationEnabled
1396         https://bugs.webkit.org/show_bug.cgi?id=102548
1397
1398         Reviewed by Adam Barth.
1399
1400         This allows us to use Settings.in to generate the code for this.
1401
1402         I didn't rename any of the WebKit API methods with similar names because that would
1403         probably break consumers.  It turns out that the getter is only called from
1404         Source/WebKit/efl (most of the time, WebPreferences just sets values on Settings).
1405
1406         No new tests, just a refactor.
1407
1408         * WebCore.exp.in: Remove symbols that are now inlined.
1409         * WebCore.order: Remove symbols that are now inlined.
1410         * dom/Document.cpp:
1411         (WebCore::Document::initSecurityContext): Rename.
1412         * page/Settings.cpp:
1413         (WebCore::Settings::Settings): Remove code since it will be generated.
1414         * page/Settings.h:
1415         (Settings): Remove code since it will be generated.
1416         * page/Settings.in: Add entries to be generated.
1417         * page/SpatialNavigation.cpp:
1418         (WebCore::isSpatialNavigationEnabled): Fix caller.
1419
1420 2012-11-19  Yael Aharon  <yael.aharon@intel.com>
1421
1422         [EFL][TexMap] Complie error when considering warnings as errors
1423         https://bugs.webkit.org/show_bug.cgi?id=102705
1424
1425         Reviewed by Kenneth Rohde Christiansen.
1426
1427         Change GaussianKernelHalfWidth to unsigned.
1428
1429         No new tests.
1430
1431         * platform/graphics/texmap/TextureMapperGL.cpp:
1432         (WebCore):
1433
1434 2012-11-19  Sheriff Bot  <webkit.review.bot@gmail.com>
1435
1436         Unreviewed, rolling out r134830.
1437         http://trac.webkit.org/changeset/134830
1438         https://bugs.webkit.org/show_bug.cgi?id=102701
1439
1440         ActiveDOMObject is not applicable to MutationObservers due to
1441         being tied to a Document (Requested by aklein on #webkit).
1442
1443         * bindings/js/JSMutationObserverCustom.cpp:
1444         (WebCore::JSMutationObserverConstructor::constructJSMutationObserver):
1445         * bindings/v8/custom/V8MutationObserverCustom.cpp:
1446         (WebCore::V8MutationObserver::constructorCallback):
1447         * dom/MutationObserver.cpp:
1448         (WebCore::MutationObserver::create):
1449         (WebCore::MutationObserver::MutationObserver):
1450         (WebCore::MutationObserver::observationStarted):
1451         (WebCore::MutationObserver::observationEnded):
1452         * dom/MutationObserver.h:
1453         (WebCore):
1454         * dom/MutationObserver.idl:
1455
1456 2012-11-19  Brady Eidson  <beidson@apple.com>
1457
1458         NetworkProcess Authentication.
1459         https://bugs.webkit.org/show_bug.cgi?id=102592
1460
1461         Reviewed by Alexey Proskuryakov.
1462
1463         Change an ASSERT that assumes there should be a resource handle which is not true with the NetworkProcess.
1464
1465         Also export some more stuff.
1466
1467         No new tests (Platform support, no effect in tested configs).
1468
1469         * WebCore.exp.in:
1470
1471         * loader/ResourceLoader.cpp:
1472         (WebCore::ResourceLoader::didReceiveAuthenticationChallenge): Only ASSERT that the handle has a challenge if
1473           there is a handle.
1474
1475 2012-11-19  Alec Flett  <alecflett@chromium.org>
1476
1477         IndexedDB: simplify RecordIdentifier
1478         https://bugs.webkit.org/show_bug.cgi?id=102018
1479
1480         Reviewed by Tony Chang.
1481
1482         Make IDBBackingStore's RecordIdentifier be a simple
1483         class, existing only as an inline or stack-based instance.
1484         This makes much of the copy semantics more explicit, and
1485         removes refcounting from an object that only ever had a refcount
1486         of 1 or 2.
1487
1488         No new tests, just a refactor.
1489
1490         * Modules/indexeddb/IDBBackingStore.cpp:
1491         (WebCore::IDBBackingStore::putRecord):
1492         (WebCore::IDBBackingStore::deleteRecord):
1493         (WebCore::IDBBackingStore::maybeUpdateKeyGeneratorCurrentNumber):
1494         (WebCore::IDBBackingStore::keyExistsInObjectStore):
1495         (WebCore::IDBBackingStore::putIndexDataForRecord):
1496         (WebCore::IDBBackingStore::deleteIndexDataForRecord):
1497         (WebCore::ObjectStoreKeyCursorImpl::loadCurrentRow):
1498         (ObjectStoreCursorImpl):
1499         (WebCore::ObjectStoreCursorImpl::loadCurrentRow):
1500         (WebCore::IndexKeyCursorImpl::recordIdentifier):
1501         (WebCore::IndexCursorImpl::recordIdentifier):
1502         * Modules/indexeddb/IDBBackingStore.h:
1503         (WebCore::IDBBackingStore::RecordIdentifier::RecordIdentifier):
1504         (WebCore::IDBBackingStore::RecordIdentifier::isValid):
1505         (WebCore::IDBBackingStore::RecordIdentifier::reset):
1506         (RecordIdentifier):
1507         (IDBBackingStore):
1508         (WebCore::IDBBackingStore::Cursor::recordIdentifier):
1509         (WebCore::IDBBackingStore::Cursor::Cursor):
1510         (Cursor):
1511         * Modules/indexeddb/IDBObjectStoreBackendImpl.cpp:
1512         (WebCore):
1513         (WebCore::IDBObjectStoreBackendImpl::setIndexKeys):
1514         (WebCore::IDBObjectStoreBackendImpl::putInternal):
1515         (WebCore::IDBObjectStoreBackendImpl::deleteInternal):
1516
1517 2012-11-19  Alexander Shalamov  <alexander.shalamov@intel.com>
1518
1519         Improve ContentTypeParser, so that it could be used to validate mime type according to RFC
1520         https://bugs.webkit.org/show_bug.cgi?id=100927
1521
1522         Reviewed by Alexey Proskuryakov.
1523
1524         This patch adds ParsedContentType class that represents contents of parsed
1525         content type string. isValidContentType function could be used to check if
1526         format of the content type string is acorrding to RFC 2616 section 4.2.
1527
1528         * CMakeLists.txt:
1529         * GNUmakefile.list.am:
1530         * Target.pri:
1531         * WebCore.gypi:
1532         * WebCore.xcodeproj/project.pbxproj:
1533         * platform/network/MIMEHeader.cpp:
1534         (WebCore::MIMEHeader::parseHeader):
1535         * platform/network/ParsedContentType.cpp: Renamed from Source/WebCore/platform/network/ContentTypeParser.cpp.
1536         (WebCore):
1537         (EmptyParsedContentType):
1538         (WebCore::EmptyParsedContentType::setContentType):
1539         (WebCore::EmptyParsedContentType::setContentTypeParameter):
1540         (WebCore::skipSpaces):
1541         (WebCore::isTokenCharacter):
1542         (WebCore::parseToken):
1543         (WebCore::parseQuotedString):
1544         (WebCore::substringForRange):
1545         (WebCore::parseContentType):
1546         (WebCore::isValidContentType):
1547         (WebCore::ParsedContentType::ParsedContentType):
1548         (WebCore::ParsedContentType::charset):
1549         (WebCore::ParsedContentType::parameterValueForName):
1550         (WebCore::ParsedContentType::parameterCount):
1551         (WebCore::ParsedContentType::setContentType):
1552         (WebCore::ParsedContentType::setContentTypeParameter):
1553         * platform/network/ParsedContentType.h: Renamed from Source/WebCore/platform/network/ContentTypeParser.h.
1554         (WebCore):
1555         (ParsedContentType):
1556         (WebCore::ParsedContentType::mimeType):
1557
1558 2012-11-19  Erik Arvidsson  <arv@chromium.org>
1559
1560         Update DOMException name: InvalidNodeTypeError
1561         https://bugs.webkit.org/show_bug.cgi?id=102519
1562
1563         Reviewed by Kentaro Hara.
1564
1565         Patch 24 of 25 to update DOMException name to match the spec and Firefox.
1566
1567         No code uses DOMException InvalidNodeTypeError. We do use INVALID_NODE_TYPE_ERR for RangeException. See bug 102515.
1568
1569         * dom/DOMCoreException.cpp:
1570
1571 2012-11-19  Shinya Kawanaka  <shinyak@chromium.org>
1572
1573         Changing id, className, or attribute should invalidate distribution
1574         https://bugs.webkit.org/show_bug.cgi?id=100738
1575
1576         Reviewed by Dimitri Glazkov.
1577
1578         When id, className, or attribute is changed, we might have to invalidate distribution.
1579         However, we don't want to do useless invalidation. So we consult with the RuleFeatureSet of ElementShadow
1580         to invalidate distribution only if necessary.
1581
1582         For the code that className is changed, we can share a lot of code between invalidating distribution and
1583         invalidating style. So we made checkNeedsStyleInvalidationForClassChange a template method, and share it.
1584
1585         Since attributeChanged() is a hot method, we don't want to make it slow. So we made one function to determine
1586         whether we have to invalidate distribution, and make it called only if necessary. Also, we've optimized
1587         shadowOfParentForDistribution() by making isInsertionPoint() de-virtualed. We consuded NodeFlags (IsInsertionPointFlag)
1588         for this purpose.
1589
1590         We've measured how this patch makes changing attribute slow. I've measured each code 3 times.
1591         DOM/ModifyAttribute.html is a micro benchmark which changes attribute a lot of times. The result of this benchmark
1592         will be the most affected by this patch. However, it's only 2% performance regression.
1593
1594         DOM/ModifyAttribute.html
1595         Before this patch:
1596                 median  stdev    min    max    [ms]
1597           1st    494.0   3.36  490.0  502.0
1598           2nd    503.5   3.44  497.0  512.0
1599           3rd    494.0   3.48  488.0  499.0
1600
1601         After this patch:
1602                 median  stdev  min      max    [ms]
1603           1st    504.0   2.00  501.0  509.0
1604           2nd    505.5   3.08  500.0  513.0
1605           3rd    507.0   2.32  502.0  510.0
1606
1607         Tests: fast/dom/shadow/distribution-attribute-modified.html
1608                fast/dom/shadow/distribution-className-modified.html
1609                fast/dom/shadow/distribution-id-modified.html
1610                fast/dom/shadow/reprojection-attribute-modified.html
1611                fast/dom/shadow/reprojection-className-modified.html
1612                fast/dom/shadow/reprojection-id-modified.html
1613
1614         * dom/Element.cpp:
1615         (WebCore::Element::attributeChanged):
1616         (WebCore::HasSelectorForClassStyleFunctor::HasSelectorForClassStyleFunctor):
1617         (HasSelectorForClassStyleFunctor):
1618         (WebCore::HasSelectorForClassStyleFunctor::operator()): Returns true if StyleResolver::hasSelectorForClass returns true.
1619         (WebCore):
1620         (WebCore::HasSelectorForClassDistributionFunctor::HasSelectorForClassDistributionFunctor):
1621         (HasSelectorForClassDistributionFunctor):
1622         (WebCore::HasSelectorForClassDistributionFunctor::operator()): Returns true if ElementShadow::hasSelectForClass returns true.
1623         (WebCore::checkFunctorForClassChange):
1624         (WebCore::checkNeedsStyleInvalidationForClassChange):
1625         (WebCore::checkNeedsDistributionInvalidationForClassChange): Extracted the implementation to checkFunctorForClassChange.
1626         (WebCore::Element::shouldInvalidateDistributionWhenAttributeChanged):
1627         * dom/Element.h:
1628         (Element):
1629         * dom/Node.h:
1630         (WebCore::Node::isInsertionPoint):
1631         * html/HTMLElement.h:
1632         (HTMLElement):
1633         * html/shadow/InsertionPoint.cpp:
1634         (WebCore::InsertionPoint::InsertionPoint):
1635         * html/shadow/InsertionPoint.h:
1636         (InsertionPoint):
1637         (WebCore::isInsertionPoint):
1638         (WebCore::shadowOfParentForDistribution):
1639         (WebCore::resolveReprojection):
1640
1641 2012-11-19  Nate Chapin  <japhet@chromium.org>
1642
1643         Move empty loading to DocumentLoader, simplify FrameLoader::init()
1644         https://bugs.webkit.org/show_bug.cgi?id=101512
1645
1646         Reviewed by Adam Barth.
1647
1648         No new tests, though several outputs changed because we no longer send resource
1649             load callbacks for empty loads.
1650
1651         * loader/DocumentLoader.cpp:
1652         (WebCore::DocumentLoader::DocumentLoader):
1653         (WebCore::DocumentLoader::~DocumentLoader):
1654         (WebCore::DocumentLoader::finishedLoading):
1655         (WebCore::DocumentLoader::clearMainResourceLoader):
1656         (WebCore::DocumentLoader::isLoadingInAPISense):
1657         (WebCore::DocumentLoader::isLoadingMainResource):
1658         (WebCore::DocumentLoader::maybeLoadEmpty):
1659         (WebCore):
1660         (WebCore::DocumentLoader::startLoadingMainResource): Handle empty main resource
1661              loads directly here.
1662         * loader/DocumentLoader.h:
1663         (DocumentLoader):
1664         * loader/FrameLoader.cpp:
1665         (WebCore::FrameLoader::FrameLoader): Initialize some variables whose values
1666             were previously being reset in init(). Given that the FrameLoader is in
1667             an inconsistent state before init() is called anyway, there doesn't seem
1668             to be a disadvantage to just initializing them to their post-init() values.
1669         (WebCore::FrameLoader::init): Just call startLoadingMainResource(), instead of
1670             doing a bunch of direct calls to functions FrameLoader shouldn't know about.
1671         * loader/FrameLoaderStateMachine.cpp:
1672         (WebCore::FrameLoaderStateMachine::FrameLoaderStateMachine):
1673         * loader/FrameLoaderStateMachine.h:
1674         * loader/MainResourceLoader.cpp: Throughout, remove the concept of an empty load.
1675         (WebCore::MainResourceLoader::loadNow): This only returned true when an empty
1676             load got deferred, which won't happen now. Return void and always treat
1677             as returning false.
1678         * loader/MainResourceLoader.h:
1679         (MainResourceLoader):
1680
1681 2012-11-19  Erik Arvidsson  <arv@chromium.org>
1682
1683         Update DOMException name: TimeoutError
1684         https://bugs.webkit.org/show_bug.cgi?id=102513
1685
1686         Reviewed by Kentaro Hara.
1687
1688         Patch 23 of 25 to update DOMException name to match the spec and Firefox.
1689
1690         No code uses DOMException TimeoutError. We do use TIMEOUT_ERR for XMLHttpRequestException. See bug 102506.
1691
1692         * dom/DOMCoreException.cpp:
1693
1694 2012-11-19  Erik Arvidsson  <arv@chromium.org>
1695
1696         Update DOMException name: DataCloneError
1697         https://bugs.webkit.org/show_bug.cgi?id=102521
1698
1699         Reviewed by Kentaro Hara.
1700
1701         Patch 25 of 25 to update DOMException name to match the spec and Firefox.
1702
1703         Updated existing tests.
1704
1705         * dom/DOMCoreException.cpp:
1706
1707 2012-11-19  Tom Hudson  <tomhudson@chromium.org>
1708
1709         Improve performance of RenderBoxModelObject::paintTranslucentBorderSides()
1710         https://bugs.webkit.org/show_bug.cgi?id=98660
1711
1712         Reviewed by Simon Fraser.
1713
1714         Accumulate edges[i].shouldRender() in a flag field and pass that to paintBorderSides()
1715         and paintTranslucentBorderSides() so that we don't do unnecessary work.
1716
1717         If we can avoid setting up and tearing down an unnecessary transparent layer we save
1718         30ms on some mobile platforms.
1719
1720         * rendering/RenderBoxModelObject.h:
1721         * rendering/RenderBoxModelObject.cpp:
1722         (WebCore::RenderBoxModelObject::paintBorder):
1723         (WebCore::RenderBoxModelObject::paintTranslucentBorderSides):
1724
1725 2012-11-19  Hans Muller  <hmuller@adobe.com>
1726
1727         [CSS Exclusions] remove null exclusion shape check from ExclusionShape::createExclusionShape
1728         https://bugs.webkit.org/show_bug.cgi?id=100765
1729
1730         Reviewed by Dirk Schulze.
1731
1732         ExclusionShape::createExclusionShape now ASSERTs that its basicShape argument
1733         isn't null, since the caller is expected to ensure as much.  No new tests were
1734         needed since this is a near-trivial cleanup.
1735
1736         * rendering/ExclusionShape.cpp:
1737         (WebCore::ExclusionShape::createExclusionShape): This method no longer defends against a null basicShape argument by returning null.
1738
1739 2012-11-19  Sami Kyostila  <skyostil@chromium.org>
1740
1741         Use device scale factor instead of physical screen DPI for screen DPI
1742         https://bugs.webkit.org/show_bug.cgi?id=101769
1743
1744         Reviewed by Adam Barth.
1745
1746         Media queries call WebCore::Screen::{horizontal,vertical}DPI() to determine
1747         the dots per CSS inch[1] value for the "screen" media type. On Chromium these
1748         functions currently return the physical screen DPI, which is wrong. To fix
1749         this, we remove both of these functions entirely and make media queries use
1750         the device scale factor multiplied by 96 on all ports.
1751
1752         [1] http://www.w3.org/TR/css3-mediaqueries/#resolution0
1753
1754         * page/Screen.cpp:
1755         (WebCore::Screen::horizontalDPI):
1756         (WebCore::Screen::verticalDPI):
1757         * platform/PlatformScreen.h:
1758         (WebCore):
1759         * platform/blackberry/PlatformScreenBlackBerry.cpp:
1760         * platform/chromium/PlatformScreenChromium.cpp:
1761         * platform/efl/PlatformScreenEfl.cpp:
1762         * platform/gtk/PlatformScreenGtk.cpp:
1763         * platform/mac/PlatformScreenMac.mm:
1764         * platform/qt/PlatformScreenQt.cpp:
1765         * platform/win/PlatformScreenWin.cpp:
1766         * platform/wx/ScreenWx.cpp:
1767
1768 2012-11-19  Julien Chaffraix  <jchaffraix@webkit.org>
1769
1770         Computed grid items' positions shouldn't be using Length
1771         https://bugs.webkit.org/show_bug.cgi?id=102537
1772
1773         Reviewed by Tony Chang.
1774
1775         This change refactors how we store the grid items' position to use
1776         a new type GridPosition. Length was a temporary type as it supported
1777         'auto' | <integer> but it was starting to get more and more confusing
1778         as we were implementing the layout routines.
1779
1780         No change in behavior.
1781
1782         * GNUmakefile.list.am:
1783         * WebCore.gypi:
1784         * WebCore.vcproj/WebCore.vcproj:
1785         * WebCore.xcodeproj/project.pbxproj:
1786         Added the new file to the build systems.
1787
1788         * rendering/style/RenderStyle.h:
1789         Updated after the type change. Also made some getters
1790         return a const reference instead of forcing a copy.
1791
1792         * rendering/style/StyleGridItemData.h:
1793         (StyleGridItemData):
1794         Ditto, also removed a comment about adding a new type.
1795
1796         * css/CSSComputedStyleDeclaration.cpp:
1797         (WebCore::valueForGridPosition):
1798         * css/StyleResolver.cpp:
1799         (WebCore::createGridPosition):
1800         (WebCore::StyleResolver::applyProperty):
1801         * rendering/RenderGrid.cpp:
1802         (WebCore::RenderGrid::resolveGridPosition):
1803         Updated these sites after switching to GridPosition.
1804
1805         * rendering/RenderGrid.h:
1806         Changed resolveGridPosition signature: it now takes a GridPosition.
1807
1808         * rendering/style/GridPosition.h: Added.
1809         (WebCore::GridPosition::GridPosition):
1810         Default constructor, creates an 'auto' position.
1811
1812         (WebCore::GridPosition::isPositive):
1813         (WebCore::GridPosition::type):
1814         (WebCore::GridPosition::isAuto):
1815         (WebCore::GridPosition::setIntegerPosition):
1816         (WebCore::GridPosition::integerPosition):
1817         Helper functions.
1818
1819         (WebCore::GridPosition::operator==):
1820         Required comparison operator for StyleGridItemData.
1821
1822 2012-11-19  Thiago Marcos P. Santos  <thiago.santos@intel.com>
1823
1824         Apply the resolved viewport rules
1825         https://bugs.webkit.org/show_bug.cgi?id=95964
1826
1827         Reviewed by Kenneth Rohde Christiansen.
1828
1829         This patch implements the CSS Device Adaptation specification. The
1830         WebKit implementation relies on the already implemented Viewport Meta
1831         infrastructure to notify the browser of viewport changes.
1832
1833         The implementation was tests with success on the Qt and EFL ports, but
1834         basically every port supporting Viewport Meta should be fine.
1835
1836         The usage of @-webkit-viewport inside media queries (more tests coming
1837         to map all the corner cases) is currently limited when the media query
1838         depends on the viewport dimensions itself. Defining the width and height
1839         based on screen size will fail on ports reporting the screen
1840         size as the size of the browser window instead of the device screen.
1841
1842         Tests: css3/device-adapt/opera/cascading-001.xhtml
1843                css3/device-adapt/opera/cascading-002.xhtml
1844                css3/device-adapt/opera/cascading-003.xhtml
1845                css3/device-adapt/opera/cascading-004.xhtml
1846                css3/device-adapt/opera/constrain-001.xhtml
1847                css3/device-adapt/opera/constrain-002.xhtml
1848                css3/device-adapt/opera/constrain-003.xhtml
1849                css3/device-adapt/opera/constrain-004.xhtml
1850                css3/device-adapt/opera/constrain-005.xhtml
1851                css3/device-adapt/opera/constrain-006.xhtml
1852                css3/device-adapt/opera/constrain-007.xhtml
1853                css3/device-adapt/opera/constrain-008.xhtml
1854                css3/device-adapt/opera/constrain-009.xhtml
1855                css3/device-adapt/opera/constrain-010.xhtml
1856                css3/device-adapt/opera/constrain-011.xhtml
1857                css3/device-adapt/opera/constrain-012.xhtml
1858                css3/device-adapt/opera/constrain-013.xhtml
1859                css3/device-adapt/opera/constrain-014.xhtml
1860                css3/device-adapt/opera/constrain-015.xhtml
1861                css3/device-adapt/opera/constrain-016.xhtml
1862                css3/device-adapt/opera/constrain-017.xhtml
1863                css3/device-adapt/opera/constrain-020.xhtml
1864                css3/device-adapt/opera/syntax-001.xhtml
1865                css3/device-adapt/opera/syntax-002.xhtml
1866                css3/device-adapt/opera/syntax-003.xhtml
1867
1868         * CMakeLists.txt:
1869         * GNUmakefile.list.am:
1870         * Target.pri:
1871         * WebCore.gypi:
1872         * WebCore.vcproj/WebCore.vcproj:
1873         * WebCore.xcodeproj/project.pbxproj:
1874         * css/CSSAllInOne.cpp:
1875         * css/RuleSet.cpp:
1876         (WebCore::RuleSet::addRulesFromSheet):
1877         * css/StyleResolver.cpp:
1878         (WebCore::StyleResolver::StyleResolver):
1879         (WebCore::StyleResolver::appendAuthorStyleSheets):
1880         (WebCore::StyleResolver::~StyleResolver):
1881         * css/StyleResolver.h:
1882         (StyleResolver):
1883         (WebCore::StyleResolver::viewportStyleResolver):
1884         * css/ViewportStyleResolver.cpp: Added.
1885         (WebCore):
1886         (WebCore::ViewportStyleResolver::ViewportStyleResolver):
1887         (WebCore::ViewportStyleResolver::addViewportRule):
1888         (WebCore::ViewportStyleResolver::clearDocument):
1889         (WebCore::ViewportStyleResolver::resolve):
1890         (WebCore::ViewportStyleResolver::getViewportArgumentValue):
1891         * css/ViewportStyleResolver.h: Added.
1892         (WebCore):
1893         (ViewportStyleResolver):
1894         (WebCore::ViewportStyleResolver::create):
1895         * dom/Document.h:
1896         (WebCore::Document::setViewportArguments):
1897         * dom/ViewportArguments.cpp:
1898         (WebCore::compareIgnoringAuto):
1899         (WebCore):
1900         (WebCore::ViewportArguments::resolve):
1901         * dom/ViewportArguments.h:
1902         (ViewportAttributes):
1903         (WebCore::ViewportArguments::ViewportArguments):
1904         (ViewportArguments):
1905         (WebCore::ViewportArguments::operator==):
1906
1907 2012-11-19  Erik Arvidsson  <arv@chromium.org>
1908
1909         Update DOMException name: SecurityError
1910         https://bugs.webkit.org/show_bug.cgi?id=102437
1911
1912         Reviewed by Kentaro Hara.
1913
1914         Patch 18 of 25 to update DOMException name to match the spec and Firefox.
1915
1916         Updated existing tests.
1917
1918         * dom/DOMCoreException.cpp:
1919
1920 2012-11-19  Erik Arvidsson  <arv@chromium.org>
1921
1922         Update DOMException name: URLMismatchError
1923         https://bugs.webkit.org/show_bug.cgi?id=102511
1924
1925         Reviewed by Kentaro Hara.
1926
1927         Patch 21 of 25 to update DOMException name to match the spec and Firefox.
1928
1929         Updated existing tests.
1930
1931         * dom/DOMCoreException.cpp:
1932         (WebCore):
1933
1934 2012-11-19  Kihong Kwon  <kihong.kwon@samsung.com>
1935
1936         Add PROXIMITY_EVENTS feature
1937         https://bugs.webkit.org/show_bug.cgi?id=102658
1938
1939         Reviewed by Kentaro Hara.
1940
1941         Add PROXIMITY_EVENTS feature to xcode project for WebCorei and GNU make.
1942
1943         No new tests. Just add a new feature.
1944
1945         * Configurations/FeatureDefines.xcconfig:
1946         * GNUmakefile.features.am:
1947
1948 2012-11-19  Alexei Filippov  <alph@chromium.org>
1949
1950         Web Inspector: Dim a component's subitems' color in NMI snapshot
1951         https://bugs.webkit.org/show_bug.cgi?id=102224
1952
1953         Reviewed by Yury Semikhatsky.
1954
1955         * inspector/front-end/NativeMemorySnapshotView.js:
1956         (WebInspector.NativeSnapshotNode.prototype._createSizeCell):
1957         * inspector/front-end/nativeMemoryProfiler.css:
1958         (.native-snapshot-view .data-grid .dimmed div.size-bar):
1959
1960 2012-11-19  Erik Arvidsson  <arv@chromium.org>
1961
1962         Update DOMException name: NetworkError
1963         https://bugs.webkit.org/show_bug.cgi?id=102503
1964
1965         Reviewed by Kentaro Hara.
1966
1967         Patch 19 of 25 to update DOMException name to match the spec and Firefox.
1968
1969         No code uses DOMException NetworkError. We do use NETWORK_ERR for XMLHttpRequestException. See bug 102506.
1970
1971         * dom/DOMCoreException.cpp:
1972
1973 2012-11-19  Ilya Tikhonovsky  <loislo@chromium.org>
1974
1975         webaudio: clean-up. Replace AudioContext::m_document member with ContextDestructionObserver::scriptExecutionContext().
1976         https://bugs.webkit.org/show_bug.cgi?id=102649
1977
1978         Reviewed by Adam Barth.
1979
1980         AudioContext uses m_document only as a pointer to ScriptExecutionContext.
1981         It could be safely replaced with ContextDestructionObserver::m_scriptExecutionContext.
1982         The lifetime of m_scriptExecutionContext is slightly different but it could be adjusted by m_isStopScheduled flag.
1983
1984         No new tests as there is no new functionality.
1985
1986         * Modules/webaudio/AudioBufferSourceNode.cpp:
1987         (WebCore::AudioBufferSourceNode::looping):
1988         (WebCore::AudioBufferSourceNode::setLooping):
1989         * Modules/webaudio/AudioContext.cpp:
1990         (WebCore::AudioContext::AudioContext):
1991         (WebCore::AudioContext::stop):
1992         (WebCore::AudioContext::scriptExecutionContext):
1993         (WebCore::AudioContext::fireCompletionEvent):
1994         (WebCore::AudioContext::reportMemoryUsage):
1995         * Modules/webaudio/AudioContext.h:
1996         (AudioContext):
1997         * Modules/webaudio/ScriptProcessorNode.cpp:
1998         (WebCore::ScriptProcessorNode::fireProcessEvent):
1999         (WebCore::ScriptProcessorNode::scriptExecutionContext):
2000
2001 2012-11-19  Ilya Tikhonovsky  <loislo@chromium.org>
2002
2003         webaudio: leak: AudioContext objects are leaking. They retain 36mb of shared data.
2004         https://bugs.webkit.org/show_bug.cgi?id=102356
2005
2006         Reviewed by Adam Barth.
2007
2008         A clean-up code was moved from uninitialize to clear method.
2009         AudioContext marks itself as hasPendingActivity in method constructCommon and unmarks itself in method clear.
2010         m_isStopScheduled filters out second ActiveDOMObject::stop call.
2011         markForDeletion appends AudioNode pointer to m_nodesToDelete array if there is no active audio thread.
2012         adoptRef was added in createOfflineContext method.
2013         A guard was added into deleteMarkedNodes.
2014
2015         Test: inspector-protocol/nmi-webaudio-leak-test.html
2016
2017         * Modules/webaudio/AudioContext.cpp:
2018         (WebCore::AudioContext::createOfflineContext):
2019         (WebCore::AudioContext::AudioContext):
2020         (WebCore::AudioContext::constructCommon):
2021         (WebCore::AudioContext::~AudioContext):
2022         (WebCore::AudioContext::clear):
2023         (WebCore::AudioContext::uninitialize):
2024         (WebCore::AudioContext::stopDispatch):
2025         (WebCore::AudioContext::stop):
2026         (WebCore::AudioContext::markForDeletion):
2027         (WebCore::AudioContext::scheduleNodeDeletion):
2028         (WebCore::AudioContext::deleteMarkedNodes):
2029         * Modules/webaudio/AudioContext.h:
2030         (AudioContext):
2031         * bindings/v8/custom/V8AudioContextCustom.cpp:
2032         (WebCore::V8AudioContext::constructorCallback):
2033         * inspector/InspectorMemoryAgent.cpp:
2034         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2035         * platform/PlatformMemoryInstrumentation.cpp:
2036         (WebCore::PlatformMemoryInstrumentation::reportMemoryUsage):
2037         (WebCore):
2038         * platform/PlatformMemoryInstrumentation.h:
2039         (PlatformMemoryInstrumentation):
2040         (WebCore):
2041
2042 2012-11-19  Erik Arvidsson  <arv@chromium.org>
2043
2044         Update DOMException name: QuotaExceededError
2045         https://bugs.webkit.org/show_bug.cgi?id=102512
2046
2047         Reviewed by Kentaro Hara.
2048
2049         Patch 22 of 25 to update DOMException name to match the spec and Firefox.
2050
2051         Updated existing tests.
2052
2053         * dom/DOMCoreException.cpp:
2054
2055 2012-11-19  Erik Arvidsson  <arv@chromium.org>
2056
2057         Update DOMException name: AbortError
2058         https://bugs.webkit.org/show_bug.cgi?id=102508
2059
2060         Reviewed by Kentaro Hara.
2061
2062         Patch 20 of 25 to update DOMException name to match the spec and Firefox.
2063
2064         No code uses DOMException AbortError. We do use ABORT_ERR for XMLHttpRequestException. See bug 102506.
2065
2066         * dom/DOMCoreException.cpp:
2067
2068 2012-11-19  Kentaro Hara  <haraken@chromium.org>
2069
2070         Unreviewed, rolling out r135111.
2071         http://trac.webkit.org/changeset/135111
2072         https://bugs.webkit.org/show_bug.cgi?id=102356
2073
2074         The patch caused crashes in several layout tests
2075
2076         * Modules/webaudio/AudioContext.cpp:
2077         (WebCore::AudioContext::createOfflineContext):
2078         (WebCore::AudioContext::AudioContext):
2079         (WebCore::AudioContext::constructCommon):
2080         (WebCore::AudioContext::~AudioContext):
2081         (WebCore::AudioContext::uninitialize):
2082         (WebCore::AudioContext::uninitializeDispatch):
2083         (WebCore::AudioContext::stop):
2084         (WebCore::AudioContext::markForDeletion):
2085         (WebCore::AudioContext::scheduleNodeDeletion):
2086         (WebCore::AudioContext::deleteMarkedNodes):
2087         * Modules/webaudio/AudioContext.h:
2088         (AudioContext):
2089         * bindings/v8/custom/V8AudioContextCustom.cpp:
2090         (WebCore::V8AudioContext::constructorCallback):
2091         * inspector/InspectorMemoryAgent.cpp:
2092         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2093         * platform/PlatformMemoryInstrumentation.cpp:
2094         (WebCore):
2095         * platform/PlatformMemoryInstrumentation.h:
2096
2097 2012-11-19  Kentaro Hara  <haraken@chromium.org>
2098
2099         Unreviewed, rolling out r135116.
2100         http://trac.webkit.org/changeset/135116
2101         https://bugs.webkit.org/show_bug.cgi?id=102649
2102
2103         Revert this patch to revert r135111, which caused crashes in
2104         several layout tests
2105
2106         * Modules/webaudio/AudioBufferSourceNode.cpp:
2107         (WebCore::AudioBufferSourceNode::looping):
2108         (WebCore::AudioBufferSourceNode::setLooping):
2109         * Modules/webaudio/AudioContext.cpp:
2110         (WebCore::AudioContext::AudioContext):
2111         (WebCore::AudioContext::stop):
2112         (WebCore::AudioContext::document):
2113         (WebCore):
2114         (WebCore::AudioContext::hasDocument):
2115         (WebCore::AudioContext::scriptExecutionContext):
2116         (WebCore::AudioContext::fireCompletionEvent):
2117         (WebCore::AudioContext::reportMemoryUsage):
2118         * Modules/webaudio/AudioContext.h:
2119         (AudioContext):
2120         * Modules/webaudio/ScriptProcessorNode.cpp:
2121         (WebCore::ScriptProcessorNode::fireProcessEvent):
2122         (WebCore::ScriptProcessorNode::scriptExecutionContext):
2123
2124 2012-11-19  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2125
2126         Web Inspector: Refine JsDoc in DebuggerScriptMapping.js
2127         https://bugs.webkit.org/show_bug.cgi?id=102673
2128
2129         Reviewed by Vsevolod Vlasov.
2130
2131         DebuggerScriptMapping calls public method "addScript" not defined
2132         in SourceMapping interface.
2133
2134         To make things clear I've added ScriptSourceMapping interface that
2135         extends SourceMapping interface by adding "addScript" method.
2136
2137         * inspector/front-end/SourceMapping.js: Added "ScriptSourceMapping".
2138         * inspector/front-end/CompilerScriptMapping.js:
2139         Updated "@implements" to ScriptSourceMapping.
2140         * inspector/front-end/ResourceScriptMapping.js: Ditto.
2141         * inspector/front-end/ScriptSnippetModel.js: Ditto.
2142         * inspector/front-end/DebuggerScriptMapping.js: Updated signatures.
2143         Removed useless code.
2144
2145 2012-11-19  Tim Horton  <timothy_horton@apple.com>
2146
2147         Unreviewed, untested build fix.
2148
2149         * bindings/scripts/IDLParser.pm:
2150         (parseModule):
2151
2152 2012-11-19  Dongwoo Joshua Im  <dw.im@samsung.com>
2153
2154         [CSS3] Move CSSPropertyWebkitTextAlignLast into isValidKeywordPropertyAndValue function
2155         https://bugs.webkit.org/show_bug.cgi?id=102303
2156
2157         Reviewed by Alexis Menard.
2158
2159         Move the part which check whether CSSPropertyWebkitTextAlignLast has available value
2160         into the isValidKeywordPropertyAndValue function, like the same kind of properties.
2161         This will help speed wise in JS.
2162
2163         No new functionality, no new tests.
2164
2165         * css/CSSParser.cpp:
2166         (WebCore::isValidKeywordPropertyAndValue):
2167         (WebCore::isKeywordPropertyID):
2168         (WebCore::CSSParser::parseValue):
2169
2170 2012-11-19  Keishi Hattori  <keishi@webkit.org>
2171
2172         REGRESSION (r133565): Calendar picker isn't animating when changing month by pressing 't'
2173         https://bugs.webkit.org/show_bug.cgi?id=102660
2174
2175         Reviewed by Kent Tamura.
2176
2177         The calendar picker used to animate when you press 't'.
2178
2179         No new tests.
2180
2181         * Resources/pagepopups/calendarPicker.js:
2182         (DaysTable.prototype.selectRange):
2183
2184 2012-11-19  Kent Tamura  <tkent@chromium.org>
2185
2186         input.value="" should clear date/time input elements with partial values
2187         https://bugs.webkit.org/show_bug.cgi?id=102645
2188
2189         Reviewed by Kentaro Hara.
2190
2191         Tests: fast/forms/date-multiple-fields/date-multiple-fields-value-set-empty.html
2192                fast/forms/datetime-multiple-fields/datetime-multiple-fields-value-set-empty.html
2193                fast/forms/datetimelocal-multiple-fields/datetimelocal-multiple-fields-value-set-empty.html
2194                fast/forms/month-multiple-fields/month-multiple-fields-value-set-empty.html
2195                fast/forms/time-multiple-fields/time-multiple-fields-value-set-empty.html
2196                fast/forms/week-multiple-fields/week-multiple-fields-value-set-empty.html
2197
2198         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2199         (WebCore::BaseMultipleFieldsDateAndTimeInputType::setValue):
2200         If the new value is an empty string and sub-fields has values, we should
2201         update the UI value to the empty state.
2202         * html/DateTimeFieldsState.h:
2203         (WebCore::DateTimeFieldsState::hasAnyValue):
2204         Added. It returns true if one or more sub-fields are not empty.
2205
2206 2012-11-19  Andrey Adaikin  <aandrey@chromium.org>
2207
2208         Web Inspector: [Canvas] if many canvases are being instrumented show the screenshot of the first one
2209         https://bugs.webkit.org/show_bug.cgi?id=102522
2210
2211         Reviewed by Yury Semikhatsky.
2212
2213         When many canvases are being instrumented we'll want to show replay screenshots for each canvas.
2214         Meanwhile, show the screenshot of the first one (instead of the last one), as it's likely to be the "main" canvas.
2215         Drive-by: add more typification for the JS compiler.
2216         Drive-by: create a new canvas for WebGL replay every time (similar to 2D replay) to avoid problems with resetting the context state.
2217
2218         * inspector/InjectedScriptCanvasModuleSource.js:
2219         (.):
2220
2221 2012-11-19  Kentaro Hara  <haraken@chromium.org>
2222
2223         Remove IDLStructure.pm
2224         https://bugs.webkit.org/show_bug.cgi?id=102642
2225
2226         Reviewed by Adam Barth.
2227
2228         Previously IDLStructure.pm was full of regular expressions to
2229         parse IDL files. Now a new IDL parser is implemented, IDLStructure.pm
2230         just contains several data structures for the IDL parser. We can
2231         move them to IDLParser.pm and thus remove IDLStructure.pm.
2232
2233         No tests. No change in generated code.
2234
2235         * CMakeLists.txt:
2236         * DerivedSources.make:
2237         * DerivedSources.pri:
2238         * GNUmakefile.am:
2239         * WebCore.gyp/WebCore.gyp:
2240         * WebCore.vcproj/MigrateScripts:
2241         * WebCore.vcproj/WebCore.vcproj:
2242         * WebCore.xcodeproj/project.pbxproj:
2243         * bindings/scripts/IDLParser.pm:
2244         (Parse):
2245         (parseInterface):
2246         (parseException):
2247         (parseConst):
2248         (parseAttributeRest):
2249         (parseOperationRest):
2250         (parseOptionalOrRequiredArgument):
2251         (parseExceptionField):
2252         (parseInterfaceOld):
2253         (parseExceptionOld):
2254         (parseAttributeRestOld):
2255         (applyExtendedAttributeList):
2256         * bindings/scripts/IDLStructure.pm: Removed.
2257
2258 2012-11-19  Alexei Filippov  <alph@chromium.org>
2259
2260         Web Inspector: refine time and bytes output formatting
2261         https://bugs.webkit.org/show_bug.cgi?id=102265
2262
2263         Reviewed by Yury Semikhatsky.
2264
2265         Add a space between number and unit, otherwise it's hard to read things like 88B.
2266         Reduce a number of decimal digits in KB and MB formats. 1023.45KB seems to be too detailed.
2267
2268         * English.lproj/localizedStrings.js:
2269         * inspector/front-end/CookiesTable.js:
2270         (WebInspector.CookiesTable.prototype._createGridNode):
2271         * inspector/front-end/UIUtils.js:
2272         (Number.secondsToString):
2273         (Number.bytesToString):
2274
2275 2012-11-19  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2276
2277         Web Inspector: Timeline: DomContentLoaded event labeled incorrectly
2278         https://bugs.webkit.org/show_bug.cgi?id=102383
2279
2280         Reviewed by Yury Semikhatsky.
2281
2282         Fixed string presentation of event.
2283
2284         * inspector/front-end/TimelinePresentationModel.js: Fixed string.
2285
2286 2012-11-19  Kentaro Hara  <haraken@chromium.org>
2287
2288         Remove IDLStructure.pm
2289         https://bugs.webkit.org/show_bug.cgi?id=102642
2290
2291         Reviewed by Adam Barth.
2292
2293         Previously IDLStructure.pm was full of regular expressions to
2294         parse IDL files. Now a new IDL parser is implemented, IDLStructure.pm
2295         just contains several data structures for the IDL parser. We can
2296         move them to IDLParser.pm and thus remove IDLStructure.pm.
2297
2298         No tests. No change in generated code.
2299
2300         * CMakeLists.txt:
2301         * DerivedSources.make:
2302         * DerivedSources.pri:
2303         * GNUmakefile.am:
2304         * WebCore.gyp/WebCore.gyp:
2305         * WebCore.vcproj/MigrateScripts:
2306         * WebCore.vcproj/WebCore.vcproj:
2307         * WebCore.xcodeproj/project.pbxproj:
2308         * bindings/scripts/IDLParser.pm:
2309         (Parse):
2310         (parseInterface):
2311         (parseException):
2312         (parseConst):
2313         (parseAttributeRest):
2314         (parseOperationRest):
2315         (parseOptionalOrRequiredArgument):
2316         (parseExceptionField):
2317         (parseInterfaceOld):
2318         (parseExceptionOld):
2319         (parseAttributeRestOld):
2320         (applyExtendedAttributeList):
2321         * bindings/scripts/IDLStructure.pm: Removed.
2322
2323 2012-11-19  Alexei Filippov  <alph@chromium.org>
2324
2325         Web Inspector: refine time and bytes output formatting
2326         https://bugs.webkit.org/show_bug.cgi?id=102265
2327
2328         Reviewed by Yury Semikhatsky.
2329
2330         Add a space between number and unit, otherwise it's hard to read things like 88B.
2331         Reduce a number of decimal digits in KB and MB formats. 1023.45KB seems to be too detailed.
2332
2333         * English.lproj/localizedStrings.js:
2334         * inspector/front-end/CookiesTable.js:
2335         (WebInspector.CookiesTable.prototype._createGridNode):
2336         * inspector/front-end/UIUtils.js:
2337         (Number.secondsToString):
2338         (Number.bytesToString):
2339
2340 2012-11-19  Eugene Klyuchnikov  <eustas.bug@gmail.com>
2341
2342         Web Inspector: Timeline: DomContentLoaded event labeled incorrectly
2343         https://bugs.webkit.org/show_bug.cgi?id=102383
2344
2345         Reviewed by Yury Semikhatsky.
2346
2347         Fixed string presentation of event.
2348
2349         * inspector/front-end/TimelinePresentationModel.js: Fixed string.
2350
2351 2012-11-19  Kentaro Hara  <haraken@chromium.org>
2352
2353         Unreviewed, rolling out r135114.
2354         http://trac.webkit.org/changeset/135114
2355         https://bugs.webkit.org/show_bug.cgi?id=102642
2356
2357         it broke Qt build
2358
2359         * CMakeLists.txt:
2360         * DerivedSources.make:
2361         * DerivedSources.pri:
2362         * GNUmakefile.am:
2363         * WebCore.gyp/WebCore.gyp:
2364         * WebCore.vcproj/MigrateScripts:
2365         * WebCore.vcproj/WebCore.vcproj:
2366         * WebCore.xcodeproj/project.pbxproj:
2367         * bindings/scripts/IDLParser.pm:
2368         (Parse):
2369         (parseInterface):
2370         (parseException):
2371         (parseConst):
2372         (parseAttributeRest):
2373         (parseOperationRest):
2374         (parseOptionalOrRequiredArgument):
2375         (parseExceptionField):
2376         (parseInterfaceOld):
2377         (parseExceptionOld):
2378         (parseAttributeRestOld):
2379         (applyExtendedAttributeList):
2380         * bindings/scripts/IDLStructure.pm: Added.
2381
2382 2012-11-19  Vsevolod Vlasov  <vsevik@chromium.org>
2383
2384         Unreviewed inspector closure compilation fix.
2385
2386         * inspector/front-end/ObjectPropertiesSection.js:
2387         * inspector/front-end/externs.js:
2388
2389 2012-11-18  Ilya Tikhonovsky  <loislo@chromium.org>
2390
2391         webaudio: clean-up. Replace AudioContext::m_document member with ContextDestructionObserver::scriptExecutionContext().
2392         https://bugs.webkit.org/show_bug.cgi?id=102649
2393
2394         Reviewed by Adam Barth.
2395
2396         AudioContext uses m_document only as a pointer to ScriptExecutionContext.
2397         It could be safely replaced with ContextDestructionObserver::m_scriptExecutionContext.
2398         The lifetime of m_scriptExecutionContext is slightly different but it could be adjusted by m_isStopScheduled flag.
2399
2400         No new tests as there is no new functionality.
2401
2402         * Modules/webaudio/AudioBufferSourceNode.cpp:
2403         (WebCore::AudioBufferSourceNode::looping):
2404         (WebCore::AudioBufferSourceNode::setLooping):
2405         * Modules/webaudio/AudioContext.cpp:
2406         (WebCore::AudioContext::AudioContext):
2407         (WebCore::AudioContext::stop):
2408         (WebCore::AudioContext::fireCompletionEvent):
2409         (WebCore::AudioContext::reportMemoryUsage):
2410         * Modules/webaudio/AudioContext.h:
2411         (WebCore::AudioContext::scriptExecutionContext):
2412         (AudioContext):
2413         * Modules/webaudio/ScriptProcessorNode.cpp:
2414         (WebCore::ScriptProcessorNode::fireProcessEvent):
2415         (WebCore::ScriptProcessorNode::scriptExecutionContext):
2416
2417 2012-11-18  Kentaro Hara  <haraken@chromium.org>
2418
2419         [V8] Remove unused variables from CodeGeneratorV8.pm
2420         https://bugs.webkit.org/show_bug.cgi?id=102648
2421
2422         Reviewed by Adam Barth.
2423
2424         No tests. No change in generated code.
2425
2426         * bindings/scripts/CodeGeneratorV8.pm:
2427         (GenerateInterface):
2428         (GenerateHeader):
2429         (GetInternalFields):
2430         (GenerateNormalAttrGetter):
2431         (GenerateSingleBatchedAttribute):
2432         (GenerateImplementationCustomCall):
2433         (GenerateFunctionCallString):
2434         (CreateCustomSignature):
2435         (GetContextEnableFunction):
2436
2437 2012-11-18  Kentaro Hara  <haraken@chromium.org>
2438
2439         Remove IDLStructure.pm
2440         https://bugs.webkit.org/show_bug.cgi?id=102642
2441
2442         Reviewed by Adam Barth.
2443
2444         Previously IDLStructure.pm was full of regular expressions to
2445         parse IDL files. Now a new IDL parser is implemented, IDLStructure.pm
2446         just contains several data structures for the IDL parser. We can
2447         move them to IDLParser.pm and thus remove IDLStructure.pm.
2448
2449         No tests. No change in generated code.
2450
2451         * CMakeLists.txt:
2452         * DerivedSources.make:
2453         * DerivedSources.pri:
2454         * GNUmakefile.am:
2455         * WebCore.gyp/WebCore.gyp:
2456         * WebCore.vcproj/MigrateScripts:
2457         * WebCore.vcproj/WebCore.vcproj:
2458         * WebCore.xcodeproj/project.pbxproj:
2459         * bindings/scripts/IDLParser.pm:
2460         (Parse):
2461         (parseInterface):
2462         (parseException):
2463         (parseConst):
2464         (parseAttributeRest):
2465         (parseOperationRest):
2466         (parseOptionalOrRequiredArgument):
2467         (parseExceptionField):
2468         (parseInterfaceOld):
2469         (parseExceptionOld):
2470         (parseAttributeRestOld):
2471         (applyExtendedAttributeList):
2472         * bindings/scripts/IDLStructure.pm: Removed.
2473
2474 2012-11-18  Kentaro Hara  <haraken@chromium.org>
2475
2476         [V8] Make more use of $v8Interface in CodeGeneratorV8.pm
2477         https://bugs.webkit.org/show_bug.cgi?id=102639
2478
2479         Reviewed by Adam Barth.
2480
2481         We can replace hard-coded "V8${interfaceName}" with $v8Interface.
2482
2483         No tests. No change in generated code.
2484
2485         * bindings/scripts/CodeGeneratorV8.pm:
2486         (GenerateNormalAttrGetter):
2487         (GenerateNormalAttrSetter):
2488         (GenerateFunctionCallback):
2489         (GenerateNamedConstructorCallback):
2490         (GenerateImplementationIndexer):
2491         (GenerateImplementationNamedPropertyGetter):
2492         (GenerateImplementation):
2493
2494 2012-11-16  Ilya Tikhonovsky  <loislo@chromium.org>
2495
2496         webaudio: leak: AudioContext objects are leaking. They retain 36mb of shared data.
2497         https://bugs.webkit.org/show_bug.cgi?id=102356
2498
2499         Reviewed by Adam Barth.
2500
2501         A clean-up code was moved from uninitialize to clear method.
2502         AudioContext marks itself as hasPendingActivity in method constructCommon and unmarks itself in method clear.
2503         m_isStopScheduled filters out second ActiveDOMObject::stop call.
2504         markForDeletion appends AudioNode pointer to m_nodesToDelete array if there is no active audio thread.
2505         adoptRef was added in createOfflineContext method.
2506
2507         Test: inspector-protocol/nmi-webaudio-leak-test.html
2508
2509         * Modules/webaudio/AudioContext.cpp:
2510         (WebCore::AudioContext::createOfflineContext):
2511         (WebCore::AudioContext::AudioContext):
2512         (WebCore::AudioContext::constructCommon):
2513         (WebCore::AudioContext::~AudioContext):
2514         (WebCore::AudioContext::clear):
2515         (WebCore::AudioContext::uninitialize):
2516         (WebCore::AudioContext::stopDispatch):
2517         (WebCore::AudioContext::stop):
2518         (WebCore::AudioContext::markForDeletion):
2519         (WebCore::AudioContext::scheduleNodeDeletion):
2520         (WebCore::AudioContext::deleteMarkedNodes):
2521         * Modules/webaudio/AudioContext.h:
2522         (AudioContext):
2523         * bindings/v8/custom/V8AudioContextCustom.cpp:
2524         (WebCore::V8AudioContext::constructorCallback):
2525         * inspector/InspectorMemoryAgent.cpp:
2526         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
2527         * platform/PlatformMemoryInstrumentation.cpp:
2528         (WebCore::PlatformMemoryInstrumentation::reportMemoryUsage):
2529         (WebCore):
2530         * platform/PlatformMemoryInstrumentation.h:
2531         (PlatformMemoryInstrumentation):
2532         (WebCore):
2533
2534 2012-11-18  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2535
2536         min/max/step support for calendar picker on datetime/datetime-local
2537         https://bugs.webkit.org/show_bug.cgi?id=102628
2538
2539         Reviewed by Kent Tamura.
2540
2541         Gray out dates with no allowed values on calendar picker for datetime/datetime-local
2542         when values are limited by min/max/step attributes.
2543
2544         Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-datetime-with-step.html
2545
2546         * Resources/pagepopups/calendarPicker.js:
2547         (CalendarPicker.prototype._stepMismatch):
2548         Returns true iff there are any allowed values in the given day.
2549
2550 2012-11-18  Laszlo Gombos  <l.gombos@samsung.com>
2551
2552         Remove non-existent directories from the make system
2553         https://bugs.webkit.org/show_bug.cgi?id=102632
2554
2555         Reviewed by Adam Barth.
2556
2557         Remove (non-existent) symbian references from the exclude list in gyp project files.
2558
2559         No new tests as there is no new functionality.
2560
2561         * WebCore.gyp/WebCore.gyp:
2562
2563 2012-11-18  Patrick Gansterer  <paroga@webkit.org>
2564
2565         [WIN] Add a IMLangFontLinkType typedef
2566         https://bugs.webkit.org/show_bug.cgi?id=102584
2567
2568         Reviewed by Brent Fulgham.
2569
2570         Add a central typedef for IMLangFontLink(2) to get rid of a bunch of ifdefs.
2571
2572         * platform/graphics/FontCache.h:
2573         (WebCore):
2574         * platform/graphics/win/FontCacheWin.cpp:
2575         (WebCore::FontCache::getFontLinkInterface):
2576         (WebCore::getCJKCodePageMasks):
2577         (WebCore::createMLangFont):
2578         (WebCore::FontCache::getFontDataForCharacters):
2579         * platform/graphics/win/SimpleFontDataWin.cpp:
2580         (WebCore::SimpleFontData::containsCharacters):
2581         * platform/graphics/wince/FontCacheWinCE.cpp:
2582         (WebCore):
2583         (WebCore::FontCache::getFontLinkInterface):
2584         (WebCore::getCJKCodePageMasks):
2585         (WebCore::FontCache::getFontDataForCharacters):
2586         * platform/graphics/wince/FontPlatformData.cpp:
2587         (WebCore::FontFamilyCodePageInfo::codePages):
2588         (WebCore::FixedSizeFontData::create):
2589         * platform/graphics/wince/GlyphPageTreeNodeWinCE.cpp:
2590         (WebCore::GlyphPage::fill):
2591
2592 2012-11-18  Mike West  <mkwst@chromium.org>
2593
2594         Web Inspector: Remove unused ConsoleMessage constructor.
2595         https://bugs.webkit.org/show_bug.cgi?id=102590
2596
2597         Reviewed by Brent Fulgham.
2598
2599         We currently have a ConsoleMessage constructor that's unused. Let's
2600         kill it.
2601
2602         * inspector/ConsoleMessage.cpp:
2603         * inspector/ConsoleMessage.h:
2604         (ConsoleMessage):
2605             Removing an unused constructor variant.
2606
2607 2012-11-18  Andreas Kling  <akling@apple.com>
2608
2609         StyledElement: Make handling the "style" attribute a litte faster.
2610         <http://webkit.org/b/102623>
2611
2612         Reviewed by Ojan Vafai.
2613
2614         We know that "style" is never a presentation attribute, so avoid the virtual call to isPresentationAttribute()
2615         by hoisting the parseAttribute() logic up into attributeChanged().
2616         Did the same thing with Element::parseAttribute() for consistency.
2617
2618         Knocks ~0.6% of samples off of the DOM/CreateNodes performance test.
2619
2620         * dom/Element.cpp:
2621         (WebCore::Element::attributeChanged):
2622         * dom/Element.h:
2623         (WebCore::Element::parseAttribute):
2624         * dom/StyledElement.cpp:
2625         (WebCore::StyledElement::attributeChanged):
2626         * dom/StyledElement.h:
2627         (StyledElement):
2628
2629 2012-11-18  Laszlo Gombos  <l.gombos@samsung.com>
2630
2631         [CMake] Consolidate common input files
2632         https://bugs.webkit.org/show_bug.cgi?id=101632
2633
2634         Reviewed by Rob Buis.
2635
2636         Consolidate and sort the list of files, move common source files
2637         into CMakeLists.txt from the port specific files.
2638
2639         No new tests as there is no new functionality.
2640
2641         * CMakeLists.txt:
2642         * PlatformBlackBerry.cmake:
2643         * PlatformEfl.cmake:
2644         * PlatformWinCE.cmake:
2645
2646 2012-11-18  Andreas Kling  <akling@apple.com>
2647
2648         Tighten small SharedBuffers by reserving the exact amount of space needed.
2649         <http://webkit.org/b/102625>
2650
2651         Reviewed by Anders Carlsson.
2652
2653         When adding the first chunk to a small (<4096 bytes) SharedBuffer, reserve the exact
2654         amount of space needed instead of leaving it to Vector<char>::append().
2655
2656         1.86MB progression on Membuster3.
2657
2658         * platform/SharedBuffer.cpp:
2659         (WebCore::SharedBuffer::append):
2660
2661 2012-11-18  Ryosuke Niwa  <rniwa@webkit.org>
2662
2663         Make namedItem return a node list only in HTMLFormControlsCollection and HTMLOptionsCollection
2664         https://bugs.webkit.org/show_bug.cgi?id=101311
2665
2666         Reviewed by Darin Adler.
2667
2668         Introduce two new interfaces HTMLFormControlsCollection and HTMLOptionsCollection to be used by form.elements
2669         and select.options. These two interfaces have the named getter and namedItem that returns a live NodeList when
2670         there are multiple matches. Introducing these two interfaces allow us to make "regular" HTMLCollection's named
2671         getter and namedItem return exactly one node or null as specified in HTML5:
2672         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#collections-0
2673
2674         Unfortunately, HTMLOptionsCollection still has a bug that its named getter and namedItem returns
2675         a static NodeList instead of a live NodeList (DynamicNodeList) at the moment.
2676
2677         Also got rid of Document::objects since it's not exposed in IDL or called anywhere.
2678
2679         Test: fast/dom/html-collections-namedItem.html
2680
2681         * CMakeLists.txt:
2682         * DerivedSources.cpp:
2683         * DerivedSources.make:
2684         * DerivedSources.pri:
2685         * GNUmakefile.list.am:
2686         * Target.pri:
2687         * UseJSC.cmake:
2688         * UseV8.cmake:
2689         * WebCore.gypi:
2690         * WebCore.vcproj/WebCore.vcproj:
2691         * WebCore.xcodeproj/project.pbxproj:
2692         * bindings/js/JSBindingsAllInOne.cpp:
2693         * bindings/js/JSHTMLAllCollectionCustom.cpp:
2694         (WebCore::getNamedItems):
2695         * bindings/js/JSHTMLCollectionCustom.cpp:
2696         (WebCore::JSHTMLCollection::nameGetter): Now returns exactly one node or null.
2697         (WebCore::toJS):
2698         * bindings/js/JSHTMLFormControlsCollectionCustom.cpp: Added.
2699         (WebCore::getNamedItems): Returns RadioNodeList when there are multiple matches.
2700         (WebCore::JSHTMLFormControlsCollection::canGetItemsForName):
2701         (WebCore::JSHTMLFormControlsCollection::nameGetter):
2702         (WebCore::JSHTMLFormControlsCollection::namedItem):
2703         * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
2704         (WebCore::getNamedItems): Returns a static NodeList when there are multiple matches.
2705         This is a bug. It should be a live NodeList instead.
2706         (WebCore::JSHTMLOptionsCollection::canGetItemsForName):
2707         (WebCore::JSHTMLOptionsCollection::nameGetter):
2708         (WebCore::JSHTMLOptionsCollection::namedItem):
2709         * bindings/js/CodeGeneratorJS.pm: Include JSNode.js for all HTML*Collection interfaces for simplicity.
2710         * bindings/js/CodeGeneratorV8.pm: HTMLOptionsCollection now inherits from HTMLCollection. See
2711         http://www.whatwg.org/specs/web-apps/current-work/multipage/common-dom-interfaces.html#htmloptionscollection
2712         * bindings/v8/custom/V8HTMLAllCollectionCustom.cpp: Pass in isolate when we can.
2713         (WebCore::getNamedItems): Added a comment about how we should be returning
2714         a HTMLCollection when there are multiple matches.
2715         (WebCore::getItem):
2716         (WebCore::V8HTMLAllCollection::namedPropertyGetter):
2717         (WebCore::V8HTMLAllCollection::namedItemCallback):
2718         * bindings/v8/custom/V8HTMLCollectionCustom.cpp: Now returns exactly one node or null.
2719         (WebCore::V8HTMLCollection::namedPropertyGetter):
2720         (WebCore::toV8):
2721         * bindings/v8/custom/V8HTMLFormControlsCollectionCustom.cpp: Added.
2722         (WebCore::getNamedItems): Returns RadioNodeList when there are multiple matches.
2723         (WebCore::V8HTMLFormControlsCollection::namedPropertyGetter):
2724         (WebCore::V8HTMLFormControlsCollection::namedItemCallback):
2725         * bindings/v8/custom/V8HTMLOptionsCollectionCustom.cpp:
2726         (WebCore::getNamedItems): Returns a static NodeList when there are multiple matches.
2727         This is a bug. It should be a live NodeList instead.
2728         (WebCore::V8HTMLOptionsCollection::namedPropertyGetter):
2729         (WebCore::V8HTMLOptionsCollection::namedItemCallback):
2730         * dom/Document.cpp: Removed Document::objects since it was not used anywhere.
2731         * dom/Document.h:
2732         (Document):
2733         * dom/Element.cpp:
2734         (WebCore::ElementRareData::ensureCachedHTMLCollection): form.elements should instantiate
2735         a HTMLFormControlsCollection instead of a HTMLCollection.
2736         * html/CollectionType.h:
2737         * html/HTMLCollection.idl: Removed [Custom] since namedItem is a regular function call now.
2738         * html/HTMLFieldSetElement.cpp:
2739         * html/HTMLFieldSetElement.h:
2740         * html/HTMLFormCollection.cpp: Removed.
2741         * html/HTMLFormCollection.h: Removed.
2742         * html/HTMLFormControlsCollection.cpp: Copied from Source/WebCore/html/HTMLFormCollection.cpp.
2743         (WebCore::HTMLFormControlsCollection::HTMLFormControlsCollection):
2744         (WebCore::HTMLFormControlsCollection::create):
2745         (WebCore::HTMLFormControlsCollection::~HTMLFormControlsCollection):
2746         (WebCore::HTMLFormControlsCollection::formControlElements):
2747         (WebCore::HTMLFormControlsCollection::formImageElements):
2748         (WebCore::HTMLFormControlsCollection::virtualItemAfter):
2749         (WebCore::HTMLFormControlsCollection::namedItem):
2750         (WebCore::HTMLFormControlsCollection::updateNameCache):
2751         * html/HTMLFormControlsCollection.h: Copied from Source/WebCore/html/HTMLFormCollection.h.
2752         (HTMLFormControlsCollection):
2753         * html/HTMLFormControlsCollection.idl: Added.
2754         * html/HTMLFormElement.cpp:
2755         * html/HTMLFormElement.h:
2756         * html/HTMLOptionsCollection.idl:
2757
2758 2012-11-18  Kentaro Hara  <haraken@chromium.org>
2759
2760         [V8] Rename $className to $v8InterfaceName
2761         https://bugs.webkit.org/show_bug.cgi?id=102487
2762
2763         Reviewed by Adam Barth.
2764
2765         In CodeGeneratorV8.pm, $className is always "V8$interfaceName".
2766         We should rename $className to $v8InterfaceName. Also we can
2767         remove GetCallbackClassName().
2768
2769         No tests. No change in behavior.
2770
2771         * bindings/scripts/CodeGeneratorV8.pm:
2772         (GenerateHeader):
2773         (GetHeaderClassInclude):
2774         (GenerateDomainSafeFunctionGetter):
2775         (GenerateDomainSafeFunctionSetter):
2776         (GenerateParametersCheck):
2777         (GenerateImplementation):
2778         (GenerateHeaderContentHeader):
2779         (GenerateImplementationContentHeader):
2780         (GenerateCallbackHeader):
2781         (GenerateCallbackImplementation):
2782         (GenerateToV8Converters):
2783         (GetPassRefPtrType):
2784
2785 2012-11-18  Kentaro Hara  <haraken@chromium.org>
2786
2787         [V8] Remove GetTypeFromSignature() from CodeGeneratorV8.pm
2788         https://bugs.webkit.org/show_bug.cgi?id=102499
2789
2790         Reviewed by Adam Barth.
2791
2792         No tests. No change in behavior.
2793
2794         * bindings/scripts/CodeGeneratorV8.pm:
2795         (GenerateNormalAttrGetter):
2796         (GenerateNormalAttrSetter):
2797         (GenerateParametersCheckExpression):
2798         (GenerateParametersCheck):
2799         (GenerateFunctionCallString):
2800         (GetNativeTypeFromSignature):
2801         (TranslateParameter):
2802         (TypeCanFailConversion):
2803         (JSValueToNative):
2804         (NativeToJSValue):
2805
2806 2012-11-18  Kentaro Hara  <haraken@chromium.org>
2807
2808         Remove GenerateModule() from all code generators
2809         https://bugs.webkit.org/show_bug.cgi?id=102490
2810
2811         Reviewed by Adam Barth.
2812
2813         WebKit IDL files no longer support modules. The Web IDL spec
2814         no longer supports modules. We can remove it from code generators.
2815
2816         No tests. No change in behavior.
2817
2818         * bindings/scripts/CodeGenerator.pm:
2819         (ProcessDocument):
2820         * bindings/scripts/CodeGeneratorCPP.pm:
2821         * bindings/scripts/CodeGeneratorGObject.pm:
2822         * bindings/scripts/CodeGeneratorJS.pm:
2823         * bindings/scripts/CodeGeneratorObjC.pm:
2824         * bindings/scripts/CodeGeneratorV8.pm:
2825
2826 2012-11-18  Kentaro Hara  <haraken@chromium.org>
2827
2828         [V8] Get rid of unused functions and inline redundant functions in CodeGeneratorV8.pm
2829         https://bugs.webkit.org/show_bug.cgi?id=102497
2830
2831         Reviewed by Adam Barth.
2832
2833         No tests. No change in behavior.
2834
2835         * bindings/scripts/CodeGeneratorV8.pm:
2836         (GenerateDomainSafeFunctionGetter):
2837         (GenerateNormalAttrGetter):
2838         (GenerateFunctionCallString):
2839
2840 2012-11-18  Sheriff Bot  <webkit.review.bot@gmail.com>
2841
2842         Unreviewed, rolling out r135074.
2843         http://trac.webkit.org/changeset/135074
2844         https://bugs.webkit.org/show_bug.cgi?id=102619
2845
2846         Made most layout tests crash. (Requested by rakuco on
2847         #webkit).
2848
2849         * PlatformEfl.cmake:
2850         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
2851         (WebCore::GraphicsContext3D::create):
2852         (WebCore::GraphicsContext3D::GraphicsContext3D):
2853         (WebCore::GraphicsContext3D::~GraphicsContext3D):
2854         (WebCore::GraphicsContext3D::makeContextCurrent):
2855         (WebCore::GraphicsContext3D::setContextLostCallback):
2856         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
2857         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
2858         (WebCore::GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
2859         (WebCore::GraphicsContext3DPrivate::createSurface):
2860         (WebCore::GraphicsContext3DPrivate::setCurrentGLContext):
2861         (WebCore::GraphicsContext3DPrivate::platformGraphicsContext3D):
2862         (WebCore::GraphicsContext3DPrivate::makeContextCurrent):
2863         (WebCore::GraphicsContext3DPrivate::createGraphicsSurfaces):
2864         (WebCore::GraphicsContext3DPrivate::copyToGraphicsSurface):
2865         (WebCore::GraphicsContext3DPrivate::graphicsSurfaceToken):
2866         * platform/graphics/efl/GraphicsContext3DPrivate.h:
2867         (GraphicsContext3DPrivate):
2868         * platform/graphics/opengl/GLDefs.h: Removed.
2869         * platform/graphics/opengl/GLPlatformContext.cpp: Removed.
2870         * platform/graphics/opengl/GLPlatformContext.h: Removed.
2871         * platform/graphics/opengl/GLPlatformSurface.cpp: Removed.
2872         * platform/graphics/opengl/GLPlatformSurface.h: Removed.
2873         * platform/graphics/surfaces/glx/GLXContext.cpp: Removed.
2874         * platform/graphics/surfaces/glx/GLXContext.h: Removed.
2875         * platform/graphics/surfaces/glx/GLXSurface.cpp: Removed.
2876         * platform/graphics/surfaces/glx/GLXSurface.h: Removed.
2877
2878 2012-11-18  Antti Koivisto  <antti@apple.com>
2879
2880         REGRESSION(r129644): User StyleSheet not applying
2881         https://bugs.webkit.org/show_bug.cgi?id=102110
2882
2883         Reviewed by Andreas Kling.
2884
2885         Injected stylesheets added as UserStyleAuthorLevel fail to apply. r129644 implicitly assumed that
2886         such things don't exists but on Chromium addUserStyleSheet() confusingly uses them.
2887         
2888         The patch adds injected author stylesheets to DocumentStyleSheetCollection::activeStyleSheets().
2889         It also generally cleans up the code around injected and user stylesheets.
2890
2891         Tests: userscripts/user-script-and-stylesheet.html
2892                userscripts/user-stylesheet-invalidate.html
2893
2894         * css/StyleResolver.cpp:
2895         (WebCore::StyleResolver::StyleResolver):
2896         (WebCore::StyleResolver::collectRulesFromUserStyleSheets):
2897         (WebCore::collectCSSOMWrappers):
2898         * css/StyleResolver.h:
2899         (StyleResolver):
2900         * dom/Document.cpp:
2901         (WebCore::Document::setCompatibilityMode):
2902         * dom/DocumentStyleSheetCollection.cpp:
2903         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
2904         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
2905         (WebCore::DocumentStyleSheetCollection::injectedUserStyleSheets):
2906         (WebCore):
2907         (WebCore::DocumentStyleSheetCollection::injectedAuthorStyleSheets):
2908         (WebCore::DocumentStyleSheetCollection::updateInjectedStyleSheetCache):
2909         (WebCore::DocumentStyleSheetCollection::invalidateInjectedStyleSheetCache):
2910         (WebCore::DocumentStyleSheetCollection::addUserSheet):
2911         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
2912         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
2913         * dom/DocumentStyleSheetCollection.h:
2914         (WebCore::DocumentStyleSheetCollection::documentUserStyleSheets):
2915         (DocumentStyleSheetCollection):
2916         * page/PageGroup.cpp:
2917         (WebCore::PageGroup::addUserStyleSheetToWorld):
2918         (WebCore::PageGroup::removeUserStyleSheetFromWorld):
2919         (WebCore::PageGroup::removeUserStyleSheetsFromWorld):
2920         (WebCore::PageGroup::removeAllUserContent):
2921         (WebCore::PageGroup::invalidatedInjectedStyleSheetCacheInAllFrames):
2922         * page/PageGroup.h:
2923         (PageGroup):
2924
2925 2012-11-18  Adam Barth  <abarth@webkit.org>
2926
2927         Unreviewed.
2928
2929         Update run-bindings-tests baselines after
2930         http://trac.webkit.org/changeset/135063
2931
2932         * bindings/scripts/test/JS/JSTestActiveDOMObject.h:
2933         (JSTestActiveDOMObjectOwner):
2934         * bindings/scripts/test/JS/JSTestCustomNamedGetter.h:
2935         (JSTestCustomNamedGetterOwner):
2936         * bindings/scripts/test/JS/JSTestEventConstructor.h:
2937         (JSTestEventConstructorOwner):
2938         * bindings/scripts/test/JS/JSTestEventTarget.h:
2939         (JSTestEventTargetOwner):
2940         * bindings/scripts/test/JS/JSTestException.h:
2941         (JSTestExceptionOwner):
2942         * bindings/scripts/test/JS/JSTestInterface.h:
2943         (JSTestInterfaceOwner):
2944         * bindings/scripts/test/JS/JSTestMediaQueryListListener.h:
2945         (JSTestMediaQueryListListenerOwner):
2946         * bindings/scripts/test/JS/JSTestNamedConstructor.h:
2947         (JSTestNamedConstructorOwner):
2948         * bindings/scripts/test/JS/JSTestObj.h:
2949         (JSTestObjOwner):
2950         * bindings/scripts/test/JS/JSTestOverloadedConstructors.h:
2951         (JSTestOverloadedConstructorsOwner):
2952         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.h:
2953         (JSTestSerializedScriptValueInterfaceOwner):
2954
2955 2012-11-18  Simon Fraser  <simon.fraser@apple.com>
2956
2957         Make convertToLayerCoords iterative, rather than recursive
2958         https://bugs.webkit.org/show_bug.cgi?id=102618
2959
2960         Reviewed by Antti Koivisto.
2961
2962         RenderLayer::convertToLayerCoords() is a hot function on profiles.
2963         Change it to be iterative, rather than recursive, so that the
2964         bulk of the function can be inlined.
2965         
2966         Was tested with assertions against the old code during development.
2967
2968         * rendering/RenderLayer.cpp:
2969         (WebCore::accumulateOffsetTowardsAncestor):
2970         (WebCore::RenderLayer::convertToLayerCoords):
2971
2972 2012-11-18  Andreas Kling  <akling@apple.com>
2973
2974         Inline the StyledElement constructor.
2975         <http://webkit.org/b/102615>
2976
2977         Reviewed by Antti Koivisto.
2978
2979         StyledElement sits between Element and HTMLElement in the inheritance chain, and both of those are inline. 
2980         Knocks ~0.4% of samples off of the DOM/CreateNodes performance test.
2981
2982         * dom/StyledElement.cpp:
2983         * dom/StyledElement.h:
2984         (WebCore::StyledElement::StyledElement):
2985
2986 2012-11-18  Andreas Kling  <akling@apple.com>
2987
2988         HTMLMediaElement: Skip unnecessary attribute lookup in parsing of "src" attribute.
2989         <http://webkit.org/b/102614>
2990
2991         Reviewed by Anders Carlsson.
2992
2993         When parsing the "src" attribute, we don't need to look it up with fastHasAttribute()
2994         to know if it's present. If it's not present, 'value' argument will be null.
2995
2996         * html/HTMLMediaElement.cpp:
2997         (WebCore::HTMLMediaElement::parseAttribute):
2998
2999 2012-11-18  Kondapally Kalyan  <kalyan.kondapally@intel.com>
3000
3001         [EFL] Refactor GraphicsContext3DEFL.
3002         https://bugs.webkit.org/show_bug.cgi?id=101291.
3003
3004         Reviewed by Kenneth Rohde Christiansen.
3005
3006         GraphicsContext3DEfl creates GraphicsContext3DPrivate, which acts as its platform Layer.
3007         GraphicsContext3DPrivate needs to handle the following cases:
3008         1) To provide an off-screen buffer for accelerated composition.
3009         2) Render to a current context.
3010         3) To render directly to host window. (currently not supported.)
3011
3012         Before this patch Evas was used to provide us an off-screen context and buffer. GLX was used in
3013         the other supported case. Evas acts as a glue layer to provide us with appropriate
3014         GL bindings (OpenGL functions), GL context and drawable (surface/offscreenbuffer).
3015         However, primitive rendering is handled by TextureMapper and OpenGLShims is used to load the needed GL functions.
3016
3017         It would be for our advantage to be able to take in to use any optimisations/extensions
3018         provided by underlying drivers, specific to a platform (e.g. GLX_MESA_copy_sub_buffer etc.).
3019         This patch introduces an abstraction layer to make it easy to add support for any GL backend (GLX, EGL etc.)
3020         and do any platform specific optimizations as needed without complicating GraphicsContext3DPrivate class.
3021         Two new classes are added with this implementation, GLPlatformContext and GLPlatformSurface.
3022         GraphicsContext3DPrivate would create and own a GLPlatformContext and GLPlatformSurface.
3023
3024         GLPlatformContext encapsulates an OpenGL context hiding any platform specific management.
3025         It uses GL extension ARB_robustness (when available) to detect driver resets.
3026         It defines a simple interface for things that need to be handled by the context. Support
3027         for multi-threaded usage and shared context-group would be added later.
3028
3029         GLPlatformSurface encapsulates an OpenGL drawable hiding any platform specific management.
3030         It defines a simple interface for things that need to be handled by the surface.
3031         It creates an off-screen rendering area. Any GLPlatformContext (compatible with the surface)
3032         can be used to render into this off-screen area.
3033
3034         This patch also adds GLX implementation. To keep the patch to minimum EGL support would be added in another changeset.
3035
3036         * PlatformEfl.cmake:
3037         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
3038         (WebCore::GraphicsContext3D::create):
3039         (WebCore::GraphicsContext3D::GraphicsContext3D):
3040         (WebCore::GraphicsContext3D::~GraphicsContext3D):
3041         (WebCore::GraphicsContext3D::makeContextCurrent):
3042         (WebCore::GraphicsContext3D::setContextLostCallback):
3043         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
3044         (WebCore::GraphicsContext3DPrivate::GraphicsContext3DPrivate):
3045         (GraphicsContext3DPrivate::~GraphicsContext3DPrivate):
3046         (GraphicsContext3DPrivate::releaseResources):
3047         (GraphicsContext3DPrivate::setContextLostCallback):
3048         (GraphicsContext3DPrivate::platformGraphicsContext3D):
3049         (GraphicsContext3DPrivate::makeContextCurrent):
3050         (GraphicsContext3DPrivate::createGraphicsSurfaces):
3051         (GraphicsContext3DPrivate::copyToGraphicsSurface):
3052         (GraphicsContext3DPrivate::graphicsSurfaceToken):
3053         * platform/graphics/efl/GraphicsContext3DPrivate.h:
3054         (GraphicsContext3DPrivate):
3055         * platform/graphics/opengl/GLDefs.h: Added.
3056         (WebCore):
3057         * platform/graphics/opengl/GLPlatformContext.cpp: Added.
3058         (WebCore):
3059         (WebCore::GLPlatformContext::createContext):
3060         (WebCore::GLPlatformContext::createOffScreenContext):
3061         (WebCore::GLPlatformContext::createCurrentContextWrapper):
3062         (WebCore::GLPlatformContext::GLPlatformContext):
3063         (WebCore::GLPlatformContext::~GLPlatformContext):
3064         (WebCore::GLPlatformContext::makeCurrent):
3065         (WebCore::GLPlatformContext::isValid):
3066         (WebCore::GLPlatformContext::releaseCurrent):
3067         (WebCore::GLPlatformContext::handle):
3068         (WebCore::GLPlatformContext::isCurrentContext):
3069         (WebCore::GLPlatformContext::initialize):
3070         (WebCore::GLPlatformContext::getCurrent):
3071         (WebCore::GLPlatformContext::platformMakeCurrent):
3072         (WebCore::GLPlatformContext::platformReleaseCurrent):
3073         (WebCore::GLPlatformContext::destroy):
3074         * platform/graphics/opengl/GLPlatformContext.h: Added.
3075         (WebCore):
3076         (GLPlatformContext):
3077         * platform/graphics/opengl/GLPlatformSurface.cpp: Added.
3078         (WebCore):
3079         (WebCore::GLPlatformSurface::createOffscreenSurface):
3080         (WebCore::GLPlatformSurface::createTransportSurface):
3081         (WebCore::GLPlatformSurface::GLPlatformSurface):
3082         (WebCore::GLPlatformSurface::~GLPlatformSurface):
3083         (WebCore::GLPlatformSurface::handle):
3084         (WebCore::GLPlatformSurface::geometry):
3085         (WebCore::GLPlatformSurface::sharedDisplay):
3086         (WebCore::GLPlatformSurface::configuration):
3087         (WebCore::GLPlatformSurface::swapBuffers):
3088         (WebCore::GLPlatformSurface::copyTexture):
3089         (WebCore::GLPlatformSurface::updateContents):
3090         (WebCore::GLPlatformSurface::setGeometry):
3091         (WebCore::GLPlatformSurface::destroy):
3092         * platform/graphics/opengl/GLPlatformSurface.h: Added.
3093         (WebCore):
3094         (GLPlatformSurface):
3095             GLXOffScreenContext creates an off-screen context. This is used when
3096             renderstyle is RenderOffscreen.
3097             It uses GL extension GLX_ARB_create_context (when available)
3098             to create a context else falls back to use glXCreateNewContext.
3099         * platform/graphics/surfaces/glx/GLXContext.cpp: Added.
3100         (WebCore):
3101         (WebCore::initializeARBExtensions):
3102         (WebCore::GLXOffScreenContext::GLXOffScreenContext):
3103         (WebCore::GLXOffScreenContext::initialize):
3104         (WebCore::GLXOffScreenContext::~GLXOffScreenContext):
3105         (WebCore::GLXOffScreenContext::isCurrentContext):
3106         (WebCore::GLXOffScreenContext::platformMakeCurrent):
3107         (WebCore::GLXOffScreenContext::platformReleaseCurrent):
3108         (WebCore::GLXOffScreenContext::freeResources):
3109         (WebCore::GLXOffScreenContext::destroy):
3110             GLXCurrentContextWrapper acts as a wrapper for current context.
3111             This is used when renderstyle is RenderToCurrentGLContext.
3112         * platform/graphics/surfaces/glx/GLXContext.h: Added.
3113         (WebCore):
3114         (GLXCurrentContextWrapper):
3115         (WebCore::GLXCurrentContextWrapper::GLXCurrentContextWrapper):
3116         (WebCore::GLXCurrentContextWrapper::~GLXCurrentContextWrapper):
3117         (GLXOffScreenContext):
3118         * platform/graphics/surfaces/glx/GLXSurface.cpp: Added.
3119         (WebCore):
3120         (WebCore::GLXSurface::GLXSurface):
3121         (WebCore::GLXSurface::~GLXSurface):
3122         (WebCore::GLXSurface::visualInfo):
3123         (WebCore::GLXSurface::xWindow):
3124         (WebCore::GLXSurface::pBufferConfiguration):
3125         (WebCore::GLXSurface::transportSurfaceConfiguration):
3126         (WebCore::GLXSurface::isXRenderExtensionSupported):
3127             GLXTransportSurface creates Window and uses it as an off-screen surface.
3128             Any GLContext that was created with respect to configuration can be used
3129             to render into this.
3130             This is used when contents of the buffer are to be provided to UI Process
3131             for display.
3132         (WebCore::GLXTransportSurface::GLXTransportSurface):
3133         (WebCore::GLXTransportSurface::~GLXTransportSurface):
3134         (WebCore::GLXTransportSurface::configuration):
3135         (WebCore::GLXTransportSurface::swapBuffers):
3136         (WebCore::GLXTransportSurface::setGeometry):
3137         (WebCore::GLXTransportSurface::initialize):
3138         (WebCore::GLXTransportSurface::destroy):
3139         (WebCore::GLXTransportSurface::freeResources):
3140            GLXPBuffer, Creates a GL surface (PBuffer) used for offscreen rendering.
3141            Any GLContext that was created with respect to configuration can be used
3142            to render into this.
3143         (WebCore::GLXPBuffer::GLXPBuffer):
3144         (WebCore::GLXPBuffer::~GLXPBuffer):
3145         (WebCore::GLXPBuffer::initialize):
3146         (WebCore::GLXPBuffer::configuration):
3147         (WebCore::GLXPBuffer::destroy):
3148         (WebCore::GLXPBuffer::freeResources):
3149         * platform/graphics/surfaces/glx/GLXSurface.h: Added.
3150         (WebCore):
3151             Creates X resources which are shared between surface and context.
3152         (SharedX11Resources):
3153         (WebCore::SharedX11Resources::create):
3154         (WebCore::SharedX11Resources::deref):
3155         (WebCore::SharedX11Resources::getXWindow):
3156         (WebCore::SharedX11Resources::display):
3157         (WebCore::SharedX11Resources::visualInfo):
3158         (WebCore::SharedX11Resources::createConfig):
3159         (WebCore::SharedX11Resources::pBufferContextConfig):
3160         (WebCore::SharedX11Resources::surfaceContextConfig):
3161         (WebCore::SharedX11Resources::isXRenderExtensionSupported):
3162         (WebCore::SharedX11Resources::SharedX11Resources):
3163         (WebCore::SharedX11Resources::~SharedX11Resources):
3164         (GLXSurface):
3165         (GLXTransportSurface):
3166         (GLXPBuffer):
3167
3168 2012-11-18  Andreas Kling  <akling@apple.com>
3169
3170         Element::parseAttribute() should take name & value as separate arguments.
3171         <http://webkit.org/b/102608>
3172
3173         Reviewed by Antti Koivisto.
3174
3175         Update the signature of parseAttribute() to take a QualifiedName/AtomicString combo instead
3176         of an Attribute. This lets us pass avoid refcount churn in Element::attributeChanged() since
3177         creating a temporary Attribute is no longer necessary.
3178
3179         This was surprisingly hot (~1%) on the DOM/CreateNodes performance test.
3180
3181         * bindings/js/ScriptEventListener.cpp:
3182         (WebCore::createAttributeEventListener):
3183         * bindings/js/ScriptEventListener.h:
3184         (WebCore):
3185         * bindings/v8/ScriptEventListener.cpp:
3186         (WebCore::createAttributeEventListener):
3187         * bindings/v8/ScriptEventListener.h:
3188         (WebCore):
3189         * dom/Element.cpp:
3190         (WebCore::Element::attributeChanged):
3191         (WebCore::Element::parseAttribute):
3192         * dom/Element.h:
3193         (Element):
3194         * dom/StyledElement.cpp:
3195         (WebCore::StyledElement::parseAttribute):
3196         * dom/StyledElement.h:
3197         (StyledElement):
3198         * html/HTMLAnchorElement.cpp:
3199         (WebCore::HTMLAnchorElement::parseAttribute):
3200         * html/HTMLAnchorElement.h:
3201         (HTMLAnchorElement):
3202         * html/HTMLAppletElement.cpp:
3203         (WebCore::HTMLAppletElement::parseAttribute):
3204         * html/HTMLAppletElement.h:
3205         (HTMLAppletElement):
3206         * html/HTMLAreaElement.cpp:
3207         (WebCore::HTMLAreaElement::parseAttribute):
3208         * html/HTMLAreaElement.h:
3209         (HTMLAreaElement):
3210         * html/HTMLBaseElement.cpp:
3211         (WebCore::HTMLBaseElement::parseAttribute):
3212         * html/HTMLBaseElement.h:
3213         (HTMLBaseElement):
3214         * html/HTMLBodyElement.cpp:
3215         (WebCore::HTMLBodyElement::parseAttribute):
3216         * html/HTMLBodyElement.h:
3217         (HTMLBodyElement):
3218         * html/HTMLButtonElement.cpp:
3219         (WebCore::HTMLButtonElement::parseAttribute):
3220         * html/HTMLButtonElement.h:
3221         * html/HTMLCanvasElement.cpp:
3222         (WebCore::HTMLCanvasElement::parseAttribute):
3223         * html/HTMLCanvasElement.h:
3224         (HTMLCanvasElement):
3225         * html/HTMLDetailsElement.cpp:
3226         (WebCore::HTMLDetailsElement::parseAttribute):
3227         * html/HTMLDetailsElement.h:
3228         (HTMLDetailsElement):
3229         * html/HTMLElement.cpp:
3230         (WebCore::HTMLElement::parseAttribute):
3231         (WebCore::HTMLElement::dirAttributeChanged):
3232         * html/HTMLElement.h:
3233         (HTMLElement):
3234         * html/HTMLEmbedElement.cpp:
3235         (WebCore::HTMLEmbedElement::parseAttribute):
3236         * html/HTMLEmbedElement.h:
3237         (HTMLEmbedElement):
3238         * html/HTMLFormControlElement.cpp:
3239         (WebCore::HTMLFormControlElement::parseAttribute):
3240         * html/HTMLFormControlElement.h:
3241         (HTMLFormControlElement):
3242         * html/HTMLFormElement.cpp:
3243         (WebCore::HTMLFormElement::parseAttribute):
3244         * html/HTMLFormElement.h:
3245         (HTMLFormElement):
3246         * html/HTMLFrameElement.cpp:
3247         (WebCore::HTMLFrameElement::parseAttribute):
3248         * html/HTMLFrameElement.h:
3249         (HTMLFrameElement):
3250         * html/HTMLFrameElementBase.cpp:
3251         (WebCore::HTMLFrameElementBase::parseAttribute):
3252         * html/HTMLFrameElementBase.h:
3253         (HTMLFrameElementBase):
3254         * html/HTMLFrameSetElement.cpp:
3255         (WebCore::HTMLFrameSetElement::parseAttribute):
3256         * html/HTMLFrameSetElement.h:
3257         (HTMLFrameSetElement):
3258         * html/HTMLIFrameElement.cpp:
3259         (WebCore::HTMLIFrameElement::parseAttribute):
3260         * html/HTMLIFrameElement.h:
3261         (HTMLIFrameElement):
3262         * html/HTMLImageElement.cpp:
3263         (WebCore::HTMLImageElement::parseAttribute):
3264         * html/HTMLImageElement.h:
3265         (HTMLImageElement):
3266         * html/HTMLInputElement.cpp:
3267         (WebCore::HTMLInputElement::parseAttribute):
3268         (WebCore::HTMLInputElement::parseMaxLengthAttribute):
3269         * html/HTMLInputElement.h:
3270         (HTMLInputElement):
3271         * html/HTMLKeygenElement.cpp:
3272         (WebCore::HTMLKeygenElement::parseAttribute):
3273         * html/HTMLKeygenElement.h:
3274         (HTMLKeygenElement):
3275         * html/HTMLLIElement.cpp:
3276         (WebCore::HTMLLIElement::parseAttribute):
3277         * html/HTMLLIElement.h:
3278         (HTMLLIElement):
3279         * html/HTMLLinkElement.cpp:
3280         (WebCore::HTMLLinkElement::parseAttribute):
3281         * html/HTMLLinkElement.h:
3282         (HTMLLinkElement):
3283         * html/HTMLMapElement.cpp:
3284         (WebCore::HTMLMapElement::parseAttribute):
3285         * html/HTMLMapElement.h:
3286         (HTMLMapElement):
3287         * html/HTMLMediaElement.cpp:
3288         (WebCore::HTMLMediaElement::parseAttribute):
3289         * html/HTMLMediaElement.h:
3290         * html/HTMLMetaElement.cpp:
3291         (WebCore::HTMLMetaElement::parseAttribute):
3292         * html/HTMLMetaElement.h:
3293         (HTMLMetaElement):
3294         * html/HTMLMeterElement.cpp:
3295         (WebCore::HTMLMeterElement::parseAttribute):
3296         * html/HTMLMeterElement.h:
3297         (HTMLMeterElement):
3298         * html/HTMLOListElement.cpp:
3299         (WebCore::HTMLOListElement::parseAttribute):
3300         * html/HTMLOListElement.h:
3301         (HTMLOListElement):
3302         * html/HTMLObjectElement.cpp:
3303         (WebCore::HTMLObjectElement::parseAttribute):
3304         * html/HTMLObjectElement.h:
3305         (HTMLObjectElement):
3306         * html/HTMLOptGroupElement.cpp:
3307         (WebCore::HTMLOptGroupElement::parseAttribute):
3308         * html/HTMLOptGroupElement.h:
3309         * html/HTMLOptionElement.cpp:
3310         (WebCore::HTMLOptionElement::parseAttribute):
3311         * html/HTMLOptionElement.h:
3312         (HTMLOptionElement):
3313         * html/HTMLOutputElement.cpp:
3314         (WebCore::HTMLOutputElement::parseAttribute):
3315         * html/HTMLOutputElement.h:
3316         (HTMLOutputElement):
3317         * html/HTMLProgressElement.cpp:
3318         (WebCore::HTMLProgressElement::parseAttribute):
3319         * html/HTMLProgressElement.h:
3320         * html/HTMLScriptElement.cpp:
3321         (WebCore::HTMLScriptElement::parseAttribute):
3322         * html/HTMLScriptElement.h:
3323         (HTMLScriptElement):
3324         * html/HTMLSelectElement.cpp:
3325         (WebCore::HTMLSelectElement::parseAttribute):
3326         (WebCore::HTMLSelectElement::parseMultipleAttribute):
3327         * html/HTMLSelectElement.h:
3328         * html/HTMLStyleElement.cpp:
3329         (WebCore::HTMLStyleElement::parseAttribute):
3330         * html/HTMLStyleElement.h:
3331         (HTMLStyleElement):
3332         * html/HTMLTableCellElement.cpp:
3333         (WebCore::HTMLTableCellElement::parseAttribute):
3334         * html/HTMLTableCellElement.h:
3335         (HTMLTableCellElement):
3336         * html/HTMLTableColElement.cpp:
3337         (WebCore::HTMLTableColElement::parseAttribute):
3338         * html/HTMLTableColElement.h:
3339         (HTMLTableColElement):
3340         * html/HTMLTableElement.cpp:
3341         (WebCore::HTMLTableElement::parseAttribute):
3342         * html/HTMLTableElement.h:
3343         (HTMLTableElement):
3344         * html/HTMLTextAreaElement.cpp:
3345         (WebCore::HTMLTextAreaElement::parseAttribute):
3346         * html/HTMLTextAreaElement.h:
3347         (HTMLTextAreaElement):
3348         * html/HTMLTextFormControlElement.cpp:
3349         (WebCore::HTMLTextFormControlElement::parseAttribute):
3350         * html/HTMLTextFormControlElement.h:
3351         (HTMLTextFormControlElement):
3352         * html/HTMLTrackElement.cpp:
3353         (WebCore::HTMLTrackElement::parseAttribute):
3354         * html/HTMLTrackElement.h:
3355         (HTMLTrackElement):
3356         * html/HTMLVideoElement.cpp:
3357         (WebCore::HTMLVideoElement::parseAttribute):
3358         * html/HTMLVideoElement.h:
3359         (HTMLVideoElement):
3360         * html/shadow/HTMLContentElement.cpp:
3361         (WebCore::HTMLContentElement::parseAttribute):
3362         * html/shadow/HTMLContentElement.h:
3363         (HTMLContentElement):
3364         * mathml/MathMLElement.cpp:
3365         (WebCore::MathMLElement::parseAttribute):
3366         * mathml/MathMLElement.h:
3367         (MathMLElement):
3368         * svg/SVGAElement.cpp:
3369         (WebCore::SVGAElement::parseAttribute):
3370         * svg/SVGAElement.h:
3371         (SVGAElement):
3372         * svg/SVGAnimateMotionElement.cpp:
3373         (WebCore::SVGAnimateMotionElement::parseAttribute):
3374         * svg/SVGAnimateMotionElement.h:
3375         (SVGAnimateMotionElement):
3376         * svg/SVGAnimateTransformElement.cpp:
3377         (WebCore::SVGAnimateTransformElement::parseAttribute):
3378         * svg/SVGAnimateTransformElement.h:
3379         (SVGAnimateTransformElement):
3380         * svg/SVGAnimationElement.cpp:
3381         (WebCore::SVGAnimationElement::parseAttribute):
3382         * svg/SVGAnimationElement.h:
3383         (SVGAnimationElement):
3384         * svg/SVGCircleElement.cpp:
3385         (WebCore::SVGCircleElement::parseAttribute):
3386         * svg/SVGCircleElement.h:
3387         (SVGCircleElement):
3388         * svg/SVGClipPathElement.cpp:
3389         (WebCore::SVGClipPathElement::parseAttribute):
3390         * svg/SVGClipPathElement.h:
3391         (SVGClipPathElement):
3392         * svg/SVGComponentTransferFunctionElement.cpp:
3393         (WebCore::SVGComponentTransferFunctionElement::parseAttribute):
3394         * svg/SVGComponentTransferFunctionElement.h:
3395         (SVGComponentTransferFunctionElement):
3396         * svg/SVGCursorElement.cpp:
3397         (WebCore::SVGCursorElement::parseAttribute):
3398         * svg/SVGCursorElement.h:
3399         (SVGCursorElement):
3400         * svg/SVGElement.cpp:
3401         (WebCore::SVGElement::reportAttributeParsingError):
3402         (WebCore::SVGElement::parseAttribute):
3403         * svg/SVGElement.h:
3404         (SVGElement):
3405         * svg/SVGEllipseElement.cpp:
3406         (WebCore::SVGEllipseElement::parseAttribute):
3407         * svg/SVGEllipseElement.h:
3408         (SVGEllipseElement):
3409         * svg/SVGExternalResourcesRequired.cpp:
3410         (WebCore::SVGExternalResourcesRequired::parseAttribute):
3411         * svg/SVGExternalResourcesRequired.h:
3412         (SVGExternalResourcesRequired):
3413         * svg/SVGFEBlendElement.cpp:
3414         (WebCore::SVGFEBlendElement::parseAttribute):
3415         * svg/SVGFEBlendElement.h:
3416         (SVGFEBlendElement):
3417         * svg/SVGFEColorMatrixElement.cpp:
3418         (WebCore::SVGFEColorMatrixElement::parseAttribute):
3419         * svg/SVGFEColorMatrixElement.h:
3420         (SVGFEColorMatrixElement):
3421         * svg/SVGFEComponentTransferElement.cpp:
3422         (WebCore::SVGFEComponentTransferElement::parseAttribute):
3423         * svg/SVGFEComponentTransferElement.h:
3424         (SVGFEComponentTransferElement):
3425         * svg/SVGFECompositeElement.cpp:
3426         (WebCore::SVGFECompositeElement::parseAttribute):
3427         * svg/SVGFECompositeElement.h:
3428         (SVGFECompositeElement):
3429         * svg/SVGFEConvolveMatrixElement.cpp:
3430         (WebCore::SVGFEConvolveMatrixElement::parseAttribute):
3431         * svg/SVGFEConvolveMatrixElement.h:
3432         (SVGFEConvolveMatrixElement):
3433         * svg/SVGFEDiffuseLightingElement.cpp:
3434         (WebCore::SVGFEDiffuseLightingElement::parseAttribute):
3435         * svg/SVGFEDiffuseLightingElement.h:
3436         (SVGFEDiffuseLightingElement):
3437         * svg/SVGFEDisplacementMapElement.cpp:
3438         (WebCore::SVGFEDisplacementMapElement::parseAttribute):
3439         * svg/SVGFEDisplacementMapElement.h:
3440         (SVGFEDisplacementMapElement):
3441         * svg/SVGFEDropShadowElement.cpp:
3442         (WebCore::SVGFEDropShadowElement::parseAttribute):
3443         * svg/SVGFEDropShadowElement.h:
3444         (SVGFEDropShadowElement):
3445         * svg/SVGFEGaussianBlurElement.cpp:
3446         (WebCore::SVGFEGaussianBlurElement::parseAttribute):
3447         * svg/SVGFEGaussianBlurElement.h:
3448         (SVGFEGaussianBlurElement):
3449         * svg/SVGFEImageElement.cpp:
3450         (WebCore::SVGFEImageElement::parseAttribute):
3451         * svg/SVGFEImageElement.h:
3452         (SVGFEImageElement):
3453         * svg/SVGFELightElement.cpp:
3454         (WebCore::SVGFELightElement::parseAttribute):
3455         * svg/SVGFELightElement.h:
3456         (SVGFELightElement):
3457         * svg/SVGFEMergeNodeElement.cpp:
3458         (WebCore::SVGFEMergeNodeElement::parseAttribute):
3459         * svg/SVGFEMergeNodeElement.h:
3460         (SVGFEMergeNodeElement):
3461         * svg/SVGFEMorphologyElement.cpp:
3462         (WebCore::SVGFEMorphologyElement::parseAttribute):
3463         * svg/SVGFEMorphologyElement.h:
3464         (SVGFEMorphologyElement):
3465         * svg/SVGFEOffsetElement.cpp:
3466         (WebCore::SVGFEOffsetElement::parseAttribute):
3467         * svg/SVGFEOffsetElement.h:
3468         (SVGFEOffsetElement):
3469         * svg/SVGFESpecularLightingElement.cpp:
3470         (WebCore::SVGFESpecularLightingElement::parseAttribute):
3471         * svg/SVGFESpecularLightingElement.h:
3472         (SVGFESpecularLightingElement):
3473         * svg/SVGFETileElement.cpp:
3474         (WebCore::SVGFETileElement::parseAttribute):
3475         * svg/SVGFETileElement.h:
3476         (SVGFETileElement):
3477         * svg/SVGFETurbulenceElement.cpp:
3478         (WebCore::SVGFETurbulenceElement::parseAttribute):
3479         * svg/SVGFETurbulenceElement.h:
3480         (SVGFETurbulenceElement):
3481         * svg/SVGFilterElement.cpp:
3482         (WebCore::SVGFilterElement::parseAttribute):
3483         * svg/SVGFilterElement.h:
3484         (SVGFilterElement):
3485         * svg/SVGFilterPrimitiveStandardAttributes.cpp:
3486         (WebCore::SVGFilterPrimitiveStandardAttributes::parseAttribute):
3487         * svg/SVGFilterPrimitiveStandardAttributes.h:
3488         (SVGFilterPrimitiveStandardAttributes):
3489         * svg/SVGFitToViewBox.h:
3490         (WebCore::SVGFitToViewBox::parseAttribute):
3491         * svg/SVGFontFaceElement.cpp:
3492         (WebCore::SVGFontFaceElement::parseAttribute):
3493         * svg/SVGFontFaceElement.h:
3494         (SVGFontFaceElement):
3495         * svg/SVGFontFaceUriElement.cpp:
3496         (WebCore::SVGFontFaceUriElement::parseAttribute):
3497         * svg/SVGFontFaceUriElement.h:
3498         (SVGFontFaceUriElement):
3499         * svg/SVGForeignObjectElement.cpp:
3500         (WebCore::SVGForeignObjectElement::parseAttribute):
3501         * svg/SVGForeignObjectElement.h:
3502         (SVGForeignObjectElement):
3503         * svg/SVGGElement.cpp:
3504         (WebCore::SVGGElement::parseAttribute):
3505         * svg/SVGGElement.h:
3506         (SVGGElement):