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