924f6bf842bc96212abc16e5154d794764651422
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-06  Alpha Lam  <hclam@chromium.org>
2
3         More cleanup in GIFImageReader
4         https://bugs.webkit.org/show_bug.cgi?id=111137
5
6         Reviewed by Stephen White.
7
8         Refactor GIFImageReaderReader with the following changes:
9         + Separate GIFLZWContext for decoding states.
10         + Replace unsigned char* with Vector<unsigned char>
11
12         There is no change in code behavior and just refactoring.
13
14         No new tests. This is covered by existing GIFImageReaderTest.
15         I also did a local testing on a 50k image corpus and showed no regression.
16
17         * platform/image-decoders/gif/GIFImageDecoder.cpp:
18         (WebCore::GIFImageDecoder::haveDecodedRow):
19         * platform/image-decoders/gif/GIFImageDecoder.h:
20         (GIFImageDecoder):
21         * platform/image-decoders/gif/GIFImageReader.cpp:
22         (GIFImageReader::outputRow):
23         (GIFImageReader::doLZW):
24         (GIFImageReader::decodeInternal):
25         (GIFImageReader::prepareLZWContext):
26         * platform/image-decoders/gif/GIFImageReader.h:
27         (GIFFrameContext):
28         (GIFFrameContext::GIFFrameContext):
29         (GIFFrameContext::~GIFFrameContext):
30         (GIFLZWContext):
31         (GIFLZWContext::GIFLZWContext):
32         (GIFImageReader):
33
34 2013-03-06  Tim Horton  <timothy_horton@apple.com>
35
36         Fix typo'd MainThreadScrollingBecauseOfStyleIndictaion
37         https://bugs.webkit.org/show_bug.cgi?id=111557
38
39         Reviewed by Geoff Garen.
40
41         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
42         (WebCore::ScrollingCoordinatorMac::commitTreeState):
43         * platform/graphics/TiledBacking.h:
44         * platform/graphics/ca/mac/TileCache.mm:
45         (WebCore::TileCache::updateTileCoverageMap):
46
47 2013-03-05  Geoffrey Garen  <ggaren@apple.com>
48
49         Removed some dead code in the page cache
50         https://bugs.webkit.org/show_bug.cgi?id=111525
51
52         Reviewed by Alexey Proskuryakov.
53
54         Page cache autorelease doesn't exist anymore, so there's no need to keep
55         around these olds hacks.
56
57         * WebCore.exp.in:
58         * history/PageCache.cpp:
59         (WebCore::PageCache::PageCache):
60         (WebCore):
61         * history/PageCache.h:
62         (PageCache):
63         * page/Settings.cpp:
64         (WebCore::Settings::setUsesPageCache):
65         * platform/mac/MemoryPressureHandlerMac.mm:
66         (WebCore::MemoryPressureHandler::releaseMemory):
67         * platform/qt/QtTestSupport.cpp:
68         (WebKit::QtTestSupport::clearMemoryCaches):
69
70 2013-03-06  Rafael Weinstein  <rafaelw@chromium.org>
71
72         Unreviewed, rolling out r144924.
73         http://trac.webkit.org/changeset/144924
74         https://bugs.webkit.org/show_bug.cgi?id=109908
75
76         caused multiple crashes in inspector/debugger tests
77
78         * bindings/js/JSInjectedScriptHostCustom.cpp:
79         * bindings/js/ScriptObject.h:
80         * bindings/v8/ScriptObject.h:
81         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
82         * inspector/InjectedScriptHost.cpp:
83         (WebCore::InjectedScriptHost::create):
84         (WebCore::InjectedScriptHost::InjectedScriptHost):
85         (WebCore::InjectedScriptHost::disconnect):
86         * inspector/InjectedScriptHost.h:
87         (WebCore):
88         (InjectedScriptHost):
89         * inspector/InjectedScriptHost.idl:
90         * inspector/InjectedScriptManager.cpp:
91         (WebCore::InjectedScriptManager::InjectedScriptManager):
92         (WebCore::InjectedScriptManager::discardInjectedScripts):
93         (WebCore::InjectedScriptManager::discardInjectedScriptsFor):
94         * inspector/InjectedScriptManager.h:
95         (InjectedScriptManager):
96         * inspector/InjectedScriptSource.js:
97         (.):
98
99 2013-03-06  Dmitry Zvorygin  <zvorygin@chromium.org>
100
101         Introduce new message sources for logging.
102         https://bugs.webkit.org/show_bug.cgi?id=110968
103
104         Reviewed by Pavel Feldman.
105
106         Added SecurityMessageSource, RenderingMessageSource, StorageMessageSource, AppCacheMessageSource, CSSMessageSource.
107         Changed some logging lines to contain more descriptive message source.
108
109         * Modules/webdatabase/DatabaseBase.cpp:
110         (WebCore::DatabaseBase::logErrorMessage):
111         * Modules/webdatabase/DatabaseManager.cpp:
112         (WebCore::DatabaseManager::logErrorMessage):
113         * Modules/websockets/WebSocketChannel.cpp:
114         (WebCore::WebSocketChannel::fail):
115         * bindings/ScriptControllerBase.cpp:
116         (WebCore::ScriptController::canExecuteScripts):
117         * css/MediaList.cpp:
118         (WebCore::addResolutionWarningMessageToConsole):
119         * dom/Document.cpp:
120         (WebCore::Document::processHttpEquiv):
121         * dom/ScriptElement.cpp:
122         (WebCore::ScriptElement::executeScript):
123         (WebCore::ScriptElement::notifyFinished):
124         * dom/ViewportArguments.cpp:
125         (WebCore::reportViewportWarning):
126         * html/HTMLFormControlElement.cpp:
127         (WebCore::shouldAutofocus):
128         * html/HTMLFormElement.cpp:
129         (WebCore::HTMLFormElement::validateInteractively):
130         * html/HTMLIFrameElement.cpp:
131         (WebCore::HTMLIFrameElement::parseAttribute):
132         * html/canvas/CanvasRenderingContext2D.cpp:
133         (WebCore::CanvasRenderingContext2D::getImageData):
134         * html/canvas/WebGLRenderingContext.cpp:
135         (WebCore):
136         (WebCore::WebGLRenderingContext::printWarningToConsole):
137         * html/parser/XSSAuditor.cpp:
138         (WebCore::XSSAuditor::init):
139         * html/parser/XSSAuditorDelegate.cpp:
140         (WebCore::XSSAuditorDelegate::didBlockScript):
141         * inspector/ConsoleMessage.cpp:
142         (WebCore::messageSourceValue):
143         * inspector/Inspector.json:
144         * loader/FrameLoader.cpp:
145         (WebCore::FrameLoader::submitForm):
146         (WebCore::FrameLoader::reportLocalLoadFailed):
147         (WebCore::createWindow):
148         * loader/ImageLoader.cpp:
149         (WebCore::ImageLoader::notifyFinished):
150         * loader/MainResourceLoader.cpp:
151         (WebCore::MainResourceLoader::responseReceived):
152         * loader/MixedContentChecker.cpp:
153         (WebCore::MixedContentChecker::logWarning):
154         * loader/TextTrackLoader.cpp:
155         (WebCore::TextTrackLoader::corsPolicyPreventedLoad):
156         * loader/appcache/ApplicationCacheGroup.cpp:
157         (WebCore::ApplicationCacheGroup::abort):
158         * loader/cache/CachedResourceLoader.cpp:
159         (WebCore::CachedResourceLoader::printAccessDeniedMessage):
160         * page/Console.cpp:
161         (WebCore::printMessageSourceAndLevelPrefix):
162         * page/ConsoleTypes.h:
163         * page/ContentSecurityPolicy.cpp:
164         (WebCore::ContentSecurityPolicy::logToConsole):
165         * page/DOMWindow.cpp:
166         (WebCore::DOMWindow::dispatchMessageEventWithOriginCheck):
167         * page/PointerLockController.cpp:
168         (WebCore::PointerLockController::requestPointerLock):
169         * svg/SVGDocumentExtensions.cpp:
170         (WebCore::reportMessage):
171
172 2013-03-06  Florin Malita  <fmalita@chromium.org>
173
174         SVG pattern to pattern reference does not work if first pattern has a child node
175         https://bugs.webkit.org/show_bug.cgi?id=111586
176
177         Reviewed by Philip Rogers.
178
179         SVGPatternElement::collectPatternAttributes should test for child elements, not child nodes.
180
181         Tests: svg/custom/pattern-reference-expected.svg
182                svg/custom/pattern-reference.svg
183
184         * svg/SVGPatternElement.cpp:
185         (WebCore::SVGPatternElement::collectPatternAttributes):
186
187 2013-03-06  Christophe Dumez  <ch.dumez@sisa.samsung.com>
188
189         [soup] session cookies are not correctly reported in getRawCookies()
190         https://bugs.webkit.org/show_bug.cgi?id=111584
191
192         Reviewed by Martin Robinson.
193
194         As per libsoup documentation, SoupCookie->expires is NULL for session cookies.
195         However, the soup implementation for getRawCookies() does not check for NULL
196         case before passing the value to soup_date_to_time_t(), which leads to run time
197         warnings.
198
199         We should also pass true for WebCore::Cookie's session argument if
200         SoupCookie->expires is NULL. The current implementation reports the cookie as a
201         session one if soup_cookie_jar_is_persistent(jar) returns true, which is
202         inaccurate.
203
204         No new tests, no behavior change for layout tests as Web Inspector currently
205         ignores the "session" member and uses expires/max-age instead to deduce it.
206
207         * platform/network/soup/CookieJarSoup.cpp:
208         (WebCore::getRawCookies):
209
210 2013-03-06  Douglas Stockwell  <dstockwell@chromium.org>
211
212         REGRESSION(r111639): delayed animation start can be postponed
213         https://bugs.webkit.org/show_bug.cgi?id=108582
214
215         Query the animation timer directly for the time it will next fire rather than
216         trying to cache the interval. Previous approach was incorrect -- as time advanced
217         it was possible for the interval to jump beyond the next service time.
218
219         Reviewed by Darin Adler.
220
221         Test: animations/animation-delay-changed.html
222
223         * page/animation/AnimationController.cpp:
224         (WebCore::AnimationControllerPrivate::AnimationControllerPrivate):
225         (WebCore::AnimationControllerPrivate::updateAnimationTimerForRenderer):
226         (WebCore::AnimationControllerPrivate::updateAnimationTimer):
227         * page/animation/AnimationControllerPrivate.h:
228         (AnimationControllerPrivate): Remove m_previousTimeToNextService
229
230 2013-03-06  Andrey Lushnikov  <lushnikov@chromium.org>
231
232         Web Inspector: [ACE] show execution line in Ace editor
233         https://bugs.webkit.org/show_bug.cgi?id=111575
234
235         Reviewed by Pavel Feldman.
236
237         Highlight execution line by the means of Ace full line markers.
238
239         No new tests.
240
241         * inspector/front-end/AceTextEditor.js:
242         (WebInspector.AceTextEditor.prototype.setExecutionLine):
243         (WebInspector.AceTextEditor.prototype.clearExecutionLine):
244         (WebInspector.AceTextEditor.prototype.setSelection):
245         * inspector/front-end/ace/acedevtools.css:
246         (.ace-editor-container):
247         (.webkit-execution-line):
248
249 2013-03-06  Yury Semikhatsky  <yurys@chromium.org>
250
251         Web Inspector: fix closure compiler warnings in the profiler code
252         https://bugs.webkit.org/show_bug.cgi?id=111581
253
254         Reviewed by Vsevolod Vlasov.
255
256         Added missing annotations. Replaced NativeProfileLauncherView with
257         ProfileLauncherView.
258
259         * inspector/InjectedScriptExterns.js:
260         (InjectedScriptHost.prototype.objectId):
261         (InjectedScriptHost.prototype.releaseObjectId):
262         * inspector/front-end/FlameChart.js:
263         (WebInspector.FlameChart.prototype._forEachNode):
264         * inspector/front-end/ProfileLauncherView.js:
265         * inspector/front-end/ProfilesPanel.js:
266
267 2013-03-06  Carlos Garcia Campos  <cgarcia@igalia.com>
268
269         [BlackBerry] Pass String::StrictConversion instead of true to String::utf8()
270         https://bugs.webkit.org/show_bug.cgi?id=111546
271
272         Reviewed by Rob Buis.
273
274         String::utf8() API changed in r134173.
275
276         * platform/graphics/blackberry/MediaPlayerPrivateBlackBerry.cpp:
277         (WebCore::MediaPlayerPrivate::notifyChallengeResult):
278
279 2013-03-06  Julien Chaffraix  <jchaffraix@webkit.org>
280
281         Remove the (dead) code for handling shorthands in StyleResolver / StyleBuilder
282         https://bugs.webkit.org/show_bug.cgi?id=111505
283
284         Unreviewed minimal build fix.
285
286         * css/StyleResolver.cpp:
287         (WebCore::StyleResolver::applyProperty):
288         Put CSSPropertyWebkitWrap under the proper if-guard.
289
290 2013-03-06  Vsevolod Vlasov  <vsevik@chromium.org>
291
292         Unreviewed follow up to r144928: front-end closure compilation fixes.
293
294         * inspector/front-end/FilteredItemSelectionDialog.js:
295         (WebInspector.JavaScriptOutlineDialog.prototype.dispose):
296         (WebInspector.OpenResourceDialog.prototype.dispose):
297         * inspector/front-end/StyleSheetOutlineDialog.js:
298         (WebInspector.StyleSheetOutlineDialog.prototype.dispose):
299
300 2013-03-06  Vsevolod Vlasov  <vsevik@chromium.org>
301
302         Web Inspector: Update open resource dialog when new uiSourceCodes are loaded.
303         https://bugs.webkit.org/show_bug.cgi?id=111327
304
305         Reviewed by Pavel Feldman.
306
307         * inspector/front-end/FilteredItemSelectionDialog.js:
308         (WebInspector.FilteredItemSelectionDialog):
309         (WebInspector.FilteredItemSelectionDialog.prototype.willHide):
310         (WebInspector.FilteredItemSelectionDialog.prototype._itemsLoaded):
311         (WebInspector.FilteredItemSelectionDialog.prototype._updateAfterItemsLoaded):
312         (WebInspector.FilteredItemSelectionDialog.prototype._filterItems.compareFunction):
313         (WebInspector.FilteredItemSelectionDialog.prototype._filterItems):
314         (WebInspector.SelectionDialogContentProvider.prototype.dispose):
315         (WebInspector.JavaScriptOutlineDialog.prototype._didBuildOutlineChunk):
316         (WebInspector.OpenResourceDialog):
317         (WebInspector.OpenResourceDialog.prototype.requestItems):
318         (WebInspector.OpenResourceDialog.prototype._filterUISourceCode):
319         (WebInspector.OpenResourceDialog.prototype._uiSourceCodeAdded):
320         (WebInspector.OpenResourceDialog.prototype.dispose):
321         * inspector/front-end/StyleSheetOutlineDialog.js:
322         (WebInspector.StyleSheetOutlineDialog.prototype.requestItems):
323         (WebInspector.StyleSheetOutlineDialog.prototype.requestItems.didGetStyleSheet):
324
325 2013-03-06  Vladislav Kaznacheev  <kaznacheev@chromium.org>
326
327         Web Inspector: Move sidebar-specific styles to a separate file.
328         https://bugs.webkit.org/show_bug.cgi?id=111173
329
330         Reviewed by Pavel Feldman.
331
332         * WebCore.gypi:
333         * inspector/front-end/BreakpointsSidebarPane.js:
334         (WebInspector.JavaScriptBreakpointsSidebarPane):
335         (WebInspector.EventListenerBreakpointsSidebarPane):
336         * inspector/front-end/NativeBreakpointsSidebarPane.js:
337         (WebInspector.NativeBreakpointsSidebarPane):
338         * inspector/front-end/SidebarPane.js:
339         (WebInspector.SidebarPaneTitle):
340         (WebInspector.SidebarPaneStack):
341         (WebInspector.SidebarTabbedPane):
342         * inspector/front-end/WebKit.qrc:
343         * inspector/front-end/breakpointsList.css: Added.
344         (.sidebar-pane > .body .breakpoint-condition):
345         (#breakpoint-condition-input):
346         (ol.breakpoint-list):
347         (.breakpoints-list-deactivated):
348         (.breakpoint-list li):
349         (.breakpoint-list li:hover):
350         (.breakpoint-list .checkbox-elem):
351         (.breakpoint-list .source-text):
352         (.sidebar-pane .breakpoint-hit):
353         (li.breakpoint-hit .breakpoint-hit-marker):
354         (.event-listener-breakpoints .event-category):
355         (.event-listener-breakpoints.properties-tree .children li):
356         (.event-listener-breakpoints .checkbox-elem):
357         * inspector/front-end/elementsPanel.css:
358         (.panel.elements .sidebar-pane-toolbar > select):
359         (.panel.elements .sidebar-pane-toolbar > select:hover):
360         (.panel.elements .sidebar-pane-toolbar > select:active):
361         (.panel.elements .sidebar-pane-toolbar > select.select-settings):
362         (.panel.elements .sidebar-pane-toolbar > select.select-filter):
363         (.panel.elements .sidebar-pane-toolbar > select > option, .panel.elements .sidebar-pane-toolbar > select > hr):
364         * inspector/front-end/inspector.css:
365         (.event-bar .event-properties):
366         * inspector/front-end/scriptsPanel.css:
367         (.workers-list > li):
368         (a.worker-item):
369         (a.worker-item:hover):
370         * inspector/front-end/sidebarPane.css: Added.
371         (.sidebar-pane):
372         (.sidebar-pane > .body):
373         (.sidebar-pane > .body .info):
374         (.sidebar-pane > .body .placard + .info):
375         (.sidebar-pane.visible > .body):
376         (.sidebar-pane .section .properties):
377         (.sidebar-tabbed-pane .tabbed-pane-header):
378         (.sidebar-pane-stack > .sidebar-pane.visible:nth-last-of-type(1)):
379         (.sidebar-pane-title):
380         (.sidebar-pane-title + .sidebar-pane-title, .pane:not(.visible) + .sidebar-pane-title, .sidebar-pane-title:first-of-type):
381         (.sidebar-pane-title:active):
382         (.sidebar-pane-title::before):
383         (.sidebar-pane-title.expanded::before):
384         (.sidebar-pane-toolbar):
385         (.sidebar-pane-toolbar > *):
386         (.sidebar-pane-toolbar > .pane-title-button):
387         (.sidebar-pane-toolbar > .pane-title-button:hover):
388         (.sidebar-pane-toolbar > .pane-title-button:active, .sidebar-pane-toolbar > .pane-title-button.toggled):
389         (.sidebar-pane-toolbar > .pane-title-button.add):
390         (.sidebar-pane-toolbar > .pane-title-button.element-state):
391         (.sidebar-pane-toolbar > .pane-title-button.refresh):
392         (.sidebar-pane-subtitle):
393         (body.platform-windows .sidebar-pane-subtitle):
394         (.sidebar-pane-subtitle input, .section .header input[type=checkbox]):
395
396 2013-03-06  Vladislav Kaznacheev  <kaznacheev@chromium.org>
397
398         Web Inspector: Combine style-related panes into a single tab when Elements panel is split horizontally.
399         https://bugs.webkit.org/show_bug.cgi?id=111550
400         Reviewed by Pavel Feldman.
401
402         Grouping the Elements sidebar panes into two tabbed panes proved to be
403         confusing and inconvenient. Put all the Elements sidebar panes into a single tabbed pane.
404         Combined Styles, Computed Style and Metrics into a single pane.
405
406         * inspector/front-end/ElementsPanel.js:
407         (WebInspector.ElementsPanel.prototype._splitVertically):
408         (WebInspector.ElementsPanel.prototype.addExtensionSidebarPane):
409         * inspector/front-end/elementsPanel.css:
410         (.sidebar-pane.composite):
411         (.sidebar-pane.composite > .body):
412         (.sidebar-pane.composite .metrics):
413         (.sidebar-pane.composite .sidebar-pane-toolbar):
414         (.sidebar-pane.composite .sidebar-pane-toolbar > .sidebar-pane-subtitle):
415         (.sidebar-pane.composite .styles-section.read-only):
416
417 2013-03-05  Yury Semikhatsky  <yurys@chromium.org>
418
419         Web Inspector: support stable remote object ids
420         https://bugs.webkit.org/show_bug.cgi?id=109908
421
422         Reviewed by Pavel Feldman.
423
424         Introduced a map from javascript object to its id. It guarantees
425         that object is assined id only once (unless it is explicitely
426         released). The map is per execution context and is stored in
427         InjectedScriptManager.
428
429         Test: inspector-protocol/persistent-id.html
430
431         * bindings/js/JSInjectedScriptHostCustom.cpp:
432         (WebCore::JSInjectedScriptHost::objectId):
433         (WebCore):
434         (WebCore::JSInjectedScriptHost::releaseObjectId):
435         * bindings/js/ScriptObject.h:
436         (WTF):
437         (WTF::ScriptObjectHash::hash):
438         (WTF::ScriptObjectHash::equal):
439         (ScriptObjectHash):
440         * bindings/v8/ScriptObject.h:
441         (WTF):
442         (WTF::ScriptObjectHash::hash):
443         (WTF::ScriptObjectHash::equal):
444         (ScriptObjectHash):
445         * bindings/v8/custom/V8InjectedScriptHostCustom.cpp:
446         (WebCore::V8InjectedScriptHost::objectIdMethodCustom):
447         (WebCore):
448         (WebCore::V8InjectedScriptHost::releaseObjectIdMethodCustom):
449         * inspector/InjectedScriptHost.cpp:
450         (WebCore::InjectedScriptHost::create):
451         (WebCore::InjectedScriptHost::InjectedScriptHost):
452         (WebCore::InjectedScriptHost::disconnect):
453         (WebCore::InjectedScriptHost::objectId):
454         (WebCore):
455         (WebCore::InjectedScriptHost::releaseObjectId):
456         * inspector/InjectedScriptHost.h:
457         (WebCore):
458         (InjectedScriptHost):
459         * inspector/InjectedScriptHost.idl:
460         * inspector/InjectedScriptManager.cpp:
461         (InjectedScriptManager::ObjectIdMap):
462         (WebCore::InjectedScriptManager::ObjectIdMap::ObjectIdMap):
463         (WebCore::InjectedScriptManager::ObjectIdMap::objectId):
464         (WebCore::InjectedScriptManager::ObjectIdMap::releaseObjectId):
465         (WebCore):
466         (WebCore::InjectedScriptManager::InjectedScriptManager):
467         (WebCore::InjectedScriptManager::discardInjectedScripts):
468         (WebCore::InjectedScriptManager::discardInjectedScriptsFor):
469         (WebCore::InjectedScriptManager::objectId):
470         (WebCore::InjectedScriptManager::releaseObjectId):
471         * inspector/InjectedScriptManager.h:
472         (InjectedScriptManager):
473         * inspector/InjectedScriptSource.js:
474         (.):
475
476 2013-03-06  Marja Hölttä  <marja@chromium.org>
477
478         REGRESSION(r144617): Wrong usage of overwritten variable in toDOMWindow (V8Binding.cpp)
479         https://bugs.webkit.org/show_bug.cgi?id=111565
480
481         Reviewed by Jochen Eisinger.
482
483         In toDOMWindow, the variable "global" was first nuked, and then used again. This
484         change was introduced in r144617.
485
486         No new tests (no functional changes).
487
488         * bindings/v8/V8Binding.cpp:
489         (WebCore::toDOMWindow):
490
491 2013-03-06  Yury Semikhatsky  <yurys@chromium.org>
492
493         Web Inspector: use regular eval instead of injectScript for front-end extension API
494         https://bugs.webkit.org/show_bug.cgi?id=111529
495
496         Reviewed by Pavel Feldman.
497
498         Removed InjectedScriptManager::injectScript and replaced all of it calls
499         except the actual script injection with ScriptController::executeScript.
500
501         * inspector/InjectedScriptManager.cpp:
502         (WebCore::InjectedScriptManager::injectedScriptFor):
503         * inspector/InjectedScriptManager.h:
504         (InjectedScriptManager):
505         * inspector/InspectorAgent.cpp:
506         (WebCore::InspectorAgent::didClearWindowObjectInWorld):
507         * inspector/InspectorPageAgent.cpp:
508         (WebCore::InspectorPageAgent::didClearWindowObjectInWorld):
509         * inspector/front-end/DOMAgent.js:
510         (WebInspector.DOMAgent.prototype._emulateTouchEventsChanged.get if):
511         * inspector/front-end/ExtensionAPI.js:
512         (buildExtensionAPIInjectedScript):
513         * inspector/front-end/ExtensionServer.js:
514         (WebInspector.ExtensionServer.prototype._onReload):
515
516 2013-03-06  Allan Sandfeld Jensen  <allan.jensen@digia.com>
517
518         [Qt] Do not disable C++0x
519         https://bugs.webkit.org/show_bug.cgi?id=111559
520
521         Reviewed by Kenneth Rohde Christiansen.
522
523         * WebCore.pri:
524
525 2013-03-06  Julien Chaffraix  <jchaffraix@webkit.org>
526
527         Remove the (dead) code for handling shorthands in StyleResolver / StyleBuilder
528         https://bugs.webkit.org/show_bug.cgi?id=111505
529
530         Reviewed by Alexis Menard.
531
532         The CSS parsing code expands shorthands (with the exception of 'font') to their longhands.
533         This means that all the code in StyleResolver / StyleBuilder to handle shorthands is basically
534         dead and shouldn't be there. The reason for it to be is that people didn't know about shorthands
535         expansion and thus copied existing code.
536
537         This change addresses both issues by removing the code and adding ASSERTs that should prevent people
538         from adding more dead code.
539
540         Refactoring, covered by existing tests.
541
542         * css/StylePropertyShorthand.h: Added isExpandedShorthand.
543         * css/StylePropertyShorthand.cpp:
544         (WebCore::isExpandedShorthand):
545         Added this function that ignores 'font' as it is the only shorthand that is no consistently expanded
546         to account for system fonts.
547
548         * css/StyleBuilder.cpp:
549         (WebCore::StyleBuilder::StyleBuilder):
550         Removed the shorthands.
551
552         * css/StyleBuilder.h:
553         (WebCore::StyleBuilder::setPropertyHandler):
554         Added ASSERTs that people don't add shorthand handling.
555
556         * css/StyleResolver.cpp:
557         (WebCore::isValidVisitedLinkProperty):
558         Removed all the shorthands (shouldn't be reachable unless the ASSERT in applyProperty
559         triggers).
560
561         (WebCore::StyleResolver::applyProperty):
562         Removed all shorthand handling code, moved the shorthands together and added some ASSERT
563         to ensure people don't abuse the code and re-add some of it back by mistake.
564
565 2013-03-05  Kent Tamura  <tkent@chromium.org>
566
567         Rename WebCore/editing/visible_units.* to VisibleUnits.*
568         https://bugs.webkit.org/show_bug.cgi?id=111426
569
570         Reviewed by Alexey Proskuryakov.
571
572         No new tests. Just a refactoring.
573
574         * CMakeLists.txt:
575         * GNUmakefile.list.am:
576         * Target.pri:
577         * WebCore.gypi:
578         * WebCore.vcproj/WebCore.vcproj:
579         * WebCore.vcxproj/WebCore.vcxproj:
580         * WebCore.vcxproj/WebCore.vcxproj.filters:
581         * WebCore.xcodeproj/project.pbxproj:
582         * accessibility/AccessibilityNodeObject.cpp:
583         * accessibility/AccessibilityObject.cpp:
584         * accessibility/AccessibilityRenderObject.cpp:
585         * accessibility/atk/WebKitAccessibleWrapperAtk.cpp:
586         * accessibility/mac/WebAccessibilityObjectWrapperBase.mm:
587         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
588         * dom/Position.cpp:
589         * dom/Range.cpp:
590         * editing/AlternativeTextController.cpp:
591         * editing/ApplyBlockElementCommand.cpp:
592         * editing/ApplyStyleCommand.cpp:
593         * editing/CompositeEditCommand.cpp:
594         * editing/DeleteSelectionCommand.cpp:
595         * editing/EditingAllInOne.cpp:
596         * editing/EditingStyle.cpp:
597         * editing/Editor.cpp:
598         * editing/FormatBlockCommand.cpp:
599         * editing/FrameSelection.cpp:
600         * editing/IndentOutdentCommand.cpp:
601         * editing/InsertLineBreakCommand.cpp:
602         * editing/InsertListCommand.cpp:
603         * editing/InsertParagraphSeparatorCommand.cpp:
604         * editing/InsertTextCommand.cpp:
605         * editing/ReplaceSelectionCommand.cpp:
606         * editing/SurroundingText.cpp:
607         * editing/TextCheckingHelper.cpp:
608         * editing/TextIterator.cpp:
609         * editing/TypingCommand.cpp:
610         * editing/VisiblePosition.cpp:
611         * editing/VisibleSelection.cpp:
612         * editing/VisibleUnits.cpp: Copied from Source/WebCore/editing/visible_units.cpp.
613         * editing/VisibleUnits.h: Copied from Source/WebCore/editing/visible_units.h.
614         * editing/htmlediting.cpp:
615         * editing/markup.cpp:
616         * editing/visible_units.cpp: Removed.
617         * editing/visible_units.h: Removed.
618         * page/Frame.cpp:
619         * page/mac/FrameMac.mm:
620         * platform/win/EditorWin.cpp:
621
622 2013-03-06  Alexis Menard  <alexis@webkit.org>
623
624         Do not add CSSPropertyBorderImage shorthand part of the property list when parsing CSS border property
625         https://bugs.webkit.org/show_bug.cgi?id=111481
626
627         Reviewed by Julien Chaffraix.
628
629         After http://trac.webkit.org/changeset/135848 and more generally we do not 
630         add shorthand directly into the property list used afterwards to build
631         StylePropertySet but we rather expand the shorthand to add the
632         longhands. CSSPropertyBorderImage is a shorthand and it should follow
633         that rule, so when we successfully parsed CSS border property and we
634         should reset border-image then we should reset the longhands too.
635
636         Test: LayoutTests/inspector/styles/styles-new-API-expected.txt which
637         reflects the fact that we add longhands instead of the shorthand. All
638         the other tests should not regress.
639
640         * css/CSSParser.cpp:
641         (WebCore::CSSParser::parseValue):
642
643 2013-03-06  Luiz Agostini  <luiz.agostini@nokia.com>
644
645         Accelerated overflow scrolling for Coordinated Graphics.
646         https://bugs.webkit.org/show_bug.cgi?id=110323
647
648         Reviewed by Noam Rosenthal.
649
650         A scroll offset is applied to individual layers on UI process and the
651         web process is notified assynchronously.
652         The new API WKCoordinatedScene may be used to scroll layers in the UI process.
653
654         Tests will be added on bug #111140.
655
656         Scrolling coordinator is used to provide a ScrollableArea to CoordinatedGraphicsLayer.
657
658         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.cpp:
659         (WebCore::ScrollingCoordinatorCoordinatedGraphics::scrollableAreaScrollLayerDidChange):
660         (WebCore):
661         (WebCore::ScrollingCoordinatorCoordinatedGraphics::willDestroyScrollableArea):
662         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
663         (ScrollingCoordinatorCoordinatedGraphics):
664
665         GraphicsLayerTextureMapper is responsible for receiving the 'did commit' messages and to pass
666         them to its TextureMapperLayer on the appropriated time.
667
668         * platform/graphics/texmap/GraphicsLayerTextureMapper.cpp:
669         (WebCore::GraphicsLayerTextureMapper::GraphicsLayerTextureMapper):
670         (WebCore::GraphicsLayerTextureMapper::didCommitScrollOffset):
671         (WebCore):
672         (WebCore::GraphicsLayerTextureMapper::setIsScrollable):
673         (WebCore::GraphicsLayerTextureMapper::commitLayerChanges):
674         * platform/graphics/texmap/GraphicsLayerTextureMapper.h:
675         (WebCore::GraphicsLayerTextureMapper::setScrollClient):
676         (WebCore::GraphicsLayerTextureMapper::setID):
677         (GraphicsLayerTextureMapper):
678         (WebCore::GraphicsLayerTextureMapper::isScrollable):
679
680         TextureMapperLayer is responsible for applying the requested scroll offset and for
681         sending the commit messages to web process. It is also able to hittest layers and identify
682         the ones that are scrollable.
683
684         * platform/graphics/texmap/TextureMapperLayer.cpp:
685         (WebCore::TextureMapperLayer::hitTest):
686         (WebCore):
687         (WebCore::TextureMapperLayer::scrollableLayerHitTestCondition):
688         (WebCore::TextureMapperLayer::findScrollableContentsLayerAt):
689         (WebCore::TextureMapperLayer::mapScrollOffset):
690         (WebCore::TextureMapperLayer::commitScrollOffset):
691         (WebCore::TextureMapperLayer::scrollBy):
692         (WebCore::TextureMapperLayer::didCommitScrollOffset):
693         * platform/graphics/texmap/TextureMapperLayer.h:
694         (TextureMapperLayer):
695         (ScrollingClient):
696         (WebCore::TextureMapperLayer::TextureMapperLayer):
697         (WebCore::TextureMapperLayer::setID):
698         (WebCore::TextureMapperLayer::id):
699         (WebCore::TextureMapperLayer::setScrollClient):
700         (WebCore::TextureMapperLayer::setIsScrollable):
701         (WebCore::TextureMapperLayer::isScrollable):
702         (WebCore::TextureMapperLayer::adjustedPosition):
703
704         CoordinatedGraphicsLayer receives the commit messages and updates its ScrollableArea.
705
706         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
707         (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer):
708         (WebCore::CoordinatedGraphicsLayer::setScrollableArea):
709         (WebCore):
710         (WebCore::CoordinatedGraphicsLayer::commitScrollOffset):
711         (WebCore::CoordinatedGraphicsLayer::resetLayerState):
712         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
713         (WebCore):
714         (CoordinatedGraphicsLayer):
715         (WebCore::CoordinatedGraphicsLayer::isScrollable):
716
717         CoordinatedGraphicsScene receives the commit messages from TextureMapperLayer and
718         dispatches them on the main thread. It also has a new method that is used to find
719         the topmost scrollable layer at a given point.
720
721         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
722         (WebCore::CoordinatedGraphicsScene::setLayerState):
723         (WebCore::CoordinatedGraphicsScene::createLayer):
724         (WebCore::CoordinatedGraphicsScene::dispatchCommitScrollOffset):
725         (WebCore):
726         (WebCore::CoordinatedGraphicsScene::commitScrollOffset):
727         (WebCore::CoordinatedGraphicsScene::findScrollableContentsLayerAt):
728         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
729         (WebCore):
730         (CoordinatedGraphicsSceneClient):
731         (CoordinatedGraphicsScene):
732
733         New fields have been added to CoordinatedGraphicsLayerState.
734
735         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
736         (CoordinatedGraphicsLayerState):
737
738 2013-03-06  Allan Sandfeld Jensen  <allan.jensen@digia.com>
739
740         REGGRESSION (r142112): It made compositing tests fail on EFL, Qt.
741         https://bugs.webkit.org/show_bug.cgi?id=109291
742
743         Reviewed by Kenneth Rohde Christiansen.
744
745         Report we support fixed layers.
746
747         * page/scrolling/coordinatedgraphics/ScrollingCoordinatorCoordinatedGraphics.h:
748         (WebCore::ScrollingCoordinatorCoordinatedGraphics::supportsFixedPositionLayers):
749         (ScrollingCoordinatorCoordinatedGraphics):
750
751 2013-03-06  Sheriff Bot  <webkit.review.bot@gmail.com>
752
753         Unreviewed, rolling out r144859.
754         http://trac.webkit.org/changeset/144859
755         https://bugs.webkit.org/show_bug.cgi?id=111519
756
757         Introduced a test that calls non-exist function on non-
758         Chromium ports and crash on Chromium (Requested by rniwa on
759         #webkit).
760
761         * html/HTMLAudioElement.h:
762         (WebCore::HTMLAudioElement::hasPendingActivity):
763         (HTMLAudioElement):
764         * html/HTMLAudioElement.idl:
765         * html/HTMLMediaElement.cpp:
766         (WebCore::HTMLMediaElement::hasPendingActivity):
767         * html/HTMLMediaElement.idl:
768
769 2013-03-06  Ilya Tikhonovsky  <loislo@chromium.org>
770
771         Web Inspector: Could not open Profiles panel.
772         https://bugs.webkit.org/show_bug.cgi?id=111535
773
774         Reviewed by Alexander Pavlov.
775
776         * inspector/front-end/CPUProfileView.js:
777         * inspector/front-end/ProfilesPanel.js:
778
779 2013-03-06  Tony Chang  <tony@chromium.org>
780
781         Crash during middle mouse click when page is removed
782         https://bugs.webkit.org/show_bug.cgi?id=111489
783
784         Reviewed by Hajime Morrita.
785
786         Check for a null page that can happen if we remove the document from the DOM.
787         The other methods in EventHandler also check for a null page.
788
789         Test: editing/pasteboard/selection-paste-crash.html
790
791         * page/EventHandler.cpp:
792         (WebCore::EventHandler::handlePasteGlobalSelection):
793
794 2013-03-05  Eric Seidel  <eric@webkit.org>
795
796         Replace shouldLazyAttach bool with an enum for readability
797         https://bugs.webkit.org/show_bug.cgi?id=111503
798
799         Reviewed by Dimitri Glazkov.
800
801         No behavioral change.
802
803         * bindings/cpp/WebDOMNodeCustom.cpp:
804         (WebDOMNode::insertBefore):
805         (WebDOMNode::replaceChild):
806         (WebDOMNode::appendChild):
807         * bindings/js/JSNodeCustom.cpp:
808         (WebCore::JSNode::insertBefore):
809         (WebCore::JSNode::replaceChild):
810         (WebCore::JSNode::appendChild):
811         * bindings/v8/custom/V8NodeCustom.cpp:
812         (WebCore):
813         (WebCore::V8Node::insertBeforeMethodCustom):
814         (WebCore::V8Node::replaceChildMethodCustom):
815         (WebCore::V8Node::appendChildMethodCustom):
816         * dom/ContainerNode.cpp:
817         (WebCore):
818         (WebCore::ContainerNode::insertBefore):
819         (WebCore::ContainerNode::replaceChild):
820         (WebCore::ContainerNode::appendChild):
821         (WebCore::updateTreeAfterInsertion):
822         * dom/ContainerNode.h:
823         (ContainerNode):
824         * dom/Node.cpp:
825         (WebCore::Node::insertBefore):
826         (WebCore::Node::replaceChild):
827         (WebCore::Node::appendChild):
828         * dom/Node.h:
829         (Node):
830         * editing/AppendNodeCommand.cpp:
831         (WebCore::AppendNodeCommand::doApply):
832         * editing/InsertNodeBeforeCommand.cpp:
833         (WebCore::InsertNodeBeforeCommand::doApply):
834         * html/shadow/MediaControlsApple.cpp:
835         (WebCore::MediaControlsApple::createControls):
836         * html/shadow/MediaControlsBlackBerry.cpp:
837         (WebCore::MediaControlsBlackBerry::createControls):
838         * html/shadow/MediaControlsChromium.cpp:
839         (WebCore::MediaControlsChromium::initializeControls):
840         * html/shadow/MediaControlsChromiumAndroid.cpp:
841         (WebCore::MediaControlsChromiumAndroid::createControls):
842
843 2013-03-05  Hajime Morrita  <morrita@google.com>
844
845         Custom Elements: CustomElementConstructor::m_name doesn't have any good use.
846         https://bugs.webkit.org/show_bug.cgi?id=111523
847
848         Reviewed by Kentaro Hara.
849
850         This change removes CustomElementConstructor::m_name and renames
851         m_tagName to m_name. Now generated function name is same as interface name.
852
853         Originally, m_name was added to specify the generated constructor
854         name. An early version of custom element allows to give the name,
855         but it no longer says anything about that.
856
857         The rename is to align the semantics of type extension mechanism
858         of Custom Elements, where the name of a custom element isn't
859         necessarily a tag name.
860
861         No new tests. Just removing old code.
862
863         * bindings/scripts/CodeGeneratorV8.pm:
864         (GenerateHeader):
865         * dom/CustomElementConstructor.cpp:
866         (WebCore::CustomElementConstructor::create):
867         (WebCore::CustomElementConstructor::CustomElementConstructor):
868         (WebCore::CustomElementConstructor::createElement):
869         * dom/CustomElementConstructor.h:
870         (CustomElementConstructor):
871         (WebCore::CustomElementConstructor::name):
872         * dom/CustomElementRegistry.cpp:
873         (WebCore::CustomElementRegistry::registerElement):
874
875 2013-03-05  Ilya Tikhonovsky  <loislo@chromium.org>
876
877         Web Inspector: Flame Chart. Provide node context info in a popover when mouse hovers over a flame chart item.
878         https://bugs.webkit.org/show_bug.cgi?id=111442
879
880         Reviewed by Yury Semikhatsky.
881
882         FlameChart is a canvas so it is not possible to attach the popover to the items on it.
883         It would be a bit tricky to support an offset due to complex behaviour of the popover.
884         The simplest solution is to create a fake anchor element and move it to the right position.
885
886         * inspector/front-end/FlameChart.js:
887         (WebInspector.FlameChart):
888         (WebInspector.FlameChart.prototype._getPopoverAnchor):
889         (WebInspector.FlameChart.prototype._showPopover):
890         (WebInspector.FlameChart.prototype._onMouseMove):
891         (WebInspector.FlameChart.prototype.findNodeCallback):
892         (WebInspector.FlameChart.prototype._coordinatesToNode):
893         (WebInspector.FlameChart.prototype.onResize):
894         * inspector/front-end/flameChart.css:
895         (.flame-chart .item-anchor):
896
897 2013-03-05  Csaba Osztrogonác  <ossy@webkit.org>
898
899         Unreviewed buildfix after r144787. Add missing USE(GRAPHICS_SURFACE) guards.
900
901         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
902         (WebCore::CoordinatedGraphicsScene::setLayerState):
903         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
904         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
905
906 2013-03-05  Geoffrey Garen  <ggaren@apple.com>
907
908         Autoreleased cached pages slow down the PLT by 2%
909         https://bugs.webkit.org/show_bug.cgi?id=111522
910
911         Reviewed by Filip Pizlo.
912
913         Let's stop doing that.
914
915         2% PLT speedup.
916
917         * history/PageCache.cpp:
918         (WebCore::PageCache::remove):
919
920 2013-03-05  Hayato Ito  <hayato@chromium.org>
921
922         [Shadow] Implements event re-targeting for Touch Events.
923         https://bugs.webkit.org/show_bug.cgi?id=107800
924
925         Reviewed by Dimitri Glazkov.
926
927         So far, Touch Events have been intentionally disabled in shadow
928         tree since it allows users to access internal nodes in shadow tree
929         by accessing Touch Event's information.
930
931         This patch re-targets all individual touch point's target in
932         TouchList (touches, targetTouches and changedTouches) owned by a Touch Event
933         before the Touch Event is dispatched so that we won't break an
934         upper boundary of shadow DOM.
935
936         Touch Events re-targeting is similar to that of Mouse Events
937         re-targeting. The difference is that a Touch Event can have more
938         than one related target because of multiple touches. We must
939         re-target all individual touch points which can be referred from
940         the Touch Event.
941
942         Now, Touch Events can be fired in shadow tree. I've removed the
943         existing limitation.
944
945         Test: fast/dom/shadow/touch-event-retargeting.html
946
947         * dom/EventContext.cpp:
948         (WebCore::EventContext::isTouchEventContext):
949         (WebCore):
950         (WebCore::TouchEventContext::TouchEventContext):
951         (WebCore::TouchEventContext::~TouchEventContext):
952         (WebCore::TouchEventContext::handleLocalEvents):
953         (WebCore::TouchEventContext::isTouchEventContext):
954         (WebCore::TouchEventContext::checkReachability):  Used for assertion of reachability for each Touch point.
955         * dom/EventContext.h:
956         (WebCore):
957         (EventContext):
958         (TouchEventContext): Introduced to hold necessary information for re-targeting Touch event.
959         (WebCore::TouchEventContext::touches):
960         (WebCore::TouchEventContext::targetTouches):
961         (WebCore::TouchEventContext::changedTouches):
962         (WebCore::EventContext::isReachable):
963         * dom/EventRetargeter.cpp:
964         (WebCore::EventRetargeter::calculateEventPath):
965         (WebCore::EventRetargeter::adjustForTouchEvent):
966         (WebCore):
967         (WebCore::EventRetargeter::adjustTouchList):
968         (WebCore::EventRetargeter::adjustForRelatedTarget):
969         (WebCore::EventRetargeter::calculateAdjustedNodes): Updated so that this can be used for Touch point re-targeting.
970         (WebCore::EventRetargeter::buildRelatedNodeMap):
971         * dom/EventRetargeter.h:
972         (WebCore):
973         (EventRetargeter):
974         * dom/Node.cpp:
975         (WebCore::Node::dispatchEvent):
976         (WebCore):
977         (WebCore::Node::dispatchTouchEvent):
978         * dom/Node.h:
979         (WebCore):
980         (Node):
981         * dom/Touch.cpp:
982         (WebCore::Touch::Touch):
983         (WebCore):
984         (WebCore::Touch::cloneWithNewTarget):
985         * dom/Touch.h:
986         (Touch):
987         * dom/TouchEvent.cpp:
988         (WebCore::TouchEventDispatchMediator::create):
989         (WebCore):
990         (WebCore::TouchEventDispatchMediator::TouchEventDispatchMediator):
991         (WebCore::TouchEventDispatchMediator::event):
992         (WebCore::TouchEventDispatchMediator::dispatchEvent):
993         * dom/TouchEvent.h:
994         (TouchEvent):
995         (WebCore::TouchEvent::setTouches):
996         (WebCore::TouchEvent::setTargetTouches):
997         (WebCore::TouchEvent::setChangedTouches):
998         (TouchEventDispatchMediator):
999         (WebCore):
1000         (WebCore::toTouchEvent):
1001         * dom/TouchList.cpp:
1002         (WebCore::TouchList::item):
1003         (WebCore):
1004         * dom/TouchList.h:
1005         (TouchList):
1006         * page/EventHandler.cpp:
1007         (WebCore::EventHandler::hitTestResultInFrame): Removed the limitation. Adjusting is no longer done here.
1008         (WebCore::EventHandler::handleTouchEvent):
1009
1010 2013-03-05  Hajime Morrita  <morrita@google.com>
1011
1012         [Custom Elements][V8] Custom Element doesn't need its own WrapperTypeInfo
1013         https://bugs.webkit.org/show_bug.cgi?id=111411
1014
1015         Reviewed by Kentaro Hara.
1016
1017         No new tests. No observable change yet.
1018
1019         This is a preparation for Bug 110436, where WebKit is going to
1020         allow any HTML element to be a superclass of custom elements.
1021
1022         This change eliminates WrapperTypeInfo for custom element. Instead
1023         of that, the wrapper of a custom element picks WrapperTypeInfo
1024         from most descendant built-in HTML element. For example, think about
1025         following hierarchy:
1026
1027         - ... <- HTMLElement <- HTMLDivElememnt <- ExistingCustomElement <- NewCustomElement
1028
1029         In this case, both ExistingCustomElement and NewCustomElement has
1030         HTMLDivElememnt's type info. This is because HTMLDivElememnt is
1031         the most descendant (or "the nearest") built-in HTML
1032         element. (HTMLElement isn't the most descendant.
1033         ExistingCustomElement isn't a built-in.)
1034
1035         Using such WrapperTypeInfos, created custom element wrappers can
1036         get appropriate set of method and properties regardless of its
1037         super-elements.
1038
1039         This change tells the prototype object of each built-in object
1040         which WrapperTypeInfo the native backing wants:
1041         HTMLDivElememnt.prototype knows V8HTMLDivElement::info for
1042         example. The pointer to the type info is stored into an internal
1043         field. On wrapper construction, createWrapper() walks up the
1044         prototype chain and pick the first one.
1045
1046         * bindings/v8/V8DOMConfiguration.cpp:
1047         (WebCore::V8DOMConfiguration::configureTemplate):
1048         * bindings/v8/V8HTMLCustomElement.cpp:
1049         (WebCore::findWrapperTypeOf):
1050         (WebCore::V8HTMLCustomElement::createWrapper):
1051         * bindings/v8/V8HTMLCustomElement.h:
1052         * bindings/v8/V8PerContextData.cpp:
1053         (WebCore::V8PerContextData::constructorForTypeSlowCase):
1054         * bindings/v8/WrapperTypeInfo.h:
1055         (WebCore):
1056
1057 2013-03-05  Aaron Colwell  <acolwell@chromium.org>
1058
1059         Heap-use-after-free in WebCore::HTMLMediaElement::~HTMLMediaElement
1060         https://bugs.webkit.org/show_bug.cgi?id=110623
1061
1062         Reviewed by Eric Seidel.
1063
1064         Test: http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html
1065
1066         * html/HTMLAudioElement.h:
1067         (HTMLAudioElement):
1068         * html/HTMLAudioElement.idl:
1069         * html/HTMLMediaElement.cpp:
1070         (WebCore::HTMLMediaElement::hasPendingActivity):
1071         * html/HTMLMediaElement.idl:
1072
1073 2013-03-05  Chris Fleizach  <cfleizach@apple.com>
1074  
1075         AX: Support aria-posinset/setsize
1076         https://bugs.webkit.org/show_bug.cgi?id=109725
1077
1078         Reviewed by Tim Horton.
1079
1080         Expose aria-setsize and aria-posinset through accessibility.
1081         Right now only the Mac platform exposes them.
1082
1083         Test: platform/mac/accessibility/aria-setsize-posinset.html
1084
1085         * accessibility/AccessibilityObject.cpp:
1086         (WebCore::AccessibilityObject::supportsARIASetSize):
1087         (WebCore):
1088         (WebCore::AccessibilityObject::supportsARIAPosInset):
1089         (WebCore::AccessibilityObject::ariaSetSize):
1090         (WebCore::AccessibilityObject::ariaPosInset):
1091         * accessibility/AccessibilityObject.h:
1092         (AccessibilityObject):
1093         * accessibility/mac/WebAccessibilityObjectWrapper.mm:
1094         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
1095         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
1096         * html/HTMLAttributeNames.in:
1097
1098
1099 2013-03-05  Peter Nelson  <peter@peterdn.com>
1100
1101         [WinCairo] Support for cookies is incomplete
1102         https://bugs.webkit.org/show_bug.cgi?id=110147
1103         
1104         Expired and HttpOnly cookies no longer accessible from JavaScript.
1105         Cookies set in JavaScript now have correct domain/path.
1106
1107         Reviewed by Brent Fulgham.
1108
1109         Test: http/tests/cookies/http-get-cookie-set-in-js.html
1110
1111         * platform/network/curl/CookieJarCurl.cpp:
1112         (WebCore):
1113         (WebCore::addMatchingCurlCookie):
1114         (WebCore::getNetscapeCookieFormat):
1115         (WebCore::setCookiesFromDOM):
1116         (WebCore::cookieRequestHeaderFieldValue):
1117
1118 2013-03-05  Alec Flett  <alecflett@chromium.org>
1119
1120         Fix mac clang build with long long
1121         https://bugs.webkit.org/show_bug.cgi?id=111495
1122
1123         Unreviewed fix for mac build.
1124
1125         * Modules/indexeddb/IDBBackingStore.cpp:
1126         (WebCore::IDBBackingStore::IDBBackingStore):
1127
1128 2013-03-05  Alec Flett  <alecflett@chromium.org>
1129
1130         Fix mac clang build with long long
1131         https://bugs.webkit.org/show_bug.cgi?id=111495
1132
1133         Unreviewed fix for mac build.
1134
1135         * Modules/indexeddb/IDBBackingStore.cpp:
1136         (WebCore::IDBBackingStore::IDBBackingStore):
1137
1138 2013-03-05  Aaron Colwell  <acolwell@chromium.org>
1139
1140         Add V8Document.h include when the V8 code generator creates a toV8(Document*) call.
1141         https://bugs.webkit.org/show_bug.cgi?id=111486
1142
1143         Reviewed by Adam Barth.
1144
1145         No new tests. This doesn't change user visible behavior.
1146
1147         * bindings/scripts/CodeGeneratorV8.pm:
1148         (GenerateNamedConstructor):
1149         * bindings/scripts/test/V8/V8TestNamedConstructor.cpp:
1150
1151 2013-03-05  Shawn Singh  <shawnsingh@chromium.org>
1152
1153         Fix default background of a dragged image.
1154         https://bugs.webkit.org/show_bug.cgi?id=110512
1155
1156         Reviewed by Tony Chang.
1157
1158         Transparent background color (particularly visible in the padding
1159         of an element) was not being respected. The solution is to
1160         initially fill the drag image with transparent instead of white,
1161         so that any color background works correctly. This patch does not
1162         affect Apple Mac or Win platforms, given that this part of the
1163         code is #if guarded from those platforms.
1164
1165         Manual test added:
1166           ManualTests/drag-background-with-padding.html
1167
1168         Infrastructure for retrieving the drag image for pixel testing
1169         does not yet exist.
1170
1171         * page/Frame.cpp:
1172         (WebCore::Frame::nodeImage):
1173
1174 2013-03-05  Emil A Eklund  <eae@chromium.org>
1175
1176         ASSERTION FAILED: i < size(), UNKNOWN in WebCore::RenderTableSection::layout
1177         https://bugs.webkit.org/show_bug.cgi?id=108838
1178
1179         Reviewed by Levi Weintraub.
1180         
1181         Ensure that RenderTable::recalcSections is called when moving a
1182         TableSection by calling setNeedsSectionRecalc in addChild for
1183         TableSections.
1184
1185         Test: fullscreen/full-screen-table-section.html
1186
1187         * rendering/RenderTable.cpp:
1188         (WebCore::RenderTable::addChild):
1189
1190 2013-03-05  Kenneth Russell  <kbr@google.com>
1191
1192         Upgrade ANGLE to r1987
1193         https://bugs.webkit.org/show_bug.cgi?id=111381
1194
1195         Reviewed by Dean Jackson.
1196
1197         Covered by existing tests. Ran WebGL conformance tests in Safari
1198         to ensure correct operation of patch.
1199
1200         * platform/graphics/blackberry/GraphicsContext3DBlackBerry.cpp:
1201         (WebCore::GraphicsContext3D::GraphicsContext3D):
1202         * platform/graphics/cairo/GraphicsContext3DCairo.cpp:
1203         (WebCore::GraphicsContext3D::GraphicsContext3D):
1204         * platform/graphics/efl/GraphicsContext3DEfl.cpp:
1205         (WebCore::GraphicsContext3D::GraphicsContext3D):
1206         * platform/graphics/mac/GraphicsContext3DMac.mm:
1207         (WebCore::GraphicsContext3D::GraphicsContext3D):
1208         * platform/graphics/qt/GraphicsContext3DQt.cpp:
1209         (WebCore::GraphicsContext3DPrivate::initializeANGLE):
1210             Changed all ports to query for highp support in fragment
1211             shaders and conditionally enable it in ANGLE shader translator.
1212
1213 2013-03-05  Alec Flett  <alecflett@chromium.org>
1214
1215         IndexedDB: Add IDBBackingStoreTest
1216         https://bugs.webkit.org/show_bug.cgi?id=111233
1217
1218         Reviewed by Adam Barth.
1219
1220         These are tweaks to make IDBBackingStore more easily testable.
1221
1222         * Modules/indexeddb/IDBBackingStore.cpp:
1223         (WebCore::IDBBackingStore::IDBBackingStore): Allow use without a backing store.
1224
1225 2013-03-04  James Robinson  <jamesr@chromium.org>
1226
1227         [chromium] Move check for threaded compositing from WebCompositorSupport to Platform
1228         https://bugs.webkit.org/show_bug.cgi?id=111386
1229
1230         Reviewed by Adrienne Walker.
1231
1232         This moves checks for whether threaded compositing is enabled from WebCompositorSupport
1233         to Platform. In the case of Canvas2DLayerBridge, the check is moved completely out of
1234         the class to make it easier for tests to specify the threaded configuration to use in the test.
1235
1236         * platform/graphics/chromium/Canvas2DLayerBridge.cpp:
1237         (WebCore::Canvas2DLayerBridge::Canvas2DLayerBridge):
1238         * platform/graphics/chromium/Canvas2DLayerBridge.h:
1239         (WebCore::Canvas2DLayerBridge::create):
1240         (Canvas2DLayerBridge):
1241         * platform/graphics/chromium/DrawingBufferChromium.cpp:
1242         (WebCore::DrawingBuffer::DrawingBuffer):
1243         * platform/graphics/skia/ImageBufferSkia.cpp:
1244         (WebCore::createAcceleratedCanvas):
1245
1246 2013-03-05  Anders Carlsson  <andersca@apple.com>
1247
1248         Split up the storage event dispatch functions further
1249         https://bugs.webkit.org/show_bug.cgi?id=111482
1250
1251         Reviewed by Beth Dakin.
1252
1253         Add new functions for dispatching storage events to a set of frames.
1254
1255         * storage/StorageAreaImpl.cpp:
1256         (WebCore::StorageAreaImpl::dispatchStorageEvent):
1257         * storage/StorageEventDispatcher.cpp:
1258         (WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
1259         (WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
1260         (WebCore):
1261         (WebCore::StorageEventDispatcher::dispatchSessionStorageEventsToFrames):
1262         (WebCore::StorageEventDispatcher::dispatchLocalStorageEventsToFrames):
1263         * storage/StorageEventDispatcher.h:
1264         (WebCore):
1265         (StorageEventDispatcher):
1266
1267 2013-03-05  Stephen Chenney  <schenney@chromium.org>
1268
1269         Crash when ImageLoader deletes Element inside SVGImageElement
1270         https://bugs.webkit.org/show_bug.cgi?id=111085
1271
1272         Reviewed by Abhishek Arya.
1273
1274         Elements with ImageLoader objects associated with them may have their
1275         final reference held by the ImageLoader (to allow events to be sent
1276         and handled). Any call on Element that causes the ImageLoader to
1277         dispatch events might then result in the final deref of the Element
1278         itself, thus leaving all the Element's "this" pointers up the stack
1279         pointing to invalid memory.
1280
1281         This change puts the deref of the Element on a timer so that, if the
1282         deref is called via a method on Element, the call stack will unwind
1283         before the deref occurs.
1284
1285         Test: svg/custom/image-with-attr-change-after-delete-crash.html
1286
1287         * loader/ImageLoader.cpp:
1288         (WebCore::ImageLoader::ImageLoader): Initialize a timer
1289         (WebCore::ImageLoader::updatedHasPendingEvent): Put deref of the
1290           element on a oneShotTimer, with appropriate assertions and checks to
1291           ensure we only ref/deref once.
1292         (WebCore::ImageLoader::timerFired): Deref the element when the timer fires.
1293         * loader/ImageLoader.h:
1294         (ImageLoader): Define a timer for controlling deref of the element.
1295
1296 2013-03-05  Antoine Quint  <graouts@apple.com>
1297
1298         Web Inspector: identify reflection layers in LayerTreeAgent
1299         https://bugs.webkit.org/show_bug.cgi?id=111419
1300
1301         We add a new property "isReflection" to the Layer objects returned
1302         to the front-end to indicate whether the layer was created to host
1303         the reflection for an element. When this new property is true, the
1304         "nodeId" property is set to point to the reflected element's node
1305         id, since there is no node per-se directly associated with this layer.
1306         We also change the "bounds" property to return absolute page coordinates
1307         such that the front-end can use this information to highlight that
1308         region in the page since metrics would otherwise be unavailable.
1309
1310         Reviewed by Dean Jackson.
1311
1312         Test: inspector-protocol/layers/layers-reflected-content.html
1313
1314         * inspector/Inspector.json:
1315         * inspector/InspectorLayerTreeAgent.cpp:
1316         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
1317
1318 2013-03-05  peavo@outlook.com  <peavo@outlook.com>
1319
1320         [WinCairo] Compile fix after r144024.
1321         https://bugs.webkit.org/show_bug.cgi?id=111306
1322
1323         Reviewed by James Robinson.
1324
1325         * page/scrolling/ScrollingCoordinator.cpp: Added guard for USE(ACCELERATED_COMPOSITING).
1326         * page/scrolling/ScrollingCoordinator.h: Added guard for USE(ACCELERATED_COMPOSITING).
1327
1328 2013-03-05  James Weatherall  <wez@chromium.org>
1329
1330         keydown and keyup events have zero keycode for some numeric pad keys under Chromium on Linux
1331         https://bugs.webkit.org/show_bug.cgi?id=85642
1332
1333         Add missing key mappings for GDK_KP_Begin, GDK_KP_Insert, GDK_KP_Delete and GDK_ISO_Level3_Shift.
1334
1335         Reviewed by Ojan Vafai.
1336
1337         * platform/chromium/KeyCodeConversionGtk.cpp:
1338         (WebCore::windowsKeyCodeForKeyEvent):
1339
1340 2013-03-05  Alec Flett  <alecflett@chromium.org>
1341
1342         IndexedDB: Properly refactor frontend/backend code by #includes
1343         https://bugs.webkit.org/show_bug.cgi?id=110653
1344
1345         Reviewed by Dimitri Glazkov.
1346
1347         IndexedDB has a distinct backend and frontend, with well defined
1348         *Interface / *Callbacks classes distinguishing them, respectively.
1349         
1350         This makes sure that the frontend and backend do not include each
1351         other and fixes build problems that occurred as a result.
1352
1353         Specifically this moves enums out of IDBCursor and IDBTransaction
1354         into IndexedDB.h in a new WebCore::IndexedDB namespace.
1355
1356         No new tests, as this is just a refactor.
1357
1358 2013-03-05  Jeffrey Pfau  <jpfau@apple.com>
1359
1360         Clear associated cache partitions when deleting origins' cache
1361         https://bugs.webkit.org/show_bug.cgi?id=111383
1362
1363         Reviewed by Maciej Stachowiak.
1364
1365         Clear the cache partitions associated with the origin being cleared.
1366
1367         Not possible to test with current automated test tools, must be tested manually.
1368
1369         * loader/cache/MemoryCache.cpp:
1370         (WebCore::MemoryCache::removeResourcesWithOrigin):
1371
1372 2013-03-04  Ojan Vafai  <ojan@chromium.org>
1373
1374         Inline min/maxInstrinsicLogicalWidth functions
1375         https://bugs.webkit.org/show_bug.cgi?id=111399
1376
1377         Reviewed by Tony Chang.
1378
1379         Turns out these functions don't need to be public and only
1380         have one caller. This patch is in preparation for supporting
1381         intrinsic widths on tables, which will need to pass in the
1382         border and padding width as an argument.
1383
1384         * rendering/RenderBox.cpp:
1385         (WebCore::RenderBox::fillAvailableMeasure):
1386         (WebCore::RenderBox::computeIntrinsicLogicalWidthUsing):
1387         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1388         * rendering/RenderBox.h:
1389
1390 2013-03-05  Victor Carbune  <vcarbune@chromium.org>
1391
1392         Cue line-height property shouldn't be inherited from the video element
1393         https://bugs.webkit.org/show_bug.cgi?id=111262
1394
1395         Reviewed by Eric Carlson.
1396
1397         Test: media/track/track-cue-rendering-on-resize.html
1398
1399         * css/mediaControls.css:
1400         (video::-webkit-media-text-track-container): Set the default font size
1401         and family using the "font" property to also reset the line-height property.
1402
1403 2013-03-05  Joshua Bell  <jsbell@chromium.org>
1404
1405         IndexedDB: Remove some unused binding code
1406         https://bugs.webkit.org/show_bug.cgi?id=111463
1407
1408         Reviewed by Adam Barth.
1409
1410         IDBRequest got a custom V8 getter for |request| to help diagnose an issue, but the
1411         root cause was found/fixed (http://wkbug.com/110916 and http://wkbug.com/110206) so
1412         remove it. Also, IDBKey was marked ScriptWrappable but it is now explicitly converted
1413         to a ScriptValue before it gets anywhere near the binding code, so remove that too.
1414         Finally, createIDBKeyFromValue doesn't need to be exposed from IDBBindingUtilities.
1415
1416         No new tests - just removing dead code.
1417
1418         * Modules/indexeddb/IDBKey.h: No need for ScriptWrappable.
1419         * Modules/indexeddb/IDBRequest.idl: Remove custom binding (root cause of bug found).
1420         * WebCore.gypi: Ditto.
1421         * bindings/js/IDBBindingUtilities.h: Don't expose internal createIDBKeyFromValue().
1422         * bindings/v8/IDBBindingUtilities.h: Ditto.
1423         * bindings/v8/custom/V8IDBRequestCustom.cpp: Removed.
1424
1425 2013-03-05  Sheriff Bot  <webkit.review.bot@gmail.com>
1426
1427         Unreviewed, rolling out r144798.
1428         http://trac.webkit.org/changeset/144798
1429         https://bugs.webkit.org/show_bug.cgi?id=111478
1430
1431         "broke chromium windows build" (Requested by dpranke on
1432         #webkit).
1433
1434         * GNUmakefile.list.am:
1435         * Modules/indexeddb/IDBBackingStore.cpp:
1436         (WebCore::IDBBackingStore::Cursor::continueFunction):
1437         (WebCore::objectStoreCursorOptions):
1438         (WebCore::indexCursorOptions):
1439         (WebCore::IDBBackingStore::openObjectStoreCursor):
1440         (WebCore::IDBBackingStore::openObjectStoreKeyCursor):
1441         (WebCore::IDBBackingStore::openIndexKeyCursor):
1442         (WebCore::IDBBackingStore::openIndexCursor):
1443         * Modules/indexeddb/IDBBackingStore.h:
1444         (IDBBackingStore):
1445         * Modules/indexeddb/IDBCursor.cpp:
1446         (WebCore::IDBCursor::create):
1447         (WebCore::IDBCursor::IDBCursor):
1448         (WebCore::IDBCursor::continueFunction):
1449         (WebCore::IDBCursor::stringToDirection):
1450         (WebCore::IDBCursor::directionToString):
1451         * Modules/indexeddb/IDBCursor.h:
1452         (IDBCursor):
1453         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
1454         (WebCore::IDBCursorBackendImpl::IDBCursorBackendImpl):
1455         (WebCore::IDBCursorBackendImpl::deleteFunction):
1456         (WebCore::IDBCursorBackendImpl::CursorPrefetchIterationOperation::perform):
1457         * Modules/indexeddb/IDBCursorBackendImpl.h:
1458         (WebCore::IDBCursorBackendImpl::create):
1459         (WebCore::IDBCursorBackendImpl::value):
1460         (IDBCursorBackendImpl):
1461         * Modules/indexeddb/IDBCursorBackendInterface.h:
1462         (WebCore):
1463         * Modules/indexeddb/IDBCursorWithValue.cpp:
1464         (WebCore::IDBCursorWithValue::create):
1465         (WebCore::IDBCursorWithValue::IDBCursorWithValue):
1466         * Modules/indexeddb/IDBCursorWithValue.h:
1467         (IDBCursorWithValue):
1468         * Modules/indexeddb/IDBDatabase.cpp:
1469         (WebCore::IDBDatabase::transaction):
1470         * Modules/indexeddb/IDBDatabase.h:
1471         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1472         (WebCore::GetOperation::create):
1473         (WebCore::GetOperation::GetOperation):
1474         (GetOperation):
1475         (WebCore::OpenCursorOperation::create):
1476         (WebCore::OpenCursorOperation::OpenCursorOperation):
1477         (OpenCursorOperation):
1478         (WebCore::IDBDatabaseBackendImpl::createObjectStore):
1479         (WebCore::IDBDatabaseBackendImpl::deleteObjectStore):
1480         (WebCore::IDBDatabaseBackendImpl::createIndex):
1481         (WebCore::IDBDatabaseBackendImpl::deleteIndex):
1482         (WebCore::IDBDatabaseBackendImpl::get):
1483         (WebCore::GetOperation::perform):
1484         (WebCore::IDBDatabaseBackendImpl::put):
1485         (WebCore::PutOperation::perform):
1486         (WebCore::IDBDatabaseBackendImpl::setIndexKeys):
1487         (WebCore::IDBDatabaseBackendImpl::openCursor):
1488         (WebCore::OpenCursorOperation::perform):
1489         (WebCore::CountOperation::perform):
1490         (WebCore::IDBDatabaseBackendImpl::deleteRange):
1491         (WebCore::DeleteRangeOperation::perform):
1492         (WebCore::IDBDatabaseBackendImpl::clear):
1493         (WebCore::IDBDatabaseBackendImpl::transactionStarted):
1494         (WebCore::IDBDatabaseBackendImpl::transactionFinished):
1495         (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndAbortFired):
1496         (WebCore::IDBDatabaseBackendImpl::transactionFinishedAndCompleteFired):
1497         (WebCore::IDBDatabaseBackendImpl::createTransaction):
1498         (WebCore::IDBDatabaseBackendImpl::runIntVersionChangeTransaction):
1499         * Modules/indexeddb/IDBDatabaseBackendImpl.h:
1500         (IDBDatabaseBackendImpl):
1501         * Modules/indexeddb/IDBDatabaseBackendInterface.h:
1502         * Modules/indexeddb/IDBFactory.h:
1503         * Modules/indexeddb/IDBIndex.cpp:
1504         (WebCore):
1505         (WebCore::IDBIndex::openCursor):
1506         (WebCore::IDBIndex::openKeyCursor):
1507         * Modules/indexeddb/IDBObjectStore.cpp:
1508         (WebCore):
1509         (WebCore::IDBObjectStore::openCursor):
1510         * Modules/indexeddb/IDBRequest.cpp:
1511         (WebCore::IDBRequest::IDBRequest):
1512         (WebCore::IDBRequest::setCursorDetails):
1513         (WebCore::IDBRequest::setResultCursor):
1514         (WebCore::IDBRequest::onSuccess):
1515         * Modules/indexeddb/IDBRequest.h:
1516         (IDBRequest):
1517         * Modules/indexeddb/IDBTransaction.cpp:
1518         (WebCore::IDBTransaction::create):
1519         (WebCore::IDBTransaction::IDBTransaction):
1520         (WebCore::IDBTransaction::stringToMode):
1521         (WebCore::IDBTransaction::modeToString):
1522         * Modules/indexeddb/IDBTransaction.h:
1523         (WebCore::IDBTransaction::isReadOnly):
1524         (WebCore::IDBTransaction::isVersionChange):
1525         (IDBTransaction):
1526         * Modules/indexeddb/IDBTransactionBackendImpl.cpp:
1527         (WebCore::IDBTransactionBackendImpl::create):
1528         (WebCore::IDBTransactionBackendImpl::IDBTransactionBackendImpl):
1529         * Modules/indexeddb/IDBTransactionBackendImpl.h:
1530         (IDBTransactionBackendImpl):
1531         (WebCore::IDBTransactionBackendImpl::mode):
1532         * Modules/indexeddb/IDBTransactionCoordinator.cpp:
1533         (WebCore::IDBTransactionCoordinator::processStartedTransactions):
1534         (WebCore::IDBTransactionCoordinator::canRunTransaction):
1535         * Modules/indexeddb/IndexedDB.h: Removed.
1536         * Target.pri:
1537         * WebCore.gypi:
1538
1539 2013-03-05  Tommy Widenflycht  <tommyw@google.com>
1540
1541         MediaStream API: Allow local and remote descriptions to be accessed after close
1542         https://bugs.webkit.org/show_bug.cgi?id=111437
1543
1544         Reviewed by Adam Barth.
1545
1546         It's quite clear in the standard that the getters should still return the old value.
1547         Also overhauling the state setters a bit to check if the new state is different.
1548
1549         Existing tests expanded to cover patch.
1550
1551         * Modules/mediastream/RTCPeerConnection.cpp:
1552         (WebCore::RTCPeerConnection::localDescription):
1553         (WebCore::RTCPeerConnection::remoteDescription):
1554         (WebCore::RTCPeerConnection::changeSignalingState):
1555         (WebCore::RTCPeerConnection::changeIceGatheringState):
1556         (WebCore::RTCPeerConnection::changeIceConnectionState):
1557
1558 2013-03-05  Charlie Reis  <creis@chromium.org>
1559
1560         Add FrameLoaderClient::didAccessInitialDocument
1561         https://bugs.webkit.org/show_bug.cgi?id=107963
1562
1563         Notifies the FrameLoaderClient if another page accesses the
1564         initial empty document of a main frame.  In this case, it is
1565         no longer safe to display the provisional URL.
1566
1567         Only takes effect for PLATFORM(CHROMIUM), since no other platforms
1568         listen to the notification.
1569
1570         Reviewed by Adam Barth.
1571
1572         * bindings/v8/V8DOMWindowShell.cpp:
1573         (WebCore::V8DOMWindowShell::setSecurityToken):
1574             Use default token for initial document.
1575         * bindings/v8/custom/V8DOMWindowCustom.cpp:
1576             Notify loader if initial document is accessed.
1577         (WebCore::V8DOMWindow::namedSecurityCheck):
1578         (WebCore::V8DOMWindow::indexedSecurityCheck):
1579         * loader/FrameLoader.cpp:
1580         (WebCore::FrameLoader::FrameLoader):
1581         (WebCore::FrameLoader::didAccessInitialDocument):
1582         (WebCore):
1583         * loader/FrameLoader.h:
1584         (FrameLoader):
1585         * loader/FrameLoaderClient.h:
1586         (FrameLoaderClient):
1587         (WebCore::FrameLoaderClient::didAccessInitialDocument):
1588
1589 2013-03-05  Otto Derek Cheung  <otcheung@rim.com>
1590
1591         [BlackBerry] Fix assertion in CookieManager::getBackingStoreCookies
1592         https://bugs.webkit.org/show_bug.cgi?id=111468
1593
1594         Reviewed by Rob Buis.
1595         Internally reviewed by Konrad Piascik.
1596
1597         The assert in getBackingStoreCookies could be giving out false positives now
1598         that we have our fixes for cookie loading in PR 286189. The cookie store could
1599         be half loaded if the first cookie get/set call happens before the db is fully loaded.
1600         A full webkit sync call to reload the database will cause the assert to be hit.
1601
1602         Safer to flush everything out and try again.
1603
1604         * platform/blackberry/CookieManager.cpp:
1605         (WebCore::CookieManager::getBackingStoreCookies):
1606
1607 2013-03-05  Tony Gentilcore  <tonyg@chromium.org>
1608
1609         CompactHTMLToken does not need an XSSInfo pointer
1610         https://bugs.webkit.org/show_bug.cgi?id=111423
1611
1612         Reviewed by Eric Seidel.
1613
1614         The CompactHTMLToken should remain as small as possible because it is copied. This shrinks the size by one pointer
1615         by moving a relatively uncommon attribute out to its own Vector.
1616
1617         No new tests because no new functionality.
1618
1619         * html/parser/BackgroundHTMLParser.cpp:
1620         (WebCore::checkThatXSSInfosAreSafeToSendToAnotherThread):
1621         (WebCore):
1622         (WebCore::BackgroundHTMLParser::pumpTokenizer):
1623         (WebCore::BackgroundHTMLParser::sendTokensToMainThread):
1624         * html/parser/BackgroundHTMLParser.h:
1625         (BackgroundHTMLParser):
1626         * html/parser/CompactHTMLToken.cpp:
1627         (SameSizeAsCompactHTMLToken):
1628         (WebCore::CompactHTMLToken::isSafeToSendToAnotherThread):
1629         * html/parser/CompactHTMLToken.h:
1630         (WebCore):
1631         (CompactHTMLToken):
1632         * html/parser/HTMLDocumentParser.cpp:
1633         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
1634         * html/parser/HTMLDocumentParser.h:
1635         (ParsedChunk):
1636         * html/parser/XSSAuditorDelegate.h:
1637         (XSSInfo):
1638         (WebCore):
1639
1640 2013-03-05  Anders Carlsson  <andersca@apple.com>
1641
1642         Split StorageEventDispatcher::dispatch into two functions
1643         https://bugs.webkit.org/show_bug.cgi?id=111464
1644
1645         Reviewed by Beth Dakin.
1646
1647         Split StorageEventDispatcher::dispatch into dispatchSessionStorageEvent and
1648         dispatchLocalStorageEvent and make StorageAreaImpl::dispatchStorageEvent call
1649         the right function based on the storage area type.
1650
1651         * storage/StorageAreaImpl.cpp:
1652         (WebCore::StorageAreaImpl::dispatchStorageEvent):
1653         * storage/StorageEventDispatcher.cpp:
1654         (WebCore::StorageEventDispatcher::dispatchSessionStorageEvent):
1655         (WebCore):
1656         (WebCore::StorageEventDispatcher::dispatchLocalStorageEvent):
1657         * storage/StorageEventDispatcher.h:
1658         (StorageEventDispatcher):
1659
1660 2013-03-05  Brent Fulgham  <bfulgham@webkit.org>
1661
1662         [WinCairo] Unreviewed build fix after r144024.
1663
1664         * page/scrolling/ScrollingCoordinator.cpp:
1665         (WebCore::ScrollingCoordinator::scrollLayerForScrollableArea): Handle
1666         case of not using Accelerated Compositing
1667         (WebCore::ScrollingCoordinator::horizontalScrollbarLayerForScrollableArea):
1668         (WebCore::ScrollingCoordinator::verticalScrollbarLayerForScrollableArea): Ditto.
1669
1670 2013-03-05  Alec Flett  <alecflett@chromium.org>
1671
1672         IndexedDB: Properly refactor frontend/backend code by #includes
1673         https://bugs.webkit.org/show_bug.cgi?id=110653
1674
1675         Reviewed by Dimitri Glazkov.
1676
1677         IndexedDB has a distinct backend and frontend, with well defined
1678         *Interface / *Callbacks classes distinguishing them, respectively.
1679         
1680         This makes sure that the frontend and backend do not include each
1681         other and fixes build problems that occurred as a result.
1682
1683         Specifically this moves enums out of IDBCursor and IDBTransaction
1684         into IndexedDB.h in a new WebCore::IndexedDB namespace.
1685
1686         No new tests, as this is just a refactor.
1687
1688 2013-03-05  James Robinson  <jamesr@chromium.org>
1689
1690         ContainerNode::setActive should not sleep for 100ms on platforms that do not implement synchronous repaint(true) semantics
1691         https://bugs.webkit.org/show_bug.cgi?id=87054
1692
1693         Reviewed by Darin Adler.
1694
1695         Adds a new ChromeClient function to query if the platform supports the immediate parameter
1696         to the invalidation APIs and guards the synchronous repaint logic in ContainerNode::setActive()
1697         with it.
1698
1699         * dom/ContainerNode.cpp:
1700         (WebCore::ContainerNode::setActive):
1701         * page/ChromeClient.h:
1702         (WebCore::ChromeClient::supportsImmediateInvalidation):
1703
1704 2013-03-05  Anders Carlsson  <andersca@apple.com>
1705
1706         Simplify storage event dispatch somewhat
1707         https://bugs.webkit.org/show_bug.cgi?id=111461
1708
1709         Reviewed by Beth Dakin.
1710
1711         Add a StorageAreaImpl::dispatchStorageEvent to avoid replicating the calls to
1712         StorageEventDispatcher::dispatch there times. This is in preparation for changing the
1713         interface of StorageEventDispatcher so it can be used by WebKit2.
1714
1715         * storage/StorageAreaImpl.cpp:
1716         (WebCore::StorageAreaImpl::setItem):
1717         (WebCore::StorageAreaImpl::removeItem):
1718         (WebCore::StorageAreaImpl::clear):
1719         (WebCore::StorageAreaImpl::dispatchStorageEvent):
1720
1721         * storage/StorageAreaImpl.h:
1722         Reindent.
1723
1724 2013-03-05  Tony Chang  <tony@chromium.org>
1725
1726         Fix some crashes in render sliders
1727         https://bugs.webkit.org/show_bug.cgi?id=111458
1728
1729         Reviewed by Ojan Vafai.
1730
1731         Fix some cases where we assumed the renderer is a renderBox.
1732
1733         Test: fast/forms/range/slider-inline-crash.html
1734
1735         * html/shadow/SliderThumbElement.cpp:
1736         (WebCore::RenderSliderContainer::layout): Use renderBox() which will return 0 if the renderer is not a RenderBox.
1737         (WebCore::SliderThumbElement::setPositionFromPoint): Bail out early if renderBox() is 0.
1738
1739 2013-03-04  Andrew Scherkus  <scherkus@chromium.org>
1740
1741         REGRESSION(r142191): Fix closed caption buttons for ports still using the painting path.
1742         https://bugs.webkit.org/show_bug.cgi?id=111109
1743
1744         Reviewed by Eric Carlson.
1745
1746         Covered by following tests:
1747         media/track/track-cue-rendering-horizontal.html
1748         media/track/track-cue-rendering-vertical.html
1749
1750         * rendering/RenderTheme.cpp:
1751         (WebCore::RenderTheme::paint):
1752         * rendering/RenderTheme.h:
1753         (WebCore::RenderTheme::paintMediaToggleClosedCaptionsButton):
1754
1755 2013-03-05  Gwang Yoon Hwang  <ryumiel@company100.net>
1756
1757         Coordinated Graphics: CoordinatedGraphicsLayer makes CoordinatedGraphicsScene perform via CoordinatedGraphicsState.
1758         https://bugs.webkit.org/show_bug.cgi?id=108294
1759
1760         Reviewed by Anders Carlsson.
1761
1762         CoordinatedLayerTreeHostProxy has too many IPC messages (e.g. SyncCanvas and
1763         CreateTile), and there is a long function chain from CoordinatedGraphicsLayer to
1764         CoordinatedGraphicsScene (4 classes).
1765         If we want to add a new message, we need to add similar functions into 4 classes.
1766
1767         Now CoordinatedLayerTreeHost has only one IPC message for CoordinatedGraphicsLayer:
1768         CommitCoordinatedGraphicsState.
1769         CoordinatedGraphicsLayer makes CoordinatedGraphicsScene run as follows:
1770         1. CoordinatedGraphicsLayer makes a CoordinatedGraphicsLayerState.
1771         2. CoordinatedLayerTreeHost stores all LayerStates.
1772         3. CoordinatedLayerTreeHost sends GraphicsState includes LayerStates to CoordinatedLayerTreeHostProxy
1773         at the moment of flushing via CommitCoordinatedGraphicsState message.
1774         4. CoordinatedGraphicsScene applies all state changes to layers.
1775
1776         There is one big behavior change. All states changes (e.g.
1777         UpdateTiles, SetLayerChildren, and etc..) are performed at the same time, when
1778         CoordinatedGraphicsScene::commitCoordinatedGraphicsState is called.
1779
1780         This patch is based on Dongsung Huang, and Noam's work in
1781         https://bugs.webkit.org/show_bug.cgi?id=108294
1782
1783         No new tests, covered by existing tests.
1784
1785         * Target.pri:
1786         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1787         (WebCore::CoordinatedGraphicsLayer::setPosition):
1788         (WebCore::CoordinatedGraphicsLayer::setAnchorPoint):
1789         (WebCore::CoordinatedGraphicsLayer::setSize):
1790         (WebCore::CoordinatedGraphicsLayer::setTransform):
1791         (WebCore::CoordinatedGraphicsLayer::setChildrenTransform):
1792         (WebCore::CoordinatedGraphicsLayer::setPreserves3D):
1793         (WebCore::CoordinatedGraphicsLayer::setMasksToBounds):
1794         (WebCore::CoordinatedGraphicsLayer::setDrawsContent):
1795         (WebCore::CoordinatedGraphicsLayer::setContentsVisible):
1796         (WebCore::CoordinatedGraphicsLayer::setContentsOpaque):
1797         (WebCore::CoordinatedGraphicsLayer::setBackfaceVisibility):
1798         (WebCore::CoordinatedGraphicsLayer::setOpacity):
1799         (WebCore::CoordinatedGraphicsLayer::setContentsRect):
1800         (WebCore::CoordinatedGraphicsLayer::setFilters):
1801         (WebCore::CoordinatedGraphicsLayer::setContentsToSolidColor):
1802         (WebCore::CoordinatedGraphicsLayer::setShowDebugBorder):
1803         (WebCore::CoordinatedGraphicsLayer::setShowRepaintCounter):
1804         (WebCore::CoordinatedGraphicsLayer::setMaskLayer):
1805         (WebCore::CoordinatedGraphicsLayer::setReplicatedByLayer):
1806         (WebCore::CoordinatedGraphicsLayer::setFixedToViewport):
1807         (WebCore::CoordinatedGraphicsLayer::syncChildren):
1808         (WebCore::CoordinatedGraphicsLayer::syncFilters):
1809         (WebCore::CoordinatedGraphicsLayer::syncImageBacking):
1810         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
1811         (WebCore::CoordinatedGraphicsLayer::setDebugBorder):
1812         (WebCore::CoordinatedGraphicsLayer::syncAnimations):
1813         (WebCore::CoordinatedGraphicsLayer::syncCanvas):
1814         (WebCore::CoordinatedGraphicsLayer::destroyCanvasIfNeeded):
1815         (WebCore::CoordinatedGraphicsLayer::createCanvasIfNeeded):
1816         (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly):
1817         (WebCore::CoordinatedGraphicsLayer::resetLayerState):
1818         (WebCore):
1819         (WebCore::CoordinatedGraphicsLayer::releaseImageBackingIfNeeded):
1820         (WebCore::CoordinatedGraphicsLayer::setRootLayer):
1821         (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd):
1822         (WebCore::CoordinatedGraphicsLayer::createTile):
1823         (WebCore::CoordinatedGraphicsLayer::updateTile):
1824         (WebCore::CoordinatedGraphicsLayer::removeTile):
1825         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.h:
1826         (CoordinatedGraphicsLayerClient):
1827         (CoordinatedGraphicsLayer):
1828         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1829         (WebCore::CoordinatedGraphicsScene::createCanvasIfNeeded):
1830         (WebCore::CoordinatedGraphicsScene::syncCanvasIfNeeded):
1831         (WebCore::CoordinatedGraphicsScene::destroyCanvasIfNeeded):
1832         (WebCore::CoordinatedGraphicsScene::setLayerRepaintCountIfNeeded):
1833         (WebCore::CoordinatedGraphicsScene::setLayerChildrenIfNeeded):
1834         (WebCore::CoordinatedGraphicsScene::setLayerFiltersIfNeeded):
1835         (WebCore::CoordinatedGraphicsScene::setLayerState):
1836         (WebCore::CoordinatedGraphicsScene::deleteLayer):
1837         (WebCore::CoordinatedGraphicsScene::createTilesIfNeeded):
1838         (WebCore::CoordinatedGraphicsScene::removeTilesIfNeeded):
1839         (WebCore::CoordinatedGraphicsScene::updateTilesIfNeeded):
1840         (WebCore::CoordinatedGraphicsScene::assignImageBackingToLayer):
1841         (WebCore::CoordinatedGraphicsScene::commitSceneState):
1842         (WebCore::CoordinatedGraphicsScene::setLayerAnimationsIfNeeded):
1843         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
1844         (WebCore):
1845         (CoordinatedGraphicsScene):
1846         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h: Added.
1847         (WebCore):
1848         (TileUpdateInfo):
1849         (TileCreationInfo):
1850         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
1851         (CoordinatedGraphicsLayerState):
1852         (CoordinatedGraphicsState):
1853         * platform/graphics/texmap/coordinated/CoordinatedImageBacking.h:
1854         * platform/graphics/texmap/coordinated/CoordinatedLayerInfo.h: Removed.
1855         * platform/graphics/texmap/coordinated/SurfaceUpdateInfo.h:
1856
1857 2013-03-05  Roger Fong  <roger_fong@apple.com>
1858
1859         Unreviewed. AppleWin VS2010 build fix.
1860
1861         * WebCore.vcxproj/WebCore.vcxproj:
1862         * WebCore.vcxproj/WebCore.vcxproj.filters:
1863         * rendering/RenderingAllInOne.cpp:
1864
1865 2013-03-05  Bem Jones-Bey  <bjonesbe@adobe.com>
1866
1867         [CSS Exclusions] shape-outside on floats for polygon shapes
1868         https://bugs.webkit.org/show_bug.cgi?id=98676
1869
1870         Reviewed by David Hyatt.
1871
1872         Implement support for polygonal shape-outside on floats. The basic
1873         tack taken here is to keep using the bounding box of the shape to
1874         position the float, but to compute the offset (caused by the shape)
1875         from the bounding box for each line when creating and positioning
1876         other inline content.
1877
1878         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-simple-polygon.html
1879
1880         * rendering/ExclusionShapeInfo.cpp:
1881         (WebCore):
1882         (WebCore::::computedShape): Add new template parameter.
1883         (WebCore::::logicalTopOffset): Add new template parameter.
1884         (WebCore::::computeSegmentsForLine): Move here from
1885             ExclusionShapeInsideInfo, since ExclusionShapeOutsideInfo needs it
1886             as well. Make virtual since there is slightly different behavior
1887             between each class even though the vast majority of the code is
1888             common.
1889         * rendering/ExclusionShapeInfo.h:
1890         (WebCore):
1891         (WebCore::ExclusionShapeInfo::~ExclusionShapeInfo): Since
1892             computeSegmentsForLine is virtual, the destructor must be virtual
1893             as well.
1894         (ExclusionShapeInfo): Add new data members to support
1895             computeSegmentsForLine.
1896         (WebCore::ExclusionShapeInfo::shapeLogicalRight): Fix bug, the logical
1897             right is based off of maxX, not y. (it's a logical bounding box!)
1898         (WebCore::ExclusionShapeInfo::logicalLineTop): Moved from
1899             ExclusionShapeInsideInfo for use by computeSegmentsForLine and
1900             lineOverlapsShapeBounds.
1901         (WebCore::ExclusionShapeInfo::logicalLineBottom): Moved from
1902             ExclusionShapeInsideInfo for use by computeSegmentsForLine and
1903             lineOverlapsShapeBounds.
1904         (WebCore::ExclusionShapeInfo::lineOverlapsShapeBounds): Moved from
1905             ExclusionShapeInsideInfo for use by computeSegmentsForLine.
1906         * rendering/ExclusionShapeInsideInfo.cpp: Moved common code from
1907             computeSegmentsForLine into ExclusionShapeInfo.
1908         * rendering/ExclusionShapeInsideInfo.h:
1909         (WebCore): Moved some methods to ExclusionShapeInfo.
1910         (ExclusionShapeInsideInfo): Update for new template parameter.
1911         (WebCore::ExclusionShapeInsideInfo::compyteSegmentsForLine): Override
1912             superclass method to clear the segment ranges. Segement ranges
1913             aren't used by shape outside, and have some complex dependencies
1914             that make it very hard to try and move up into ExclusionShapeInfo.
1915         (WebCore::ExclusionShapeInsideInfo::ExclusionShapeInsideInfo): Update
1916             for new template parameter.
1917         * rendering/ExclusionShapeOutsideInfo.cpp:
1918         (WebCore::ExclusionShapeOutsideInfo::isEnabledFor): Add polygons as a
1919             supported shape.
1920         (WebCore::ExclusionShapeOutsideInfo::computeSegmentsForLine): Override
1921             superclass method to not recompute if it isn't needed (this isn't
1922             straightfoward for shape inside, which is why it isn't common),
1923             and to save the left and right offsets caused by the shape
1924             outside, since that's all that is needed to properly do layout in
1925             the case of floats.
1926         * rendering/ExclusionShapeOutsideInfo.h:
1927         (WebCore::ExclusionShapeOutsideInfo::shapeLogicalOffset): Reformat to
1928             be on a single line, like most other methods of it's type in
1929             WebKit headers.
1930         (ExclusionShapeOutsideInfo): Update for new template parameter.
1931         (WebCore::ExclusionShapeOutsideInfo::logicalLeftOffsetForLine):
1932             Accessor method to get the left offset between the shape and the
1933             shape's bounding box.
1934         (WebCore::ExclusionShapeOutsideInfo::logicalRightOffsetForLine):
1935             Accessor method to get the left offset between the shape and the
1936             shape's bounding box.
1937         (WebCore::ExclusionShapeOutsideInfo::ExclusionShapeOutsideInfo):
1938             Update for new template parameter.
1939         * rendering/RenderBlock.cpp:
1940         (WebCore::::collectIfNeeded): Save the last float encountered so that
1941             the shape outside offset can be accounted for.
1942         (WebCore::RenderBlock::logicalLeftOffsetForLine): Account for the
1943             shape outside offset on the outermost float.
1944         (WebCore::RenderBlock::logicalRightOffsetForLine): Account for the
1945             shape outside offset on the outermost float.
1946         * rendering/RenderBlock.h:
1947         (WebCore::RenderBlock::FloatIntervalSearchAdapter::FloatIntervalSearchAdapter):
1948             Initialize the lastFloat member.
1949         (WebCore::RenderBlock::FloatIntervalSearchAdapter::lastFloat): Get the
1950             last float encountered.
1951         (FloatIntervalSearchAdapter): Add a pointer to the last float
1952             encountered. Note that the variable is mutable because
1953             collectIfNeeded is declared as a const method even though it isn't
1954             (it uses loopholes to update m_offset and m_heightRemaining).
1955             Instead of trying to come up with a hack to stick with the
1956             loopholes, I decided to be explicit about it.
1957         * rendering/RenderBlockLineLayout.cpp:
1958         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Take
1959             into account the offset from any polygonal shape outside.
1960         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Add a FIXME
1961             because the current code will not work properly with stacked
1962             floats that have polygonal shape outside.
1963
1964 2013-03-04  David Hyatt  <hyatt@apple.com>
1965
1966         [New Multicolumn] Autogenerate regions for columns.
1967         https://bugs.webkit.org/show_bug.cgi?id=111363
1968
1969         Reviewed by Dean Jackson.
1970
1971         In CSS Regions, we lay out the regions first, and then
1972         we put the flow thread into the regions. This model doesn't
1973         really work for multicolumn layout, which needs to be able
1974         to auto-generate new regions lazily in response to the flow
1975         thread asking for regions at particular offsets.
1976
1977         With the multi-column model, where the regions can't just occur
1978         anywhere, its ok not to lay them out before the flow thread, as
1979         long as we have at least given them the correct size.
1980         
1981         This patch changes the layout algorithm for columns to:
1982         (1) Size any existing regions (without worrying about placement).
1983         (2) Lay out the flow thread (generating and sizing regions lazily
1984         that need to be created).
1985         (3) Lay out the regions (to give them correct placement and to
1986         compute overflow correctly for the multi-column block that contains
1987         the regions).
1988
1989         There are no new tests, since there are no behavioral changes. This
1990         is just groundwork for being able to add new sets in response to
1991         spans, balancing, and nested pagination contexts.
1992
1993         * rendering/RenderBlock.cpp:
1994         (WebCore::RenderBlock::determineLogicalLeftPositionForChild):
1995         (WebCore::RenderBlock::layoutBlockChild):
1996         * rendering/RenderBlock.h:
1997         (RenderBlock):
1998         Since we want to be able to call determineLogicalLeftPositionForChild
1999         to place the flow thread properly, and we don't want to apply a layout
2000         delta (flow threads repaint themselves), we parameterize the method
2001         here so that it can be called without applying a layout delta.
2002         
2003         * rendering/RenderFlowThread.cpp:
2004         (WebCore::RenderFlowThread::addRegionToThread):
2005         (WebCore::RenderFlowThread::removeRegionFromThread):
2006         These methods are only used by RenderMultiColumnFlowThread, since
2007         RenderNamedFlowThread overrides them. Remove the code that invalidates
2008         the flow threads region set as regions come and go, since that is now
2009         going to be expected with auto-generation.
2010
2011         (WebCore::RenderFlowThread::validateRegions):
2012         Refactor the code in RenderFlowThread::layout that validates the regions
2013         into its own method, so that we can re-validate regions at any time
2014         after generating new ones.
2015         
2016         (WebCore::RenderFlowThread::layout):
2017         Changed to move the region validation code into its own function that is
2018         now called from here.
2019
2020         (WebCore::RenderFlowThread::updateLogicalWidth):
2021         Don't assert if a region set needs layout.
2022
2023         (WebCore::RenderFlowThread::computeLogicalHeight):
2024         Ditto. Don't assert if a region set needs layout. That's expected now.
2025
2026         (WebCore::RenderFlowThread::regionAtBlockOffset):
2027         Add code to regionAtBlockOffset to auto-generate regions up to
2028         the offset. This ensures the region that is being asked for
2029         exists.
2030
2031         (WebCore::RenderFlowThread::pageLogicalTopForOffset):
2032         (WebCore::RenderFlowThread::pageLogicalWidthForOffset):
2033         (WebCore::RenderFlowThread::pageLogicalHeightForOffset):
2034         (WebCore::RenderFlowThread::pageRemainingLogicalHeightForOffset):
2035         These functions are no longer const, since the act of asking for
2036         pagination offsets can cause us to generate new regions.
2037
2038         (WebCore::RenderFlowThread::mapFromFlowToRegion):
2039         Modified to turn auto-generation off, since this is not really
2040         a "layout-time" function.
2041
2042         (WebCore::RenderFlowThread::logicalWidthChangedInRegions):
2043         Modified to not assert if a region set needs layout, since that is
2044         expected now.
2045
2046         * rendering/RenderFlowThread.h:
2047         Changes to remove const from the methods that can trigger region
2048         auto-generation.
2049
2050         * rendering/RenderMultiColumnBlock.cpp:
2051         (WebCore::RenderMultiColumnBlock::styleDidChange):
2052         Make sure to propagate style changes down into the regions. I don't know
2053         of any correctness bugs around this, but I figured I'd be thorough.
2054
2055         (WebCore::RenderMultiColumnBlock::checkForPaginationLogicalHeightChange):
2056         We no longer build a column set aggressively. We wait for the flow thread
2057         to ask us for a region at a particular offset, and only then do we
2058         build the set.
2059         
2060         (WebCore::RenderMultiColumnBlock::addChild):
2061         Now that we lay out the flow thread as a special excluded child, we don't
2062         care about the ordering of it relative to the region children.
2063
2064         (WebCore::RenderMultiColumnBlock::layoutSpecialExcludedChild):
2065         We now lay out the flow thread as a special excluded child (like the legend
2066         of a fieldset).
2067
2068         * rendering/RenderMultiColumnBlock.h:
2069         (RenderMultiColumnBlock):
2070         Add new overrides like layoutSpecialExcludedChild.
2071         
2072         * rendering/RenderMultiColumnFlowThread.cpp:
2073         (WebCore::RenderMultiColumnFlowThread::initialLogicalWidth):
2074         Set the flow thread to the initial column width even when no regions exist
2075         yet. This way we ensure the width is right even when we don't have any
2076         regions yet.
2077
2078         (WebCore::RenderMultiColumnFlowThread::autoGenerateRegionsToBlockOffset):
2079         This method handles autogenerating the new region for a given offset.
2080         Right now it's simplistic, since we only have one column set. This method
2081         will be enhanced in future patches when we start supporting multiple column
2082         sets.
2083
2084         * rendering/RenderMultiColumnFlowThread.h:
2085         (RenderMultiColumnFlowThread):
2086         Adding new method declarations like autoGenerateRegionsToBlockOffset.
2087
2088         * rendering/RenderMultiColumnSet.cpp:
2089         (WebCore::RenderMultiColumnSet::updateLogicalWidth):
2090         Since regions lay out after flow threads, we don't need to make 
2091         setFlowThreadPortionRect virtual any longer. We can just get our column set's
2092         width correct immediately. This is the same logic, just moved into updateLogicalWidth().
2093
2094         * rendering/RenderMultiColumnSet.h:
2095         Remove setFlowThreadPortionRect override, since the function can just be simple
2096         and non-virtual in RenderRegion now.
2097
2098         * rendering/RenderRegion.cpp:
2099         (WebCore::RenderRegion::layoutBlock):
2100         Don't ever invalidate region sets in response to our size changing during layout. Since
2101         our size is always determined outside of layout now, we don't need to do any of
2102         these checks.
2103
2104         * rendering/RenderRegion.h:
2105         (WebCore::RenderRegion::setFlowThreadPortionRect):
2106         Changed to be non-virtual now that RenderMultiColumnSet doesn't need to override.
2107
2108 2013-03-04  Alexey Proskuryakov  <ap@apple.com>
2109
2110         Make AsyncFileReader work without ScriptExecutionContext
2111         https://bugs.webkit.org/show_bug.cgi?id=111376
2112
2113         Reviewed by Anders Carlsson.
2114
2115         * WebCore.xcodeproj/project.pbxproj: Added MainThreadTask.h.
2116
2117         * dom/ScriptExecutionContext.cpp:
2118         * dom/ScriptExecutionContext.h:
2119         Removed fileThread(). Creating a thread for every context that acesses files appears
2120         wasteful and unnecessary.
2121
2122         * fileapi/AsyncFileStream.h:
2123         * fileapi/AsyncFileStream.cpp:
2124         (WebCore::createFileThread): FileThread is now a singleton.
2125         (WebCore::fileThread): Ditto.
2126         (WebCore::AsyncFileStream::AsyncFileStream):
2127         (WebCore::AsyncFileStream::create):
2128         (WebCore::didStart):
2129         (WebCore::AsyncFileStream::startOnFileThread):
2130         (WebCore::AsyncFileStream::stop):
2131         (WebCore::derefProxyOnMainThread):
2132         (WebCore::AsyncFileStream::stopOnFileThread):
2133         (WebCore::didGetSize):
2134         (WebCore::AsyncFileStream::getSizeOnFileThread):
2135         (WebCore::didOpen):
2136         (WebCore::AsyncFileStream::openForReadOnFileThread):
2137         (WebCore::AsyncFileStream::openForWriteOnFileThread):
2138         (WebCore::didRead):
2139         (WebCore::AsyncFileStream::readOnFileThread):
2140         (WebCore::didWrite):
2141         (WebCore::AsyncFileStream::writeOnFileThread):
2142         (WebCore::didTruncate):
2143         (WebCore::AsyncFileStream::truncateOnFileThread):
2144         Use callOnMainThread() instead of posting messages through a context. We never used
2145         other threads, and don't plan to.
2146
2147         * loader/ResourceLoader.cpp:
2148         * loader/ResourceLoader.h:
2149         We no longer need this pseudo-client call to create an AsyncFileStream, now that
2150         we don't need to get a ScriptExecutionContext somewhere.
2151
2152         * platform/MainThreadTask.h: Added. This implements callOnMainThread with multiple
2153         strongly typed arguments. Closely based on CrossThreadTask.h.
2154
2155         * platform/network/BlobResourceHandle.cpp:
2156         (WebCore::BlobResourceHandle::BlobResourceHandle): Create AsyncFileStream directly.
2157
2158         * platform/network/ResourceHandleClient.h: Removed createAsyncFileStream().
2159
2160 2013-03-05  Jessie Berlin  <jberlin@apple.com>
2161
2162         Update the localizable strings file.
2163
2164         Rubber-stamped by Anders Carlsson.
2165
2166         * English.lproj/Localizable.strings:
2167
2168 2013-03-05  Chris Fleizach  <cfleizach@apple.com>
2169
2170         AX: aria-label does not override text content on iOS
2171         https://bugs.webkit.org/show_bug.cgi?id=111222
2172
2173         Reviewed by David Kilzer.
2174
2175         Make iOS use the same text alternative computation that Mac is using. The main difference
2176         is that description and title need to be concatenated, because iOS doesn't have two attributes
2177         to return those values.
2178
2179         Test: platform/iphone-simulator/accessibility/aria-label-with-internal-text.html
2180
2181         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2182         (-[WebAccessibilityObjectWrapper stringValueShouldBeUsedInLabel]):
2183         (-[WebAccessibilityObjectWrapper accessibilityLabel]):
2184         (-[WebAccessibilityObjectWrapper accessibilityHint]):
2185         * accessibility/mac/WebAccessibilityObjectWrapperBase.h:
2186
2187 2013-03-05  David Kilzer  <ddkilzer@apple.com>
2188
2189         BUILD FIX (r144698): Only enable SPEECH_SYNTHESIS for Mac
2190         <http://webkit.org/b/106742>
2191
2192         Fixes the following build failures:
2193
2194             Undefined symbols for architecture i386:
2195               "__ZTVN7WebCore25PlatformSpeechSynthesizerE", referenced from:
2196                   __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o
2197               NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
2198               "__ZN7WebCore25PlatformSpeechSynthesizer19initializeVoiceListEv", referenced from:
2199                   __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o
2200             ld: symbol(s) not found for architecture i386
2201
2202         * Configurations/FeatureDefines.xcconfig:
2203         - Only set ENABLE_SPEECH_SYNTHESIS for the macosx platform.
2204
2205 2013-03-05  Dmitry Zvorygin  <zvorygin@chromium.org>
2206
2207         Web Inspector: registered new MIME type application/font-woff for WOFF fonts.
2208         https://bugs.webkit.org/show_bug.cgi?id=111418
2209
2210         The WOFF MIME Type was formally registered as application/font-woff (FINALLY):
2211         http://www.iana.org/assignments/media-types/application/font-woff
2212
2213         Reviewed by Pavel Feldman.
2214
2215         * inspector/front-end/NetworkManager.js:
2216         (WebInspector.NetworkManager):
2217         (WebInspector.NetworkDispatcher.prototype._updateNetworkRequestWithResponse):
2218
2219 2013-03-05  Julien Chaffraix  <jchaffraix@webkit.org>
2220
2221         [CSS Grid Layout] Add parsing for grid-{end|after}
2222         https://bugs.webkit.org/show_bug.cgi?id=111372
2223
2224         Reviewed by Tony Chang.
2225
2226         Test: fast/css-grid-layout/grid-item-end-after-get-set.html
2227
2228         This change adds the proper support for grid-{end|after}. It doesn't update
2229         grid-{row|column} to be a shorthand for both grid-{before|start} and grid-{after|end}
2230         though.
2231
2232         * css/CSSComputedStyleDeclaration.cpp:
2233         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2234         Added the new properties to our known properties. Also added
2235         support for getComputedStyle.
2236
2237         * css/CSSParser.cpp:
2238         (WebCore::CSSParser::parseValue):
2239         Added parsing for the new properties.
2240
2241         * css/CSSProperty.cpp:
2242         (WebCore::CSSProperty::isInheritedProperty):
2243         The new properties are not inherited.
2244
2245         * css/CSSPropertyNames.in:
2246         Added the new properties.
2247
2248         * css/StyleResolver.cpp:
2249         (WebCore::StyleResolver::applyProperty):
2250         Added code to handle applying them to our style.
2251
2252         * rendering/style/RenderStyle.h:
2253         * rendering/style/StyleGridItemData.cpp:
2254         (WebCore::StyleGridItemData::StyleGridItemData):
2255         * rendering/style/StyleGridItemData.h:
2256         (WebCore::StyleGridItemData::operator==):
2257         (StyleGridItemData):
2258         Updated our representation to store the new properties.
2259
2260 2013-03-05  Andrey Kosyakov  <caseq@chromium.org>
2261
2262         Unreviewed follow-up to r144756, fix broken inspector-less build.
2263
2264         * inspector/InspectorInstrumentation.h:
2265         (WebCore::InspectorInstrumentation::willWriteHTML):
2266
2267 2013-03-05  Mark Lam  <mark.lam@apple.com>
2268
2269         Improve robustness of WebSQL quota management.
2270         https://bugs.webkit.org/show_bug.cgi?id=110600.
2271
2272         Reviewed by Geoffrey Garen.
2273
2274         1. Introduced the OriginLock for synchronizing write access to the
2275            database origin directory. This allows us to more accurately
2276            compute the disk usage.
2277
2278            The OriginLock uses a mutex to provide mutual exclusion between
2279            threads and a file lock for mutual exclusion between processes.
2280            The file lock part is conditional on USE(FILE_LOCK).
2281
2282            The mutex mutual exclusion also serves to ensure that only 1 thread
2283            can write to a sqlite database at one time.
2284
2285         2. Change the SQLTransactionCoordinator to only allow one write
2286            transaction to an origin instead of one write transaction per
2287            database. This is needed in order to accurately compute the
2288            disk usage. It is also necessary so that the OriginLock does not
2289            deadlock itself (as would be the case if concurrent write transactions
2290            to different databases in the same origin are allowed).
2291
2292         3. Fix DatabaseTracker::getMaxSizeForDatabase() to check for when
2293            disk usage may exceed the quota, and ensure that we will return
2294            an appropriate max database size.
2295
2296            Disk usage can exceed the usage if it is already near the quota limit
2297            but have not exceeded it yet. If a new database is opened in that
2298            origin, it may bump the usage above the quota, but should not
2299            continually repeat this. Subsequent attempts to open a database
2300            will find that the quota is already exhausted and fail.
2301
2302            There is still a race condition pertaining to the tracker database
2303            getting out of sync that may still enable runaway growth in the
2304            database sizes. That issue only manifest in a multi-process
2305            environment, and will be fixed in another changeset.
2306
2307         4. Fixed a bug in SQLStatement to check if the errorCallback exists
2308            before invoking it.
2309
2310         No new layout tests. A quota-test.html was attached to bugzilla for manual
2311         testing of multi-tab concurrent consumption of storage resource, and also
2312         to test handling situations when the user deletes the database files while
2313         the script is still using the database.
2314
2315         * CMakeLists.txt:
2316         * GNUmakefile.list.am:
2317         * Modules/webdatabase/DatabaseTracker.cpp:
2318         (WebCore::DatabaseTracker::getMaxSizeForDatabase):
2319         (WebCore::DatabaseTracker::originLockFor):
2320         (WebCore::DatabaseTracker::deleteOriginLockFor):
2321         (WebCore::DatabaseTracker::deleteOrigin):
2322         * Modules/webdatabase/DatabaseTracker.h:
2323         * Modules/webdatabase/OriginLock.cpp: Added.
2324         (WebCore::OriginLock::lockFileNameForPath):
2325         (WebCore::OriginLock::OriginLock):
2326         (WebCore::OriginLock::~OriginLock):
2327         (WebCore::OriginLock::lock):
2328         (WebCore::OriginLock::unlock):
2329         * Modules/webdatabase/OriginLock.h: Added.
2330         * Modules/webdatabase/SQLStatement.cpp:
2331         (WebCore::SQLStatement::performCallback):
2332         * Modules/webdatabase/SQLTransactionBackend.cpp:
2333         (WebCore::SQLTransactionBackend::doCleanup):
2334         (WebCore::SQLTransactionBackend::computeNextStateAndCleanupIfNeeded):
2335         (WebCore::SQLTransactionBackend::openTransactionAndPreflight):
2336         (WebCore::SQLTransactionBackend::postflightAndCommit):
2337         (WebCore::SQLTransactionBackend::cleanupAfterTransactionErrorCallback):
2338         (WebCore::SQLTransactionBackend::acquireOriginLock):
2339         (WebCore::SQLTransactionBackend::releaseOriginLockIfNeeded):
2340         * Modules/webdatabase/SQLTransactionBackend.h:
2341         (SQLTransactionBackend):
2342         * Modules/webdatabase/SQLTransactionCoordinator.cpp:
2343         (WebCore::getDatabaseIdentifier):
2344         * Target.pri:
2345         * WebCore.gypi:
2346         * WebCore.vcproj/WebCore.vcproj:
2347         * WebCore.vcxproj/WebCore.vcxproj:
2348         * WebCore.vcxproj/WebCore.vcxproj.filters:
2349         * WebCore.xcodeproj/project.pbxproj:
2350         * config.h:
2351         * platform/FileSystem.h:
2352         * platform/posix/FileSystemPOSIX.cpp:
2353         (WebCore::lockFile):
2354         (WebCore::unlockFile):
2355
2356 2013-03-05  Ilya Tikhonovsky  <loislo@chromium.org>
2357
2358         Web Inspector: move PopoverContentHelper from TimelinePresentationModel.js to Popover.js.
2359         https://bugs.webkit.org/show_bug.cgi?id=111431
2360
2361         Reviewed by Yury Semikhatsky.
2362
2363         class WebInspector.TimelinePresentationModel.PopoverContentHelper was renamed to WebInspector.PopoverContentHelper.
2364         Style names were changed accordingly.
2365
2366         * inspector/front-end/Popover.js:
2367         (WebInspector.PopoverContentHelper):
2368         (WebInspector.PopoverContentHelper.prototype.contentTable):
2369         (WebInspector.PopoverContentHelper.prototype._createCell):
2370         (WebInspector.PopoverContentHelper.prototype.appendTextRow):
2371         (WebInspector.PopoverContentHelper.prototype.appendElementRow):
2372         (WebInspector.PopoverContentHelper.prototype.appendStackTrace):
2373         * inspector/front-end/TimelinePresentationModel.js:
2374         (WebInspector.TimelinePresentationModel.prototype.generateMainThreadBarPopupContent):
2375         (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview):
2376         (WebInspector.TimelinePresentationModel.generatePopupContentForFrame):
2377         (WebInspector.TimelinePresentationModel.generatePopupContentForFrameStatistics):
2378         * inspector/front-end/popover.css:
2379         (.popover-details):
2380         (.popover-function-name):
2381         (.popover-stacktrace-title):
2382         (.popover-details-row-title):
2383         (.popover-details-row-data):
2384         (.popover-details-title):
2385         * inspector/front-end/timelinePanel.css:
2386
2387 2013-03-05  Yury Semikhatsky  <yurys@chromium.org>
2388
2389         Web Inspector: remove "Live native memory chart" experiment
2390         https://bugs.webkit.org/show_bug.cgi?id=111432
2391
2392         Reviewed by Alexander Pavlov.
2393
2394         Removed support for live native memory chart.
2395
2396         * English.lproj/localizedStrings.js:
2397         * inspector/front-end/NativeMemorySnapshotView.js:
2398         * inspector/front-end/ProfileLauncherView.js:
2399         (WebInspector.ProfileLauncherView):
2400         * inspector/front-end/ProfilesPanel.js:
2401         (WebInspector.ProfilesPanel):
2402         * inspector/front-end/Settings.js:
2403         (WebInspector.ExperimentsSettings):
2404         * inspector/front-end/nativeMemoryProfiler.css:
2405
2406 2013-03-05  Andrey Kosyakov  <caseq@chromium.org>
2407
2408         Web Inspector: remove length parameter from Parse HTML timeline event
2409         https://bugs.webkit.org/show_bug.cgi?id=111421
2410
2411         Reviewed by Yury Semikhatsky.
2412
2413         - remove length parameter in all instrumentation methods used to emit ParseHTML timeline event;
2414         - drive-by style fixes.
2415
2416         * html/parser/HTMLDocumentParser.cpp:
2417         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
2418         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
2419         (WebCore::HTMLDocumentParser::pumpTokenizer):
2420         * inspector/InspectorInstrumentation.cpp:
2421         (WebCore):
2422         (WebCore::InspectorInstrumentation::willWriteHTMLImpl):
2423         (WebCore::InspectorInstrumentation::didWriteHTMLImpl):
2424         * inspector/InspectorInstrumentation.h:
2425         (InspectorInstrumentation):
2426         (WebCore::InspectorInstrumentation::willWriteHTML):
2427         (WebCore::InspectorInstrumentation::didWriteHTML):
2428         * inspector/InspectorTimelineAgent.cpp:
2429         (WebCore::InspectorTimelineAgent::willWriteHTML):
2430         (WebCore::InspectorTimelineAgent::didWriteHTML):
2431         * inspector/InspectorTimelineAgent.h:
2432         (InspectorTimelineAgent):
2433         * inspector/TimelineRecordFactory.cpp:
2434         (WebCore::TimelineRecordFactory::createParseHTMLData):
2435         * inspector/TimelineRecordFactory.h:
2436         (TimelineRecordFactory):
2437
2438 2013-03-05  Alexei Filippov  <alph@chromium.org>
2439
2440         Web Inspector: allow each profiler panel to have own landing page
2441         https://bugs.webkit.org/show_bug.cgi?id=111298
2442
2443         Reviewed by Yury Semikhatsky.
2444
2445         Refactor profiler landing page to allow different profiler panels to have own landing pages.
2446           - MultiProfileLauncherView is inherited from ProfileLauncherView
2447           - Native memory distribution profiler has got a custom page.
2448
2449         No new tests: code refactoring.
2450
2451         * inspector/front-end/HeapSnapshotView.js:
2452         (WebInspector.HeapSnapshotView.prototype.get profile):
2453         (WebInspector.HeapSnapshotView.prototype.get baseProfile):
2454         (WebInspector.HeapSnapshotView.prototype._profiles):
2455         * inspector/front-end/NativeMemorySnapshotView.js:
2456         * inspector/front-end/ProfileLauncherView.js:
2457         (WebInspector.ProfileLauncherView):
2458         (WebInspector.ProfileLauncherView.prototype.addProfileType):
2459         (WebInspector.ProfileLauncherView.prototype._controlButtonClicked):
2460         (WebInspector.ProfileLauncherView.prototype._updateControls):
2461         (WebInspector.ProfileLauncherView.prototype.profileStarted):
2462         (WebInspector.ProfileLauncherView.prototype.profileFinished):
2463         (WebInspector.MultiProfileLauncherView):
2464         (WebInspector.MultiProfileLauncherView.prototype.addProfileType):
2465         (WebInspector.MultiProfileLauncherView.prototype._profileTypeChanged):
2466         (WebInspector.NativeProfileLauncherView):
2467         * inspector/front-end/ProfilesPanel.js:
2468         (WebInspector.ProfilesPanel):
2469         (WebInspector.ProfilesPanel.prototype._createLauncherView):
2470         (WebInspector.CPUProfilerPanel):
2471         (WebInspector.CSSSelectorProfilerPanel):
2472         (WebInspector.HeapProfilerPanel):
2473         (WebInspector.CanvasProfilerPanel):
2474         (WebInspector.MemoryChartProfilerPanel):
2475         (WebInspector.MemoryChartProfilerPanel.prototype._createLauncherView):
2476         (WebInspector.NativeMemoryProfilerPanel):
2477         * inspector/front-end/profilesPanel.css:
2478         (.panel-enabler-view.profile-launcher-view button:not(.status-bar-item)):
2479
2480 2013-03-05  Eugene Klyuchnikov  <eustas@chromium.org>
2481
2482         Web Inspector: Clarify some StylesSidebarPanel and CSSMetadata JSDocs.
2483         https://bugs.webkit.org/show_bug.cgi?id=111427
2484
2485         Reviewed by Alexander Pavlov.
2486
2487         Goal: reflect in JSDoc that non-null array is passed to completionsReady callback.
2488
2489         * inspector/front-end/CSSMetadata.js:
2490         Added JSDocs, avoided possible NPEs.
2491         * inspector/front-end/StylesSidebarPane.js:
2492         Fixed JSDocs, removed unused assignment.
2493
2494 2013-03-05  David Kilzer  <ddkilzer@apple.com>
2495
2496         BUILD FIX (r144727): Change type of columnRange and rowRange to pair<unsigned, unsigned>
2497         <http://webkit.org/b/110050>
2498
2499         Fixes the following build failures:
2500
2501             Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:741:30: error: non-const lvalue reference to type 'pair<unsigned int, unsigned int>' cannot bind to a value of unrelated type 'pair<int, int>'
2502                 tableCell->rowIndexRange(rowRange);
2503                                          ^~~~~~~~
2504             In file included from Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:33:
2505             Source/WebCore/accessibility/AccessibilityTableCell.h:47:58: note: passing argument to parameter 'rowRange' here
2506                 virtual void rowIndexRange(pair<unsigned, unsigned>& rowRange);
2507                                                                      ^
2508             Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:742:33: error: non-const lvalue reference to type 'pair<unsigned int, unsigned int>' cannot bind to a value of unrelated type 'pair<int, int>'
2509                 tableCell->columnIndexRange(columnRange);
2510                                             ^~~~~~~~~~~
2511             In file included from Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:33:
2512             Source/WebCore/accessibility/AccessibilityTableCell.h:49:61: note: passing argument to parameter 'columnRange' here
2513                 virtual void columnIndexRange(pair<unsigned, unsigned>& columnRange);
2514                                                                         ^
2515             Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:804:30: error: non-const lvalue reference to type 'pair<unsigned int, unsigned int>' cannot bind to a value of unrelated type 'pair<int, int>'
2516                 tableCell->rowIndexRange(rowRange);
2517                                          ^~~~~~~~
2518             In file included from Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:33:
2519             Source/WebCore/accessibility/AccessibilityTableCell.h:47:58: note: passing argument to parameter 'rowRange' here
2520                 virtual void rowIndexRange(pair<unsigned, unsigned>& rowRange);
2521                                                                      ^
2522             Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:818:33: error: non-const lvalue reference to type 'pair<unsigned int, unsigned int>' cannot bind to a value of unrelated type 'pair<int, int>'
2523                 tableCell->columnIndexRange(columnRange);
2524                                             ^~~~~~~~~~~
2525             In file included from Source/WebCore/accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:33:
2526             Source/WebCore/accessibility/AccessibilityTableCell.h:49:61: note: passing argument to parameter 'columnRange' here
2527                 virtual void columnIndexRange(pair<unsigned, unsigned>& columnRange);
2528                                                             ^
2529             4 errors generated.
2530
2531         * accessibility/ios/WebAccessibilityObjectWrapperIOS.mm:
2532         (-[WebAccessibilityObjectWrapper accessibilityHeaderElements]):
2533         (-[WebAccessibilityObjectWrapper accessibilityRowRange]):
2534         (-[WebAccessibilityObjectWrapper accessibilityColumnRange]):
2535
2536 2013-03-04  Andrey Kosyakov  <caseq@chromium.org>
2537
2538         Web Inspector: [refactoring] set frame identifiers in timeline records early, do not keep them in event stack
2539         https://bugs.webkit.org/show_bug.cgi?id=111345
2540
2541         Reviewed by Pavel Feldman.
2542
2543         * inspector/InspectorTimelineAgent.cpp:
2544         (WebCore::InspectorTimelineAgent::pushGCEventRecords):
2545         (WebCore::InspectorTimelineAgent::addRecordToTimeline):
2546         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
2547         (WebCore::InspectorTimelineAgent::setFrameIdentifier):
2548         (WebCore):
2549         (WebCore::InspectorTimelineAgent::didCompleteCurrentRecord):
2550         (WebCore::InspectorTimelineAgent::appendRecord):
2551         (WebCore::InspectorTimelineAgent::pushCurrentRecord):
2552         (WebCore::InspectorTimelineAgent::commitFrameRecord):
2553         * inspector/InspectorTimelineAgent.h:
2554         (WebCore::InspectorTimelineAgent::TimelineRecordEntry::TimelineRecordEntry):
2555         (TimelineRecordEntry):
2556         (InspectorTimelineAgent):
2557
2558 2013-03-05  Tommy Widenflycht  <tommyw@google.com>
2559
2560         MediaStream API: Add the getStreamById method on RTCPeerConnection
2561         https://bugs.webkit.org/show_bug.cgi?id=111311
2562
2563         Reviewed by Adam Barth.
2564
2565         Adding the missing method on RTCPeerConnection defined here:
2566         http://dev.w3.org/2011/webrtc/editor/webrtc.html#widl-RTCPeerConnection-getStreamById-MediaStream-DOMString-streamId
2567
2568         Existing tests have been extended to cover patch.
2569
2570         * Modules/mediastream/RTCPeerConnection.cpp:
2571         (WebCore::RTCPeerConnection::getStreamById):
2572         (WebCore):
2573         * Modules/mediastream/RTCPeerConnection.h:
2574         (RTCPeerConnection):
2575         * Modules/mediastream/RTCPeerConnection.idl:
2576         * platform/chromium/support/WebMediaStream.cpp:
2577         (WebKit::WebMediaStream::initialize):
2578         (WebKit):
2579         * platform/mediastream/MediaStreamSource.cpp:
2580         (WebCore::MediaStreamSource::setReadyState):
2581
2582 2013-03-05  Antoine Quint  <graouts@apple.com>
2583
2584         Web Inspector: allow retrieval of composited layers in a given DOM subtree
2585         https://bugs.webkit.org/show_bug.cgi?id=111312
2586
2587         Introduce the LayerTreeAgent.layersForNode(node) method allowing the front-end
2588         to gather all composited layers associated with nodes in the subtree of which
2589         the provided node is the root.
2590
2591         In order to gather the layers in the subtree, we first traverse the node's
2592         renderer's RenderObject hierarchy and whenever we encounter a RenderObject
2593         that has a RenderLayer, we then traverse that renderLayer's RenderLayer
2594         hierarchy. This allows for a quick path through the relevant objects we're
2595         gathering.
2596
2597         Layers gathered will push the node to which they're associated, allowing a
2598         nodeId for this layer to be listed in the Layer object sent to the front-end.
2599         It is crucial to be able to provide a nodeId as well as a layerId for a Layer
2600         object in order to be able to correctly assess mutations in the layer tree.
2601         For instance, it is expected that a node's layer be replaced by a new layer
2602         to represent a slightly different rendering of its content, but the front-end
2603         should be able to represent this layer as an object for which only certain
2604         attributes have changed (like the "paintCount" property).
2605
2606         Layer objects also indicate whether they're associated to a node hosted in a
2607         shadow tree (the optional "isInShadowTree" property) in order for the front-end
2608         to be able to only show this layer if the option to show nodes hosted in shadow
2609         tree is enabled.
2610
2611         Finally, since we're only gathering composited layers, we're removing the
2612         "isLayerComposited" property and removing the optional flag on the "paintCount",
2613         "memory" and "compositedBounds" properties.
2614
2615         Reviewed by Simon Fraser.
2616
2617         Test: inspector-protocol/layers/layers-for-node.html
2618
2619         * inspector/Inspector.json:
2620         * inspector/InspectorLayerTreeAgent.cpp:
2621         (WebCore::InspectorLayerTreeAgent::layersForNode):
2622         (WebCore):
2623         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderObjectHierarchy):
2624         (WebCore::InspectorLayerTreeAgent::gatherLayersUsingRenderLayerHierarchy):
2625         (WebCore::InspectorLayerTreeAgent::buildObjectForLayer):
2626         (WebCore::InspectorLayerTreeAgent::idForNode):
2627         * inspector/InspectorLayerTreeAgent.h:
2628         (InspectorLayerTreeAgent):
2629
2630 2013-03-04  Andrey Kosyakov  <caseq@chromium.org>
2631
2632         Web Inspector: use timestamps consistent with rest of Timeline in WebSocket events.
2633         https://bugs.webkit.org/show_bug.cgi?id=111344
2634
2635         - create web socket related records in a manner consistent with the rest of timeline.
2636
2637         Reviewed by Pavel Feldman.
2638
2639         * inspector/InspectorTimelineAgent.cpp:
2640         (WebCore::InspectorTimelineAgent::didCreateWebSocket):
2641         (WebCore::InspectorTimelineAgent::willSendWebSocketHandshakeRequest):
2642         (WebCore::InspectorTimelineAgent::didReceiveWebSocketHandshakeResponse):
2643         (WebCore::InspectorTimelineAgent::didDestroyWebSocket):
2644         * inspector/InspectorTimelineAgent.h:
2645         (InspectorTimelineAgent):
2646
2647 2013-03-05  Andrei Bucur  <abucur@adobe.com>
2648
2649         [CSS Regions] Crash when MathML used in CSS Regions
2650         https://bugs.webkit.org/show_bug.cgi?id=110686
2651
2652         Reviewed by David Hyatt.
2653
2654         The MathML blocks trigger a children layout when computing the preferred widths. This happens to determine the preferred
2655         logical heights of the children. When the layout reaches the line boxes computation the preferred width of the containing block
2656         is requested. Because it wasn't computed, the layout of the children is started again to determine the preferred logical heights.
2657         This causes an infinite recursion and triggers a stack overflow.
2658
2659         The patch introduces a new RAII utility class that disables fragmentation when the constructor is called and restores it
2660         on the destructor. This class is used when computing the preferred height for the children of a MathML block.
2661
2662         Test: fast/regions/mathml-crash.html
2663
2664         * rendering/RenderObject.cpp:
2665         (WebCore::RenderObject::setFlowThreadStateIncludingDescendants): Do not cross RenderFlowThread boundaries when updating the flow thread
2666         state flag. The innermost flow threads need to manage their descendants flag values.
2667         * rendering/RenderView.cpp:
2668         (WebCore::FragmentationDisabler::FragmentationDisabler):
2669         (WebCore):
2670         (WebCore::FragmentationDisabler::~FragmentationDisabler):
2671         * rendering/RenderView.h:
2672         (FragmentationDisabler):
2673         (WebCore):
2674         * rendering/mathml/RenderMathMLBlock.cpp:
2675         (WebCore::RenderMathMLBlock::computeChildrenPreferredLogicalHeights):
2676
2677 2013-03-05  Mike West  <mkwst@chromium.org>
2678
2679         Cleanup: Move HitTestLocation and HitTestResult into separate files.
2680         https://bugs.webkit.org/show_bug.cgi?id=111294
2681
2682         Reviewed by Allan Sandfeld Jensen.
2683
2684         HitTestLocation and HitTestResult currently both live in
2685         HitTestResult.h. That makes things more difficult to understand than
2686         they should be, and violates the one-class-one-file principle that
2687         WebKit generally follows. Happily, it's fairly trivial to fix.
2688
2689         This should have no visible change; it's strictly an internal
2690         refactoring. It doesn't even touch any implementation code: we're
2691         just moving bits from one place to another.
2692
2693         * CMakeLists.txt:
2694         * GNUmakefile.list.am:
2695         * Target.pri:
2696         * WebCore.gypi:
2697         * WebCore.vcproj/WebCore.vcproj:
2698         * WebCore.xcodeproj/project.pbxproj:
2699             Hey, look: a new file! Let's add it to six different build systems! :)
2700         * rendering/HitTestLocation.cpp: Added.
2701         (WebCore):
2702         (WebCore::HitTestLocation::HitTestLocation):
2703         (WebCore::HitTestLocation::~HitTestLocation):
2704         (WebCore::HitTestLocation::operator=):
2705         (WebCore::HitTestLocation::move):
2706         (WebCore::HitTestLocation::intersectsRect):
2707         (WebCore::HitTestLocation::intersects):
2708         (WebCore::HitTestLocation::rectForPoint):
2709         * rendering/HitTestLocation.h: Added.
2710         (WebCore):
2711         (HitTestLocation):
2712         (WebCore::HitTestLocation::point):
2713         (WebCore::HitTestLocation::roundedPoint):
2714         (WebCore::HitTestLocation::region):
2715         (WebCore::HitTestLocation::isRectBasedTest):
2716         (WebCore::HitTestLocation::isRectilinear):
2717         (WebCore::HitTestLocation::boundingBox):
2718         (WebCore::HitTestLocation::topPadding):
2719         (WebCore::HitTestLocation::rightPadding):
2720         (WebCore::HitTestLocation::bottomPadding):
2721         (WebCore::HitTestLocation::leftPadding):
2722         (WebCore::HitTestLocation::transformedPoint):
2723         (WebCore::HitTestLocation::transformedRect):
2724         * rendering/HitTestResult.cpp:
2725         * rendering/HitTestResult.h:
2726             Move all this code from HitTestResult.* to HitTestLocation.*.
2727         * rendering/RenderBlock.cpp:
2728             Include HitTestLocation.h.
2729
2730 2013-03-05  Jochen Eisinger  <jochen@chromium.org>
2731
2732         Refactor UserGestureIndicator::Token to be a top-level class
2733         https://bugs.webkit.org/show_bug.cgi?id=111412
2734
2735         Reviewed by Nico Weber.
2736
2737         This will allow for forward declaring the class in a public WebKit
2738         API header. The goal is to enable the embedder to hold on to a
2739         UserGestureToken.
2740
2741         * dom/UserGestureIndicator.cpp:
2742         (WebCore::UserGestureIndicator::UserGestureIndicator):
2743         (WebCore::UserGestureIndicator::currentToken):
2744         * dom/UserGestureIndicator.h:
2745         (UserGestureToken):
2746         (WebCore::UserGestureToken::~UserGestureToken):
2747         (WebCore):
2748         (UserGestureIndicator):
2749         * page/DOMTimer.h:
2750         (DOMTimer):
2751         * page/EventHandler.h:
2752
2753 2013-03-05  Mike West  <mkwst@chromium.org>
2754
2755         Remove redundant code in Document::updateHoverActiveState.
2756         https://bugs.webkit.org/show_bug.cgi?id=111303
2757
2758         Reviewed by Darin Adler.
2759
2760         Document::updateHoverActiveState currently looks for touchrelease events
2761         and explictly clears out the hover state for all nodes between the
2762         currently hovered node and the top of the hover chain. This is actually
2763         redundant with the logic in the rest of the function; we can simplify by
2764         setting the Element* we're working with to 0, which causes the later
2765         loops to do the necessary work.
2766
2767         There should be no web-visible effect from this change; it should simply
2768         make this function less complex.
2769
2770         Extracted from Allan Sandfeld Jensen's original patch to wkbug.com/98168
2771
2772         * dom/Document.cpp:
2773         (WebCore::Document::updateHoverActiveState):
2774             Set innerElementInDocument to 0 rather than walking the hover chain
2775             and clearing it when we see a touchrelease event. The rest of the
2776             code in this function will have the same effect.
2777
2778 2013-03-05  Koji Hara  <kojih@chromium.org>
2779
2780         [V8] Remove unused custom indexedPropertyGetter
2781         https://bugs.webkit.org/show_bug.cgi?id=111409
2782
2783         Reviewed by Kentaro Hara.
2784
2785         Remove unused custom indexedPropertyGetter.
2786         There are 9 custom indexedPropertyGetter, including an unused one(NamedNodeMap).
2787         This commit assures all existing custom indexedPropertyGetter(for V8) are used.
2788
2789         No new tests. Simple refactoring.
2790
2791         * bindings/v8/custom/V8NamedNodeMapCustom.cpp: Remove indexedPropertyGetter
2792
2793 2013-03-05  Hajime Morrita  <morrita@google.com>
2794
2795         ShadowRoot needs guardRef() and guardDeref()
2796         https://bugs.webkit.org/show_bug.cgi?id=109777
2797
2798         Reviewed by Dimitri Glazkov.
2799
2800         This change moves m_guardRefCount from Document to TreeScope,
2801         which allows ShadowRoot to be guarded by guardRef() mechanism as
2802         Document. After r137524, Node referes TreeScope instead of
2803         Document. This is natural consequence of the change: It no longer
2804         makes sense to guardRef() Document pointer from Node.
2805
2806         Detail:
2807
2808         - Document::m_guardRefCount and related funcdtions are moved to TreeScope
2809         - Document::removedLastRef is factored out into TreeScope::removedLastRefToScope(),
2810           TreeScope::dispose() and Docuent::dispose(). ShadowRoot also got its own dispose() implementation.
2811         - Moved guardRef() and guardDeref() calls to TreeScope and Node.
2812           Note that there are two "guarded" TreeScope references. One is
2813           Node::m_treeScope and another is TreeScope::m_parentTreeScope.
2814           The guarded-ref management is now encapsulated in these two classes.
2815
2816         No new tests. Covered by existing tests.
2817
2818         * WebCore.exp.in:
2819         * dom/Document.cpp:
2820         (WebCore::Document::Document):
2821         (WebCore::Document::~Document):
2822         (WebCore::Document::dispose): Extracted from removedLastRef()
2823         * dom/Document.h:
2824         (WebCore::Node::isTreeScope):
2825         (WebCore::Node::Node):
2826         * dom/DocumentFragment.cpp:
2827         (WebCore::DocumentFragment::DocumentFragment): Remove ASSERT() and move it to ...
2828         (WebCore::DocumentFragment::create): ... here, to allow NULL document from ShadowRoot.
2829         * dom/Node.cpp:
2830         (WebCore::Node::~Node):
2831         (WebCore::Node::removedLastRef):
2832         * dom/Node.h:
2833         (WebCore::Node::setTreeScope):
2834         * dom/Element.cpp:
2835         (WebCore::Element::ensureAttr): This has been wrong and is fixed in this revision since the incorrectness is unveiled by this change.
2836         * dom/ShadowRoot.cpp:
2837         (WebCore::ShadowRoot::ShadowRoot): Passed NULL document to superclass. This aligns what Document is doing.
2838         (WebCore::ShadowRoot::dispose): Added.
2839         * dom/ShadowRoot.h:
2840         (ShadowRoot):
2841         * dom/TreeScope.cpp:
2842         (SameSizeAsTreeScope):
2843         (WebCore::TreeScope::TreeScope):
2844         (WebCore::TreeScope::~TreeScope):
2845         (WebCore::TreeScope::dispose): Added.
2846         (WebCore::TreeScope::setParentTreeScope):
2847         (WebCore::TreeScope::deletionHasBegun):
2848         (WebCore::TreeScope::beginDeletion):
2849         (WebCore::TreeScope::refCount): Added.
2850         * dom/TreeScope.h: Turned m_rootNode to Node* from ContainerNode* for Node::isTreeScope to be inlined.
2851         (WebCore::TreeScope::guardRef): Pulled up from Document.
2852         (WebCore::TreeScope::guardDeref): Ditto.
2853         (WebCore::TreeScope::hasGuardRefCount): Added to hide m_guardRefCount.
2854         (WebCore::TreeScope::deletionHasBegun): Added.
2855         (WebCore::TreeScope::beginDeletion): Added.
2856         (WebCore::TreeScope::removedLastRefToScope): Pulled up from Document.
2857         * dom/TreeScopeAdopter.cpp:
2858         (WebCore::TreeScopeAdopter::moveTreeToNewScope):
2859         (WebCore::TreeScopeAdopter::moveNodeToNewDocument):
2860
2861 2013-03-04  Uday Kiran  <udaykiran@motorola.com>
2862
2863         getPropertyValue for -webkit-text-stroke returns null, should compute the shorthand value
2864         https://bugs.webkit.org/show_bug.cgi?id=111018
2865
2866         Reviewed by Alexander Pavlov.
2867
2868         Test: fast/css/getPropertyValue-webkit-text-stroke.html
2869
2870         * css/StylePropertySet.cpp:
2871         (WebCore::StylePropertySet::getPropertyValue):
2872
2873 2013-03-04  Uday Kiran  <udaykiran@motorola.com>
2874
2875         getPropertyValue for -webkit-columns returns null, should compute the shorthand value
2876         https://bugs.webkit.org/show_bug.cgi?id=111011
2877
2878         Reviewed by Alexander Pavlov.
2879
2880         Test: fast/css/getPropertyValue-columns.html
2881
2882         * css/StylePropertySet.cpp:
2883         (WebCore::StylePropertySet::getPropertyValue):
2884
2885 2013-03-04  Vsevolod Vlasov  <vsevik@chromium.org>
2886
2887         Web Inspector: Do not accumulate file system files, add them to workspace immediately
2888         https://bugs.webkit.org/show_bug.cgi?id=111325
2889
2890         Reviewed by Pavel Feldman.
2891
2892         * inspector/front-end/FileSystemProjectDelegate.js:
2893         (WebInspector.FileSystemProjectDelegate.prototype.populate.fileLoaded):
2894         (WebInspector.FileSystemProjectDelegate.prototype.populate):
2895         * inspector/front-end/IsolatedFileSystem.js:
2896         (WebInspector.IsolatedFileSystem.prototype.innerCallback):
2897         (WebInspector.IsolatedFileSystem.prototype.requestFilesRecursive):
2898
2899 2013-03-04  Kinuko Yasuda  <kinuko@chromium.org>
2900
2901         Unreviewed Windows build fix attempt.
2902
2903         floor method is ambigious so explicitly specify the type.
2904
2905         * html/canvas/WebGLRenderingContext.cpp:
2906         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
2907
2908 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
2909
2910         AX: cellForColumnAndRow fails for tables with hidden table cells
2911         https://bugs.webkit.org/show_bug.cgi?id=110050
2912
2913         Reviewed by Tim Horton.
2914
2915         If a table had hidden cells, then accessibility code was being confused in a few ways.
2916         1) The cellForColumnAndRow method would return the wrong information since that was
2917            using the RenderTableSection to retrieve a cell, which did not have the same data as the AXTable
2918         2) The way we were adding children made it impossible to determine column and row range because we 
2919            would skip rows that had hidden children
2920         3) AccessibilityARIAGrid and AccessibilityTable were using different methods for cellForColumnAndRow
2921
2922         The fix does a few things to make things right:
2923         1) Always add an accessibility row, even if there are no visible cells in that row.
2924         2) Have one method for AXTable and AXARIAGrid for cellForColumnAndRow.
2925         3) Change cellForColumnAndRow to query the accessibility children rather than the RenderTableSection in determining the row, col info.
2926         4) cellForColumnAndRow should use unsigned values instead of int values.
2927
2928         Test: accessibility/table-with-hidden-head-section.html
2929
2930         * accessibility/AccessibilityARIAGrid.cpp:
2931         (WebCore):
2932         * accessibility/AccessibilityARIAGrid.h:
2933         (AccessibilityARIAGrid):
2934         * accessibility/AccessibilityARIAGridCell.cpp:
2935         (WebCore::AccessibilityARIAGridCell::rowIndexRange):
2936         (WebCore::AccessibilityARIAGridCell::columnIndexRange):
2937         * accessibility/AccessibilityARIAGridCell.h:
2938         (AccessibilityARIAGridCell):
2939         * accessibility/AccessibilityTable.cpp:
2940         (WebCore::AccessibilityTable::addChildren):
2941         (WebCore::AccessibilityTable::cellForColumnAndRow):
2942         * accessibility/AccessibilityTable.h:
2943         (WebCore):
2944         (AccessibilityTable):
2945         * accessibility/AccessibilityTableCell.cpp:
2946         (WebCore::AccessibilityTableCell::rowIndexRange):
2947         (WebCore::AccessibilityTableCell::columnIndexRange):
2948         * accessibility/AccessibilityTableCell.h:
2949         (AccessibilityTableCell):
2950         * accessibility/atk/WebKitAccessibleInterfaceTable.cpp:
2951         (webkitAccessibleTableGetColumnAtIndex):
2952         (webkitAccessibleTableGetRowAtIndex):
2953         (webkitAccessibleTableGetColumnExtentAt):
2954         (webkitAccessibleTableGetRowExtentAt):
2955         (webkitAccessibleTableGetColumnHeader):
2956         (webkitAccessibleTableGetRowHeader):
2957         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2958         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
2959         * rendering/RenderTableSection.h:
2960         (RenderTableSection):
2961         (WebCore::RenderTableSection::rowRendererAt):
2962
2963 2013-03-04  Arpita Bahuguna  <a.bah@samsung.com>
2964
2965         getAttribute does not behave correctly for mixed-case attributes on HTML elements
2966         https://bugs.webkit.org/show_bug.cgi?id=105713
2967
2968         Reviewed by Andreas Kling.
2969
2970         getAttribute() and getAttributeNode() APIs do not convert the
2971         passed attribute name to lowercase before comparing against the
2972         existing attributes.
2973         The specification however states that the passed name should
2974         be converted to ASCII lowercase before checking for the existence
2975         of the given attribute. [www.w3.org/TR/domcore/#dom-element-getattribute]
2976
2977         Test: fast/dom/Element/getAttribute-case-insensitivity.html
2978
2979         * dom/Element.h:
2980         (WebCore::ElementData::getAttributeItemIndex):
2981         getAttributeItemIndex() accepts a bool param 'shouldIgnoreAttributeCase'
2982         which specifies whether the attribute's case should be ignored
2983         before comparison. But inspite of this param's value we still carry
2984         out a case sensitive search.
2985         Have modified the same to convert the passed attribute's name to
2986         lowercase if 'shouldIgnoreAttributeCase' is true.
2987
2988 2013-03-04  Kunihiko Sakamoto  <ksakamoto@chromium.org>
2989
2990         [Chromium] Add runtime flag for font load events
2991         https://bugs.webkit.org/show_bug.cgi?id=111296
2992
2993         Reviewed by Kent Tamura.
2994
2995         Add a runtime feature flag for FontLoader interface (disabled by default),
2996         and enable ENABLE_FONT_LOAD_EVENTS build flag for chromium.
2997
2998         * bindings/generic/RuntimeEnabledFeatures.cpp:
2999         (WebCore):
3000         * bindings/generic/RuntimeEnabledFeatures.h:
3001         (RuntimeEnabledFeatures):
3002         (WebCore::RuntimeEnabledFeatures::setFontLoadEventsEnabled):
3003         (WebCore::RuntimeEnabledFeatures::fontLoadEventsEnabled):
3004
3005 2013-03-04  Brandon Jones  <bajones@google.com>
3006
3007         WEBGL_compressed_texture_atc implementation
3008         https://bugs.webkit.org/show_bug.cgi?id=110496
3009
3010         Reviewed by Kenneth Russell.
3011
3012         Test: webgl/conformance/extensions/webgl-compressed-texture-atc.html
3013
3014         Exposes the WEBGL_compressed_texture_atc extension, but is unverified since no desktop hardware supports
3015         the format that I am aware of. Should enable mobile ports to expose the format, however.
3016
3017         * CMakeLists.txt:
3018         * DerivedSources.make:
3019         * DerivedSources.pri:
3020         * GNUmakefile.list.am:
3021         * Target.pri:
3022         * WebCore.gypi:
3023         * WebCore.xcodeproj/project.pbxproj:
3024         * bindings/js/JSWebGLRenderingContextCustom.cpp:
3025         (WebCore::toJS):
3026         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
3027         (WebCore::toV8Object):
3028         * html/canvas/WebGLCompressedTextureATC.cpp: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
3029         (WebCore):
3030         (WebCore::WebGLCompressedTextureATC::WebGLCompressedTextureATC):
3031         (WebCore::WebGLCompressedTextureATC::~WebGLCompressedTextureATC):
3032         (WebCore::WebGLCompressedTextureATC::getName):
3033         (WebCore::WebGLCompressedTextureATC::create):
3034         (WebCore::WebGLCompressedTextureATC::supported):
3035         * html/canvas/WebGLCompressedTextureATC.h: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
3036         (WebCore):
3037         (WebGLCompressedTextureATC):
3038         * html/canvas/WebGLCompressedTextureATC.idl: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
3039         * html/canvas/WebGLExtension.h:
3040         * html/canvas/WebGLRenderingContext.cpp:
3041         (WebCore):
3042         (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
3043         (WebCore::WebGLRenderingContext::getExtension):
3044         (WebCore::WebGLRenderingContext::getSupportedExtensions):
3045         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
3046         * html/canvas/WebGLRenderingContext.h:
3047         (WebCore):
3048         (WebGLRenderingContext):
3049         * platform/graphics/Extensions3D.h:
3050
3051
3052 2013-03-04  Eugene Klyuchnikov  <eustas@chromium.org>
3053
3054         Web Inspector: Exceptions when WebInspector run in hosted mode.
3055         https://bugs.webkit.org/show_bug.cgi?id=111326
3056
3057         Reviewed by Pavel Feldman.
3058
3059         There is bug in commands code generation in InspectorBackend.js
3060         As a consequence all protocol enums have wrong names and cause
3061         exception when refererenced.
3062
3063         Currently protocol enums are referenced only from NetworkManager.
3064
3065         Test: inspector/inspector-backend-commands-generation.html
3066
3067         * inspector/front-end/InspectorBackend.js:
3068         (InspectorBackendClass.prototype.loadFromJSONIfNeeded):
3069         Use static method to generate code.
3070         (InspectorBackendClass._generateCommands):
3071         Extracted from loadFromJSONIfNeeded. Typo fixed.
3072
3073 2013-03-04  Chris Rogers  <crogers@google.com>
3074
3075         Add audio hardware support for multi-channel output by implementing AudioDestinationNode.maxChannelCount
3076         https://bugs.webkit.org/show_bug.cgi?id=111385
3077
3078         Reviewed by James Robinson.
3079         
3080         See specification details for .maxChannelCount:
3081         https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioDestinationNode
3082         
3083         * Modules/webaudio/AudioDestinationNode.h:
3084         (WebCore::AudioDestinationNode::maxChannelCount):
3085         * Modules/webaudio/AudioDestinationNode.idl:
3086         * Modules/webaudio/AudioNode.h:
3087         Implement .maxChannelCount attribute.
3088         
3089         (AudioNode):
3090         * Modules/webaudio/DefaultAudioDestinationNode.h:
3091         * Modules/webaudio/DefaultAudioDestinationNode.cpp:
3092         (WebCore::DefaultAudioDestinationNode::initialize):
3093         (WebCore::DefaultAudioDestinationNode::createDestination):
3094         (WebCore::DefaultAudioDestinationNode::enableInput):
3095         Call to createDestination() now takes no argument.
3096         Instead we maintain a member variable for the input device ID.
3097         (WebCore::DefaultAudioDestinationNode::maxChannelCount):
3098         (WebCore::DefaultAudioDestinationNode::setChannelCount):
3099         Check port-specific hardware support for maxChannelCount(),
3100         and allow setting the channel count based on what the hardware
3101         supports.
3102         
3103         * platform/audio/AudioDestination.h:
3104         (AudioDestination):
3105         * platform/audio/chromium/AudioDestinationChromium.cpp:
3106         (WebCore::AudioDestination::maxChannelCount):
3107         (WebCore::AudioDestinationChromium::render):
3108         Call into chromium WebKit API: audioHardwareOutputChannels().
3109
3110         * platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
3111         (WebCore::AudioDestination::maxChannelCount):
3112         Add basic implementation for maxChannelCount() only supporting stereo output.
3113
3114         * platform/audio/mac/AudioDestinationMac.cpp:
3115         (WebCore::AudioDestination::maxChannelCount):
3116         Add basic implementation for maxChannelCount() only supporting stereo output.
3117         Later, the mac port can support more than this with some small improvements to AudioDestinationMac.
3118
3119 2013-03-04  Adam Barth  <abarth@webkit.org>
3120
3121         Background HTML parser can rewind the tokenizer after end-of-file
3122         https://bugs.webkit.org/show_bug.cgi?id=111365
3123
3124         Reviewed by Eric Seidel.
3125
3126         Prior to this patch, it was possible to call didFailSpeculation after
3127         processing the end-of-file token because checkForSpeculationFailure
3128         didn't zero out m_tokenizer in some control paths.
3129
3130         This patch renames checkForSpeculationFailure to validateSpeculations
3131         and ensures that it always takes ownership of the main thread's
3132         HTMLTokenizer.
3133
3134         This patch also adds a number of ASSERTs to make sure the parser state
3135         machine stays in the correct configuration (e.g., that we don't have a
3136         main thread tokenizer while we're supposed to be tokenizing on the
3137         background thread).
3138
3139         Test: fast/parser/document-write-fighting-eof.html
3140
3141         * html/parser/BackgroundHTMLInputStream.cpp:
3142         (WebCore::BackgroundHTMLInputStream::rewindTo):
3143         * html/parser/BackgroundHTMLParser.cpp:
3144         (WebCore::BackgroundHTMLParser::append):
3145         * html/parser/HTMLDocumentParser.cpp:
3146         (WebCore::HTMLDocumentParser::validateSpeculations):
3147         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
3148         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
3149         (WebCore::HTMLDocumentParser::resumeParsingAfterScriptExecution):
3150         * html/parser/HTMLDocumentParser.h:
3151         (HTMLDocumentParser):
3152
3153 2013-03-04  Tim 'mithro' Ansell  <mithro@mithis.com>
3154
3155         Make sure that clearOwnerNode also clears StyleResolver references (via didMutate).
3156         https://bugs.webkit.org/show_bug.cgi?id=109446
3157
3158         Reviewed by Eric Seidel.
3159
3160         Test: fast/css/stylesheet.innerHTML-calls-didmutate.html
3161
3162         * css/CSSStyleSheet.h:
3163
3164 2013-03-04  Kentaro Hara  <haraken@chromium.org>
3165
3166         Unreviewd build fix after r144701.
3167
3168         * platform/EventTracer.cpp:
3169         (WebCore::EventTracer::initialize):
3170
3171 2013-03-04  Min Qin  <qinmin@chromium.org>
3172
3173         Fix some style issues in RenderLayerCompositor
3174         https://bugs.webkit.org/show_bug.cgi?id=111369
3175
3176         Reviewed by Simon Fraser.
3177
3178         Just style fix, no test needed
3179
3180         * rendering/RenderLayerCompositor.cpp:
3181         (WebCore::RenderLayerCompositor::frameViewDidScroll):
3182         (WebCore::RenderLayerCompositor::requiresCompositingForPosition):
3183
3184 2013-03-04  Terry Anderson  <tdanderson@chromium.org>
3185
3186         Revert changes to RenderLayer::scrollByRecursively() that were added for gesture-scrolling
3187         https://bugs.webkit.org/show_bug.cgi?id=111007
3188
3189         Reviewed by Simon Fraser.
3190
3191         Due to http://trac.webkit.org/changeset/144519 landing, the changes made to RenderLayer in
3192         http://trac.webkit.org/changeset/142057,
3193         http://trac.webkit.org/changeset/140177, and  
3194         http://trac.webkit.org/changeset/142195
3195         are no longer necessary (as RenderLayer::scrollByRecursively() is not used for
3196         gesture-scrolling) and should be reverted.
3197
3198         No change in behavior, so no new tests needed.
3199
3200         * rendering/RenderLayer.cpp:
3201         (WebCore::RenderLayer::scrollByRecursively):
3202         * rendering/RenderLayer.h:
3203
3204 2013-03-04  Kentaro Hara  <haraken@chromium.org>
3205
3206         Unreviewed build fix after r144701.
3207
3208         * platform/EventTracer.cpp:
3209         (WebCore::EventTracer::initialize):
3210
3211 2013-03-04  Christian Biesinger  <cbiesinger@chromium.org>
3212
3213         REGRESSION (r143643): Buttons containing floats render differently
3214         https://bugs.webkit.org/show_bug.cgi?id=110933
3215
3216         Reviewed by Ojan Vafai.
3217
3218         Test: fast/forms/button-with-float.html
3219
3220         * rendering/RenderBlock.cpp:
3221         (WebCore::RenderBlock::expandsToEncloseOverhangingFloats):
3222         Also include new flexbox as a renderer that needs to enclose
3223         overhanging floats. Flex boxes establish a block formatting context,
3224         so they need to contain floats:
3225         http://dev.w3.org/csswg/css3-flexbox/#flex-items
3226
3227 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
3228
3229         Support WebSpeech - Speech Synthesis
3230         https://bugs.webkit.org/show_bug.cgi?id=106742
3231
3232         Build fix.
3233
3234         * Modules/speech/SpeechSynthesis.cpp:
3235
3236 2013-03-04  Rafael Weinstein  <rafaelw@chromium.org>
3237
3238         Unreviewed, rolling out r144595.
3239         http://trac.webkit.org/changeset/144595
3240         https://bugs.webkit.org/show_bug.cgi?id=90341
3241
3242         Causing multiple crashes in fast/dom/Element/* tests (hits
3243         assert in Attr.cp:215)
3244
3245         * dom/Element.cpp:
3246         (WebCore::Element::setAttributeNode):
3247
3248 2013-02-26  Kentaro Hara  <haraken@chromium.org>
3249
3250         [chromium] Implement TRACE_EVENT macros for sampling profiling
3251         https://bugs.webkit.org/show_bug.cgi?id=110932
3252
3253         Reviewed by Adam Barth.
3254
3255         We are implementing TRACE_EVENT macros for sampling profiling.
3256         It works in the following mechanism:
3257
3258         - Chromium defines global state variables for sampling profiling.
3259         (i.e. g_trace_state0, g_trace_state1, g_trace_state2 in trace_event.h)
3260
3261         - WebKit gets the addresses of the global state variables at the
3262         initialization step. (i.e. EventTracer::initialize())
3263
3264         - WebKit updates the global states by using TRACE_EVENT_SAMPLING_STATE()
3265         macros every time WebKit changes its state. (e.g. DOM attribute
3266         getters/setters/methods)
3267
3268         - A sampling thread running in Chrome reads the global states
3269         periodically and visualizes the profiling results into about://tracing.
3270
3271         This patch implements (1) a WebKit API to get the addresses of
3272         the global states and (2) the TRACE_EVENT_SAMPLING_STATE() macro.
3273
3274         No tests. The sampling profiler is not enabled in Chrome by default.
3275         I manually inserted TRACE_EVENT_SAMPLING_STATE() macros and
3276         confirmed that the sampling profiling is working as expected.
3277
3278         * platform/EventTracer.cpp:
3279         (WebCore::EventTracer::initialize):
3280         (WebCore::EventTracer::getTraceCategoryEnabledFlag):
3281         (WebCore):
3282         * platform/EventTracer.h:
3283         (WebCore):
3284         (EventTracer):
3285         * platform/chromium/EventTracerChromium.cpp:
3286         (WebCore):
3287         (WebCore::EventTracer::initialize):
3288         * platform/chromium/TraceEvent.h:
3289
3290 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
3291
3292         Support WebSpeech - Speech Synthesis
3293         https://bugs.webkit.org/show_bug.cgi?id=106742
3294
3295         Reviewed by Simon Fraser.
3296
3297         Enable speech synthesis for the Mac.
3298
3299         * Configurations/FeatureDefines.xcconfig:
3300
3301 2013-03-04  Ruslan Abdikeev  <aruslan@chromium.org>
3302
3303         <link rel="apple-touch-icon"> tag is not honored on CNN.com, workflowy.com etc
3304         https://bugs.webkit.org/show_bug.cgi?id=109061
3305
3306         Reviewed by Adam Barth.
3307
3308         Test: fast/dom/icon-url-list-apple-touch.html
3309
3310         Added iconTypes parameter to Document::iconURLs().
3311         Added Document::shortcutIconURLs() with original semantics of iconURLs().
3312         Fixed IconController.cpp to provide iconTypesMask to iconURLs().
3313         Renamed iconTypes to iconTypesMask to make the meaning clearer.
3314
3315         * WebCore.exp.in:
3316         * dom/Document.cpp:
3317         (WebCore::Document::shortcutIconURLs):
3318         (WebCore):
3319         (WebCore::Document::iconURLs):
3320         * dom/Document.h:
3321         (Document):
3322         * loader/icon/IconController.cpp:
3323         (WebCore::IconController::iconURL):
3324         (WebCore::IconController::urlsForTypes):
3325         * testing/Internals.cpp:
3326         (WebCore::Internals::iconURLs):
3327         (WebCore::Internals::shortcutIconURLs):
3328         (WebCore):
3329         (WebCore::Internals::allIconURLs):
3330         * testing/Internals.h:
3331         * testing/Internals.idl:
3332
3333 2013-02-27  Jeffrey Pfau  <jpfau@apple.com>
3334
3335         Cache partitioning does not affect iframe MainResources
3336         https://bugs.webkit.org/show_bug.cgi?id=111022
3337
3338         Reviewed by David Kilzer.
3339
3340         Set the partition of a main resource request if in a subframe.
3341
3342         Test: http/tests/cache/partitioned-cache-iframe.html
3343
3344         * loader/FrameLoader.cpp:
3345         (WebCore::FrameLoader::loadURL):
3346
3347 2013-03-04  Chris Fleizach  <cfleizach@apple.com>
3348
3349         AX: user agent shadow roots for plugins should be 'accessible'
3350         https://bugs.webkit.org/show_bug.cgi?id=111339
3351
3352         Reviewed by Tim Horton.
3353
3354         If a plugin element uses a user agent shadow element, we should make that shadow element
3355         into a button with the title and subtitle put together, and use that as the label. This 
3356         will probably be the best accessibility experience.
3357
3358         * html/HTMLPlugInImageElement.cpp:
3359         (WebCore::HTMLPlugInImageElement::didAddUserAgentShadowRoot):
3360
3361 2013-03-04  Alok Priyadarshi  <alokp@chromium.org>
3362
3363         [chromium] Form controls on composited layers are not painted properly
3364         https://bugs.webkit.org/show_bug.cgi?id=111366
3365
3366         Reviewed by James Robinson.
3367
3368         Set PlatformContextSkia::m_drawingToImageBuffer which is used as a hint to properly blend GDI-painted bitmap.
3369
3370         * platform/graphics/chromium/OpaqueRectTrackingContentLayerDelegate.cpp:
3371         (WebCore::OpaqueRectTrackingContentLayerDelegate::paintContents):
3372
3373 2013-03-04  Simon Fraser  <simon.fraser@apple.com>
3374
3375         Give ViewportConstraints classes copy constructors
3376         https://bugs.webkit.org/show_bug.cgi?id=111367
3377
3378         Reviewed by Beth Dakin.
3379         
3380         Downstream code requires that ViewportConstraints objects have
3381         copy constructors, so add them.
3382         
3383         Also clean up some redundant initialization of stack objects
3384         in RenderLayerCompositor.
3385
3386         No behavior change.
3387
3388         * page/scrolling/ScrollingConstraints.h:
3389         (WebCore::ViewportConstraints::ViewportConstraints):
3390         (ViewportConstraints):
3391         (WebCore::FixedPositionViewportConstraints::FixedPositionViewportConstraints):
3392         (FixedPositionViewportConstraints):
3393         (WebCore::StickyPositionViewportConstraints::StickyPositionViewportConstraints):
3394         (StickyPositionViewportConstraints):
3395         * rendering/RenderLayerCompositor.cpp:
3396         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
3397         (WebCore::RenderLayerCompositor::computeStickyViewportConstraints):
3398
3399 2013-03-04  Roger Fong  <roger_fong@apple.com>
3400
3401         Unreviewed. AppleWin build fix.
3402
3403         * html/parser/XSSAuditor.cpp:
3404         (WebCore::isSemicolonSeparatedAttribute):
3405
3406 2013-03-04  Andreas Kling  <akling@apple.com>
3407
3408         CSSParser: Avoid temporary String when parsing hex colors.
3409         <http://webkit.org/b/111341>
3410
3411         Reviewed by Anders Carlsson.
3412
3413         Templatize CSSParser::fastParseColor() so we can pass a CSSParserString as the color name.
3414         This avoids creating a temporary WTF::String from the parser string.
3415
3416         * css/CSSParser.cpp:
3417         (WebCore::CSSParser::fastParseColor):
3418         * css/CSSParser.h:
3419         * css/CSSParserValues.h:
3420         (CSSParserString):
3421
3422 2013-03-04  Julien Chaffraix  <jchaffraix@webkit.org>
3423
3424         [CSS Grid Layout] Add parsing for grid-{start|before}
3425         https://bugs.webkit.org/show_bug.cgi?id=110988
3426
3427         Reviewed by Tony Chang.
3428
3429         Test: fast/css-grid-layout/grid-item-start-before-get-set.html
3430
3431         Refactored how we store internally grid-{row|column} to be based on grid-{before|start}.
3432         This is required as grid-{row|column} are shorthands for resp. grid-{before|after} and grid-{start|end}
3433         in the specification and will also be in the code. That means a lot of methods were renamed to be more
3434         aligned with the new design.
3435
3436         * css/CSSComputedStyleDeclaration.cpp:
3437         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
3438         * css/CSSParser.cpp:
3439         (WebCore::CSSParser::parseValue):
3440         * css/CSSProperty.cpp:
3441         (WebCore::CSSProperty::isInheritedProperty):
3442         * css/CSSPropertyNames.in:
3443         * css/StyleResolver.cpp:
3444         (WebCore::StyleResolver::applyProperty):
3445         Added the code to parse, apply and get back the new properties. Also
3446         some renaming after the internal naming change below.
3447
3448         * rendering/RenderGrid.cpp:
3449         (WebCore::RenderGrid::maximumIndexInDirection):
3450         (WebCore::RenderGrid::placeItemsOnGrid):
3451         (WebCore::RenderGrid::autoPlacementMajorAxisPositionForChild):
3452         (WebCore::RenderGrid::autoPlacementMinorAxisPositionForChild):</