c8478b380e4c1a948d2ae1db03c7a1853e6dae78
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2012-09-26  Ilya Tikhonovsky  <loislo@chromium.org>
2
3         Web Inspector: NMI: replace manual JS external resources counting with MemoryInstrumentation
4         https://bugs.webkit.org/show_bug.cgi?id=97662
5
6         Reviewed by Yury Semikhatsky.
7
8         Old schema uses sizeInBytes method on StringImpl. This method works incorrect for substrings.
9         Also we'd like to know exact pointers to strings and buffers for verification purposes.
10
11         * dom/WebCoreMemoryInstrumentation.cpp:
12         (WebCore):
13         * dom/WebCoreMemoryInstrumentation.h:
14         (WebCoreMemoryTypes):
15         * inspector/InspectorMemoryAgent.cpp:
16         (MemoryBlockName):
17         (WebCore):
18         (WebCore::collectDomTreeInfo):
19         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
20
21 2012-09-26  Vsevolod Vlasov  <vsevik@chromium.org>
22
23         Web Inspector: [REGRESSION] Revision support problems: revert and apply original content  cause exceptions
24         https://bugs.webkit.org/show_bug.cgi?id=97669
25
26         Reviewed by Pavel Feldman.
27
28         Added missed callback parameters.
29
30         Test: inspector/uisourcecode-revisions.html
31
32         * inspector/front-end/UISourceCode.js:
33         (WebInspector.UISourceCode.prototype.revertToOriginal):
34         (WebInspector.UISourceCode.prototype.revertAndClearHistory):
35
36 2012-09-26  Kenneth Rohde Christiansen  <kenneth@webkit.org>
37
38         Reorder Qt WebCore includes
39         https://bugs.webkit.org/show_bug.cgi?id=97678
40
41         Reviewed by Noam Rosenthal.
42
43         * bridge/qt/qt_instance.cpp:
44         * bridge/qt/qt_instance.h:
45         * bridge/qt/qt_pixmapruntime.cpp:
46         * bridge/qt/qt_runtime.cpp:
47         * platform/graphics/qt/FontCacheQt.cpp:
48         * platform/graphics/qt/FontCustomPlatformData.h:
49         * platform/graphics/qt/ImageDecoderQt.cpp:
50         * platform/graphics/qt/ImageDecoderQt.h:
51         * platform/graphics/qt/PathQt.cpp:
52         * platform/graphics/qt/TransformationMatrixQt.cpp:
53         * platform/graphics/surfaces/qt/GraphicsSurfaceGLX.cpp:
54         * platform/network/qt/DnsPrefetchHelper.h:
55         * platform/network/qt/QNetworkReplyHandler.cpp:
56         * platform/network/qt/ResourceHandleQt.cpp:
57         * platform/qt/ClipboardQt.cpp:
58         * platform/qt/GamepadsQt.cpp:
59         * platform/qt/PasteboardQt.cpp:
60         * platform/qt/PlatformScreenQt.cpp:
61         * platform/qt/RenderThemeQt.cpp:
62         * platform/text/qt/TextBoundariesQt.cpp:
63         * plugins/qt/PluginPackageQt.cpp:
64         * plugins/qt/PluginViewQt.cpp:
65
66 2012-09-26  Christophe Dumez  <christophe.dumez@intel.com>
67
68         [EFL] mediaControlsEflFullscreen.css overrides regular media controls styling
69         https://bugs.webkit.org/show_bug.cgi?id=97671
70
71         Reviewed by Kenneth Rohde Christiansen.
72
73         Add missing ":-webkit-full-screen" in mediaControlsEflFullscreen.css so
74         that regular media controls styling is not overridden by full screen
75         styling when switching to full screen mode. This was causing a lot of
76         flakiness in our media tests.
77
78         No new tests, already covered by existing media tests.
79
80         * css/mediaControlsEflFullscreen.css:
81         (video:-webkit-full-screen::-webkit-media-controls-panel):
82         (video:-webkit-full-screen:-webkit-full-page-media::-webkit-media-controls-panel):
83         (video:-webkit-full-screen::-webkit-media-controls-mute-button):
84         (video:-webkit-full-screen::-webkit-media-controls-play-button):
85         (video:-webkit-full-screen::-webkit-media-controls-timeline-container):
86         (video:-webkit-full-screen::-webkit-media-controls-current-time-display):
87         (video:-webkit-full-screen::-webkit-media-controls-time-remaining-display):
88         (video:-webkit-full-screen::-webkit-media-controls-timeline):
89         (video:-webkit-full-screen::-webkit-media-controls-volume-slider-container):
90         (video:-webkit-full-screen::-webkit-media-controls-volume-slider):
91         (video:-webkit-full-screen::-webkit-media-controls-seek-back-button):
92         (video:-webkit-full-screen::-webkit-media-controls-seek-forward-button):
93         (video:-webkit-full-screen::-webkit-media-controls-fullscreen-button):
94         (video:-webkit-full-screen::-webkit-media-controls-rewind-button):
95         (video:-webkit-full-screen::-webkit-media-controls-return-to-realtime-button):
96         (video:-webkit-full-screen::-webkit-media-controls-toggle-closed-captions-button):
97
98 2012-09-26  Andrey Kosyakov  <caseq@chromium.org>
99
100         Web Inspector: display stack of last layout invalidation instead of first one
101         https://bugs.webkit.org/show_bug.cgi?id=97677
102
103         Reviewed by Vsevolod Vlasov.
104
105         - add a call to InspectorInstrumentation::didInvalidateLayout() when upgrading relayout root;
106         - do not suppress timeline's Invalidate Layout records other than first.
107
108         * inspector/InspectorTimelineAgent.cpp:
109         (WebCore::InspectorTimelineAgent::didInvalidateLayout):
110         * page/FrameView.cpp:
111         (WebCore::FrameView::scheduleRelayoutOfSubtree):
112
113 2012-09-25  Antti Koivisto  <antti@apple.com>
114
115         Optimize stylesheet insertions
116         https://bugs.webkit.org/show_bug.cgi?id=97627
117
118         Reviewed by Andreas Kling.
119
120         We currently do scope analysis for stylesheets that are added to the end of the active stylesheet list to avoid unnecessary style
121         recalcs and StyleResolver rebuilding. However it is somewhat common to insert <style> elements dynamically to positions other than last.
122         In this case we currently simply force full style recalc. We should do scope analysis and partial style recalcs also in these cases.
123         
124         PerformanceTests/CSS/StyleSheetInsert.html microbenchmark shows ~20x progression from the patch.
125
126         * css/StyleResolver.cpp:
127         (WebCore::StyleResolver::StyleResolver):
128         (WebCore::StyleResolver::resetAuthorStyle):
129         
130             Add a way to reset author RuleSet without deleting the whole StyleResolver.
131
132         (WebCore):
133         * css/StyleResolver.h:
134         (StyleResolver):
135         * dom/DocumentStyleSheetCollection.cpp:
136         (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
137         
138             Check if there have been insertions to the stylesheet list. If so we need to reset
139             the StyleResolver (to handle rule position changes) but don't need to force full
140             style recalc. Do scope analysis for inserted stylesheets as well.
141
142         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
143         * dom/DocumentStyleSheetCollection.h:
144
145 2012-09-26  Allan Sandfeld Jensen  <allan.jensen@digia.com>
146
147         Gesture tap highlighting entire first line
148         https://bugs.webkit.org/show_bug.cgi?id=97668
149
150         Reviewed by Kenneth Rohde Christiansen.
151
152         Keep better track if which part is the first, middle or last, and adjust the X-edges accordingly.
153
154         * page/GestureTapHighlighter.cpp:
155
156 2012-09-26  Vsevolod Vlasov  <vsevik@chromium.org>
157
158         Web Inspector: DefaultTextEditor throws exception sometimes.
159         https://bugs.webkit.org/show_bug.cgi?id=97681
160
161         Reviewed by Alexander Pavlov.
162
163         Added a check that line number does not exceed text model line count.
164
165         * inspector/front-end/DefaultTextEditor.js:
166         (WebInspector.TextEditorMainPanel.prototype._positionToSelection):
167
168 2012-09-26  Kenneth Rohde Christiansen  <kenneth@webkit.org>
169
170         [TextureMapper] Remove unused method
171         https://bugs.webkit.org/show_bug.cgi?id=97675
172
173         Reviewed by Simon Hausmann.
174
175         * platform/graphics/texmap/TextureMapperGL.h: Remove uidForImage()
176
177 2012-09-25  Ilya Tikhonovsky  <loislo@chromium.org>
178
179         Web Inspector: extract HashSet instrumentation from core NMI code and put it into MemoryInstrumentationHashSet.h
180         https://bugs.webkit.org/show_bug.cgi?id=97198
181
182         Reviewed by Yury Semikhatsky.
183
184         Current implementation has overloads for HashSet.
185         This prevents us from instrumenting complex cases like Vector<HashSet<...> >.
186
187         * css/CSSCursorImageValue.cpp:
188         (WebCore::CSSCursorImageValue::reportDescendantMemoryUsage):
189         * css/StyleResolver.cpp:
190         (WebCore::StyleResolver::Features::reportMemoryUsage):
191         (WebCore::StyleResolver::collectMatchingRulesForList):
192         * dom/Document.cpp:
193         (WebCore::Document::reportMemoryUsage):
194         * dom/DocumentEventQueue.cpp:
195         (WebCore::DocumentEventQueue::reportMemoryUsage):
196         * loader/DocumentLoader.cpp:
197         (WebCore::DocumentLoader::reportMemoryUsage):
198         * loader/FrameLoader.cpp:
199         (WebCore::FrameLoader::reportMemoryUsage):
200         * loader/cache/CachedResource.cpp:
201         (WebCore::CachedResource::reportMemoryUsage):
202         * loader/cache/CachedResourceLoader.cpp:
203         (WebCore::CachedResourceLoader::reportMemoryUsage):
204
205 2012-09-26  Dominik Röttsches  <dominik.rottsches@intel.com>
206
207         [soup] Obey setTimeoutInterval in soup backend
208         https://bugs.webkit.org/show_bug.cgi?id=94796
209
210         Reviewed by Gustavo Noronha Silva.
211
212         Implementing ResourceHandle's setTimeoutInterval support for the soup backend.
213         This is preparatory work for bug 74802, timeout support for XHR2. The patch
214         has been successfully tested in combination with my work-in-progress
215         for that bug.
216
217         No new tests yet, tests will be added with the patch in bug 74802.
218
219         * platform/network/ResourceHandleInternal.h:
220         (WebCore::ResourceHandleInternal::ResourceHandleInternal): Adding a timeout source.
221         (ResourceHandleInternal):
222         * platform/network/soup/ResourceHandleSoup.cpp:
223         (WebCore):
224         (WebCore::cleanupSoupRequestOperation): Resetting the timer.
225         (WebCore::sendRequestCallback): Stopping the timer.
226         (WebCore::startHTTPRequest): Starting a timeout timer before the async request.
227         (WebCore::ResourceHandle::platformSetDefersLoading): Starting a timeout timer before the async request.
228         (WebCore::requestTimeoutCallback): Preparing a corresponding resource error and notifying clients of failure.
229         (WebCore::startNonHTTPRequest): Starting a timeout timer before the async request.
230
231 2012-09-26  Andrey Kosyakov  <caseq@chromium.org>
232
233         Web Inspector: paint inspector overlay on a transparency layer
234         https://bugs.webkit.org/show_bug.cgi?id=97659
235
236         Reviewed by Pavel Feldman.
237
238         Set composite operation to copy and begin transparency layer before painting the
239             frame view of overlay page, so that text on transparent background is properly rendered.
240
241         * inspector/InspectorOverlay.cpp:
242         (WebCore::InspectorOverlay::paint):
243
244 2012-09-26  Marcelo Lira  <marcelo.lira@openbossa.org>
245
246         [Qt] Make use of ASCIILiteral in PlatformKeyboardEventQt.cpp
247         https://bugs.webkit.org/show_bug.cgi?id=97612
248
249         Reviewed by Jocelyn Turcotte.
250
251         String literals returned by keyIdentifierForQtKeyCode and
252         keyTextForKeyEvent now make use of more efficient ASCIILiteral.
253
254         * platform/qt/PlatformKeyboardEventQt.cpp:
255         (WebCore::keyIdentifierForQtKeyCode):
256         (WebCore::keyTextForKeyEvent):
257
258 2012-09-26  Yury Semikhatsky  <yurys@chromium.org>
259
260         Unreviewed. Roll out http://trac.webkit.org/changeset/129502 since it broke cookie table.
261         https://bugs.webkit.org/show_bug.cgi?id=97471
262
263         * inspector/front-end/CookieParser.js:
264         (WebInspector.Cookie.prototype.expires):
265         * inspector/front-end/CookiesTable.js:
266         (WebInspector.CookiesTable.prototype._createGridNode):
267
268 2012-09-25  Vsevolod Vlasov  <vsevik@chromium.org>
269
270         Web Inspector: Remove resource() getter from UISourceCode.
271         https://bugs.webkit.org/show_bug.cgi?id=97557
272
273         Reviewed by Pavel Feldman.
274
275         Resource getter removed from UISourceCode. Resource could be fetched from ResourceTreeModel directly.
276
277         * inspector/front-end/CSSStyleModel.js:
278         (WebInspector.CSSStyleModelResourceBinding.prototype.setStyleContent):
279         * inspector/front-end/CompilerScriptMapping.js:
280         * inspector/front-end/JavaScriptSource.js:
281         (WebInspector.JavaScriptSource):
282         * inspector/front-end/NetworkUISourceCodeProvider.js:
283         (WebInspector.NetworkUISourceCodeProvider.prototype._resourceAdded):
284         * inspector/front-end/ResourceScriptMapping.js:
285         (WebInspector.ResourceScriptMapping.prototype._addOrReplaceTemporaryUISourceCode):
286         * inspector/front-end/SASSSourceMapping.js:
287         (WebInspector.SASSSource):
288         * inspector/front-end/ScriptSnippetModel.js:
289         (WebInspector.ScriptSnippetModel.prototype._createUISourceCodeForScript):
290         (WebInspector.SnippetJavaScriptSource):
291         * inspector/front-end/ScriptsPanel.js:
292         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
293         * inspector/front-end/StyleSource.js:
294         (WebInspector.StyleSource):
295         * inspector/front-end/UISourceCode.js:
296         (WebInspector.UISourceCode):
297
298 2012-09-26  Vsevolod Vlasov  <vsevik@chromium.org>
299
300         Web Inspector: Fix closure compilation errors.
301         https://bugs.webkit.org/show_bug.cgi?id=97666
302
303         Reviewed by Alexander Pavlov.
304
305         Fixed closure compilation errors.
306         Changed contentProvider contentURL() method return type to string.
307         Removed redundant () in CookieTable.
308
309         * inspector/front-end/CSSStyleModel.js:
310         * inspector/front-end/ContentProvider.js:
311         * inspector/front-end/ContentProviders.js:
312         (WebInspector.ConcatenatedScriptsContentProvider.prototype.contentURL):
313         (WebInspector.StaticContentProvider.prototype.contentURL):
314         * inspector/front-end/CookiesTable.js:
315         (WebInspector.CookiesTable.prototype._createGridNode):
316         * inspector/front-end/DOMAgent.js:
317         (WebInspector.DOMDocument):
318         * inspector/front-end/FileContentView.js:
319         * inspector/front-end/NetworkRequest.js:
320         * inspector/front-end/Resource.js:
321         * inspector/front-end/Script.js:
322         * inspector/front-end/ScriptsPanel.js:
323         * inspector/front-end/UISourceCode.js:
324
325 2012-09-26  Yury Semikhatsky  <yurys@chromium.org>
326
327         Web Inspector: compare objects counted by the memory instrumentation with those allocated in the heap
328         https://bugs.webkit.org/show_bug.cgi?id=97641
329
330         Reviewed by Pavel Feldman.
331
332         Added code that allows to check if all objects counted by the memory instrumentation
333         were allocated by the underlying memory allocator. It requires support
334         from the memory allocator. The code works only if the set of allocated objects
335         is not empty and should only be used for debugging purposes.
336
337         * inspector/InspectorClient.h:
338         (InspectorClient):
339         (WebCore::InspectorClient::getAllocatedObjects):
340         * inspector/InspectorController.cpp:
341         (WebCore::InspectorController::InspectorController):
342         * inspector/InspectorMemoryAgent.cpp:
343         (WebCore::collectDomTreeInfo):
344         (WebCore::InspectorMemoryAgent::getProcessMemoryDistribution):
345         (WebCore::InspectorMemoryAgent::InspectorMemoryAgent):
346         * inspector/InspectorMemoryAgent.h:
347         (WebCore):
348         (WebCore::InspectorMemoryAgent::create):
349         (InspectorMemoryAgent):
350         * inspector/MemoryInstrumentationImpl.cpp:
351         (WebCore::MemoryInstrumentationImpl::MemoryInstrumentationImpl):
352         (WebCore::MemoryInstrumentationImpl::countObjectSize):
353         (WebCore):
354         (WebCore::MemoryInstrumentationImpl::checkCountedObject):
355         * inspector/MemoryInstrumentationImpl.h:
356         (MemoryInstrumentationImpl):
357
358 2012-09-26  Keishi Hattori  <keishi@webkit.org>
359
360         SuggestionPicker min width is two pixels wider than it should be
361         https://bugs.webkit.org/show_bug.cgi?id=97645
362
363         Reviewed by Kent Tamura.
364
365         Suggestion picker's minimum width should match inputWidth.
366
367         No new tests. Added later in Bug 97645.
368
369         * Resources/pagepopups/suggestionPicker.js:
370         (SuggestionPicker.prototype._measureMaxContentWidth):
371         (SuggestionPicker.prototype._fixWindowSize): We shouldn't be adding ListBorder to inputWidth.
372
373 2012-09-26  Andrey Adaikin  <aandrey@chromium.org>
374
375         Web Inspector: [TextEditor] fix tab unindent selection restore
376         https://bugs.webkit.org/show_bug.cgi?id=97462
377
378         Reviewed by Vsevolod Vlasov.
379
380         Selection would be wrongly restored on tab unindent when the last line does not need to be unindented unlike the others.
381
382         * inspector/front-end/DefaultTextEditor.js:
383         (WebInspector.TextEditorMainPanel.prototype._unindentLines.get var):
384         (WebInspector.TextEditorMainPanel.prototype._unindentLines):
385
386 2012-09-26  Yoshifumi Inoue  <yosin@chromium.org>
387
388         Rename ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS to ENABLE_INPUT_MULTIPLE_FIELDS_UI
389         https://bugs.webkit.org/show_bug.cgi?id=97640
390
391         This patch renames ENABLE_INPUT_TYPE_TIME MULTIPLE_FIELDS feature
392         flag to ENABLE_INPUT_MULTIPLE_FIELDS_UI for implementing multiple
393         fields date/time input UI other than input type "time".
394
395         No new tests. This patch doesn't change behavior.
396
397         * css/html.css:
398         * css/themeWin.css:
399         * html/DateTimeFieldsState.cpp:
400         * html/DateTimeFieldsState.h:
401         * html/TimeInputType.cpp:
402         (WebCore):
403         * html/TimeInputType.h:
404         (TimeInputType):
405         * html/shadow/DateTimeEditElement.cpp:
406         * html/shadow/DateTimeEditElement.h:
407         * html/shadow/DateTimeFieldElement.cpp:
408         * html/shadow/DateTimeFieldElement.h:
409         * html/shadow/DateTimeFieldElements.cpp:
410         * html/shadow/DateTimeFieldElements.h:
411         * html/shadow/DateTimeNumericFieldElement.cpp:
412         * html/shadow/DateTimeNumericFieldElement.h:
413         * html/shadow/DateTimeSymbolicFieldElement.cpp:
414         * html/shadow/DateTimeSymbolicFieldElement.h:
415         * platform/LocalizedStrings.h:
416         (WebCore):
417         * platform/text/DateTimeFormat.cpp:
418         * platform/text/DateTimeFormat.h:
419         * platform/text/LocaleICU.cpp:
420         (WebCore::LocaleICU::LocaleICU):
421         (WebCore::LocaleICU::~LocaleICU):
422         (WebCore):
423         * platform/text/LocaleICU.h:
424         (LocaleICU):
425         * platform/text/LocaleWin.cpp:
426         (WebCore):
427         * platform/text/LocaleWin.h:
428         (LocaleWin):
429         * platform/text/LocalizedNumber.h:
430         (WebCore):
431         * platform/text/LocalizedNumberICU.cpp:
432         (WebCore):
433         * platform/text/LocalizedNumberNone.cpp:
434         (WebCore):
435         * platform/text/Localizer.cpp:
436         (WebCore):
437         * platform/text/Localizer.h:
438         (Localizer):
439         * platform/text/mac/LocaleMac.h:
440         (LocaleMac):
441         * platform/text/mac/LocaleMac.mm:
442         (WebCore):
443         * platform/text/mac/LocalizedNumberMac.mm:
444         (WebCore):
445         * platform/text/win/LocalizedNumberWin.cpp:
446         (WebCore):
447
448 2012-09-26  Zan Dobersek  <zandobersek@gmail.com>
449
450         [GTK] Enable some of the unstable CSS features
451         https://bugs.webkit.org/show_bug.cgi?id=97572
452
453         Reviewed by Martin Robinson.
454
455         Enable the CSS sticky position, CSS3 text decoration and <style scoped>
456         features by default but disable them if unstable features are not meant
457         to be enabled.
458
459         No new tests - the related tests are being unskipped or are having failure
460         expectations removed.
461
462         * GNUmakefile.am:
463         * GNUmakefile.features.am:
464
465 2012-09-26  Dongwoo Joshua Im  <dw.im@samsung.com>
466
467         Fix potential build error on LocalFileSystem::deleteFileSystem
468         https://bugs.webkit.org/show_bug.cgi?id=97632
469
470         Reviewed by Yuta Kitamura.
471
472         Non-Chrome build of WebKit with FILE_SYSTEM flag will be broken at LocalFileSystem::deleteFileSystem.
473         Type of the third parameter is PassOwnPtr<AsyncFileSystemCallbacks> in header file,
474         but PassRefPtr<AsyncFileSystemCallbacks> in cpp file.
475
476         Non-Chrome WebKit build with FILE_SYSTEM should be finished successfully.
477
478         * Modules/filesystem/LocalFileSystem.cpp:
479         (WebCore::LocalFileSystem::deleteFileSystem):
480
481 2012-09-25  Patrick Gansterer  <paroga@webkit.org>
482
483         [WIN] Fix ASSERT in BString after r128988.
484
485         * platform/win/BString.cpp:
486         (WebCore::BString::~BString):
487         (WebCore::BString::adoptBSTR):
488         (WebCore::BString::clear): Set pointer to 0 after freeing.
489
490 2012-09-25  Yoshifumi Inoue  <yosin@chromium.org>
491
492         [Forms] We should disconnect DateTimeEditElement and DateTimeFieldElement on layout()
493         https://bugs.webkit.org/show_bug.cgi?id=97438
494
495         Reviewed by Kent Tamura.
496
497         This patch is for code cleanup. It is better to disconnect DateTimeFieldElement
498         from DateTimeEditElement when DateTimeEditElement doesn't have
499         pointers to DateTimeFieldElement.
500
501         No new tests. This patch doesn't change behavior.
502
503         * html/shadow/DateTimeEditElement.cpp:
504         (WebCore::DateTimeEditElement::resetFields): Changed to call DateTimeFieldElement::removeEventHandler()
505         for existing fields to disconnect DateTimeEditElement and DateTimeFieldElement.
506
507 2012-09-25  Bear Travis  <betravis@adobe.com>
508
509         [CSS Exclusions] shape-inside line segment layout should be based on line position and height
510         https://bugs.webkit.org/show_bug.cgi?id=95479
511
512         Reviewed by Levi Weintraub.
513
514         This patch adds line height to line top to calculate line segments using the line's upper
515         and lower logical edges. The last line in a shape is allowed to overflow the shape,
516         using line top and shape bottom to calculate the available line segments. Overflow
517         behavior will develop in greater detail as the specification advances. For more on
518         overflow, see:
519         - http://dev.w3.org/csswg/css3-exclusions/#shape-inside-property and
520         - https://www.w3.org/Bugs/Public/show_bug.cgi?id=16460
521
522         As more shapes are added, line positions within a shape are no longer guaranteed to
523         have segments (eg, the first line in a circular shape inside), and so many instances
524         of lineState were replaced with hasSegments. Layout code also uses lineOverlapsShapeBounds
525         rather than lineState, now that lines may partially overlap a shape without being
526         completely contained by it. Because layout begins at the shape's logical top, however,
527         we only run into this edge case laying out the last line within a shape-inside.
528
529         Test: fast/exclusions/shape-inside/shape-inside-rounded-rectangle.html
530
531         * rendering/RenderBlockLineLayout.cpp:
532         (WebCore::LineWidth::LineWidth): Use WrapShapeInfo::hasSegments rather than
533         WrapShapeInfo::lineState, as line positions within a shape are no longer
534         guaranteed to always have line segments. 
535         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Ditto.
536         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Pass lineBottom as well as lineTop
537         to computeSegmentsForLine.
538         * rendering/WrapShapeInfo.cpp:
539         (WebCore::WrapShapeInfo::computeSegmentsForLine): Pass lineBottom as well as lineTop
540         to ExclusionShape::getInsideIntervals.
541         * rendering/WrapShapeInfo.h:
542         (WrapShapeInfo):
543         (WebCore::WrapShapeInfo::shapeLogicalBottom): Calculate the logical bottom of an
544         Exclusion Shape.
545         (WebCore::WrapShapeInfo::hasSegments): Allow hasSegments to be called even when
546         a line does not overlap a shape.
547         (WebCore::WrapShapeInfo::lineOverlapsShapeBounds): Test whether a line's top/bottom
548         overlap a shape's top/bottom. This includes lines that begin before or end after
549         a shape but still overlap it.
550
551 2012-09-25  Adam Barth  <abarth@webkit.org>
552
553         [Chromium] Network requests without a networking context can be started
554         https://bugs.webkit.org/show_bug.cgi?id=97498
555
556         Reviewed by Eric Seidel.
557
558         We shouldn't try to start network requests without a networking
559         context. Other ports have a similar null check.
560
561         * platform/network/chromium/ResourceHandle.cpp:
562         (WebCore::ResourceHandle::start):
563
564 2012-09-25  Justin Schuh  <jschuh@chromium.org>
565
566         Mask RenderArena freelist entries.
567         https://bugs.webkit.org/show_bug.cgi?id=97494
568
569         Reviewed by Julien Chaffraix.
570
571         This is a mitigation for freelist spraying. See http://download.crowdstrike.com/papers/hes-exploiting-a-coalmine.pdf.
572
573         No new tests. This is a hardening measure. Found no measurable performance impact with Dromaeo.
574
575         * rendering/RenderArena.cpp:
576         (MaskPtr):
577         (WebCore::RenderArena::allocate):
578         (WebCore::RenderArena::free):
579
580 2012-09-25  Luke Macpherson   <macpherson@chromium.org>
581
582         Ensure variables are resolved for specialized CSS primitive value types.
583         https://bugs.webkit.org/show_bug.cgi?id=95930
584
585         Reviewed by Tony Chang.
586
587         Sometimes CSSPrimitiveValue contains a collection of other CSSPrimitiveValues (eg. 2, 4 or n).
588         This patch makes sure any variables contained inside those child values are resolved.
589
590         Tests: fast/css/variables/root-background-size.html
591                fast/css/variables/var-inside-pair.html
592                fast/css/variables/var-inside-quad.html
593                fast/css/variables/var-inside-shape.html
594
595         * css/CSSBasicShapes.cpp:
596         (WebCore::buildRectangleString):
597         (WebCore::CSSBasicShapeRectangle::cssText):
598         (WebCore):
599         (WebCore::CSSBasicShapeRectangle::serializeResolvingVariables):
600         Generates a string representation of this value with variables resolved from the provided HashMap of variables.
601         (WebCore::CSSBasicShapeRectangle::hasVariableReference):
602         Returns true if any of the values used to describe the rectange depend on the value of a variable.
603         (WebCore::buildCircleString):
604         (WebCore::CSSBasicShapeCircle::cssText):
605         (WebCore::CSSBasicShapeCircle::serializeResolvingVariables):
606         (WebCore::CSSBasicShapeCircle::hasVariableReference):
607         (WebCore::buildEllipseString):
608         (WebCore::CSSBasicShapeEllipse::cssText):
609         (WebCore::CSSBasicShapeEllipse::serializeResolvingVariables):
610         (WebCore::CSSBasicShapeEllipse::hasVariableReference):
611         (WebCore::CSSBasicShapePolygon::serializeResolvingVariables):
612         (WebCore::CSSBasicShapePolygon::hasVariableReference):
613         * css/CSSBasicShapes.h:
614         (CSSBasicShapeRectangle):
615         (CSSBasicShapeCircle):
616         (CSSBasicShapeEllipse):
617         (CSSBasicShapePolygon):
618         * css/CSSPrimitiveValue.cpp:
619         (WebCore::CSSPrimitiveValue::customCssText):
620         Move the logic for generating the strings for Rects, Quads, Pairs and Shapes into their respective classes.
621         (WebCore::CSSPrimitiveValue::customSerializeResolvingVariables):
622         Handle Rects, Quads, Pairs and Shapes when they contain variables, by calling their serializeResolvingVariables method.
623         (WebCore):
624         (WebCore::CSSPrimitiveValue::hasVariableReference):
625         Handle Rects, Quads, Pairs and Shapes by calling their respective hasVariableReference methods.
626         * css/CSSPrimitiveValue.h:
627         (CSSPrimitiveValue):
628         * css/Pair.h:
629         (WebCore::Pair::pairString):
630         (Pair):
631         (WebCore::Pair::cssText):
632         (WebCore::Pair::serializeResolvingVariables):
633         (WebCore::Pair::hasVariableReference):
634         * css/Rect.h:
635         (RectBase):
636         (WebCore::RectBase::hasVariableReference):
637         (WebCore::Rect::rectString):
638         (Rect):
639         (WebCore::Rect::cssText):
640         (WebCore::Rect::serializeResolvingVariables):
641         (WebCore::Quad::quadString):
642         (Quad):
643         (WebCore::Quad::cssText):
644         (WebCore::Quad::serializeResolvingVariables):
645         * css/StyleResolver.cpp:
646         (WebCore::StyleResolver::collectMatchingRulesForList):
647
648 2012-09-25  Filip Pizlo  <fpizlo@apple.com>
649
650         JSC bindings appear to sometimes ignore the possibility of arrays being in sparse mode
651         https://bugs.webkit.org/show_bug.cgi?id=95610
652
653         Reviewed by Oliver Hunt.
654
655         Fix all of the cases I found where we were using getIndexQuickly(), which was wrong
656         if we were in sparse mode.
657
658         * bindings/js/ArrayValue.cpp:
659         (WebCore::ArrayValue::get):
660         * bindings/js/JSBlobCustom.cpp:
661         (WebCore::JSBlobConstructor::constructJSBlob):
662         * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
663         (WebCore::JSCanvasRenderingContext2D::setWebkitLineDash):
664         * bindings/js/JSDOMStringListCustom.cpp:
665         (WebCore::toDOMStringList):
666         * bindings/js/JSInspectorFrontendHostCustom.cpp:
667         (WebCore::populateContextMenuItems):
668         * bindings/js/JSWebSocketCustom.cpp:
669         (WebCore::JSWebSocketConstructor::constructJSWebSocket):
670         * bindings/js/ScriptValue.cpp:
671         (WebCore::jsToInspectorValue):
672         * bindings/js/SerializedScriptValue.cpp:
673         (CloneSerializer):
674         (WebCore::CloneSerializer::serialize):
675
676 2012-09-25  Tim Horton  <timothy_horton@apple.com>
677
678         Load the linearized sRGB profile via NSData instead of CoreFoundation
679         https://bugs.webkit.org/show_bug.cgi?id=97616
680
681         Reviewed by Dan Bernstein.
682
683         * platform/graphics/cg/GraphicsContextCG.cpp:
684         (WebCore::linearRGBColorSpaceRef):
685         * platform/graphics/mac/GraphicsContextMac.mm:
686         (WebCore::linearRGBColorSpaceRef):
687
688 2012-09-25  Mike West  <mkwst@chromium.org>
689
690         CSP logging: Be more developer-friendly when 'default-src' is violated.
691         https://bugs.webkit.org/show_bug.cgi?id=97597
692
693         Reviewed by Adam Barth.
694
695         Developers unfamiliar with the details of Content Security Policy might
696         be confused when 'default-src' is used as a fallback for a directive
697         otherwise absent from the policy they've set. This patch adds an
698         explicit explanation to the permission warning in such a situation.
699
700         New warning string is covered by rebaselining existing tests.
701
702         * page/ContentSecurityPolicy.cpp:
703         (WebCore::CSPDirectiveList::checkEvalAndReportViolation):
704         (WebCore::CSPDirectiveList::checkInlineAndReportViolation):
705         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
706             If the operative directive is 'default-src', output a warning,
707             using the type information present in the report to specify which
708             directive is falling back to the default values.
709
710 2012-09-25  Beth Dakin  <bdakin@apple.com>
711
712         https://bugs.webkit.org/show_bug.cgi?id=97615
713         fast/loader/scroll-position-restored-on-back.html failing after 
714         didFirstLayout/didFirstVisuallyNonEmptyLayout change
715
716         Reviewed by Sam Weinig.
717
718         http://trac.webkit.org/changeset/129545 made it so we only dispatch 
719         the layout callbacks when the client has opted into them. This is a 
720         problem for a bit of work that used to be done, prior to that patch, 
721         in FrameLoader::didFirstLayout(). Because that function did some work 
722         with scroll position and the state machine, and that is work that we 
723         want to do even when the client has not opted into the didFirstLayout 
724         callback. We are seeing this bug in DRT and WTR since those clients 
725         do not opt into the callback. And they shouldn't have to to get this 
726         scroll position and state machine work done. 
727
728         * loader/FrameLoader.cpp:
729         (WebCore::FrameLoader::didLayout):
730         (WebCore::FrameLoader::didFirstLayout):
731         * loader/FrameLoader.h:
732         (FrameLoader):
733         * page/FrameView.cpp:
734         (WebCore::FrameView::performPostLayoutTasks):
735
736 2012-09-24  Simon Fraser  <simon.fraser@apple.com>
737
738         <rdar://problem/12351906> Have DumpRenderTree and WebKitTestRunner crash logs show which test crashed
739
740         Reviewed by Mark Rowe.
741
742         Use a new WebKitSytemInterface function to add data to crash logs about which 
743         test was running when the crash happened.
744
745         * WebCore.exp.in: Export wkSetCrashReportApplicationSpecificInformation
746         * platform/mac/WebCoreSystemInterface.h: Add wkSetCrashReportApplicationSpecificInformation.
747         * platform/mac/WebCoreSystemInterface.mm: Ditto.
748
749 2012-09-25  Adam Klein  <adamk@chromium.org>
750
751         Remove unused DOMAttrModified from EventsNames and Document::ListenerType
752         https://bugs.webkit.org/show_bug.cgi?id=97591
753
754         Reviewed by Ojan Vafai.
755
756         WebKit does not, and will never, fire DOMAttrModified events, so
757         there's no need to create the "DOMAttrModified" event name.
758
759         The only use of the name was to set the DOMATTRMODIFIED_LISTENER bit
760         on Document; with the name gone, the enum value can be removed as well.
761
762         * dom/Document.cpp:
763         (WebCore::Document::addListenerTypeIfNeeded):
764         * dom/Document.h: Remove DOMATTRMODIFIED_LISTENER, and switch this
765         enum to use shift-left instead of hex values, so as to be easier to
766         update in future.
767         * dom/EventNames.h:
768         (WebCore):
769
770 2012-09-25  Leo Yang  <leoyang@rim.com>
771
772         GraphicsContext3D::compileShader is using incorrect string length in GraphicsContext3DOpenGLCommon.cpp
773         https://bugs.webkit.org/show_bug.cgi?id=97476
774
775         Reviewed by Dean Jackson.
776
777         No new tests because it's not testable in webkit test runner.
778
779         * platform/graphics/opengl/GraphicsContext3DOpenGLCommon.cpp:
780         (WebCore::GraphicsContext3D::compileShader):
781         Use translatedShaderCString.length() instead of translatedShaderSource.length()
782         for the shader source length because we are using translatedShaderCString.data()
783         for glShaderSource().
784
785 2012-09-25  Huang Dongsung  <luxtella@company100.net>
786
787         Use USE(3D_GRAPHICS) in CSS SHADERS code when ENABLE(WEBGL) is true.
788         https://bugs.webkit.org/show_bug.cgi?id=97543
789
790         Reviewed by Dean Jackson.
791
792         This patch cleans remaining ENABLE(WEBGL) guards in CSS SHADERS code after
793         r122175, which made USE(3D_GRAPHICS) default to true when ENABLE(WEBGL) is true.
794
795         No new tests because of no behavior changes.
796
797         * rendering/FilterEffectRenderer.cpp:
798         (WebCore):
799         (WebCore::FilterEffectRenderer::build):
800         * rendering/RenderView.cpp:
801         (WebCore):
802         * rendering/RenderView.h:
803         (WebCore):
804         (RenderView):
805
806 2012-09-25  Beth Dakin  <bdakin@apple.com>
807
808         https://bugs.webkit.org/show_bug.cgi?id=95397
809         Need to merge didFirstVisuallyNonEmptyLayout and 
810         didNewFirstVisuallyNonEmptyLayout
811         -and corresponding-
812         <rdar://problem/10791680>
813
814         Reviewed by Sam Weinig.
815
816         This patch merges didFirstLayout, didFirstVisuallyNonEmptyLayout, 
817         and didNewFirstVisuallyNonEmptyLayout. Page keeps track of which 
818         layout milestones we are interested in with a bit mask, so that 
819         different ports/clients can opt-into different milestones. This 
820         will allow us to safely add more layout milestones in the future 
821         if that seems worthwhile.
822
823         Include new file LayoutMilestoneOptions.h
824         * GNUmakefile.list.am:
825         * Target.pri:
826         * WebCore.exp.in:
827         * WebCore.gypi:
828         * WebCore.xcodeproj/project.pbxproj:
829
830         Remove dispatchDidFirstLayout, 
831         dispatchDidFirstVisuallyNonEmptyLayout, and 
832         dispatchDidNewFirstVisuallyNonEmptyLayout. They are now replaced 
833         by dispatchDidLayout(LayoutMilestoneOptions)
834         * loader/EmptyClients.h:
835         (WebCore::EmptyFrameLoaderClient::dispatchDidLayout):
836         * loader/FrameLoader.cpp:
837         (WebCore::FrameLoader::didLayout):
838         * loader/FrameLoader.h:
839         (FrameLoader):
840         * loader/FrameLoaderClient.h:
841         (FrameLoaderClient):
842         (WebCore::FrameLoaderClient::dispatchDidLayout):
843         * page/LayoutMilestoneOptions.h: Added.
844         (WebCore):
845
846         Check with Page to find out which layout milestones the client is 
847         interested in, and then dispatch the notifications when 
848         appropriate.
849         * page/FrameView.cpp:
850         (WebCore::FrameView::performPostLayoutTasks):
851
852         Remove setRelevantRepaintedObjectsCounterThreshold(). Instead keep 
853         track of the layout milestones bit mask.
854         * page/Page.cpp:
855         (WebCore::Page::Page):
856         (WebCore::Page::addLayoutMilestones):
857         (WebCore):
858         (WebCore::Page::isCountingRelevantRepaintedObjects):
859         (WebCore::Page::addRelevantRepaintedObject):
860         * page/Page.h:
861         (Page):
862         (WebCore::Page::layoutMilestones):
863
864 2012-09-25  Andreas Kling  <kling@webkit.org>
865
866         StylePropertySet: Use subclasses to manage varying object layouts.
867         <http://webkit.org/b/97470>
868
869         Reviewed by Antti Koivisto.
870
871         Add two StylePropertySet subclasses:
872
873             - MutableStylePropertySet
874             - ImmutableStylePropertySet
875
876         The StylePropertySet::m_isMutable bit determines which subclass to cast to when accessing
877         the property storage. Added mutablePropertyVector() and immutablePropertyArray() helpers
878         to StylePropertySet (with appropriate assertions.)
879
880         This patch removes one heap allocation (and one step of indirection) in the mutable case,
881         since the Vector<CSSProperty> is no longer heap-allocated, but part of MutableStylePropertySet.
882
883         Override RefCounted::deref() in StylePropertySet to make sure that the correct subclass
884         destructor gets called.
885
886         * WebCore.exp.in:
887         * css/StylePropertySet.cpp:
888         (WebCore::immutableStylePropertySetSize):
889         (WebCore::StylePropertySet::createImmutable):
890         (WebCore::StylePropertySet::immutableCopyIfNeeded):
891         (WebCore::MutableStylePropertySet::MutableStylePropertySet):
892         (WebCore::ImmutableStylePropertySet::ImmutableStylePropertySet):
893         (WebCore::ImmutableStylePropertySet::~ImmutableStylePropertySet):
894         (WebCore::StylePropertySet::~StylePropertySet):
895         (WebCore::StylePropertySet::removeProperty):
896         (WebCore::StylePropertySet::parseDeclaration):
897         (WebCore::StylePropertySet::addParsedProperties):
898         (WebCore::StylePropertySet::removePropertiesInSet):
899         (WebCore::StylePropertySet::removeEquivalentProperties):
900         (WebCore::StylePropertySet::copy):
901         (WebCore::StylePropertySet::reportMemoryUsage):
902         (WebCore::StylePropertySet::append):
903         (WebCore::StylePropertySet::create):
904         * css/StylePropertySet.h:
905         (StylePropertySet):
906         (WebCore::StylePropertySet::StylePropertySet):
907         (ImmutableStylePropertySet):
908         (MutableStylePropertySet):
909         (WebCore::MutableStylePropertySet::MutableStylePropertySet):
910         (WebCore::StylePropertySet::mutablePropertyVector):
911         (WebCore::StylePropertySet::immutablePropertyArray):
912         (WebCore::StylePropertySet::propertyAt):
913         (WebCore::StylePropertySet::propertyCount):
914         (WebCore::StylePropertySet::deref):
915
916 2012-09-25  Joshua Bell  <jsbell@chromium.org>
917
918         IndexedDB: One transaction coordinator per database
919         https://bugs.webkit.org/show_bug.cgi?id=97501
920
921         Reviewed by Tony Chang.
922
923         Per the IDB spec, transactions only need to be sequenced within databases.
924         The implementation was using one coordinator per factory backend (effectively
925         a singleton), which would prevent parallel execution of transactions in different
926         databases. Moved ownership of the transaction coordinator to the database backend.
927
928         Tests: storage/indexeddb/transaction-coordination-across-databases.html
929                storage/indexeddb/transaction-readwrite-exclusive.html
930
931         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
932         (WebCore::IDBDatabaseBackendImpl::create):
933         (WebCore):
934         (WebCore::IDBDatabaseBackendImpl::IDBDatabaseBackendImpl):
935         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
936         (IDBDatabaseBackendImpl):
937         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
938         (WebCore::IDBFactoryBackendImpl::deleteDatabase):
939         (WebCore::IDBFactoryBackendImpl::open):
940         * Modules/indexeddb/IDBFactoryBackendImpl.h:
941         (WebCore):
942         (IDBFactoryBackendImpl):
943         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
944         (WebCore::IDBTransactionCoordinator::create):
945         (WebCore::IDBTransactionCoordinator::IDBTransactionCoordinator):
946         * Modules/indexeddb/IDBTransactionCoordinator.h:
947         (IDBTransactionCoordinator):
948
949 2012-09-25  Sheriff Bot  <webkit.review.bot@gmail.com>
950
951         Unreviewed, rolling out r129517.
952         http://trac.webkit.org/changeset/129517
953         https://bugs.webkit.org/show_bug.cgi?id=97582
954
955         Link errors in chromium (Requested by alecf on #webkit).
956
957         * Modules/mediastream/MediaConstraintsImpl.cpp:
958         * Modules/mediastream/MediaConstraintsImpl.h:
959         * Modules/mediastream/NavigatorMediaStream.cpp:
960         (WebCore::NavigatorMediaStream::webkitGetUserMedia):
961         * Modules/mediastream/UserMediaRequest.cpp:
962         (WebCore::UserMediaRequest::create):
963         (WebCore::UserMediaRequest::UserMediaRequest):
964         * Modules/mediastream/UserMediaRequest.h:
965         (WebCore):
966         (UserMediaRequest):
967         (WebCore::UserMediaRequest::audio):
968         (WebCore::UserMediaRequest::video):
969         * platform/chromium/support/WebMediaConstraints.cpp:
970
971 2012-09-25  Bear Travis  <betravis@adobe.com>
972
973         [CSS Exclusions] Enable css exclusions for multiple blocks per element
974         https://bugs.webkit.org/show_bug.cgi?id=89993
975
976         Reviewed by Julien Chaffraix.
977
978         Similar to multi-column layout, a parent RenderBlock's WrapShapeInfo may affect
979         the inline content of its children. This patch follows the example of ColumnInfo
980         and adds WrapShapeInfo to LayoutState, which tracks the current shape-inside that
981         inline content should respect.
982
983         Tests: fast/exclusions/shape-inside/shape-inside-multiple-blocks.html
984                fast/exclusions/shape-inside/shape-inside-multiple-blocks-vertical.html
985
986         * rendering/LayoutState.cpp:
987         (WebCore::LayoutState::LayoutState): Initialize m_wrapShapeInfo.
988         * rendering/LayoutState.h:
989         (WebCore):
990         (WebCore::LayoutState::LayoutState): Initialize m_wrapShapeInfo.
991         (LayoutState):
992         (WebCore::LayoutState::wrapShapeInfo): Getter for m_wrapShapeInfo.
993         * rendering/RenderBlockLineLayout.cpp:
994         (WebCore::LineWidth::LineWidth): Use LayoutState to lookup WrapShapeInfo.
995         (WebCore::RenderBlock::computeInlineDirectionPositionsForLine): Ditto.
996         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Ditto.
997         * rendering/RenderView.h:
998         (WebCore::RenderView::pushLayoutState): Push LayoutState if a WrapShapeInfo
999         is present.
1000
1001 2012-09-24  Emil A Eklund  <eae@chromium.org>
1002
1003         [chromium] REGRESSION: Incorrect preferred width calculation for table cells
1004         https://bugs.webkit.org/show_bug.cgi?id=97497
1005
1006         Reviewed by Levi Weintraub.
1007
1008         In fixing bug 93911 r125694 caused a problem with the preferred
1009         width calculations for table cells with a fractional padding
1010         where the logic to ensure that the cell is wide enough for the
1011         content returns different results for cells with a fixed width
1012         and cells with an automatic width.
1013
1014         Test: fast/sub-pixel/table-cells-have-stable-width.html
1015
1016         * rendering/AutoTableLayout.cpp:
1017         (WebCore::AutoTableLayout::recalcColumn):
1018         * rendering/RenderBlock.cpp:
1019         (WebCore::RenderBlock::computePreferredLogicalWidths):
1020         Move the logic that ensures that a cell is wide enough from AutoTableLayout::recalcColumn to RenderBlock::computePreferredLogicalWidths to. This way it also applies to FixedTableLayout which had the same problem.
1021
1022 2012-09-25  Dominic Mazzoni  <dmazzoni@google.com>
1023
1024         AX: Chromium doesn't pass accessibility text range and line number tests
1025         https://bugs.webkit.org/show_bug.cgi?id=97246
1026
1027         Reviewed by Chris Fleizach.
1028
1029         Adds a method to get all line breaks at once, so retrieving all
1030         line breaks isn't an O(n^2) operation for Chromium.
1031
1032         Enables four existing tests to pass on Chromium:
1033         Tests: accessibility/textarea-insertion-point-line-number.html
1034                accessibility/textarea-line-for-index.html
1035                accessibility/textarea-selected-text-range.html
1036                accessibility/textbox-role-reports-selection.html
1037
1038         * accessibility/AccessibilityObject.h:
1039         (WebCore::AccessibilityObject::lineBreaks):
1040         * accessibility/AccessibilityRenderObject.cpp:
1041         (WebCore::AccessibilityRenderObject::lineBreaks):
1042         (WebCore):
1043         * accessibility/AccessibilityRenderObject.h:
1044         (AccessibilityRenderObject):
1045
1046 2012-09-25  Mike West  <mkwst@google.com>
1047
1048         CSP paths: Ignore invalid path components, rather than dropping the source completely.
1049         https://bugs.webkit.org/show_bug.cgi?id=97538
1050
1051         Reviewed by Adam Barth.
1052
1053         Content Security Policy directives that accept source lists currently
1054         handle soure URI paths containing '?' or '#' in a draconian fashion by
1055         dropping the entire source expression. We should be slightly friendlier,
1056         and ignore simply the portion of the source expression that we know to
1057         be invalid, just as we previously ignored everything after and including
1058         a '/' in source expressions before we supported paths.
1059
1060         The new behavior is covered by existing tests, and two test-cases added
1061         to http/tests/security/contentSecurityPolicy/source-list-parsing-paths-02.html.
1062
1063         * page/ContentSecurityPolicy.cpp:
1064         (WebCore::CSPSourceList::parsePath):
1065             Report an error to the console, rather than ignoring a path that
1066             contains an invalid fragment or query.
1067         (WebCore::ContentSecurityPolicy::reportInvalidPathCharacter):
1068         (WebCore):
1069         * page/ContentSecurityPolicy.h:
1070             Add a new warning type to cover this case.
1071
1072 2012-09-25  commit-queue@webkit.org  <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
1073
1074         [BlackBerry] Reverting implementation for 407 error pages
1075         https://bugs.webkit.org/show_bug.cgi?id=97455
1076
1077         Reviewed by Rob Buis.
1078
1079         Adding additional fixes to NetworkJob since BlackBerry::Platform::Client
1080         is no longer avaliable. Using BlackBerryPlatformSettings to get proxy
1081         information instead.
1082
1083         BlackBerryPlatformClient was deleted in PR 170160.
1084
1085         * platform/network/blackberry/NetworkJob.cpp:
1086         (WebCore::NetworkJob::sendRequestWithCredentials):
1087
1088 2012-09-25  Hans Wennborg  <hans@chromium.org>
1089
1090         GIFImageReader: fix tautological compare
1091         https://bugs.webkit.org/show_bug.cgi?id=97563
1092
1093         Reviewed by Adam Barth.
1094
1095         The frame_reader->disposal_method field is of type
1096         ImageFrame::FrameDisposalMethod, which has a range of 0--3. Therefore,
1097         recent versions of Clang concludes that the expression
1098         frame_reader->disposal_method == 4
1099         will never be true, and warns about it.
1100
1101         This patch fixes the code by doing the comparison before storing the
1102         value in the enum.
1103
1104         No new functionality, no new tests.
1105
1106         * platform/image-decoders/gif/GIFImageReader.cpp:
1107         (GIFImageReader::read):
1108
1109 2012-09-25  Tommy Widenflycht  <tommyw@google.com>
1110
1111         MediaStream API: Update getUserMedia to match the latest specification
1112         https://bugs.webkit.org/show_bug.cgi?id=97540
1113
1114         Reviewed by Adam Barth.
1115
1116         http://dev.w3.org/2011/webrtc/editor/getusermedia.html#navigatorusermedia
1117         Navigator.getUserMedia is changed so that the audio and video members can either
1118         be a bool or a constraints object.
1119
1120         Existing tests expanded to cover the new change.
1121
1122         * Modules/mediastream/MediaConstraintsImpl.cpp:
1123         (WebCore::MediaConstraintsImpl::create):
1124         (WebCore):
1125         * Modules/mediastream/MediaConstraintsImpl.h:
1126         (MediaConstraintsImpl):
1127         * Modules/mediastream/NavigatorMediaStream.cpp:
1128         (WebCore::NavigatorMediaStream::webkitGetUserMedia):
1129         * Modules/mediastream/UserMediaRequest.cpp:
1130         (WebCore::parseOptions):
1131         (WebCore):
1132         (WebCore::UserMediaRequest::create):
1133         (WebCore::UserMediaRequest::UserMediaRequest):
1134         (WebCore::UserMediaRequest::audio):
1135         (WebCore::UserMediaRequest::video):
1136         (WebCore::UserMediaRequest::audioConstraints):
1137         (WebCore::UserMediaRequest::videoConstraints):
1138         * Modules/mediastream/UserMediaRequest.h:
1139         (WebCore):
1140         (UserMediaRequest):
1141         * platform/chromium/support/WebMediaConstraints.cpp:
1142         (WebKit::WebMediaConstraints::WebMediaConstraints):
1143         (WebKit):
1144
1145 2012-09-25  mire  <mbudaes@adobe.com>
1146
1147         Web Inspector: yellow on-hover pop-up won't go if another pane asynchronously opens
1148         https://bugs.webkit.org/show_bug.cgi?id=97120
1149
1150         Reviewed by Alexander Pavlov.
1151
1152         Add mouseout event listener to popover element so that the pop-up will go when moving to another panel.
1153
1154         No new tests.
1155
1156         * inspector/front-end/Popover.js:
1157         (WebInspector.Popover.prototype.show):
1158         (WebInspector.PopoverHelper.prototype._mouseOut):
1159
1160 2012-09-25  Otto Derek Cheung  <otcheung@rim.com>
1161
1162         [BlackBerry] Reverting implementation for 407 error pages
1163         https://bugs.webkit.org/show_bug.cgi?id=97455
1164
1165         Reviewed by Rob Buis.
1166
1167         Revert "[BlackBerry] Show custom error page when 407 is received"
1168         This reverts commit f6fe97ec3f1841a151e4ebdde21f710a6185f9d6.
1169
1170         * platform/network/blackberry/NetworkJob.cpp:
1171         (WebCore::NetworkJob::handleNotifyStatusReceived):
1172         (WebCore::NetworkJob::notifyAuthReceived):
1173         (WebCore::NetworkJob::sendRequestWithCredentials):
1174
1175 2012-09-25  Otto Derek Cheung  <otcheung@rim.com>
1176
1177         Web Inspector: Cookie info in Network Resources Cookies tab shows "Invalid Date"
1178         https://bugs.webkit.org/show_bug.cgi?id=97471
1179
1180         Reviewed by Yury Semikhatsky.
1181
1182         The original implementation is trying to create a new Date object
1183         using another Date object, which is invalid. Also, Date.toGMTString is
1184         deprecated.
1185
1186         The fix replaces toGMTString with toUTCString and fixes cookie.expire
1187         so it won't crash when an empty requestDate is passed in.
1188
1189         Following RFC 6265, Max-age attributes now take precedence over expiresi
1190         attribute in CookieParser.
1191
1192         Manual testing on inspector to make sure the CookiesTable is properly generated.
1193
1194         * inspector/front-end/CookieParser.js:
1195         (WebInspector.Cookie.prototype.expires):
1196         * inspector/front-end/CookiesTable.js:
1197         (WebInspector.CookiesTable.prototype._createGridNode):
1198
1199 2012-09-25  Keishi Hattori  <keishi@webkit.org>
1200
1201         [Chromium] Enable datalist UI for input type=date
1202         https://bugs.webkit.org/show_bug.cgi?id=97541
1203
1204         Reviewed by Kent Tamura.
1205
1206         This enables datalist UI for input type=date on Chromium.
1207
1208         No new tests. Adding tests in Bug 97551.
1209
1210         * rendering/RenderThemeChromiumCommon.cpp:
1211         (WebCore::RenderThemeChromiumCommon::supportsDataListUI):
1212
1213 2012-09-25  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
1214
1215         [WK2] Supported media MIME types are not included to the list of shown MIME types.
1216         https://bugs.webkit.org/show_bug.cgi?id=97552
1217
1218         Reviewed by Kenneth Rohde Christiansen.
1219
1220         Exported WebCore::MIMETypeRegistry::isSupportedMediaMIMEType() for MAC.
1221
1222         No new tests. No new functionality.
1223
1224         * WebCore.exp.in:
1225
1226 2012-09-25  Vsevolod Vlasov  <vsevik@chromium.org>
1227
1228         Web Inspector: ResourceScriptMapping should no steal scripts from other mappings.
1229         https://bugs.webkit.org/show_bug.cgi?id=97453
1230
1231         Reviewed by Pavel Feldman.
1232
1233         Exposed sourceMapping getter on Script so that resource mapping could check it.
1234
1235         * inspector/front-end/ResourceScriptMapping.js:
1236         (WebInspector.ResourceScriptMapping):
1237         (WebInspector.ResourceScriptMapping.prototype._scriptsForSourceURL):
1238         (WebInspector.ResourceScriptMapping.prototype._reset):
1239
1240 2012-09-25  Keishi Hattori  <keishi@webkit.org>
1241
1242         REGRESSION(r129448): multiple fields time input UI doesn't use system time format settings on Chromium-Mac
1243         https://bugs.webkit.org/show_bug.cgi?id=97517
1244
1245         Reviewed by Kent Tamura.
1246
1247         We need to locale [NSLocale currentLocale] if browser language/@lang equals [[NSLocal currentLocale] localeIdentifier]. Otherwise it won't use the custom time format that the user has set.
1248
1249         No new tests. Unable to test because we need to change system locale settings.
1250
1251         * platform/text/mac/LocaleMac.h:
1252         (LocaleMac):
1253         * platform/text/mac/LocaleMac.mm:
1254         (WebCore::languageFromLocale): Moved to top.
1255         (WebCore):
1256         (WebCore::determineLocale): Modified so it takes a locale as an argument.
1257         (WebCore::Localizer::create):
1258         (WebCore::LocaleMac::LocaleMac): Added checks for invalid locales to this constructor and removed the other one so we don't have duplicated code.
1259         (WebCore::LocaleMac::create):
1260         (WebCore::LocaleMac::currentLocale):
1261
1262 2012-09-20  Alexander Pavlov  <apavlov@chromium.org>
1263
1264         Web Inspector: Relative URL Link Tooltips do not respect <base>
1265         https://bugs.webkit.org/show_bug.cgi?id=43434
1266
1267         Reviewed by Pavel Feldman.
1268
1269         New "baseURL" field added into the DOM.Node payload for document nodes and is made use of while resolving and completing URLs.
1270
1271         * inspector/Inspector.json:
1272         * inspector/InspectorDOMAgent.cpp:
1273         (WebCore::documentBaseURLString):
1274         (WebCore):
1275         (WebCore::InspectorDOMAgent::buildObjectForNode):
1276         * inspector/front-end/AuditRules.js:
1277         (WebInspector.AuditRules.ImageDimensionsRule.prototype.doRun):
1278         (WebInspector.AuditRules.CssInHeadRule.prototype.doRun.externalStylesheetsReceived):
1279         (WebInspector.AuditRules.StylesScriptsOrderRule.prototype.doRun.cssBeforeInlineReceived):
1280         * inspector/front-end/DOMAgent.js:
1281         (WebInspector.DOMNode.prototype.resolveURL):
1282         (WebInspector.DOMDocument):
1283
1284 2012-09-25  Peter Wang  <peter.wang@torchmobile.com.cn>
1285
1286         Web Inspector:  The JS code injected by worker inspector shouldn't be evaluated through JSMainThreadExecState
1287         https://bugs.webkit.org/show_bug.cgi?id=95341
1288
1289         Reviewed by Yury Semikhatsky.
1290
1291         Add extra code to "JSC::InjectedScriptManager" and "JSC::ScriptFunctionCall" to make sure the
1292         interfaces of JSMainThreadExecState are invoked only in main thread.
1293
1294         No new test case for this bug. Without this patch, opening worker inspector will meet failed assert statements.   
1295
1296         * bindings/js/JSInjectedScriptManager.cpp:
1297         (WebCore::InjectedScriptManager::createInjectedScript):
1298         * bindings/js/ScriptFunctionCall.cpp:
1299         (WebCore::ScriptFunctionCall::call):
1300
1301 2012-09-25  Andreas Kling  <kling@webkit.org>
1302
1303         CSSParserString: Avoid pointless String refcount churn in init().
1304         <http://webkit.org/b/94748>
1305
1306         Reviewed by Sam Weinig.
1307
1308         Have CSSParserString::init() take a const String& instead of a String.
1309
1310         * css/CSSParserValues.h:
1311         (WebCore::CSSParserString::init):
1312
1313 2012-09-25  Alexander Pavlov  <apavlov@chromium.org>
1314
1315         Web Inspector: [Styles] For group selectors, transmit their segments with the "matches" flag
1316         https://bugs.webkit.org/show_bug.cgi?id=96999
1317
1318         Reviewed by Pavel Feldman.
1319
1320         The CSSRule protocol object has been modified to include a SelectorList object that contains selector-related data.
1321         CSSAgent methods that return CSS rule matches will return RuleMatch objects that encapsulate matching CSSRules
1322         with indices of matching selectors on the associated selector list, so the additional backend roundtrips
1323         from StylesSidebarPane are no longer necessary.
1324
1325         * inspector/Inspector.json:
1326         * inspector/InspectorCSSAgent.cpp:
1327         (WebCore::InspectorCSSAgent::getMatchedStylesForNode):
1328         (WebCore::InspectorCSSAgent::buildObjectForRule):
1329         (WebCore):
1330         (WebCore::InspectorCSSAgent::buildArrayForRuleList):
1331         (WebCore::InspectorCSSAgent::buildArrayForMatchedRuleList):
1332         * inspector/InspectorCSSAgent.h:
1333         (InspectorCSSAgent):
1334         * inspector/InspectorStyleSheet.cpp:
1335         (WebCore::InspectorStyleSheet::buildObjectForSelectorList):
1336         (WebCore):
1337         (WebCore::InspectorStyleSheet::buildObjectForRule):
1338         * inspector/InspectorStyleSheet.h:
1339         (InspectorStyleSheet):
1340         * inspector/front-end/CSSStyleModel.js:
1341         (WebInspector.CSSStyleModel.parseRuleMatchArrayPayload):
1342         (WebInspector.CSSStyleModel.prototype.getMatchedStylesAsync):
1343         (WebInspector.CSSRule):
1344         (WebInspector.CSSRule.parsePayload):
1345         * inspector/front-end/StylesSidebarPane.js:
1346         (WebInspector.StylesSidebarPane.prototype._innerRebuildUpdate):
1347         (WebInspector.StylesSidebarPane.prototype._rebuildSectionsForStyleRules):
1348         (WebInspector.StylePropertiesSection.prototype._markSelectorMatches):
1349         (WebInspector.StylePropertiesSection.prototype._moveEditorFromSelector):
1350         (WebInspector.StylePropertiesSection.prototype.editingSelectorCancelled):
1351
1352 2012-09-25  MORITA Hajime  <morrita@google.com>
1353
1354         adoptNode() shouldn't reset ownerDocument if the source node failed to remove itself
1355         https://bugs.webkit.org/show_bug.cgi?id=97527
1356
1357         Reviewed by Ryosuke Niwa.
1358
1359         Document::adoptNode() overlooked an error which can happen in Node::removeChild().
1360         Which results an assertion failure. This change adds an error check for that code path.
1361
1362         Test: fast/dom/adopt-node-prevented.html
1363
1364         * dom/Document.cpp:
1365         (WebCore::Document::adoptNode):
1366
1367 2012-09-21  Ilya Tikhonovsky  <loislo@chromium.org>
1368
1369         Web Inspector: extract Vector instrumentation from core NMI code into MemoryInstrumentationVector.h header.
1370         https://bugs.webkit.org/show_bug.cgi?id=96650
1371
1372         Reviewed by Vsevolod Vlasov.
1373
1374         addInstrumentedVector and addInstrumentedVectorPtr were replaced with addMember.
1375         The same thing happens with addVector and addVectorPtr.
1376
1377         * css/CSSGradientValue.cpp:
1378         (WebCore::CSSGradientValue::reportBaseClassMemoryUsage):
1379         * css/CSSImageSetValue.cpp:
1380         (WebCore::CSSImageSetValue::reportDescendantMemoryUsage):
1381         * css/CSSMediaRule.cpp:
1382         (WebCore::CSSMediaRule::reportDescendantMemoryUsage):
1383         * css/CSSRuleList.cpp:
1384         (WebCore::StaticCSSRuleList::reportMemoryUsage):
1385         * css/CSSStyleSheet.cpp:
1386         (WebCore::CSSStyleSheet::reportMemoryUsage):
1387         * css/CSSValueList.cpp:
1388         (WebCore::CSSValueList::reportDescendantMemoryUsage):
1389         * css/MediaList.cpp:
1390         (WebCore::MediaQuerySet::reportMemoryUsage):
1391         * css/MediaQuery.cpp:
1392         (WebCore::MediaQuery::reportMemoryUsage):
1393         * css/StyleResolver.cpp:
1394         (WebCore::StyleResolver::collectMatchingRulesForList):
1395         * css/StyleRule.cpp:
1396         (WebCore::StyleRuleBlock::reportDescendantMemoryUsage):
1397         * css/StyleSheetContents.cpp:
1398         (WebCore::StyleSheetContents::reportMemoryUsage):
1399         * css/WebKitCSSKeyframesRule.cpp:
1400         (WebCore::StyleRuleKeyframes::reportDescendantMemoryUsage):
1401         (WebCore::WebKitCSSKeyframesRule::reportDescendantMemoryUsage):
1402         * css/WebKitCSSRegionRule.cpp:
1403         (WebCore::WebKitCSSRegionRule::reportDescendantMemoryUsage):
1404         * dom/Document.cpp:
1405         (WebCore::Document::reportMemoryUsage):
1406         * loader/DocumentLoader.cpp:
1407         (WebCore::DocumentLoader::reportMemoryUsage):
1408         * platform/network/ResourceRequestBase.cpp:
1409         (WebCore::ResourceRequestBase::reportMemoryUsage):
1410
1411 2012-09-25  Vivek Galatage  <vivekgalatage@gmail.com>
1412
1413         REGRESSION(r129346): It broke !ENABLE(INSPECTOR) build
1414         https://bugs.webkit.org/show_bug.cgi?id=97490
1415
1416         Reviewed by Csaba Osztrogonác.
1417
1418         The dummy class implementation must be under the ENABLE(INSPECTOR)
1419         guard. Added them to prevent from braking the build with --minimal
1420         option for build-webkit
1421
1422         No new tests as caused by missing compile guard.
1423
1424         * testing/Internals.cpp:
1425         (WebCore):
1426
1427 2012-09-24  Bo Liu  <boliu@chromium.org>
1428
1429         Reland "Add in-place reload behavior to ImagesEnabled setting" with optimizations
1430         https://bugs.webkit.org/show_bug.cgi?id=97055
1431
1432         Reviewed by Adam Barth.
1433
1434         Relanding 128780, 128676, 128645. Was reverted in 128914 due to
1435         performance regression in Chromium.
1436
1437         New changes in addition to previously reverted patches:
1438
1439         Refactored CachedResource::requestResource, loadResource, and
1440         revalidateResource. Moved CachedResource::load method to end of
1441         requestResource so there is one place where load is called for all
1442         resources.
1443
1444         Added a enum parameter for requestResource and
1445         determineRevalidationPolicy so that FrameLoaderClient::allowImage call
1446         do not need to be called multiple times.
1447
1448         Removed CachedImage::load call in requestImage so it is not called
1449         twice.
1450
1451         Removed unnecessary Frame.h includes in CachedResource and
1452         CachedImage.
1453
1454         Removed dead load() method declaration in CachedImage.
1455
1456         Updated text expectation for two image-permissions tests to reflect
1457         the removed calls to allowImage.
1458
1459         Tests: fast/loader/display-image-unset-allows-cached-image-load.html
1460                fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html
1461                fast/loader/images-enabled-unset-can-block-image-and-can-reload-in-place.html
1462
1463         * WebCore.exp.in:
1464         * loader/FrameLoader.cpp:
1465         (WebCore::FrameLoader::didBeginDocument):
1466         * loader/SubresourceLoader.cpp:
1467         (WebCore::SubresourceLoader::willSendRequest):
1468         * loader/cache/CachedImage.cpp:
1469         * loader/cache/CachedImage.h:
1470         * loader/cache/CachedResource.cpp:
1471         (WebCore::CachedResource::didAddClient):
1472         * loader/cache/CachedResource.h:
1473         (WebCore):
1474         (WebCore::CachedResource::stillNeedsLoad):
1475         * loader/cache/CachedResourceLoader.cpp:
1476         (WebCore::CachedResourceLoader::CachedResourceLoader):
1477         (WebCore::CachedResourceLoader::requestImage):
1478         (WebCore::CachedResourceLoader::canRequest):
1479         (WebCore::CachedResourceLoader::requestResource):
1480         (WebCore::CachedResourceLoader::revalidateResource):
1481         (WebCore::CachedResourceLoader::loadResource):
1482         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
1483         (WebCore::CachedResourceLoader::setAutoLoadImages):
1484         (WebCore):
1485         (WebCore::CachedResourceLoader::setImagesEnabled):
1486         (WebCore::CachedResourceLoader::clientDefersImage):
1487         (WebCore::CachedResourceLoader::shouldDeferImageLoad):
1488         (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
1489         * loader/cache/CachedResourceLoader.h:
1490         (CachedResourceLoader):
1491         * page/Settings.cpp:
1492         (WebCore::setImageLoadingSettings):
1493         (WebCore::Settings::Settings):
1494         (WebCore::Settings::setLoadsImagesAutomatically):
1495         (WebCore::Settings::imageLoadingSettingsTimerFired):
1496         (WebCore::Settings::setImagesEnabled):
1497         * page/Settings.h:
1498         (Settings):
1499         * testing/InternalSettings.cpp:
1500         (WebCore::InternalSettings::Backup::Backup):
1501         (WebCore::InternalSettings::Backup::restoreTo):
1502         (WebCore::InternalSettings::setImagesEnabled):
1503         (WebCore):
1504         * testing/InternalSettings.h:
1505         (Backup):
1506         (InternalSettings):
1507         * testing/InternalSettings.idl:
1508
1509 2012-09-24  Filip Pizlo  <fpizlo@apple.com>
1510
1511         SerializedScriptValue isn't aware of indexed storage, but should be
1512         https://bugs.webkit.org/show_bug.cgi?id=97515
1513         <rdar://problem/12361874>
1514
1515         Reviewed by Sam Weinig.
1516
1517         New test: fast/js/post-message-numeric-property.html
1518
1519         * bindings/js/SerializedScriptValue.cpp:
1520         (WebCore::CloneDeserializer::putProperty):
1521
1522 2012-09-24  Gavin Barraclough  <barraclough@apple.com>
1523
1524         Remove JSObject::unwrappedGlobalObject(), JSObject::unwrappedObject()
1525         https://bugs.webkit.org/show_bug.cgi?id=97519
1526
1527         Reviewed by Geoff Garen.
1528
1529         JSDOMWindowShell::setWindow should update the structure's globalObject.
1530
1531         * bindings/js/JSDOMWindowShell.h:
1532         (WebCore::JSDOMWindowShell::setWindow):
1533             - Update the JSDOMWindowShell's structure's globalObject when the
1534               window changes.
1535
1536 2012-09-24  Yoshifumi Inoue  <yosin@chromium.org>
1537
1538         [Forms] We should remove DateTimeEditElement::valueAsDouble()
1539         https://bugs.webkit.org/show_bug.cgi?id=97327
1540
1541         Reviewed by Kent Tamura.
1542
1543         This patch removes unused function DateTimeEditElement::valueAsDouble()
1544         and related functions in DateTimeFieldElement.
1545
1546         This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
1547         ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
1548
1549         No new tests. This patch doesn't change behavior.
1550
1551         * html/shadow/DateTimeEditElement.cpp: Removed valueAsDouble() implementation.
1552         * html/shadow/DateTimeEditElement.h: Removed valueAsDouble() declaration.
1553         (DateTimeEditElement):
1554         * html/shadow/DateTimeFieldElement.cpp: Removed valueAsDouble() implementation.
1555         * html/shadow/DateTimeFieldElement.h: Removed unitInMillisecond() and valueAsDouble() declarations.
1556         (DateTimeFieldElement):
1557         * html/shadow/DateTimeFieldElements.cpp: Removed unitInMillisecond() implementations.
1558         * html/shadow/DateTimeFieldElements.h:
1559         (DateTimeAMPMFieldElement): Removed unitInMillisecond() declaration.
1560         (DateTimeHourFieldElement): ditto.
1561         (DateTimeMillisecondFieldElement): ditto.
1562         (DateTimeMinuteFieldElement): ditto.
1563         (DateTimeSecondFieldElement): ditto.
1564
1565 2012-09-24  Antti Koivisto  <antti@apple.com>
1566
1567         Don't use StyleSheetList internally.
1568         https://bugs.webkit.org/show_bug.cgi?id=97504
1569
1570         Reviewed by Ryosuke Niwa.
1571
1572         StyleSheetList is a DOM type and should not be used internally. Use plain Vector instead and construct StyleSheetList on DOM access only.
1573
1574         * css/StyleResolver.cpp:
1575         (WebCore::StyleResolver::StyleResolver):
1576         (WebCore::StyleResolver::addStylesheetsFromSeamlessParents):
1577         (WebCore::StyleResolver::collectMatchingRulesForList):
1578         * css/StyleSheetList.cpp:
1579         (WebCore::StyleSheetList::StyleSheetList):
1580         (WebCore::StyleSheetList::styleSheets):
1581         (WebCore):
1582         (WebCore::StyleSheetList::detachFromDocument):
1583         
1584             Use live stylesheet vector of the documents stylesheet collection as long as we are attached to a document. 
1585             When detached copy the stylesheet vector to a member field and use that instead.
1586
1587         (WebCore::StyleSheetList::length):
1588         (WebCore::StyleSheetList::item):
1589         (WebCore::StyleSheetList::getNamedItem):
1590         * css/StyleSheetList.h:
1591         
1592             Removed StyleSheetVector typedef as Vector<RefPtr<StyleSheet> > is less opaque and not much longer.
1593     
1594         (WebCore):
1595         (WebCore::StyleSheetList::create):
1596         (StyleSheetList):
1597         (WebCore::StyleSheetList::document):
1598         * dom/Document.cpp:
1599         (WebCore::Document::~Document):
1600         (WebCore::Document::setCompatibilityMode):
1601         (WebCore::Document::styleSheets):
1602         * dom/Document.h:
1603         (Document):
1604         * dom/DocumentStyleSheetCollection.cpp:
1605         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
1606         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
1607         (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
1608         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
1609         * dom/DocumentStyleSheetCollection.h:
1610         (WebCore::DocumentStyleSheetCollec
1611
1612 2012-09-24  Laszlo Gombos  <l.gombos@samsung.com>
1613
1614         [GTK][EFL] Remove cairo prefix from include statements 
1615         https://bugs.webkit.org/show_bug.cgi?id=97509
1616
1617         Reviewed by Gyuyoung Kim.
1618
1619         Make the build system consistent by always assuming that directory
1620         that includes the cairo headers is included in the include path.
1621
1622         No new tests as there is no new functionality.
1623
1624         * platform/cairo/WidgetBackingStoreCairo.cpp:
1625         * platform/gtk/GtkWidgetBackingStoreX11.cpp:
1626         * plugins/gtk/PluginViewGtk.cpp:
1627
1628 2012-09-24  Yoshifumi Inoue  <yosin@chromium.org>
1629
1630         Document::adoptNode for multiple fields time input UI should not crash
1631         https://bugs.webkit.org/show_bug.cgi?id=97428
1632
1633         Reviewed by Dimitri Glazkov.
1634
1635         This patch changes Document::removeFocusedNodeOfSubtree() to check
1636         focused node in shadow DOM tree for avoiding Document::m_focusedNode
1637         not to have dangling pointer to field owner in DateTimeFieldElement.
1638
1639         Test:
1640          - fast/dom/shadow/shadow-removechild-and-blur-event.html: test for removeChild dispatches blur event.
1641          - fast/forms/time-multiple-fields/time-multiple-fields-crash-after-adoptnode.html: test for adoptNode not to crash.
1642          - fast/forms/time-multiple-fields/time-multiple-fields-state-change-on-focus-or-blur.html: removeChild of input type "time" dispatches blur event, existing test.
1643
1644         * dom/Document.cpp:
1645         (WebCore::Document::removeFocusedNodeOfSubtree): Changed to check
1646         focused node in shadow DOM tree in addition to descendant node.
1647
1648 2012-09-24  Robin Cao  <robin.cao@torchmobile.com.cn>
1649
1650         [Blackberry] Add a software rendering path for media player
1651         https://bugs.webkit.org/show_bug.cgi?id=97443
1652
1653         Reviewed by Yong Li.
1654
1655         This patch adds a software rendering path for media player. When accelerated rendering
1656         is not supported by the media engine for the current media, the rendering will fallback
1657         to this software path.
1658
1659         PR #212386
1660         Reviewed internally by Max Feil.
1661
1662         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
1663         (WebCore::MediaPlayerPrivate::paint):
1664         (WebCore::MediaPlayerPrivate::updateStates):
1665         (WebCore::MediaPlayerPrivate::supportsAcceleratedRendering):
1666         (WebCore):
1667         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
1668         (MediaPlayerPrivate):
1669
1670 2012-09-24  Benjamin Poulain  <bpoulain@apple.com>
1671
1672         Fix Geolocation error reporting in the test support
1673         https://bugs.webkit.org/show_bug.cgi?id=97386
1674
1675         Reviewed by Sam Weinig.
1676
1677         GeolocationController currently expose GeolocationError which can be either
1678         PermissionDenied or PositionUnavailable.
1679
1680         In practice, only PositionUnavailable is supported and tested, only Chrome
1681         somewhat expose PermissionDenied.
1682         The correct way to deny the permission is through Geolocation::setIsAllowed().
1683
1684         This patch does some of the initial cleanup toward that goal, reducing how
1685         far GeolocationError is spread.
1686
1687         * WebCore.exp.in:
1688         * WebCore.xcodeproj/project.pbxproj:
1689         Mac does not use GeolocationClientMock, it should not be compiled in WebCore.
1690
1691         * platform/mock/GeolocationClientMock.cpp:
1692         (WebCore::GeolocationClientMock::GeolocationClientMock):
1693         (WebCore::GeolocationClientMock::setPosition):
1694         (WebCore::GeolocationClientMock::setPositionUnavailableError):
1695         This method replace setError(). It is limited to PositionUnavailable errors.
1696
1697         (WebCore::GeolocationClientMock::reset):
1698         (WebCore::GeolocationClientMock::controllerTimerFired):
1699         (WebCore):
1700         (WebCore::GeolocationClientMock::clearError):
1701         * platform/mock/GeolocationClientMock.h:
1702         (WebCore):
1703         (GeolocationClientMock):
1704
1705 2012-09-24  Kent Tamura  <tkent@chromium.org>
1706
1707         [Chromium] Implement ValidationMessageClient for Chromium
1708         https://bugs.webkit.org/show_bug.cgi?id=97167
1709
1710         Reviewed by Hajime Morita.
1711
1712         * page/ValidationMessageClient.h:
1713         Add forward declaration for WTF::String.
1714
1715 2012-09-24  Yoshifumi Inoue  <yosin@chromium.org>
1716
1717         [Forms] DateTimeEditElement should return string value for ease of implementing other date/time input types.
1718         https://bugs.webkit.org/show_bug.cgi?id=97303
1719
1720         Reviewed by Kent Tamura.
1721
1722         This patch introduces a function DateTimeEditElement::value() for
1723         setting internal text value of TimeInputType with new function
1724         EditControlOwner::formatDateTimeFieldsState() to utilize this protocl
1725         in other date time input types.
1726
1727         We used DateTimeEditElement::valueAsDouble() and and BaseDateAndTimeInputType::serialize()
1728         to make string value then setting internal text value of multiple
1729         fields time input UI. Although, this steps doesn't work well for
1730         other date/time input types.
1731
1732         This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
1733         ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
1734
1735         No new tests. This patch doesn't change behavior.
1736
1737         * html/DateTimeFieldsState.cpp:
1738         (WebCore::DateTimeFieldsState::hour23): Added to convert 1 to 12 hour value to 0 to 23 hour.
1739         * html/DateTimeFieldsState.h:
1740         (DateTimeFieldsState): Added declaration of hour23().
1741         * html/TimeInputType.cpp:
1742         (WebCore::TimeInputType::DateTimeEditControlOwnerImpl::editControlValueChanged): Changed to use DateTimeEditElement::value() instead of DateTimeEditElement::valueAsDouble().
1743         (WebCore::TimeInputType::DateTimeEditControlOwnerImpl::formatDateTimeFieldsState): Added to format time.
1744         (WebCore::TimeInputType::restoreFormControlState): Changed to use DateTimeEditElement::value() instead of DateTimeEditElement::valueAsDouble().
1745         * html/TimeInputType.h:
1746         (DateTimeEditControlOwnerImpl): Added a declaration of formatDateTimeFieldsState().
1747         * html/shadow/DateTimeEditElement.cpp:
1748         (WebCore::DateTimeEditElement::value): Added.
1749         * html/shadow/DateTimeEditElement.h:
1750         (EditControlOwner): Added a declaration of formatDateTimeFieldsState().
1751         (DateTimeEditElement): Added a declaration of value().
1752
1753 2012-09-24  Dean Jackson  <dino@apple.com>
1754
1755         [WebGL] Intel Mac needs built-in function emulation
1756         https://bugs.webkit.org/show_bug.cgi?id=96140
1757
1758         Reviewed by Sam Weinig.
1759
1760         Temporarily turn on built-in function emulation for Intel GPUs
1761         on OS X. This is a work-around for a driver bug, and
1762         will be removed once the driver is updated:
1763         https://bugs.webkit.org/show_bug.cgi?id=97503
1764
1765         This can be tested using the Khronos WebGL conformance
1766         suite, in particular:
1767
1768         conformance/glsl/functions/glsl-function-dot.html
1769         conformance/glsl/functions/glsl-function-length.html
1770         conformance/glsl/functions/glsl-function-normalize.html
1771         conformance/glsl/functions/glsl-function-reflect.html
1772
1773         Note that the faceforward built-in will still cause
1774         problems on Intel GPUs, but this would require an unnecessary
1775         change in the ANGLE project (remember, we're going to
1776         remove this code once the driver is fixed).
1777
1778         * platform/graphics/opengl/Extensions3DOpenGLCommon.cpp:
1779         (WebCore::Extensions3DOpenGLCommon::getTranslatedShaderSourceANGLE):
1780             Temporarily add "Intel" to the list of GPUs we do translation
1781             for in the shader compiler.
1782
1783 2012-09-24  Peter Wang  <peter.wang@torchmobile.com.cn>
1784
1785         There is a mistake in InspectorProfilerAgent::enable(bool skipRecompile)
1786         https://bugs.webkit.org/show_bug.cgi?id=97450
1787
1788         Reviewed by Yury Semikhatsky.
1789
1790         The "InspectorProfilerAgent::enable()" should invokes "PageScriptDebugServer" in
1791         no-worker thread.
1792
1793         No new test case.
1794
1795         * inspector/InspectorProfilerAgent.cpp:
1796         (WebCore::PageProfilerAgent::recompileScript):
1797         (PageProfilerAgent):
1798         (WebCore::WorkerProfilerAgent::recompileScript):
1799         (WorkerProfilerAgent):
1800         (WebCore::InspectorProfilerAgent::disable):
1801         (WebCore::InspectorProfilerAgent::enable):
1802         * inspector/InspectorProfilerAgent.h:
1803         (InspectorProfilerAgent):
1804
1805 2012-09-24  Patrick Gansterer  <paroga@webkit.org>
1806
1807         Remove String::operator+=()
1808         https://bugs.webkit.org/show_bug.cgi?id=96172
1809
1810         Reviewed by Benjamin Poulain.
1811
1812         Replace the last usage with String::append() in Gtk.
1813
1814         * platform/gtk/GtkInputMethodFilter.cpp:
1815         (WebCore::GtkInputMethodFilter::handleCommit):
1816
1817 2012-09-24  Mark Pilgrim  <pilgrim@chromium.org>
1818
1819         [Chromium][Mac] Remove loadFont from PlatformSupport
1820         https://bugs.webkit.org/show_bug.cgi?id=97360
1821
1822         Reviewed by Adam Barth.
1823
1824         Part of a refactoring series. See tracking bug 82948.
1825
1826         * platform/chromium/PlatformSupport.h:
1827         (PlatformSupport):
1828         * platform/graphics/chromium/CrossProcessFontLoading.mm:
1829
1830 2012-09-24  Tony Chang  <tony@chromium.org>
1831
1832         Replace 2 uses of updateLogicalHeight with computeLogicalHeight
1833         https://bugs.webkit.org/show_bug.cgi?id=97486
1834
1835         Reviewed by Ojan Vafai.
1836
1837         More work for bug 96804.  This is just a refactoring.
1838
1839         No new tests, behavior should be the same as before.
1840
1841         * rendering/RenderFlowThread.cpp:
1842         (WebCore::RenderFlowThread::computeLogicalHeight):
1843         * rendering/RenderFlowThread.h:
1844         * rendering/RenderMultiColumnFlowThread.cpp:
1845         (WebCore::RenderMultiColumnFlowThread::computeLogicalHeight):
1846         (WebCore):
1847         * rendering/RenderMultiColumnFlowThread.h:
1848         (RenderMultiColumnFlowThread):
1849
1850 2012-09-21  Kenneth Russell  <kbr@google.com>
1851
1852         [V8] ArrayBuffer code should not pass a negative length to SetIndexedPropertiesToExternalArrayData()
1853         https://bugs.webkit.org/show_bug.cgi?id=96703
1854
1855         Reviewed by Adam Barth.
1856
1857         Check length arguments that may be passed to SetIndexedPropertiesToExternalArrayData.
1858
1859         No tests because it is not guaranteed that buffers this large can actually be allocated.
1860
1861         * bindings/v8/custom/V8ArrayBufferViewCustom.h:
1862         (WebCore::wrapArrayBufferView):
1863         (WebCore::constructWebGLArrayWithArrayBufferArgument):
1864         (WebCore::constructWebGLArray):
1865
1866 2012-09-24  Antti Koivisto  <antti@apple.com>
1867
1868         Split stylesheet related code out from Document 
1869         https://bugs.webkit.org/show_bug.cgi?id=97353
1870
1871         Reviewed by Andreas Kling.
1872
1873         Document is big and unwieldy. The code related to tracking active stylesheets can be factored out.
1874         
1875         The patch moves stylesheet upkeep, collection and invalidation code from Document to a separate
1876         DocumentStyleSheetCollection class. There are no functional changes.
1877         
1878         The usesLinkRules stylesheet feature bit and the related code is removed as no one was using it.
1879
1880         * WebCore.xcodeproj/project.pbxproj:
1881         * css/SelectorChecker.cpp:
1882         (WebCore::SelectorChecker::checkOneSelector):
1883         * css/StyleResolver.cpp:
1884         (WebCore::StyleResolver::StyleResolver):
1885         (WebCore::StyleResolver::Features::Features):
1886         (WebCore::StyleResolver::Features::add):
1887         (WebCore::StyleResolver::Features::clear):
1888         (WebCore::StyleResolver::collectMatchingRulesForList):
1889         * css/StyleResolver.h:
1890         (WebCore::StyleResolver::usesBeforeAfterRules):
1891         (Features):
1892         * dom/Document.cpp:
1893         (WebCore::Document::Document):
1894         (WebCore::Document::~Document):
1895         (WebCore::Document::setCompatibilityMode):
1896         (WebCore::Document::recalcStyle):
1897         (WebCore):
1898         (WebCore::Document::createStyleResolver):
1899         (WebCore::Document::seamlessParentUpdatedStylesheets):
1900         (WebCore::Document::didRemoveAllPendingStylesheet):
1901         (WebCore::Document::processHttpEquiv):
1902         (WebCore::Document::styleSheets):
1903         (WebCore::Document::preferredStylesheetSet):
1904         (WebCore::Document::selectedStylesheetSet):
1905         (WebCore::Document::setSelectedStylesheetSet):
1906         (WebCore::Document::styleResolverChanged):
1907         (WebCore::Document::reportMemoryUsage):
1908         (WebCore::Document::haveStylesheetsLoaded):
1909         * dom/Document.h:
1910         (WebCore):
1911         (Document):
1912         (WebCore::Document::styleSheetCollection):
1913         (WebCore::Document::hasNodesWithPlaceholderStyle):
1914         (WebCore::Document::setNeedsNotifyRemoveAllPendingStylesheet):
1915         (WebCore::Document::inStyleRecalc):
1916         * dom/DocumentStyleSheetCollection.cpp: Added.
1917         (WebCore):
1918         (WebCore::DocumentStyleSheetCollection::DocumentStyleSheetCollection):
1919         (WebCore::DocumentStyleSheetCollection::~DocumentStyleSheetCollection):
1920         (WebCore::DocumentStyleSheetCollection::pageUserSheet):
1921         (WebCore::DocumentStyleSheetCollection::clearPageUserSheet):
1922         (WebCore::DocumentStyleSheetCollection::updatePageUserSheet):
1923         (WebCore::DocumentStyleSheetCollection::pageGroupUserSheets):
1924         (WebCore::DocumentStyleSheetCollection::clearPageGroupUserSheets):
1925         (WebCore::DocumentStyleSheetCollection::updatePageGroupUserSheets):
1926         (WebCore::DocumentStyleSheetCollection::addUserSheet):
1927         (WebCore::DocumentStyleSheetCollection::removePendingSheet):
1928         (WebCore::DocumentStyleSheetCollection::addStyleSheetCandidateNode):
1929         (WebCore::DocumentStyleSheetCollection::removeStyleSheetCandidateNode):
1930         (WebCore::DocumentStyleSheetCollection::collectActiveStyleSheets):
1931         (WebCore::DocumentStyleSheetCollection::testAddedStyleSheetRequiresStyleRecalc):
1932         (WebCore::DocumentStyleSheetCollection::analyzeStyleSheetChange):
1933         (WebCore::styleSheetsUseRemUnits):
1934         (WebCore::DocumentStyleSheetCollection::updateActiveStyleSheets):
1935         (WebCore::DocumentStyleSheetCollection::combineCSSFeatureFlags):
1936         (WebCore::DocumentStyleSheetCollection::resetCSSFeatureFlags):
1937         (WebCore::DocumentStyleSheetCollection::reportMemoryUsage):
1938         * dom/DocumentStyleSheetCollection.h: Added.
1939         (WebCore):
1940         (DocumentStyleSheetCollection):
1941         (WebCore::DocumentStyleSheetCollection::authorStyleSheets):
1942         (WebCore::DocumentStyleSheetCollection::documentUserSheets):
1943         (WebCore::DocumentStyleSheetCollection::needsUpdateActiveStylesheetsOnStyleRecalc):
1944         (WebCore::DocumentStyleSheetCollection::preferredStylesheetSetName):
1945         (WebCore::DocumentStyleSheetCollection::selectedStylesheetSetName):
1946         (WebCore::DocumentStyleSheetCollection::setPreferredStylesheetSetName):
1947         (WebCore::DocumentStyleSheetCollection::setSelectedStylesheetSetName):
1948         (WebCore::DocumentStyleSheetCollection::addPendingSheet):
1949         (WebCore::DocumentStyleSheetCollection::hasPendingSheets):
1950         (WebCore::DocumentStyleSheetCollection::usesSiblingRules):
1951         (WebCore::DocumentStyleSheetCollection::setUsesSiblingRulesOverride):
1952         (WebCore::DocumentStyleSheetCollection::usesFirstLineRules):
1953         (WebCore::DocumentStyleSheetCollection::usesFirstLetterRules):
1954         (WebCore::DocumentStyleSheetCollection::setUsesFirstLetterRules):
1955         (WebCore::DocumentStyleSheetCollection::usesBeforeAfterRules):
1956         (WebCore::DocumentStyleSheetCollection::setUsesBeforeAfterRulesOverride):
1957         (WebCore::DocumentStyleSheetCollection::usesRemUnits):
1958         (WebCore::DocumentStyleSheetCollection::setUsesRemUnit):
1959         * dom/Element.cpp:
1960         (WebCore::Element::recalcStyle):
1961         * dom/ProcessingInstruction.cpp:
1962         (WebCore::ProcessingInstruction::~ProcessingInstruction):
1963         (WebCore::ProcessingInstruction::checkStyleSheet):
1964         (WebCore::ProcessingInstruction::sheetLoaded):
1965         (WebCore::ProcessingInstruction::insertedInto):
1966         (WebCore::ProcessingInstruction::removedFrom):
1967         * dom/StyleElement.cpp:
1968         (WebCore::StyleElement::insertedIntoDocument):
1969         (WebCore::StyleElement::removedFromDocument):
1970         (WebCore::StyleElement::clearDocumentData):
1971         (WebCore::StyleElement::createSheet):
1972         (WebCore::StyleElement::sheetLoaded):
1973         (WebCore::StyleElement::startLoadingDynamicSheet):
1974         * html/HTMLLinkElement.cpp:
1975         (WebCore::HTMLLinkElement::~HTMLLinkElement):
1976         (WebCore::HTMLLinkElement::insertedInto):
1977         (WebCore::HTMLLinkElement::removedFrom):
1978         (WebCore::HTMLLinkElement::addPendingSheet):
1979         (WebCore::HTMLLinkElement::removePendingSheet):
1980         * html/HTMLQuoteElement.cpp:
1981         (WebCore::HTMLQuoteElement::insertedInto):
1982         * html/HTMLViewSourceDocument.cpp:
1983         (WebCore::HTMLViewSourceDocument::HTMLViewSourceDocument):
1984         * mathml/MathMLMathElement.cpp:
1985         (WebCore::MathMLMathElement::insertedInto):
1986         * page/Page.cpp:
1987         (WebCore::Page::userStyleSheetLocationChanged):
1988         * page/PageGroup.cpp:
1989         (WebCore::PageGroup::resetUserStyleCacheInAllFrames):
1990         * rendering/RenderBR.cpp:
1991         (WebCore::RenderBR::lineHeight):
1992         * rendering/RenderBlock.cpp:
1993         (WebCore::RenderBlock::styleDidChange):
1994         (WebCore::RenderBlock::splitBlocks):
1995         (WebCore::RenderBlock::addChildIgnoringAnonymousColumnBlocks):
1996         (WebCore::RenderBlock::lineHeight):
1997         (WebCore::RenderBlock::updateFirstLetter):
1998         * rendering/RenderInline.cpp:
1999         (WebCore::RenderInline::styleDidChange):
2000         (WebCore::RenderInline::updateAlwaysCreateLineBoxes):
2001         (WebCore::RenderInline::addChildIgnoringContinuation):
2002         (WebCore::RenderInline::splitInlines):
2003         (WebCore::RenderInline::lineHeight):
2004         * rendering/RenderObject.cpp:
2005         (WebCore::RenderObject::uncachedFirstLineStyle):
2006         (WebCore::RenderObject::firstLineStyleSlowCase):
2007         * rendering/RenderObject.h:
2008         (WebCore::RenderObject::firstLineStyle):
2009         * rendering/RenderObjectChildList.cpp:
2010         (WebCore::RenderObjectChildList::updateBeforeAfterContent):
2011         * rendering/RenderTableRow.cpp:
2012         (WebCore::RenderTableRow::updateBeforeAndAfterContent):
2013         * rendering/RootInlineBox.cpp:
2014         (WebCore::RootInlineBox::verticalPositionForBox):
2015
2016 2012-09-24  Otto Derek Cheung  <otcheung@rim.com>
2017
2018         [BlackBerry] Reverting implementation for 407 error pages
2019         https://bugs.webkit.org/show_bug.cgi?id=97455
2020
2021         Reviewed by Rob Buis.
2022
2023         Revert "[BlackBerry] Reverting implementation for 407 error pages"
2024         This reverts commit fda0a1b6ac40c06c03bb6293b4a7d7353c3ca238.
2025
2026         This revert also reverts commit 0cffe01961fb80204138505bcec29a83818efb73
2027         due to dependency issues.
2028
2029         * PlatformBlackBerry.cmake:
2030         * platform/blackberry/AuthenticationChallengeManager.cpp: Removed.
2031         * platform/blackberry/AuthenticationChallengeManager.h:
2032         * platform/blackberry/PageClientBlackBerry.h:
2033         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
2034         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
2035         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
2036         (WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
2037         (WebCore::MediaPlayerPrivate::notifyChallengeResult):
2038         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
2039         (MediaPlayerPrivate):
2040         * platform/network/blackberry/NetworkJob.cpp:
2041         (WebCore::NetworkJob::NetworkJob):
2042         (WebCore::NetworkJob::handleNotifyStatusReceived):
2043         (WebCore::NetworkJob::notifyAuthReceived):
2044         (WebCore::NetworkJob::handleNotifyClose):
2045         (WebCore::NetworkJob::sendRequestWithCredentials):
2046         (WebCore::NetworkJob::notifyChallengeResult):
2047         * platform/network/blackberry/NetworkJob.h:
2048         (NetworkJob):
2049
2050 2012-09-24  Chris Rogers  <crogers@google.com>
2051
2052         [REGRESSION] Layout Test webaudio/biquad-getFrequencyResponse.html is failing
2053         https://bugs.webkit.org/show_bug.cgi?id=97439
2054
2055         Reviewed by Kenneth Russell.
2056
2057         Fixes uninitialized member variable.
2058
2059         This should fix flaky failing test: webaudio/biquad-getFrequencyResponse.html
2060
2061         * Modules/webaudio/BiquadProcessor.cpp:
2062         (WebCore::BiquadProcessor::BiquadProcessor):
2063
2064 2012-09-24  Tony Chang  <tony@chromium.org>
2065
2066         flex-grow should be 1 when omitted from flex shorthand
2067         https://bugs.webkit.org/show_bug.cgi?id=97480
2068
2069         Reviewed by Ojan Vafai.
2070
2071         We were using 0, based on an outdated version of the spec.
2072
2073         Tests: css3/flexbox/flex-property-parsing.html
2074                css3/flexbox/flex-algorithm.html: New test case.
2075
2076         * css/CSSParser.cpp:
2077         (WebCore::CSSParser::parseFlex):
2078
2079 2012-09-24  Benjamin Poulain  <benjamin@webkit.org>
2080
2081         Add support for query encoding to WTFURL
2082         https://bugs.webkit.org/show_bug.cgi?id=97422
2083
2084         Reviewed by Adam Barth.
2085
2086         Add the Charset conversion on WebCore side.
2087
2088         * platform/KURLWTFURL.cpp:
2089         (WebCore::KURL::KURL):
2090         (CharsetConverter):
2091         (WebCore::CharsetConverter::CharsetConverter):
2092         * platform/mac/KURLMac.mm:
2093         (WebCore::KURL::KURL):
2094
2095 2012-09-24  Benjamin Poulain  <benjamin@webkit.org>
2096
2097         Integrate most of GoogleURL in WTFURL
2098         https://bugs.webkit.org/show_bug.cgi?id=97405
2099
2100         Reviewed by Adam Barth.
2101
2102         Loosen KURLWTFURL to be able to run most tests in Debug.
2103
2104         * platform/KURLWTFURL.cpp:
2105         (WebCore::KURL::KURL):
2106         (WebCore::KURL::hasPort):
2107         (WebCore::KURL::user):
2108         (WebCore::KURL::pass):
2109         (WebCore::KURL::hasPath):
2110         (WebCore::KURL::path):
2111         (WebCore::KURL::query):
2112         (WebCore::KURL::fragmentIdentifier):
2113         (WebCore::KURL::fileSystemPath):
2114
2115 2012-09-24  Hans Muller  <hmuller@adobe.com>
2116
2117         [CSS Exclusions] ExclusionShape API should use logical coordinates for input/output
2118         https://bugs.webkit.org/show_bug.cgi?id=96156
2119
2120         Reviewed by Dirk Schulze.
2121
2122         Correct how ExclusionShapes deal with logical coordinates and enable
2123         shape-inside exclusion layout for vertical writing-modes.
2124
2125         BasicShape's are defined in physical cooordinates, incoming line and box
2126         dimensions are logical coordinates, and the ExclusionShape internals assume
2127         that lines are aligned with the Y axis. The createExclusionShape() method
2128         is responsible for converting the BasicShape to the internal coordinate
2129         system when the writing-mode is vertical. Similarly, the getInclude,ExcludedIntervals()
2130         methods are responsible for converting their logical line parameters to Y
2131         values in the internal coordinate system. The min,maxYForLogicalLine()
2132         methods do the conversion, based on the WritingMode the ExclusionShape
2133         was created with. The getInclude,ExcludedIntervals() methods return the
2134         logical left and right edges of line segments. No transformation is needed for this.
2135
2136         The ExclusionShape's internal coordinate system is essentially the
2137         "logical" one, except that top/bottom always map to Y, no matter what
2138         the writing-mode is.  This is just to simplify writing geometrical shape
2139         algorithms, notably the complex ones for polygons. The bug report includes a
2140         pair of diagrams that clarify how internal coordinates are related to logical
2141         and physical coordinates.
2142
2143         Test: fast/exclusions/shape-inside/shape-inside-vertical-text.html
2144
2145         * rendering/ExclusionRectangle.cpp:
2146         (WebCore::ExclusionRectangle::getExcludedIntervals): rename more accurately reflects return value
2147         (WebCore::ExclusionRectangle::getIncludedIntervals): rename for consistency with "excluded" version
2148         * rendering/ExclusionRectangle.h:
2149         * rendering/ExclusionShape.cpp:
2150         (WebCore):
2151         (WebCore::ExclusionShape::createExclusionShape):
2152         * rendering/ExclusionShape.h:
2153         (LineSegment):
2154         (WebCore::LineSegment::LineSegment): relocated from WrapShapeInfo.h
2155         (WebCore):
2156         (ExclusionShape):
2157         (WebCore::ExclusionShape::minYForLogicalLine):
2158         (WebCore::ExclusionShape::maxYForLogicalLine):
2159         (WebCore::ExclusionShape::internalToLogicalBoundingBox):
2160         * rendering/WrapShapeInfo.cpp:
2161         (WebCore::WrapShapeInfo::isWrapShapeInfoEnabledForRenderBlock):
2162         (WebCore::WrapShapeInfo::computeShapeSize): pass writingMode to createExclusionShape()
2163         (WebCore::WrapShapeInfo::computeSegmentsForLine): removed short-circuit for vertical writing-modes
2164         * rendering/WrapShapeInfo.h:
2165         (WebCore):
2166
2167 2012-09-24  Tony Chang  <tony@chromium.org>
2168
2169         Replace RenderMeter::updateLogicalHeight to RenderMeter::computeLogicalHeight
2170         https://bugs.webkit.org/show_bug.cgi?id=97475
2171
2172         Reviewed by Ojan Vafai.
2173
2174         Using RenderMeter::computeLogicalHeight is part of bug 96804.
2175         Also fix some code to be vertical writing mode aware. This doesn't actually cause
2176         a behavioral difference because we use percentage heights/widths which don't depend on
2177         updateLogicalWidth or computeLogicalHeight.  You can still see bugs if you try to set
2178         the min-width on a <meter> node in a vertical writing mode.
2179
2180         No new tests, no behavioral changes.
2181
2182         * rendering/RenderMeter.cpp:
2183         (WebCore::RenderMeter::updateLogicalWidth): Make vertical writing mode aware.
2184         (WebCore::RenderMeter::computeLogicalHeight): Switch from updateLogicalHeight and make vertical writing mode aware.
2185         * rendering/RenderMeter.h:
2186         (RenderMeter):
2187
2188 2012-09-24  Dimitri Glazkov  <dglazkov@chromium.org>
2189
2190         Remove unbaked support for :scope pseudo-class.
2191         https://bugs.webkit.org/show_bug.cgi?id=97467
2192
2193         Reviewed by Antti Koivisto.
2194
2195         It turns out, the Selectors 4 require ":scope" to match contextual reference element set, which would be the root node in querySelector:
2196         http://dev.w3.org/csswg/selectors4/#the-scope-pseudo
2197
2198         Right now, we simply make ":scope" equivalent to ":root", which is not correct. Let's remove the partial implementation until we have
2199         time/energy to fully implement it.
2200
2201         No new tests, removing half-baked feature.
2202
2203         * css/CSSSelector.cpp:
2204         (WebCore::CSSSelector::pseudoId): Removed all mentions of PseudoScope
2205         (WebCore::nameToPseudoTypeMap): Ditto.
2206         (WebCore::CSSSelector::extractPseudoType): Ditto.
2207         * css/CSSSelector.h: Ditto.
2208         * css/SelectorChecker.cpp:
2209         (WebCore::SelectorChecker::checkOneSelector): Ditto.
2210
2211 2012-09-24  Ryosuke Niwa  <rniwa@webkit.org>
2212
2213         suspend/resumeWidgetHierarchyUpdates should be a RAII object
2214         https://bugs.webkit.org/show_bug.cgi?id=96706
2215
2216         Reviewed by Simon Fraser.
2217
2218         Replaced suspendWidgetHierarchyUpdates and resumeWidgetHierarchyUpdates by WidgetHierarchyUpdatesSuspensionScope.
2219
2220         * WebCore.exp.in: Export new symbols.
2221         * dom/ContainerNode.cpp:
2222         (WebCore::ContainerNode::removeChild):
2223         (WebCore::ContainerNode::removeChildren):
2224         * dom/Document.cpp:
2225         (WebCore::Document::recalcStyle):
2226         * dom/Element.cpp:
2227         (WebCore::Element::attach):
2228         (WebCore::Element::detach):
2229         * page/mac/EventHandlerMac.mm:
2230         (WebCore::EventHandler::passMouseDownEventToWidget):
2231         * rendering/RenderWidget.cpp:
2232         (WebCore):
2233         (WebCore::WidgetHierarchyUpdatesSuspensionScope::widgetNewParentMap):
2234         (WebCore::WidgetHierarchyUpdatesSuspensionScope::moveWidgets):
2235         (WebCore::moveWidgetToParentSoon):
2236         * rendering/RenderWidget.h:
2237         (WidgetHierarchyUpdatesSuspensionScope):
2238         (WebCore::WidgetHierarchyUpdatesSuspensionScope::WidgetHierarchyUpdatesSuspensionScope):
2239         (WebCore::WidgetHierarchyUpdatesSuspensionScope::~WidgetHierarchyUpdatesSuspensionScope):
2240         (WebCore::WidgetHierarchyUpdatesSuspensionScope::isSuspended):
2241         (WebCore::WidgetHierarchyUpdatesSuspensionScope::scheduleWidgetToMove):
2242         (WebCore):
2243         (RenderWidget):
2244
2245 2012-09-24  Otto Derek Cheung  <otcheung@rim.com>
2246
2247         [BlackBerry] Reverting implementation for 407 error pages
2248         https://bugs.webkit.org/show_bug.cgi?id=97455
2249
2250         Reviewed by Rob Buis.
2251
2252         Revert "[BlackBerry] Show custom error page when 407 is received"
2253         This reverts commit e6d14529428fe47916fcb997528095b8acad2f2b.
2254
2255         * platform/network/blackberry/NetworkJob.cpp:
2256         (WebCore::NetworkJob::handleNotifyStatusReceived):
2257         (WebCore::NetworkJob::notifyAuthReceived):
2258         (WebCore::NetworkJob::sendRequestWithCredentials):
2259
2260 2012-09-24  Sheriff Bot  <webkit.review.bot@gmail.com>
2261
2262         Unreviewed, rolling out r129388.
2263         http://trac.webkit.org/changeset/129388
2264         https://bugs.webkit.org/show_bug.cgi?id=97477
2265
2266         Caused an assertion in a WebKit2 unit test (Requested by
2267         abarth on #webkit).
2268
2269         * WebCore.exp.in:
2270         * loader/FrameLoader.cpp:
2271         (WebCore::FrameLoader::didBeginDocument):
2272         * loader/SubresourceLoader.cpp:
2273         (WebCore::SubresourceLoader::willSendRequest):
2274         * loader/cache/CachedImage.cpp:
2275         * loader/cache/CachedImage.h:
2276         (WebCore::CachedImage::stillNeedsLoad):
2277         (CachedImage):
2278         * loader/cache/CachedResource.cpp:
2279         (WebCore::CachedResource::didAddClient):
2280         * loader/cache/CachedResource.h:
2281         (WebCore):
2282         * loader/cache/CachedResourceLoader.cpp:
2283         (WebCore::CachedResourceLoader::CachedResourceLoader):
2284         (WebCore::CachedResourceLoader::requestImage):
2285         (WebCore::CachedResourceLoader::canRequest):
2286         (WebCore::CachedResourceLoader::requestResource):
2287         (WebCore::CachedResourceLoader::revalidateResource):
2288         (WebCore::CachedResourceLoader::loadResource):
2289         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
2290         (WebCore::CachedResourceLoader::setAutoLoadImages):
2291         * loader/cache/CachedResourceLoader.h:
2292         (CachedResourceLoader):
2293         * page/Settings.cpp:
2294         (WebCore::setLoadsImagesAutomaticallyInAllFrames):
2295         (WebCore::Settings::Settings):
2296         (WebCore::Settings::setLoadsImagesAutomatically):
2297         (WebCore::Settings::loadsImagesAutomaticallyTimerFired):
2298         (WebCore::Settings::setImagesEnabled):
2299         * page/Settings.h:
2300         (Settings):
2301         * testing/InternalSettings.cpp:
2302         (WebCore::InternalSettings::Backup::Backup):
2303         (WebCore::InternalSettings::Backup::restoreTo):
2304         * testing/InternalSettings.h:
2305         (Backup):
2306         (InternalSettings):
2307         * testing/InternalSettings.idl:
2308
2309 2012-09-24  Erik Arvidsson  <arv@chromium.org>
2310
2311         DOM4 remove method
2312         https://bugs.webkit.org/show_bug.cgi?id=73885
2313
2314         Reviewed by Ojan Vafai.
2315
2316         This adds the DOM 4 remove method.
2317         
2318         http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#dom-childnode-remove
2319         
2320         The remove method removes the node from its parent if it has a parent.
2321
2322         Tests: fast/dom/Comment/remove.html
2323                fast/dom/DocumentType/remove.html
2324                fast/dom/Element/remove.html
2325                fast/dom/Text/remove.html
2326
2327         * dom/CharacterData.idl:
2328         * dom/DocumentType.idl:
2329         * dom/Element.idl:
2330         * dom/Node.cpp:
2331         (WebCore::Node::remove): The spec says to do nothing if the node has no parent.
2332         * html/parser/HTMLTreeBuilder.cpp:
2333         (WebCore::HTMLTreeBuilder::processStartTagForInBody): Cleanup.
2334         * html/track/TextTrackCue.cpp:
2335         (WebCore::TextTrackCue::removeDisplayTree): No need to check parenNode twice.
2336
2337 2012-09-24  Tommy Widenflycht  <tommyw@google.com>
2338
2339         MediaStream API: Fix the incorrectly spelled RTCPeerConnection::onnegotiationneeded callback
2340         https://bugs.webkit.org/show_bug.cgi?id=97456
2341
2342         Reviewed by Adam Barth.
2343
2344         Renamed onnegotationneeded to onnegotiationneeded.
2345
2346         Existing test updated. 
2347
2348         * Modules/mediastream/RTCPeerConnection.cpp:
2349         (WebCore::RTCPeerConnection::negotiationNeeded):
2350         * Modules/mediastream/RTCPeerConnection.h:
2351         (RTCPeerConnection):
2352         * Modules/mediastream/RTCPeerConnection.idl:
2353         * dom/EventNames.h:
2354         (WebCore):
2355
2356 2012-09-24  Peter Beverloo  <peter@chromium.org>
2357
2358         Android's mock scrollbars shows up as a difference in layout test results
2359         https://bugs.webkit.org/show_bug.cgi?id=96382
2360
2361         Reviewed by Adam Barth.
2362
2363         Remove the exceptions made for layout tests in Android's scrollbar theme.
2364         This will make our actual scrollbars show up in layout test pixel results,
2365         bringing the tests closer to what we actually ship.
2366
2367         An important difference with other platforms is that scrollbars do not
2368         take any width on Android, they're rendered on top of the content. Therefore
2369         each test that has a visible scrollbar does not just need a new pixel
2370         result, but will also need a new text result. This will be handled as part
2371         of a larger rebaselining process.
2372
2373         Will be exercised by every layout test that has a scrollbar.
2374
2375         * platform/chromium/ScrollbarThemeChromiumAndroid.cpp:
2376         (WebCore::ScrollbarThemeChromiumAndroid::scrollbarThickness):
2377         (WebCore::ScrollbarThemeChromiumAndroid::usesOverlayScrollbars):
2378         (WebCore::ScrollbarThemeChromiumAndroid::hasThumb):
2379         * platform/chromium/ScrollbarThemeChromiumAndroid.h:
2380         (ScrollbarThemeChromiumAndroid):
2381
2382 2012-09-24  Sean Wang  <Xuewen.Wang@torchmobile.com.cn>
2383
2384         [BlackBerry] Basic authentication challenge credentials for stored credentials again after restarting browser
2385         https://bugs.webkit.org/show_bug.cgi?id=96362
2386
2387         Reviewed by Rob Buis.
2388
2389         Fix a mistake of the commit 11fdc73c7c74bbd736ed4160248ff59636a01864
2390         Trunk has been changed during reviewing that patch.
2391
2392         No new tests, this is to correct a build error.
2393
2394         * platform/network/blackberry/CredentialBackingStore.cpp:
2395         (WebCore::CredentialBackingStore::getProtectionSpace):
2396
2397 2012-09-24  Dan Bernstein  <mitz@apple.com>
2398
2399         Reverted r129176, the fix for <http://webkit.org/b/97269>, because it introduced a
2400         discrepancy between line breaking and max width computation.
2401
2402         Rubber-stamped by Anders Carlsson.
2403
2404         * platform/graphics/mac/ComplexTextController.cpp:
2405         (WebCore::ComplexTextController::adjustGlyphsAndAdvances):
2406
2407 2012-09-24  Bo Liu  <boliu@chromium.org>
2408
2409         Reland "Add in-place reload behavior to ImagesEnabled setting" with optimizations
2410         https://bugs.webkit.org/show_bug.cgi?id=97055
2411
2412         Reviewed by Adam Barth.
2413
2414         Relanding 128780, 128676, 128645. Was reverted in 128914 due to
2415         performance regression in Chromium.
2416
2417         New changes in addition to previously reverted patches:
2418
2419         Refactored CachedResource::requestResource, loadResource, and
2420         revalidateResource. Moved CachedResource::load method to end of
2421         requestResource so there is one place where load is called for all
2422         resources.
2423
2424         Added a enum parameter for requestResource and
2425         determineRevalidationPolicy so that FrameLoaderClient::allowImage call
2426         do not need to be called multiple times.
2427
2428         Removed CachedImage::load call in requestImage so it is not called
2429         twice.
2430
2431         Removed unnecessary Frame.h includes in CachedResource and
2432         CachedImage.
2433
2434         Removed dead load() method declaration in CachedImage.
2435
2436         Updated text expectation for two image-permissions tests to reflect
2437         the removed calls to allowImage.
2438
2439         Tests: fast/loader/display-image-unset-allows-cached-image-load.html
2440                fast/loader/display-image-unset-can-block-image-and-can-reload-in-place.html
2441                fast/loader/images-enabled-unset-can-block-image-and-can-reload-in-place.html
2442
2443         * WebCore.exp.in:
2444         * loader/FrameLoader.cpp:
2445         (WebCore::FrameLoader::didBeginDocument):
2446         * loader/SubresourceLoader.cpp:
2447         (WebCore::SubresourceLoader::willSendRequest):
2448         * loader/cache/CachedImage.cpp:
2449         * loader/cache/CachedImage.h:
2450         * loader/cache/CachedResource.cpp:
2451         (WebCore::CachedResource::didAddClient):
2452         * loader/cache/CachedResource.h:
2453         (WebCore):
2454         (WebCore::CachedResource::stillNeedsLoad):
2455         * loader/cache/CachedResourceLoader.cpp:
2456         (WebCore::CachedResourceLoader::CachedResourceLoader):
2457         (WebCore::CachedResourceLoader::requestImage):
2458         (WebCore::CachedResourceLoader::canRequest):
2459         (WebCore::CachedResourceLoader::requestResource):
2460         (WebCore::CachedResourceLoader::revalidateResource):
2461         (WebCore::CachedResourceLoader::loadResource):
2462         (WebCore::CachedResourceLoader::determineRevalidationPolicy):
2463         (WebCore::CachedResourceLoader::setAutoLoadImages):
2464         (WebCore):
2465         (WebCore::CachedResourceLoader::setImagesEnabled):
2466         (WebCore::CachedResourceLoader::clientDefersImage):
2467         (WebCore::CachedResourceLoader::shouldDeferImageLoad):
2468         (WebCore::CachedResourceLoader::reloadImagesIfNotDeferred):
2469         * loader/cache/CachedResourceLoader.h:
2470         (CachedResourceLoader):
2471         * page/Settings.cpp:
2472         (WebCore::setImageLoadingSettings):
2473         (WebCore::Settings::Settings):
2474         (WebCore::Settings::setLoadsImagesAutomatically):
2475         (WebCore::Settings::imageLoadingSettingsTimerFired):
2476         (WebCore::Settings::setImagesEnabled):
2477         * page/Settings.h:
2478         (Settings):
2479         * testing/InternalSettings.cpp:
2480         (WebCore::InternalSettings::Backup::Backup):
2481         (WebCore::InternalSettings::Backup::restoreTo):
2482         (WebCore::InternalSettings::setImagesEnabled):
2483         (WebCore):
2484         * testing/InternalSettings.h:
2485         (Backup):
2486         (InternalSettings):
2487         * testing/InternalSettings.idl:
2488
2489 2012-09-24  Joone Hur  <joone.hur@intel.com>, Gustavo Noronha Silva  <gustavo.noronha@collabora.com>
2490
2491         [GTK] Implement GraphicsLayer using Clutter
2492         https://bugs.webkit.org/show_bug.cgi?id=73767
2493
2494         Reviewed by Martin Robinson.
2495         
2496         This patch is needed for enabling Accelerated Compositing(Clutter backend) 
2497         with the patches submitted in bug 92045 and 91940.
2498         
2499         No new tests. This will be covered by pixel tests for Qt/GTK+ accelerated
2500         compositing and 3D transforms.
2501
2502         * GNUmakefile.list.am:
2503         * platform/clutter/GRefPtrClutter.cpp: Removed.
2504         * platform/clutter/GRefPtrClutter.h: Removed.
2505         * platform/graphics/clutter/PlatformClutterLayerClient.h: Added.
2506         (WebCore):
2507         (PlatformClutterLayerClient):
2508         (WebCore::PlatformClutterLayerClient::~PlatformClutterLayerClient):
2509         * platform/graphics/clutter/TransformationMatrixClutter.cpp: Added to convert CoglMatrix to 
2510         TransformationMatrix.
2511         (WebCore):
2512         (WebCore::TransformationMatrix::operator CoglMatrix):
2513         * platform/graphics/transforms/TransformationMatrix.h:
2514         (TransformationMatrix):
2515
2516 2012-09-24  David Grogan  <dgrogan@chromium.org>
2517
2518         Unprefix IndexedDB
2519         https://bugs.webkit.org/show_bug.cgi?id=96548
2520
2521         Reviewed by Adam Barth.
2522
2523         We are largely compatible with the FF implementation and the w3c test
2524         suite submitted by MS. The w3c test suite doesn't yet check
2525         for lack of prefix; this is mostly to signal to devs that we think our
2526         implementation is stable.
2527
2528         This patch uses the new FeatureObserver to get data about prefixed
2529         vs unprefixed usage.
2530
2531         Tests: storage/indexeddb/unprefix-workers.html
2532                storage/indexeddb/unprefix.html
2533
2534         * Modules/indexeddb/DOMWindowIndexedDatabase.cpp:
2535         (WebCore::DOMWindowIndexedDatabase::indexedDB):
2536         * Modules/indexeddb/DOMWindowIndexedDatabase.h:
2537         (DOMWindowIndexedDatabase):
2538         * Modules/indexeddb/DOMWindowIndexedDatabase.idl:
2539         * Modules/indexeddb/WorkerContextIndexedDatabase.cpp:
2540         (WebCore::WorkerContextIndexedDatabase::indexedDB):
2541         * Modules/indexeddb/WorkerContextIndexedDatabase.h:
2542         (WorkerContextIndexedDatabase):
2543         * Modules/indexeddb/WorkerContextIndexedDatabase.idl:
2544         * bindings/generic/RuntimeEnabledFeatures.h:
2545         Making the auxiliary objects RuntimeEnabled didn't make much sense as
2546         they are useless without the factory, so always enable them.
2547
2548         (WebCore::RuntimeEnabledFeatures::indexedDBEnabled):
2549         * bindings/scripts/CodeGeneratorGObject.pm:
2550         (SkipAttribute):
2551         * page/FeatureObserver.h:
2552
2553 2012-09-24  Andrey Adaikin  <aandrey@chromium.org>
2554
2555         Web Inspector: [WebGL] First step towards 2D canvas instrumentation in injected script
2556         https://bugs.webkit.org/show_bug.cgi?id=96746
2557
2558         Reviewed by Pavel Feldman.
2559
2560         First step towards the 2D canvas instrumentation from the WebGL injected script module side.
2561         We trace and save all calls that affect the 2D canvas context state and it's resources (Gradient and Pattern)
2562         so that we could replay the context and resources states later.
2563         The 2D canvas context state consists of:
2564         - current transformation matrix
2565         - current default path
2566         - current clipping region (affected by the "clip" command)
2567         - current values of the context attributes (like strokeStyle, fillStyle, etc.)
2568         - a stack of saved drawing states (affected by the "save" and "restore" commands)
2569
2570         * inspector/InjectedScriptCanvasModuleSource.js:
2571         (.):
2572
2573 2012-09-24  Andrey Adaikin  <aandrey@chromium.org>
2574
2575         Web Inspector: [TextEditor] conditional breakpoint popup not showing up the first time
2576         https://bugs.webkit.org/show_bug.cgi?id=97442
2577
2578         Reviewed by Pavel Feldman.
2579
2580         1) The conditional breakpoint popup may not show up the first time we click on the gutter.
2581         This was the case because the popup decoration element would be deleted from the line while
2582         it was being highlighted and appended afterwards. Now we do not remove decorations from the
2583         DOM while highlighting.
2584
2585         2) Also the popup will close itself on any mouse click event, even if it's targeted to the
2586         input box itself. This was due to pointer-events: none; CSS style for the parent element.
2587         Now we just override this style for the input box.
2588
2589         * inspector/front-end/DefaultTextEditor.js:
2590         (WebInspector.TextEditorMainPanel.prototype._paintLine):
2591         (WebInspector.TextEditorMainPanel.prototype._insertSpanBefore):
2592         (WebInspector.TextEditorMainPanel.prototype._insertTextNodeBefore):
2593         * inspector/front-end/inspector.css:
2594         (.source-frame-breakpoint-condition):
2595
2596 2012-09-24  Andrey Adaikin  <aandrey@chromium.org>
2597
2598         Web Inspector: [Canvas] set CanvasAgent in InstrumentingAgents upon calling enable command
2599         https://bugs.webkit.org/show_bug.cgi?id=97331
2600
2601         Reviewed by Yury Semikhatsky.
2602
2603         We should set CanvasAgent in InstrumentingAgents from enable() command and remove from disable(), instead of doing this in constructor and destructor.
2604
2605         * inspector/InspectorCanvasAgent.cpp:
2606         (WebCore::InspectorCanvasAgent::InspectorCanvasAgent):
2607         (WebCore::InspectorCanvasAgent::~InspectorCanvasAgent):
2608         (WebCore::InspectorCanvasAgent::restore):
2609         (WebCore::InspectorCanvasAgent::enable):
2610         (WebCore::InspectorCanvasAgent::disable):
2611         * inspector/InspectorCanvasAgent.h:
2612         (InspectorCanvasAgent):
2613         * inspector/InspectorCanvasInstrumentation.h:
2614         (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
2615         (WebCore::InspectorInstrumentation::wrapWebGLRenderingContextForInstrumentation):
2616
2617 2012-09-24  Patrick Gansterer  <paroga@webkit.org>
2618
2619         Remove remaining WTF_DEPRECATED_STRING_OPERATORS from cpp files
2620         https://bugs.webkit.org/show_bug.cgi?id=97412
2621
2622         Reviewed by Adam Barth.
2623
2624         * css/StylePropertySet.cpp: Removed useless define.
2625
2626 2012-09-20  Emil A Eklund  <eae@chromium.org>
2627
2628         snapToSize rounds the incorrectly for negative locations
2629         https://bugs.webkit.org/show_bug.cgi?id=97265
2630
2631         Reviewed by Eric Seidel.
2632
2633         Change snapSizeToPixel to preserve sign for location which
2634         affects rounding.
2635
2636         Test: fast/sub-pixel/snap-negative-location.html
2637
2638         * platform/FractionalLayoutUnit.h:
2639         (WebCore::snapSizeToPixel):
2640
2641 2012-09-24  Jonathan Liu  <net147@gmail.com>
2642
2643         Use unsigned char for bitfield instead of unsigned.
2644         https://bugs.webkit.org/show_bug.cgi?id=97447
2645
2646         Reviewed by Andreas Kling.
2647
2648         Not all compilers will pad an unsigned bitfield to the smallest size.
2649         Use unsigned char instead of unsigned to reduce padding for compilers
2650         that pad to the underlying type.
2651
2652         No new tests. There is already a compile-time assertion.
2653
2654         * css/CSSRule.cpp:
2655         (SameSizeAsCSSRule):
2656         * css/CSSRule.h:
2657         (CSSRule):
2658
2659 2012-09-24  Peter Rybin  <peter.rybin@gmail.com>
2660
2661         Web Inspector: don't allow exception in front-end when expanding function scope
2662         https://bugs.webkit.org/show_bug.cgi?id=97346
2663
2664         Reviewed by Yury Semikhatsky.
2665
2666         A missing guard condition is added.
2667
2668         * inspector/front-end/ObjectPropertiesSection.js:
2669         (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate.didGetDetails):
2670         (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate):
2671
2672 2012-09-24  Arvid Nilsson  <anilsson@rim.com>
2673
2674         [BlackBerry] Add cookie database API
2675         https://bugs.webkit.org/show_bug.cgi?id=97102
2676
2677         Reviewed by Antonio Gomes.
2678
2679         Add a CookieManager method that takes a list of strings to parse
2680         instead of just one string. Expose CookieParser::parseOneCookie.
2681
2682         Reviewed internally by Otto D. Cheung.
2683
2684         No change in behavior, no new tests.
2685
2686         * platform/blackberry/CookieManager.cpp:
2687         (WebCore::CookieManager::setCookies):
2688         (WebCore):
2689         * platform/blackberry/CookieManager.h:
2690         * platform/blackberry/CookieParser.cpp:
2691         (WebCore::CookieParser::parseOneCookie):
2692         (WebCore):
2693         * platform/blackberry/CookieParser.h:
2694         (CookieParser):
2695
2696 2012-09-24  Vsevolod Vlasov  <vsevik@chromium.org>
2697
2698         Web Inspector: Open resource dialog has too many false positive matches.
2699         https://bugs.webkit.org/show_bug.cgi?id=97332
2700
2701         Reviewed by Alexander Pavlov.
2702
2703         Improved open resource dialog filtering to make the amount of false
2704         positive search results less.
2705
2706         * inspector/front-end/FilteredItemSelectionDialog.js:
2707         (WebInspector.FilteredItemSelectionDialog.prototype._innerCreateSearchRegExp):
2708         (WebInspector.FilteredItemSelectionDialog.prototype._highlightItem.get var):
2709         (WebInspector.FilteredItemSelectionDialog.prototype._highlightItem):
2710
2711 2012-09-24  Andrey Adaikin  <aandrey@chromium.org>
2712
2713         Web Inspector: [Canvas] support 2D canvas instrumentation from the inspector C++ code
2714         https://bugs.webkit.org/show_bug.cgi?id=97203
2715
2716         Reviewed by Yury Semikhatsky.
2717
2718         Implements wrapping a 2D canvas context through the injected canvas module script facility.
2719
2720         * bindings/js/JSHTMLCanvasElementCustom.cpp:
2721         (WebCore::JSHTMLCanvasElement::getContext):
2722         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2723         (WebCore::V8HTMLCanvasElement::getContextCallback):
2724         * inspector/InjectedScriptCanvasModule.cpp:
2725         (WebCore::InjectedScriptCanvasModule::wrapCanvas2DContext):
2726         (WebCore):
2727         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
2728         (WebCore::InjectedScriptCanvasModule::callWrapContextFunction):
2729         * inspector/InjectedScriptCanvasModule.h:
2730         (InjectedScriptCanvasModule):
2731         * inspector/InspectorCanvasAgent.cpp:
2732         (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
2733         (WebCore):
2734         * inspector/InspectorCanvasAgent.h:
2735         (InspectorCanvasAgent):
2736         * inspector/InspectorCanvasInstrumentation.h:
2737         (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
2738         (WebCore):
2739         * inspector/InspectorInstrumentation.h:
2740         (InspectorInstrumentation):
2741
2742 2012-09-24  Pavel Feldman  <pfeldman@chromium.org>
2743
2744         Web Inspector:EXC_BAD_ACCESS upon closing page with node highlighted
2745         https://bugs.webkit.org/show_bug.cgi?id=97446
2746
2747         Reviewed by Alexander Pavlov.
2748
2749         Added 0 check on frame view.
2750
2751         * inspector/InspectorOverlay.cpp:
2752         (WebCore::InspectorOverlay::update):
2753
2754 2012-09-21  Alexander Pavlov  <apavlov@chromium.org>
2755
2756         Web Inspector: [REGRESSION] Cmd-Shift-C doesn't enable element inspection mode when inspector hidden
2757         https://bugs.webkit.org/show_bug.cgi?id=97249
2758
2759         Reviewed by Yury Semikhatsky.
2760
2761         Fix regression from r125871.
2762
2763         * inspector/front-end/InspectorFrontendAPI.js:
2764         (InspectorFrontendAPI.enterInspectElementMode):
2765         * inspector/front-end/inspector.js:
2766         (WebInspector._createGlobalStatusBarItems):
2767         (WebInspector.documentKeyDown):
2768
2769 2012-09-24  Alexander Pavlov  <apavlov@chromium.org>
2770
2771         Web Inspector: Disable persistence of master switches in the "Overrides" settings tab
2772         https://bugs.webkit.org/show_bug.cgi?id=97440
2773
2774         Reviewed by Yury Semikhatsky.
2775
2776         Disables enforcement of device metrics, geolocation, and device orientation overrides on Web Inspector start.
2777
2778         * inspector/InspectorPageAgent.cpp:
2779         (WebCore::InspectorPageAgent::restore):
2780         * inspector/front-end/SettingsScreen.js:
2781         (WebInspector.UserAgentSettingsTab.prototype._onMetricsCheckboxClicked):
2782         (WebInspector.UserAgentSettingsTab.prototype._onGeolocationOverrideCheckboxClicked):
2783         (WebInspector.UserAgentSettingsTab.prototype._onDeviceOrientationOverrideCheckboxClicked):
2784         * inspector/front-end/UserAgentSupport.js:
2785         (WebInspector.UserAgentSupport):
2786         (WebInspector.UserAgentSupport.prototype.toggleDeviceMetricsOverride):
2787         (WebInspector.UserAgentSupport.prototype.toggleGeolocationPositionOverride):
2788         (WebInspector.UserAgentSupport.prototype.toggleDeviceOrientationOverride):
2789         * inspector/front-end/externs.js:
2790
2791 2012-09-24  Vivek Galatage  <vivekgalatage@gmail.com>
2792
2793         Web Inspector: implement testing harness for pure protocol tests.
2794         https://bugs.webkit.org/show_bug.cgi?id=90675
2795
2796         Reviewed by Yury Semikhatsky.
2797
2798         Implementing the testing harness as the APIs of Internals object not
2799         only reduced platform specific patching of DRTs but also minimized the
2800         the effort required to open up the new dummy inspector Frontend. 
2801         
2802         The openDummyInspectorFrontend method will return the handle to newly 
2803         created DOMWindow. This DOMWindow object can be utilized inside the test 
2804         case to communicate using postMessage WebAPI.
2805         
2806         The newly created DOMWindow will host the protocol-test.html which
2807         will seed the necessary JS libraries to communicate with the
2808         InspectorBackend.
2809
2810         Test: inspector-protocol/css-getSupportedCSSProperties.html
2811
2812         * WebCore.exp.in:
2813         * WebCore.gypi:
2814         * inspector/InspectorClient.h:
2815         (InspectorClient):
2816         * testing/Internals.cpp:
2817         (InspectorFrontendClientDummy):
2818         (WebCore::InspectorFrontendClientDummy::~InspectorFrontendClientDummy):
2819         (WebCore):
2820         (WebCore::InspectorFrontendClientDummy::InspectorFrontendClientDummy):
2821         (InspectorFrontendChannelDummy):
2822         (WebCore::InspectorFrontendChannelDummy::~InspectorFrontendChannelDummy):
2823         (WebCore::InspectorFrontendChannelDummy::InspectorFrontendChannelDummy):
2824         (WebCore::InspectorFrontendChannelDummy::sendMessageToFrontend):
2825         (WebCore::Internals::consoleMessageArgumentCounts):
2826         (WebCore::Internals::openDummyInspectorFrontend):
2827         (WebCore::Internals::closeDummyInspectorFrontend):
2828         * testing/Internals.h:
2829         (WebCore):
2830         (Internals):
2831         * testing/Internals.idl:
2832
2833 2012-09-24  Keishi Hattori  <keishi@webkit.org>
2834
2835         REGRESSION(r127727): Calendar picker focus doesn't loop in calendar-picker.html
2836         https://bugs.webkit.org/show_bug.cgi?id=97183
2837
2838         Reviewed by Kent Tamura.
2839
2840         Fixing bug calendar-picker.html. The page popup behaves fine because
2841         this code is only necessary in calendar-picker.html where the focus can
2842         move outside of the picker because we are just using an iframe.
2843
2844         No new tests. Added tests to calendar-picker-key-operations.html.
2845
2846         * Resources/pagepopups/calendarPicker.js:
2847         (YearMonthController.prototype.attachTo):
2848         (CalendarPicker.prototype._handleBodyKeyDown):
2849
2850 2012-09-24  Andrey Kosyakov  <caseq@chromium.org>
2851
2852         Unreviewed follow-up to r129336 -- fixed closure compiler warnings.
2853
2854         * inspector/front-end/HAREntry.js:
2855         * inspector/front-end/TimelineModel.js:
2856
2857 2012-09-24  Andrey Adaikin  <aandrey@chromium.org>
2858
2859         Web Inspector: [TextEditor] Line numbers out of sync after closing breakpoint condition editor
2860         https://bugs.webkit.org/show_bug.cgi?id=96510
2861
2862         Reviewed by Vsevolod Vlasov.
2863
2864         Sync line heights on adding/removing decorations.
2865
2866         * inspector/front-end/DefaultTextEditor.js:
2867         (WebInspector.TextEditorGutterChunk):
2868         (WebInspector.TextEditorGutterChunk.prototype.addDecoration):
2869         (WebInspector.TextEditorGutterChunk.prototype.removeDecoration):
2870         (WebInspector.TextEditorGutterChunk.prototype.set expanded):
2871         (WebInspector.TextEditorGutterChunk.prototype.get height):
2872         (WebInspector.TextEditorGutterChunk.prototype._createRow):
2873         (WebInspector.TextEditorMainChunk.prototype.addDecoration):
2874         (WebInspector.TextEditorMainChunk.prototype.removeDecoration):
2875         (WebInspector.TextEditorMainChunk.prototype.removeAllDecorations):
2876
2877 2012-09-21  Andrey Kosyakov  <caseq@chromium.org>
2878
2879         Web Inspector: support saving HAR with resources content
2880         https://bugs.webkit.org/show_bug.cgi?id=97341
2881
2882         Reviewed by Vsevolod Vlasov.
2883
2884         - add WebInspector.HARWriter that writes HAR with content to a stream;
2885         - replace Save all as HAR with Save all with Content as HAR in network's panel context menu;
2886         - remove entries for copying/saving of individual request items to reduce clutter in context menu;
2887         - a drive-by fix of an exception when invoking context menu not on a network item;
2888
2889         Test: http/tests/inspector/network/har-content.html
2890
2891         * English.lproj/localizedStrings.js:
2892         * inspector/front-end/FileUtils.js:
2893         * inspector/front-end/HAREntry.js:
2894         (WebInspector.HAREntry.prototype._buildPostData):
2895         (WebInspector.HARLog.prototype.build):
2896         (WebInspector.HARLog.prototype._creator):
2897         (WebInspector.HARWriter):
2898         (WebInspector.HARWriter.prototype.write):
2899         (WebInspector.HARWriter.prototype._onContentAvailable):
2900         (WebInspector.HARWriter.prototype._beginWrite):
2901         (WebInspector.HARWriter.prototype._writeNextChunk):
2902         * inspector/front-end/NetworkPanel.js:
2903         (WebInspector.NetworkLogView.prototype.get statusBarItems):
2904         (WebInspector.NetworkLogView.prototype._createStatusBarItems):
2905         (WebInspector.NetworkLogView.prototype._contextMenu):
2906         (WebInspector.NetworkLogView.prototype._exportAll.openCallback):
2907         (WebInspector.NetworkLogView.prototype._exportAll):
2908
2909 2012-09-24  Nico Weber  <thakis@chromium.org>
2910
2911         [chromium] Remove BitLockerSkia. It's apparently not used.
2912         https://bugs.webkit.org/show_bug.cgi?id=97434
2913
2914         Reviewed by Kent Tamura.
2915
2916         * platform/graphics/skia/BitLockerSkia.cpp: Removed.
2917         * platform/graphics/skia/BitLockerSkia.h: Removed.
2918
2919 2012-09-24  Matt Falkenhagen  <falken@chromium.org>
2920
2921         Skeleton implementation of dialog.showModal()
2922         https://bugs.webkit.org/show_bug.cgi?id=97425
2923
2924         Reviewed by Kent Tamura.
2925
2926         This adds a basic implementation of showModal(), so it later can be
2927         used to test the top layer, once it is implemented. The main features
2928         of showModal(), modality and the top layer, are not yet implemented.
2929
2930         Test: fast/dom/HTMLDialogElement/dialog-show-modal.html
2931
2932         * html/HTMLDialogElement.cpp:
2933         (WebCore::HTMLDialogElement::showModal): The same as show(), but throws an error in the cases specified in the spec.
2934         (WebCore):
2935         * html/HTMLDialogElement.h:
2936         (HTMLDialogElement):
2937         * html/HTMLDialogElement.idl:
2938
2939 2012-09-24  Ryuan Choi  <ryuan.choi@samsung.com>
2940
2941         [EFL] Regression after r129328
2942         https://bugs.webkit.org/show_bug.cgi?id=97429
2943
2944         Unreviewed, rolling out r129328.
2945
2946         * platform/efl/RenderThemeEfl.cpp:
2947         (WebCore::RenderTheme::themeForPage):
2948
2949 2012-09-23  Ryuan Choi  <ryuan.choi@samsung.com>
2950
2951         [EFL] Duplicated RenderThemeEfl creation for same page
2952         https://bugs.webkit.org/show_bug.cgi?id=88391
2953
2954         Reviewed by Gyuyoung Kim.
2955
2956         Other ports return one or two RenderTheme regardless of page.
2957         But, WebKit/Efl can create different theme for each page and
2958         themeForPage creates new RenderTheme whenever it is called with page.
2959         So more than one RenderTheme can be created for a page.
2960
2961         This patches checks whether page already has RenderTheme not to create new
2962         RenderTheme for same page.
2963
2964         * platform/efl/RenderThemeEfl.cpp:
2965         (WebCore::RenderTheme::themeForPage):
2966
2967 2012-09-23  Keishi Hattori  <keishi@webkit.org>
2968
2969         Add suggestionPicker to CalendarPicker
2970         https://bugs.webkit.org/show_bug.cgi?id=97201
2971
2972         Reviewed by Kent Tamura.
2973
2974         This adds the suggestionPicker to CalendarPicker. It is not available yet as a datalist UI but it can be used inside ManualTests/forms/calendar-picker.html.
2975
2976         No new tests. Suggestion Picker can be tested in ManualTests/forms/calendar-picker.html.
2977
2978         * Resources/pagepopups/calendarPicker.js:
2979         (initialize):
2980         (openSuggestionPicker):
2981         * Resources/pagepopups/pickerCommon.js:
2982         (enclosingNodeOrSelfWithClass):
2983         * Resources/pagepopups/suggestionPicker.css: Added.
2984         (.suggestion-list):
2985         (.suggestion-list-entry):
2986         (.suggestion-list-entry:focus):
2987         (.suggestion-list-entry:focus .label):
2988         (.suggestion-list-entry .content):
2989         (.suggestion-list-entry .title):
2990         (.suggestion-list-entry .label):
2991         (.measuring-width .suggestion-list-entry .label):
2992         (.suggestion-list .separator):
2993         * Resources/pagepopups/suggestionPicker.js: Added.
2994         (SuggestionPicker):
2995         (SuggestionPicker.validateConfig):
2996         (SuggestionPicker.prototype.cleanup):
2997         (SuggestionPicker.prototype._setColors): Creates css rules that sets highlight colors.
2998         (SuggestionPicker.prototype._createSuggestionEntryElement): Creates an entry that when selected submits the value.
2999         (SuggestionPicker.prototype._createActionEntryElement): Creates an entry that causes an action. (e.x. "Other...")
3000         (SuggestionPicker.prototype._measureMaxContentWidth): Temporarily left align everything to measure the width.
3001         (SuggestionPicker.prototype._fixWindowSize):
3002         (SuggestionPicker.prototype._layout):
3003         (SuggestionPicker.prototype.selectEntry):
3004         (SuggestionPicker.prototype._handleEntryClick):
3005         (SuggestionPicker.prototype._findFirstVisibleEntry):
3006         (SuggestionPicker.prototype._findLastVisibleEntry):
3007         (SuggestionPicker.prototype._handleBodyKeyDown):
3008         (SuggestionPicker.prototype._handleEntryMouseOver):
3009         (SuggestionPicker.prototype._handleMouseOut):
3010         * WebCore.gyp/WebCore.gyp:
3011
3012 2012-09-23  Andreas Kling  <kling@webkit.org>
3013
3014         REGRESSION(r128239): Mutable ElementAttributeData leak their Attribute vectors.
3015         <http://webkit.org/b/97423>
3016
3017         Reviewed by Anders Carlsson.
3018
3019         r128239 added a WTF::deleteOwnedPtr() override for ElementAttributeData*, but ElementAttributeData is
3020         a ref-counted object. Fixed this by overriding deref() instead to call the appropriate subclass destructor.
3021
3022         * dom/ElementAttributeData.h:
3023         (WebCore::ElementAttributeData::deref):
3024
3025 2012-09-23  Byungwoo Lee  <bw80.lee@gmail.com>
3026
3027         Fix build warnings : -Wunused-parameter, -Wparentheses, -Wuninitialized.
3028         https://bugs.webkit.org/show_bug.cgi?id=97306
3029
3030         Reviewed by Benjamin Poulain.
3031
3032         Fix build warning about -Wunused-parameter on ImageBufferCairo.cpp,
3033         ImageDecoder.h by using ASSERT_UNUSED() macro.
3034
3035         * platform/graphics/cairo/ImageBufferCairo.cpp:
3036         (WebCore::encodeImage):
3037         * platform/image-decoders/ImageDecoder.h:
3038         (WebCore::ImageDecoder::rgbColorProfile):
3039         (WebCore::ImageDecoder::inputDeviceColorProfile):
3040
3041 2012-09-23  Andreas Kling  <kling@webkit.org>
3042
3043         Enable ElementAttributeData sharing for non-HTML elements.
3044         <http://webkit.org/b/97413>
3045
3046         Reviewed by Anders Carlsson.
3047
3048         Use the whole qualified tag name when creating the ElementAttributeData cache key
3049         instead of just the localName(). This allows sharing and caching of attribute data
3050         for non-HTML elements and makes the code a little cleaner.
3051
3052         * dom/Element.cpp:
3053         (WebCore::Element::parserSetAttributes):
3054
3055             Enable the ElementAttributeData sharing path for non-HTML elements.
3056
3057         * dom/ElementAttributeData.h:
3058
3059             Make immutableAttributeArray() public so Document can call it instead of getting
3060             the raw data address from a const_cast'ed attributeItem(0).
3061
3062         * dom/Document.cpp:
3063         (WebCore::ImmutableAttributeDataCacheKey::ImmutableAttributeDataCacheKey):
3064         (WebCore::ImmutableAttributeDataCacheKey::operator!=):
3065         (WebCore::ImmutableAttributeDataCacheKey::hash):
3066         (ImmutableAttributeDataCacheKey):
3067         (WebCore::ImmutableAttributeDataCacheEntry::ImmutableAttributeDataCacheEntry):
3068         (ImmutableAttributeDataCacheEntry):
3069         (WebCore::Document::cachedImmutableAttributeData):
3070
3071             Let the immutable attribute data cache use a QualifiedName/attributes key
3072             instead of the AtomicString/attributes we were using before. We still grab the
3073             existingHash() from the QualifiedName::localName() and use that for the actual
3074             HashMap key.
3075
3076 2012-09-23  Mike West  <mkwst@chromium.org>
3077
3078         Measure the usage of the "X-WebKit-CSP" header in the hopes of dropping the prefix completely.
3079         https://bugs.webkit.org/show_bug.cgi?id=97408
3080
3081         Reviewed by Adam Barth.
3082
3083         We plan on landing the unprefixed header in webkit.org/b/96765 once the
3084         spec moves to CR. Though we plan to use it for experimentation in the
3085         near future, we'll want to drop the prefixed header completely at some
3086         point in the future. Starting to measure its usage now will give us a
3087         good baseline when we start contemplating that decision.
3088
3089         No new functionality, so no new tests.
3090
3091         * page/ContentSecurityPolicy.cpp:
3092         (WebCore::ContentSecurityPolicy::didReceiveHeader):
3093         * page/FeatureObserver.h:
3094
3095 2012-09-22  Dominic Mazzoni  <dmazzoni@google.com>
3096
3097         AX: Layout tests would be easier to write if AccessibilityController could find an element by id
3098         https://bugs.webkit.org/show_bug.cgi?id=97301
3099
3100         Reviewed by Chris Fleizach.
3101
3102         Add a method to get the DOM "id" attribute from an accessible object, only for layout tests.
3103
3104         Makes existing test more cross-platform:
3105         Tests: accessibility/aria-hidden-with-elements.html
3106
3107         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
3108         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
3109
3110 2012-09-22  Thierry Reding  <thierry.reding@avionic-design.de>
3111
3112         [GTK] Build is broken with GLib Unicode backend
3113         https://bugs.webkit.org/show_bug.cgi?id=97308.
3114
3115         Reviewed by Carlos Garcia Campos.
3116
3117         The TextBreakIteratorGtk implementation uses ubrk_close() to delete
3118         the iterator. However that function is ICU specific and not declared
3119         when using the GLib backend. Instead the iterator can simply be freed
3120         using the delete operator.
3121
3122         This commit is based on work by Martin Schlemmer who posted a fix for
3123         this here:
3124
3125             http://permalink.gmane.org/gmane.os.opendarwin.webkit.gtk/1210
3126
3127         No new tests.
3128
3129         * platform/text/gtk/TextBreakIteratorGtk.cpp:
3130         (WebCore::NonSharedCharacterBreakIterator::~NonSharedCharacterBreakIterator):
3131         Free iterator using delete instead of ubrk_close().
3132
3133 2012-09-21  Ami Fischman  <fischman@chromium.org>
3134
3135         HTMLMediaElement isn't garbage collected between document reloads
3136         https://bugs.webkit.org/show_bug.cgi?id=97020
3137
3138         Reviewed by Eric Carlson.
3139
3140         JS-created (as opposed to DOM-created) Audio nodes never got collected, because they
3141         appear to always hasPendingActivity(), because m_playing is never set to false.
3142
3143         Manual test added: ManualTests/audio-freed-during-reload.html
3144
3145         * html/HTMLMediaElement.cpp:
3146         (WebCore::HTMLMediaElement::stop): set m_playing = false; explicitly.
3147
3148 2012-09-21  Simon Fraser  <simon.fraser@apple.com>
3149
3150         RenderMarquee causes ASSERTION FAILED: enclosingIntRect(rendererMappedResult) == enclosingIntRect(FloatQuad(result).boundingBox()) : WebCore::FloatRect WebCore::RenderGeometryMap::absoluteRect(const WebCore::FloatRect &) const
3151         https://bugs.webkit.org/show_bug.cgi?id=92464
3152
3153         Reviewed by Sam Weinig.
3154
3155         Marquees could cause an updateCompositingLayersAfterScroll() to be called when
3156         we're in the middle of updating layer positions. updateCompositingLayersAfterScroll()
3157         does a full RenderLayer tree walk, but its use of RenderGeomeryMap reveals that
3158         it's using layers whose positions haven't been updated yet.
3159         
3160         Fix by avoiding the updateCompositingLayersAfterScroll() if we're in the process
3161         of updating a marquee when updating layer positions. We'll do a compositing update
3162         soon anyway.
3163
3164         Tested by fast/events/tabindex-focus-blur-all.html
3165
3166         * rendering/RenderLayer.cpp:
3167         (WebCore::RenderLayer::RenderLayer):
3168         (WebCore::RenderLayer::updateLayerPositions):
3169         (WebCore::RenderLayer::updateLayerPositionsAfterScroll):
3170         (WebCore::RenderLayer::scrollTo):
3171         * rendering/RenderLayer.h:
3172         (RenderLayer):
3173
3174 2012-09-21  Adam Klein  <adamk@chromium.org>
3175
3176         Remove bogus assertions from ChildListMutationScope
3177         https://bugs.webkit.org/show_bug.cgi?id=97372
3178
3179         Reviewed by Ryosuke Niwa.
3180
3181         Some asserts (and their accompanying comment) were trying to enforce
3182         proper usage of ChildListMutationScope from WebCore, but in the
3183         presence of MutationEvents they could fail due to arbitrary script
3184         execution.
3185
3186         This change gets rid of those asserts and adds tests exercising
3187         the (pre-existing) codepaths for handling these out-of-order cases.
3188         Without this patch, these tests ASSERT in debug builds.
3189
3190         Tests: fast/mutation/added-out-of-order.html
3191                fast/mutation/removed-out-of-order.html
3192
3193         * dom/ChildListMutationScope.cpp:
3194         (WebCore::ChildListMutationAccumulator::childAdded):
3195         (WebCore::ChildListMutationAccumulator::willRemoveChild):
3196         * dom/ChildListMutationScope.h:
3197         (WebCore):
3198
3199 2012-09-21  Dan Bernstein  <mitz@apple.com>
3200
3201         REGRESSION (r129176): Incorrect line breaking when kerning occurs between a space and the following character
3202         https://bugs.webkit.org/show_bug.cgi?id=97377
3203
3204         Reviewed by Enrica Casucci.
3205
3206         Test: fast/text/kerning-with-TextLayout.html
3207
3208         When kerning is enabled, the last character in a word may have its advance shortened because
3209         of its trailing space. To account for that, words are measured along with the trailing space,
3210         then the width of a space is subtracted from the result. This doesn’t work when the trailing
3211         space itself has its advance shortened due to the character following it, which can happen
3212         when using the TextLayout optimization. However, when the optimization is used, the advance
3213         of the last character of the word is already adjusted for the trailing space, so there is no
3214         need to measure with that space and subtract its advance.
3215
3216         * rendering/RenderBlockLineLayout.cpp:
3217         (WebCore::RenderBlock::LineBreaker::nextLineBreak): Changed to not use the trailingSpaceWidth
3218         mechanism when TextLayout is being used.
3219
3220 2012-09-21  Adam Klein  <adamk@chromium.org>
3221
3222         Simplify and optimize ChildListMutationScope
3223         https://bugs.webkit.org/show_bug.cgi?id=97352
3224
3225         Reviewed by Ryosuke Niwa.
3226
3227         ChildListMutationScope is one of the most complicated bits of
3228         MutationObserver implementation. This patch aims to simplify it for
3229         clarity and improve its performance (mostly by just doing less).
3230
3231         The big change is to remove the MutationAccumulatorRouter class,
3232         replacing it with lifetime-management logic in ChildListMutationAccumulator
3233         ChildListMutationScope is expected to call getOrCreate() in
3234         its constructor, and each scope holds a RefPtr to the accumulator.
3235         When the last scope holding such a RefPtr is destroyed,
3236         ChildListMutationAccumulator's destructor enqueues the accumulated record.
3237
3238         This greatly reduces the number of lines of code, and condenses
3239         two HashMaps into one. It also reduces hash lookups, which now
3240         occur only on scope creation and when the refcount for a given
3241         accumulator reaches 0 (previously, each childAdded and willRemoveChild
3242         call could result in two hash lookups each).
3243
3244         There are some minor changes as well: the ChildListMutationAccumulator::clear()
3245         method is gone, as it was doing more work than necessary;
3246         DEFINE_STATIC_LOCAL is now used instead of hand-rolled static-management
3247         code; ChildListMutationAccumulator::m_lastAdded is no longer a RefPtr, since it
3248         always points at a Node that's already being ref'd by the accumulator.
3249         Also various minor syntactic cleanups.
3250
3251         No new tests, no change in behavior.
3252
3253         * dom/ChildListMutationScope.cpp:
3254         (WebCore::accumulatorMap): Reduced two maps to one, and manage its lifetime with DEFINE_STATIC_LOCAL.
3255         (WebCore::ChildListMutationAccumulator::ChildListMutationAccumulator): Remove unnecessary call to clear() (which itself has been removed).
3256         (WebCore::ChildListMutationAccumulator::~ChildListMutationAccumulator): Enqueue record if not empty at destruction, and have the accumulator
3257         remove itself from the map.
3258         (WebCore::ChildListMutationAccumulator::getOrCreate): Replaces half of MutationAccumulatorRouter's job.
3259         (WebCore::ChildListMutationAccumulator::childAdded): Minor RefPtr usage improvements.
3260         (WebCore::ChildListMutationAccumulator::isRemovedNodeInOrder): Simplify RefPtr syntax.
3261         (WebCore::ChildListMutationAccumulator::willRemoveChild): Minor RefPtr usage improvements.
3262         (WebCore::ChildListMutationAccumulator::enqueueMutationRecord): Replace call to clear() with clearing m_lastAdded,
3263         since it's the only bit not cleared by the MutationRecord creation call. Also remove
3264         isEmpty check and replace with asserts now that it's a private method.
3265         (WebCore::ChildListMutationAccumulator::isEmpty): Added more assertions about emptiness.
3266         * dom/ChildListMutationScope.h:
3267         (WebCore):
3268         (ChildListMutationAccumulator): Extract the inner class to make everything easier to read.
3269         (WebCore::ChildListMutationScope::ChildListMutationScope): Store m_accumulator rather than m_target.
3270         (WebCore::ChildListMutationScope::~ChildListMutationScope): ditto
3271         (WebCore::ChildListMutationScope::childAdded): ditto
3272         (WebCore::ChildListMutationScope::willRemoveChild): ditto
3273         (ChildListMutationScope):
3274         * html/HTMLElement.cpp: Remove unused ChildListMutationScope.h #include.
3275
3276 2012-09-21  Chris Rogers  <crogers@google.com>
3277
3278         BiquadFilterNode must take audio-rate parameter changes into account
3279         https://bugs.webkit.org/show_bug.cgi?id=97369
3280
3281         Reviewed by Kenneth Russell.
3282
3283         BiquadFilterNode is currently ignoring any timeline or audio-rate changes to its parameters.
3284         We now check if any of its parameters have timeline or audio-rate changes and, if so, take
3285         them into account.  Otherwise, we use ordinary parameter smoothing/de-zippering which is
3286         the case when the parameters are adjusted, for example, from a knob or slider in the UI.
3287
3288         * Modules/webaudio/BiquadDSPKernel.cpp:
3289         (WebCore::BiquadDSPKernel::updateCoefficientsIfNecessary):
3290         * Modules/webaudio/BiquadProcessor.cpp:
3291         (WebCore::BiquadProcessor::checkForDirtyCoefficients):
3292         * Modules/webaudio/BiquadProcessor.h:
3293         (WebCore::BiquadProcessor::hasSampleAccurateValues):
3294         (BiquadProcessor):
3295
3296 2012-09-21  Brandon Jones  <bajones@google.com>
3297
3298         Add support for OES_vertex_array_object in chromium
3299         https://bugs.webkit.org/show_bug.cgi?id=96578
3300
3301         Reviewed by Kenneth Russell.
3302
3303         Adding basic reference counting to WebGLBuffer objects to satisfy spec requirements
3304         for the OES_vertex_array_object extension. Added code to allow calls to the
3305         OES_vertex_array_object extension to interface properly with the chromium WebGL
3306         implementation.
3307
3308         Test: fast/canvas/webgl/oes-vertex-array-object.html
3309
3310         * html/canvas/WebGLRenderingContext.cpp:
3311         (WebCore):
3312         (WebCore::WebGLRenderingContext::deleteBuffer):
3313         (WebCore::WebGLRenderingContext::vertexAttribPointer):
3314         * html/canvas/WebGLVertexArrayObjectOES.cpp:
3315         (WebCore::WebGLVertexArrayObjectOES::setElementArrayBuffer):
3316         (WebCore):
3317         * html/canvas/WebGLVertexArrayObjectOES.h:
3318         (WebGLVertexArrayObjectOES):
3319         (WebCore::WebGLVertexArrayObjectOES::getVertexAttribStateSize):
3320         * platform/chromium/support/Extensions3DChromium.cpp:
3321         (WebCore::Extensions3DChromium::createVertexArrayOES):
3322         (WebCore::Extensions3DChromium::deleteVertexArrayOES):
3323         (WebCore::Extensions3DChromium::isVertexArrayOES):
3324         (WebCore::Extensions3DChromium::bindVertexArrayOES):
3325
3326 2012-09-21  Kenichi Ishibashi  <bashi@chromium.org>
3327
3328         [Chromium] Use OpenTypeVerticalData on Linux
3329         https://bugs.webkit.org/show_bug.cgi?id=97277
3330
3331         Reviewed by Tony Chang.
3332
3333         Remove HarfBuzz dependency from GlyphPageTreeNodeSkia. Use OpenTypeVerticalData instead.
3334
3335         No new tests. Rebaselined existing tests.
3336
3337         * WebCore.gyp/WebCore.gyp: Added OpenTypeTypes.h and OpenTypeVerticalData.(cpp|h) for linux and android.
3338         * platform/graphics/FontCache.cpp:
3339         Inserted a space between > and > in typedef of FontVerticalDataCache so that making some compilers happy.
3340         (WebCore):
3341         * platform/graphics/SimpleFontData.h:
3342         (SimpleFontData): Moved declaration of m_verticalData to avoid compile warnings.
3343         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.cpp:
3344         (WebCore):
3345         (WebCore::FontPlatformData::verticalData): Added.
3346         (WebCore::FontPlatformData::openTypeTable): Added.
3347         * platform/graphics/harfbuzz/FontPlatformDataHarfBuzz.h:
3348         (WebCore):
3349         (FontPlatformData):
3350         * platform/graphics/skia/GlyphPageTreeNodeSkia.cpp: Removed substituteWithVerticalGlyphs().
3351         (WebCore::GlyphPage::fill):
3352
3353 2012-09-21  Jeremy Apthorp  <jeremya@chromium.org>
3354
3355         Crash in WebCore::Document::fullScreenChangeDelayTimerFired
3356         https://bugs.webkit.org/show_bug.cgi?id=97367
3357
3358         Reviewed by Abhishek Arya.
3359
3360         The document could be destroyed during the processing of the
3361         fullscreenchange event, if the document was destroyed as a result of
3362         one of the dispatchEvent calls.
3363
3364         This bug isn't reliably reproducible, so no new tests.
3365
3366         * dom/Document.cpp:
3367         (WebCore::Document::fullScreenChangeDelayTimerFired):
3368
3369 2012-09-21  Pratik Solanki  <psolanki@apple.com>
3370
3371         No need to pass order file for WebCoreTestSupport build
3372         https://bugs.webkit.org/show_bug.cgi?id=97363
3373
3374         Reviewed by David Kilzer.
3375
3376         No new tests because no functional change.
3377
3378         * Configurations/WebCoreTestSupport.xcconfig:
3379
3380 2012-09-21  Chris Rogers  <crogers@google.com>
3381
3382         Add Web Audio support for deprecated/legacy APIs
3383         https://bugs.webkit.org/show_bug.cgi?id=97050
3384
3385         Reviewed by Eric Carlson.
3386
3387         The Web Audio API specification has undergone much review and some small API changes
3388         have been made (mostly naming-related changes).  This patch adds an ENABLE_LEGACY_WEB_AUDIO
3389         build option to allow ports to support the old names.
3390
3391         Tests changed:
3392         audiobuffersource-playbackrate.html
3393         audiobuffersource.html
3394         note-grain-on-testing.js
3395         oscillator-testing.js
3396
3397         * Configurations/FeatureDefines.xcconfig:
3398         * GNUmakefile.features.am:
3399         * Modules/webaudio/AudioBufferSourceNode.cpp:
3400         (WebCore::AudioBufferSourceNode::startGrain):
3401         (WebCore):
3402         (WebCore::AudioBufferSourceNode::noteGrainOn):
3403         * Modules/webaudio/AudioBufferSourceNode.h:
3404         (AudioBufferSourceNode):
3405         * Modules/webaudio/AudioBufferSourceNode.idl:
3406         * Modules/webaudio/AudioScheduledSourceNode.cpp:
3407         (WebCore::AudioScheduledSourceNode::start):
3408         (WebCore::AudioScheduledSourceNode::stop):
3409         (WebCore):
3410         (WebCore::AudioScheduledSourceNode::noteOn):
3411         (WebCore::AudioScheduledSourceNode::noteOff):
3412         * Modules/webaudio/AudioScheduledSourceNode.h:
3413         * Modules/webaudio/Oscillator.idl:
3414         * page/FeatureObserver.h:
3415
3416 2012-09-21  Mark Pilgrim  <pilgrim@chromium.org>
3417
3418         [Chromium] remove getFontFamilyForCharacters from PlatformSupport
3419         https://bugs.webkit.org/show_bug.cgi?id=96282
3420
3421         Reviewed by Tony Chang.
3422
3423         Migrating away from PlatformSupport. getFontFamilyForCharacters is
3424         moved to FontCache.h and overridden by the two platforms that
3425         need it (Chromium Linux and Blackberry). New files for the overrides.
3426         Part of a larger refactoring series. See tracking bug 82948.
3427
3428         * PlatformBlackBerry.cmake:
3429         * WebCore.gypi:
3430         * platform/chromium/PlatformSupport.h:
3431         (PlatformSupport):
3432         * platform/graphics/FontCache.h:
3433         (SimpleFontFamily):
3434         (FontCache):
3435         * platform/graphics/blackberry/FontCacheBlackberry.cpp: Added.
3436         (WebCore):
3437         (WebCore::FontCache::getFontFamilyForCharacters):
3438         * platform/graphics/blackberry/skia/PlatformSupport.cpp:
3439         (WebCore):
3440         * platform/graphics/blackberry/skia/PlatformSupport.h:
3441         (PlatformSupport):
3442         * platform/graphics/chromium/FontCacheAndroid.cpp:
3443         (WebCore::FontCache::getFontDataForCharacters):
3444         * platform/graphics/chromium/FontCacheChromiumLinux.cpp: Added.
3445         (WebCore):
3446         (WebCore::FontCache::getFontFamilyForCharacters):
3447         * platform/graphics/skia/FontCacheSkia.cpp:
3448         (WebCore::FontCache::getFontDataForCharacters):
3449
3450 2012-09-21  Chris Fleizach  <cfleizach@apple.com>
3451
3452         AX: WebKit exposes incorrect bounds for embedded SVG in HTML
3453         https://bugs.webkit.org/show_bug.cgi?id=96168
3454
3455         Reviewed by Eric Seidel.
3456
3457         Override absoluteFocusRingQuads() for SVG objects because the default
3458         implementation relies on addFocusRingRects(). In addFocusRingRects(), SVG 
3459         objects adds local positions for its rects instead of absolute positions.
3460
3461         Test: accessibility/svg-bounds.html
3462
3463         * rendering/RenderObject.h:
3464         (RenderObject):
3465         * rendering/svg/RenderSVGModelObject.cpp:
3466         (WebCore):
3467         (WebCore::RenderSVGModelObject::absoluteFocusRingQuads):
3468         * rendering/svg/RenderSVGModelObject.h:
3469         (RenderSVGModelObject):
3470
3471 2012-09-21  Lianghui Chen  <liachen@rim.com>
3472
3473         [BlackBerry] Really fix bug 95488 that user can get the authentication challenge dialog while the other tab has focus.
3474         https://bugs.webkit.org/show_bug.cgi?id=97348
3475         Internal PR: 186597.
3476
3477         Internally reviewed by Yong Li, Joe Mason.
3478         Reviewed by Yong Li.
3479
3480         Add a singleton AuthenticationChallengeManager to manage authentication
3481         challenge dialog. It does following things:
3482         Record page creation/deletion, so it knows what page is present or not.
3483         Record page visibility change so it knows when to display a dialog or not.
3484         Accept authentication challenge, and decide whether to postpone the
3485             challenge dialog based on whether there is active authentication challenge
3486             dialog already and whether its page is visible or not.
3487         When a challenge result comes back, notify the result to all clients
3488             authenticating for the same protection space, and then start the next
3489             authentication challenge from the same page, if there is one.
3490         When a page becomes visible, start the first authentication challenge
3491             dialog that has been blocked before.
3492
3493         And to support this new AuthenticationChallengeManager, and making the
3494             challenge really asynchronous, NetworkJob has been updated to support
3495             the concept of "freeze", which means buffering all network loading status
3496             change but don't send them to NetworkJob clients.
3497         This is necessary when authentication challenge is asynchronous, as the
3498             previous network loading status will likely come before user make any
3499             decision.
3500
3501         No new tests for platform specific internal change.
3502
3503         * PlatformBlackBerry.cmake:
3504         * platform/blackberry/AuthenticationChallengeManager.cpp: Added.
3505         (WebCore):
3506         (ChallengeInfo):
3507         (WebCore::ChallengeInfo::ChallengeInfo):
3508         (AuthenticationChallengeManagerPrivate):
3509         (WebCore::AuthenticationChallengeManagerPrivate::AuthenticationChallengeManagerPrivate):
3510         (WebCore::AuthenticationChallengeManagerPrivate::resumeAuthenticationChallenge):
3511         (WebCore::AuthenticationChallengeManagerPrivate::startAuthenticationChallenge):
3512         (WebCore::AuthenticationChallengeManagerPrivate::pageExists):
3513         (WebCore::AuthenticationChallengeManager::AuthenticationChallengeManager):
3514         (WebCore::AuthenticationChallengeManager::pageCreated):
3515         (WebCore::AuthenticationChallengeManager::pageDeleted):
3516         (WebCore::AuthenticationChallengeManager::pageVisibilityChanged):
3517         (WebCore::AuthenticationChallengeManager::authenticationChallenge):
3518         (WebCore::AuthenticationChallengeManager::cancelAuthenticationChallenge):
3519         (WebCore::AuthenticationChallengeManager::notifyChallengeResult):
3520         (WebCore::AuthenticationChallengeManager::instance):
3521         (WebCore::AuthenticationChallengeManager::init):
3522         * platform/blackberry/AuthenticationChallengeManager.h:
3523         (WebCore):
3524         (AuthenticationChallengeManager):
3525         * platform/blackberry/PageClientBlackBerry.h:
3526         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
3527         (WebCore::MediaPlayerPrivate::MediaPlayerPrivate):
3528         (WebCore::MediaPlayerPrivate::~MediaPlayerPrivate):
3529         (WebCore::MediaPlayerPrivate::onAuthenticationNeeded):
3530         (WebCore::MediaPlayerPrivate::notifyChallengeResult):
3531         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.h:
3532         (MediaPlayerPrivate):
3533         * platform/network/blackberry/NetworkJob.cpp:
3534         (WebCore::NetworkJob::NetworkJob):
3535         (WebCore::NetworkJob::~NetworkJob):
3536         (WebCore):
3537         (WebCore::NetworkJob::handleNotifyStatusReceived):
3538         (WebCore::NetworkJob::handleNotifyClose):
3539         (WebCore::NetworkJob::sendRequestWithCredentials):
3540         (WebCore::NetworkJob::notifyChallengeResult):
3541         * platform/network/blackberry/NetworkJob.h:
3542         (NetworkJob):
3543
3544 2012-09-21  Simon Hausmann  <simon.hausmann@digia.com>
3545
3546         Unreviewed, rolling out r129248.
3547         http://trac.webkit.org/changeset/129248
3548         https://bugs.webkit.org/show_bug.cgi?id=96000
3549
3550         Broke win build
3551
3552         * Target.pri:
3553         * WebCore.vcproj/WebCore.vcproj:
3554         * rendering/RenderingAllInOne.cpp:
3555
3556 2012-09-21  Simon Hausmann  <simon.hausmann@nokia.com>
3557
3558         Make RenderingAllInOne.cpp usable for ports other than Apple/Win
3559         https://bugs.webkit.org/show_bug.cgi?id=96000
3560
3561         Reviewed by Ryosuke Niwa.
3562
3563         RenderingAllInOne.cpp unconditionally includes RenderThemeWin. This patch separates
3564         it out from the file.
3565
3566         * Target.pri: Add RenderingAllInOne.cpp to the list of supported all-in-one files.
3567         * WebCore.vcproj/WebCore.vcproj: Compile RenderThemeWin.cpp separately.
3568         * rendering/RenderingAllInOne.cpp: Don't include RenderThemeWin.cpp here.
3569
3570 2012-09-21  Joanmarie Diggs  <jdiggs@igalia.com>
3571
3572         REGRESSION (r127882): accessibility/spinbutton-value.html failing on GTK
3573         https://bugs.webkit.org/show_bug.cgi?id=96196
3574
3575         Reviewed by Martin Robinson.
3576
3577         The "regression" is that a new test was added but the support was missing
3578         in the Gtk port for spin buttons.
3579
3580         No new tests. Instead the new test which had been skipped was unskipped
3581         as part of this fix.
3582
3583         * accessibility/gtk/WebKitAccessibleWrapperAtk.cpp:
3584         (atkRole): Map SpinButtonRole to ATK_ROLE_SPIN_BUTTON
3585         (getInterfaceMaskFromObject): Add SpinButtonRole to the roles implementing
3586         the AtkValue interface.
3587
3588 2012-09-21  Joanmarie Diggs  <jdiggs@igalia.com>
3589
3590         [GTK] [Stable] Infinite recursion in WebCore::AXObjectCache::getOrCreate
3591         https://bugs.webkit.org/show_bug.cgi?id=96932
3592
3593         Reviewed by Martin Robinson.
3594
3595         Make the decision based on RenderObjects rather than AccessibilityObjects
3596         to avoid the infinite recursion which occurs when remapAriaRoleDueToParent
3597         gets called.
3598
3599         Test: platform/gtk/accessibility/remapped-aria-crash.html
3600
3601         * accessibility/gtk/AccessibilityObjectAtk.cpp:
3602         (WebCore::AccessibilityObject::accessibilityPlatformIncludesObject):
3603
3604 2012-09-21  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3605
3606         [BlackBerry] HTML5 media does not handle SSL certificate failures
3607         https://bugs.webkit.org/show_bug.cgi?id=93324
3608
3609         Reviewed by Eric Carlson.
3610
3611         RIM PR: 116205
3612         Passed FrameLoaderClientBlackBerry's playerId to MMRPlayer::load()
3613         because MMRPlayer::load() added playerId as a new parameter, which
3614         is required to initiate a MediaSSLHandlerStream to deal with
3615         certificate failure when loading a "https" media url.
3616
3617         Internally reviewed by Joe Mason <jmason@rim.com>.
3618
3619         No new tests since there's no functional change.
3620
3621         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
3622         (WebCore::MediaPlayerPrivate::load):
3623
3624 2012-09-21  Evan Wallace  <evan.exe@gmail.com>
3625
3626         [WebSocket] Receiving a large message is really slow
3627         https://bugs.webkit.org/show_bug.cgi?id=97237
3628
3629         Reviewed by Alexey Proskuryakov.
3630
3631         WebSocketChannel always reallocates its internal buffer when it receives
3632         and appends new data which causes dramatic slowdowns for messages over
3633         2 MB in size. This patch changes the internal buffer of WebSocketChannel
3634         from a raw char array to a Vector<char> and uses its amortized append()
3635         method. This brings the time to receive a 5 MB message from 5.2 seconds
3636         to 0.25 seconds.
3637
3638         This patch is only for optimization. No new tests are needed.
3639
3640         * Modules/websockets/WebSocketChannel.cpp:
3641         (WebCore::WebSocketChannel::WebSocketChannel):
3642         (WebCore::WebSocketChannel::~WebSocketChannel):
3643         (WebCore::WebSocketChannel::fail):
3644         (WebCore::WebSocketChannel::resume):
3645         (WebCore::WebSocketChannel::didReceiveSocketStreamData):
3646         (WebCore::WebSocketChannel::appendToBuffer):
3647         (WebCore::WebSocketChannel::skipBuffer):
3648         (WebCore::WebSocketChannel::processBuffer):
3649         (WebCore::WebSocketChannel::resumeTimerFired):
3650         (WebCore::WebSocketChannel::processFrame):
3651         * Modules/websockets/WebSocketChannel.h:
3652
3653 2012-09-21  Andrey Adaikin  <aandrey@chromium.org>
3654
3655         Fix build with ENABLE_WEBGL=false
3656         https://bugs.webkit.org/show_bug.cgi?id=97309
3657
3658         Reviewed by Eric Seidel.
3659
3660         WebKit no longer builds when WEBGL is not enabled.
3661
3662         * rendering/FilterEffectRenderer.h:
3663         (FilterEffectRenderer):
3664
3665 2012-09-21  Jonathan Dong  <jonathan.dong@torchmobile.com.cn>
3666
3667         [BlackBerry] Media player won't resize for the following source when first source fail to load
3668         https://bugs.webkit.org/show_bug.cgi?id=97342
3669
3670         Reviewed by Yong Li.
3671
3672         As platformPlayer will notify MediaPlayerPrivate for size change
3673         when loading metadata failed (in this case hasVideo() is false),
3674         we should prevent MediaPlayerPrivate to set width and height
3675         attribute of media element, otherwise we won't get the correct
3676         dimension for the following media sources.
3677
3678         Internally reviewed by Max Feil.
3679
3680         Test case: media/video-size.html
3681
3682         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
3683         (WebCore::MediaPlayerPrivate::resizeSourceDimensions):
3684
3685 2012-09-21  Dan Bernstein  <mitz@apple.com>
3686
3687         REGRESSION (r126763): Incorrect line breaking when both kerning and word spacing are enabled
3688         https://bugs.webkit.org/show_bug.cgi?id=97280
3689
3690         Reviewed by Adele Peterson.
3691
3692         Font::width() never applies word spacing to the first character in the TextRun. The
3693         TextLayout optimization tried to achieve this behavior by not applying word spacing to
3694         any character, which led to this bug.
3695
3696         Test: fast/text/word-space-with-kerning-2.html
3697
3698         * platform/graphics/mac/ComplexTextController.cpp:
3699         (WebCore::TextLayout::TextLayout): Changed to use the given font rather than a version
3700         without word spacing.
3701         (WebCore::TextLayout::width): Added a check if the run starts with a space at a non-zero
3702         offset. If that is the case, then the ComplexTextController has added word spacing to that
3703         space, so subtract it here in order to maintain the behavior described above.
3704
3705 2012-09-21  Sheriff Bot  <webkit.review.bot@gmail.com>
3706
3707         Unreviewed, rolling out r129219.
3708         http://trac.webkit.org/changeset/129219
3709         https://bugs.webkit.org/show_bug.cgi?id=97338
3710
3711         Presumably broke Apple Mac compilation (Requested by yurys_ on
3712         #webkit).
3713
3714         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3715         (WebCore::JSHTMLCanvasElement::getContext):
3716         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3717         (WebCore::V8HTMLCanvasElement::getContextCallback):
3718         * inspector/InjectedScriptCanvasModule.cpp:
3719         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
3720         (WebCore):
3721         * inspector/InjectedScriptCanvasModule.h:
3722         (InjectedScriptCanvasModule):
3723         * inspector/InspectorCanvasAgent.cpp:
3724         * inspector/InspectorCanvasAgent.h:
3725         * inspector/InspectorCanvasInstrumentation.h:
3726         * inspector/InspectorInstrumentation.h:
3727         (InspectorInstrumentation):
3728
3729 2012-09-21  Andrey Adaikin  <aandrey@chromium.org>
3730
3731         Web Inspector: [Canvas] support 2D canvas instrumentation from the inspector C++ code
3732         https://bugs.webkit.org/show_bug.cgi?id=97203
3733
3734         Reviewed by Yury Semikhatsky.
3735
3736         Implements wrapping a 2D canvas context through the injected canvas module script facility.
3737
3738         * bindings/js/JSHTMLCanvasElementCustom.cpp:
3739         (WebCore::JSHTMLCanvasElement::getContext):
3740         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
3741         (WebCore::V8HTMLCanvasElement::getContextCallback):
3742         * inspector/InjectedScriptCanvasModule.cpp:
3743         (WebCore::InjectedScriptCanvasModule::wrapCanvas2DContext):
3744         (WebCore):
3745         (WebCore::InjectedScriptCanvasModule::wrapWebGLContext):
3746         (WebCore::InjectedScriptCanvasModule::callWrapContextFunction):
3747         * inspector/InjectedScriptCanvasModule.h:
3748         (InjectedScriptCanvasModule):
3749         * inspector/InspectorCanvasAgent.cpp:
3750         (WebCore::InspectorCanvasAgent::wrapCanvas2DRenderingContextForInstrumentation):
3751         (WebCore):
3752         * inspector/InspectorCanvasAgent.h:
3753         (InspectorCanvasAgent):
3754         * inspector/InspectorCanvasInstrumentation.h:
3755         (WebCore::InspectorInstrumentation::wrapCanvas2DRenderingContextForInstrumentation):
3756         (WebCore):
3757         * inspector/InspectorInstrumentation.h:
3758         (InspectorInstrumentation):
3759
3760 2012-09-20  Andrey Kosyakov  <caseq@chromium.org>
3761
3762         Web Inspector: [refactoring] simplify interface to FileOutputStream
3763         https://bugs.webkit.org/show_bug.cgi?id=97226
3764
3765         Reviewed by Yury Semikhatsky.
3766
3767         - change OutputStream interface to match that of stream;
3768         - fix OutputStream implementations (FileOutputStream and those in heap profiler);
3769         - fix usages in Timeline and HeapProfiler.
3770
3771         * inspector/front-end/FileUtils.js:
3772         (WebInspector.OutputStream.prototype.write):
3773         (WebInspector.OutputStream.prototype.close):
3774         (WebInspector.ChunkedFileReader.prototype.start):
3775         (WebInspector.ChunkedFileReader.prototype._onChunkLoaded):
3776         (WebInspector.ChunkedXHRReader.prototype.start):
3777         (WebInspector.ChunkedXHRReader.prototype._onProgress):
3778         (WebInspector.ChunkedXHRReader.prototype._onLoad):
3779         (WebInspector.FileOutputStream):
3780         (WebInspector.FileOutputStream.prototype.open.callbackWrapper):
3781         (WebInspector.FileOutputStream.prototype.open):
3782         (WebInspector.FileOutputStream.prototype.write):
3783         (WebInspector.FileOutputStream.prototype.close):
3784         (WebInspector.FileOutputStream.prototype._onAppendDone):
3785         * inspector/front-end/HeapSnapshotLoader.js:
3786         (WebInspector.HeapSnapshotLoader.prototype.close):
3787         (WebInspector.HeapSnapshotLoader.prototype.write):
3788         * inspector/front-end/HeapSnapshotProxy.js:
3789         (WebInspector.HeapSnapshotLoaderProxy.prototype.startTransfer):
3790         (WebInspector.HeapSnapshotLoaderProxy.prototype.write):
3791         (WebInspector.HeapSnapshotLoaderProxy.prototype.close):
3792         * inspector/front-end/HeapSnapshotView.js:
3793         (WebInspector.HeapProfileHeader):
3794         (WebInspector.HeapProfileHeader.prototype.load):
3795         (WebInspector.HeapProfileHeader.prototype._setupWorker):
3796         (WebInspector.HeapProfileHeader.prototype.dispose):
3797         (WebInspector.HeapProfileHeader.prototype.transferChunk.callback):
3798         (WebInspector.HeapProfileHeader.prototype.transferChunk):
3799         (WebInspector.HeapProfileHeader.prototype.finishHeapSnapshot):
3800         (WebInspector.HeapProfileHeader.prototype.saveToFile.onOpen):
3801         (WebInspector.HeapProfileHeader.prototype.saveToFile):
3802         * inspector/front-end/TimelineModel.js:
3803         (WebInspector.TimelineModel.prototype._createFileWriter):
3804         (WebInspector.TimelineModel.prototype.saveToFile.callback):
3805         (WebInspector.TimelineModel.prototype.saveToFile):
3806         (WebInspector.TimelineModelLoader):
3807         (WebInspector.TimelineModelLoader.prototype.write):
3808         (WebInspector.TimelineModelLoader.prototype.close):
3809         (WebInspector.TimelineSaver):
3810         (WebInspector.TimelineSaver.prototype.save):
3811         (WebInspector.TimelineSaver.prototype._writeNextChunk):
3812
3813 2012-09-21  Alexandru Chiculita  <achicu@adobe.com>
3814
3815         -webkit-clip-path is applied on elements that are not descendant of the container
3816         https://bugs.webkit.org/show_bug.cgi?id=97217
3817
3818         Reviewed by Dirk Schulze.
3819
3820         The clip-path was set on the GraphicsContext, but was never restored, thus making all the layers
3821         rendered in the same "group" of save/restore state use the same clip-path.
3822
3823         Test: css3/masking/clip-path-restore.html
3824
3825         * css/StyleResolver.cpp:
3826         (WebCore::StyleResolver::collectMatchingRulesForList):
3827         clip-path property should create a stacking-context, otherwise the RenderLayers will not be nested,
3828         meaning that the clip-path of the parent is not going to apply correctly.
3829
3830         * rendering/RenderLayer.cpp:
3831         (WebCore::RenderLayer::paintLayerContents):
3832
3833 2012-09-21  Kent Tamura  <tkent@chromium.org>
3834
3835         Remove unused functions of LocalizedDate.h
3836         https://bugs.webkit.org/show_bug.cgi?id=97311
3837
3838         Reviewed by Kentaro Hara.
3839
3840         WebCore::localizedTimeFormatText, WebCore::localizedShortTimeFormatText,
3841         and WebCore::timeAMPMLabels are not used any more because we switched to
3842         the corresponding functions of Localizer.
3843
3844         No new tests because of no behavior changes.
3845
3846         * platform/text/Localizer.h:
3847         (Localizer): Moved comments from LocalizedDate.h.
3848         * platform/text/LocalizedDate.h:
3849         (WebCore): Removed localizedTimeFormatText,
3850         localizedShortTimeFormatText, and timeAMPMLabels.
3851         * platform/text/LocalizedDateICU.cpp:
3852         (WebCore): ditto.
3853         * platform/text/LocalizedDateWin.cpp:
3854         (WebCore): ditto.
3855         * platform/text/mac/LocalizedDateMac.cpp:
3856         (WebCore): ditto.
3857
3858 2012-09-21  Keishi Hattori  <keishi@webkit.org>
3859
3860         Add datalist suggestions into DateTimeChooserParameters
3861         https://bugs.webkit.org/show_bug.cgi?id=97292
3862
3863         Reviewed by Kent Tamura.
3864
3865         We read datalist suggestions, add them to DateTimeChooserParameters,
3866         and pass them to the page popup.
3867
3868         No new tests. No behavior change yet.
3869
3870         * html/shadow/CalendarPickerElement.cpp:
3871         (WebCore::CalendarPickerElement::openPopup): Read datalist suggestions and add them to DateTimeChooserParameters
3872         * platform/DateTimeChooser.h:
3873         (DateTimeChooserParameters): Added localizedSuggestionValues so we can show localized values inside the page popup.
3874
3875 2012-09-21  Yoshifumi Inoue  <yosin@chromium.org>
3876
3877         [Forms] DateTimeEditElement::layout() should take date time format as a parameter
3878         https://bugs.webkit.org/show_bug.cgi?id=97300
3879
3880         Reviewed by Kent Tamura.
3881
3882         This patch introduces DateTimeEditElement::LayoutParameters struct for
3883         passing four parameters to DateTimeEditElement::layout() for passing
3884         date time format from client of DateTimeEditElement instead of
3885         DateTimeEditElement::layout() takes time or short time format.
3886
3887         This patch is a part of preparation of introducing multiple fields
3888         date/datetime/month/week input UI.
3889
3890         This patch affects ports which enable both ENABLE_INPUT_TYPE_TIME and
3891         ENABLE_INPUT_TYPE_TIME_MULTIPLE_FIELDS.
3892
3893         No new tests. This patch doesn't change behavior.
3894
3895         * html/TimeInputType.cpp:
3896         (WebCore::TimeInputType::updateInnerTextValue): Changed to use LayoutParmeters.
3897         * html/shadow/DateTimeEditElement.cpp:  Removed unused include files, LocalizedDate.h and LocalizedNumber.h.
3898         (DateTimeEditBuilder):
3899         (WebCore::DateTimeEditBuilder::DateTimeEditBuilder): Changed parameters to LayoutParmeters.
3900         (WebCore::DateTimeEditElement::LayoutParameters::shouldHaveSecondField): Moved from DateTimeEditBuilder::needSecondField().
3901         (WebCore::DateTimeEditElement::layout): Changed to take LayoutParameters.
3902         (WebCore::DateTimeEditElement::setValueAsDate): ditto
3903         (WebCore::DateTimeEditElement::setEmptyValue): ditto
3904         * html/shadow/DateTimeEditElement.h: Removed unused classe declarations DateComponents and DateTimeEditLayouter.
3905         (LayoutParameters):  Added to bundle parameters for layout().
3906         (WebCore::DateTimeEditElement::LayoutParameters::LayoutParameters): Added.
3907
3908 2012-09-20  Pavel Feldman  <pfeldman@chromium.org>
3909
3910         Web Inspector: render grid scale to the right / at bottom in case box is close to 0 on that axis.
3911         https://bugs.webkit.org/show_bug.cgi?id=97219
3912
3913         Reviewed by Vsevolod Vlasov.
3914
3915         Otherwise, it is hard to inspect objects close to (0, 0)
3916
3917         * inspector/InspectorOverlayPage.html:
3918
3919 2012-09-21  Sheriff Bot  <webkit.review.bot@gmail.com>
3920
3921         Unreviewed, rolling out r129086.
3922         http://trac.webkit.org/changeset/129086
3923         https://bugs.webkit.org/show_bug.cgi?id=97312
3924
3925         Broke input rendering (Requested by shinyak on #webkit).
3926
3927         * html/BaseButtonInputType.cpp:
3928         (WebCore):
3929         * html/BaseButtonInputType.h:
3930         (WebCore::BaseButtonInputType::BaseButtonInputType):
3931         (BaseButtonInputType):
3932         * html/FileInputType.cpp:
3933         (WebCore::UploadButtonElement::create):
3934         (WebCore::UploadButtonElement::createForMultiple):
3935         * html/HTMLInputElement.cpp:
3936         (WebCore::HTMLInputElement::parseAttribute):
3937         * html/InputType.cpp:
3938         * html/InputType.h:
3939         (InputType):
3940         * rendering/RenderButton.cpp:
3941         (WebCore::RenderButton::RenderButton):
3942         (WebCore::RenderButton::styleDidChange):
3943         (WebCore::RenderButton::updateFromElement):
3944         (WebCore):
3945         (WebCore::RenderButton::setText):
3946         (WebCore::RenderButton::text):
3947         * rendering/RenderButton.h:
3948         (RenderButton):
3949
3950 2012-09-21  Kihong Kwon  <kihong.kwon@samsung.com>
3951
3952         Remove useless class prototypes from Vibration.h
3953         https://bugs.webkit.org/show_bug.cgi?id=97304
3954
3955         Reviewed by Kentaro Hara.
3956
3957         Remove two useless class prototype statements in the Vibration.h
3958
3959         * Modules/vibration/Vibration.h:
3960
3961 2012-09-21  Keishi Hattori  <keishi@webkit.org>
3962
3963         Prepare CalendarPicker so we can add another picker, SuggetionPicker
3964         https://bugs.webkit.org/show_bug.cgi?id=97193
3965
3966         Reviewed by Kent Tamura.
3967
3968         Preparation so we can add another picker to CalendarPicker and switch
3969         between them.
3970
3971         No new tests. No behavior change.
3972
3973         * Resources/pagepopups/calendarPicker.css:
3974         (.calendar-picker): Added so we can apply these styles just to calendar picker.
3975         * Resources/pagepopups/calendarPicker.js:
3976         (CalendarPicker.validateConfig): Renamed so each picker can validate the config object.
3977         (initialize):
3978         (closePicker): Call Picker.cleanup().
3979         (openCalendarPicker):
3980         (CalendarPicker):
3981         (CalendarPicker.prototype.cleanup): Cleanup event listener on document.body.
3982         * Resources/pagepopups/pickerCommon.js:
3983         (Picker.prototype.cleanup):
3984
3985 2012-09-20  John Mellor  <johnme@chromium.org>
3986
3987         Text Autosizing: Cluster text at flow roots, for consistency and to avoid autosizing headers/footers.
3988         https://bugs.webkit.org/show_bug.cgi?id=97025
3989
3990         Reviewed by Julien Chaffraix.
3991
3992         This patch has 3 main changes:
3993
3994         1. All text within a "cluster" (roughly equivalent to a CSS flow root /
3995            block formatting context) must have a uniform textAutosizingMultiplier,
3996            except for subtrees which are themselves clusters. This improves the
3997            consistency of the final output, since sibling blocks are now more
3998            likely to have the same multiplier (hence grow in proportion).
3999
4000         2. Clusters must contain a minimum amount of text in order to be
4001            autosized (4 lines of text, assuming each char is 1em wide, so about
4002            2 lines of text in practice). This is to reduce the likelihood of
4003            autosizing things like headers and footers, which can be quite
4004            visually distracting. The rationale is that if a cluster contains
4005            very few lines of text then it's ok to have to zoom in and pan from
4006            side to side to read each line, since if there are very few lines of
4007            text you'll only need to pan across once or twice.
4008
4009         3. To avoid adding a 3rd tree traversal, processSubtree/processBox were
4010            refactored such that all of Text Autosizing now happens as a single
4011            tree traversal (hence halving the number of tree traversals done).
4012
4013         Tests: fast/text-autosizing/cluster-narrow-in-wide.html
4014                fast/text-autosizing/cluster-wide-in-narrow.html
4015                fast/text-autosizing/clusters-insufficient-text.html
4016                fast/text-autosizing/clusters-insufficient-width.html
4017                fast/text-autosizing/clusters-sufficient-text-except-in-root.html
4018                fast/text-autosizing/clusters-sufficient-width.html
4019
4020         * rendering/TextAutosizer.cpp:
4021         (TextAutosizingWindowInfo):
4022
4023             Added this struct to bundle together the various sizes that
4024             processSubtree needs to pass to every recursive call to
4025             processCluster and processContainer.
4026
4027         (WebCore::TextAutosizer::processSubtree):
4028
4029             - Bundle windowSize and minLayoutSize together as a single struct,
4030               TextAutosizingWindowInfo, rather than passing them separately.
4031             - Walk up the tree to find the current cluster and container, rather
4032               than (incorrectly) assuming that the layoutRoot is always a
4033               container.
4034             - Call processCluster instead of traversing the tree.
4035
4036         (WebCore::TextAutosizer::processCluster):
4037
4038             Calculates the multiplier based on the width of the cluster (moved
4039             the calculation here from processBox, since now the multiplier is
4040             fixed per cluster), and delegates to processContainer for the actual
4041             tree traversal (since clusters are also containers).
4042
4043         (WebCore::contentHeightIsConstrained):
4044
4045             Changed parameter to RenderBlock.
4046
4047         (WebCore::TextAutosizer::processContainer):
4048
4049             This now takes care of the whole tree traversal, recursively calling
4050             processCluster/processContainer when it encounters such an object,
4051             and setMultiplier on RenderText objects (as processBox used to).
4052             Also added a check that the RenderText's multiplier is not already
4053             equal to the target multiplier (to save needlessly setting it).
4054
4055         (WebCore::TextAutosizer::isContainer):
4056
4057             - Changed to be a positive (is) instead of negative (isNot) check.
4058             - Require objects to be RenderBlocks so it's easier to find them
4059               using containingBlock, and there don't seem to be many interesting
4060               RenderBoxes that aren't RenderBlocks.
4061
4062         (WebCore::TextAutosizer::isAutosizingCluster):
4063
4064             A container that is also a flow root / block formatting context
4065             (approximately), hence demarcates an independent region of the page,
4066             within which we want consistent autosizing.
4067
4068         (WebCore::TextAutosizer::clusterShouldBeAutosized):
4069
4070             Uses measureDescendantTextWidth and to check whether the cluster
4071          &nb