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