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