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