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