1bc4d80cd1dadec8ada09591137f2dff1a572ab3
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-27  Philip Rogers  <pdr@google.com>
2
3         Rename toScriptElement -> toScriptElementIfPossible
4         https://bugs.webkit.org/show_bug.cgi?id=113473
5
6         Reviewed by Ryosuke Niwa.
7
8         Rename ScriptElement::toScriptElement to ScriptElement::toScriptElementIfPossible to
9         differentiate this function from other to*Element functions, and to better describe the
10         function's behavior. Other to*Element functions do not return null if the cast fails,
11         whereas toScriptElementIfPossible does.
12
13         No new tests as this is just a refactoring.
14
15         * dom/ScriptElement.cpp:
16         (WebCore::toScriptElementIfPossible):
17         * dom/ScriptElement.h:
18         (WebCore):
19         * dom/ScriptRunner.cpp:
20         (WebCore::ScriptRunner::timerFired):
21
22             This is the only unchecked return value but there isn't a security issue here.
23
24         * html/HTMLOptionElement.cpp:
25         (WebCore::HTMLOptionElement::collectOptionInnerText):
26         * html/parser/HTMLConstructionSite.cpp:
27         (WebCore::HTMLConstructionSite::attachLater):
28         (WebCore::HTMLConstructionSite::insertForeignElement):
29         * html/parser/HTMLScriptRunner.cpp:
30         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
31         (WebCore::HTMLScriptRunner::requestPendingScript):
32         (WebCore::HTMLScriptRunner::runScript):
33         * xml/parser/XMLDocumentParser.cpp:
34         (WebCore::XMLDocumentParser::notifyFinished):
35         * xml/parser/XMLDocumentParserLibxml2.cpp:
36         (WebCore::XMLDocumentParser::startElementNs):
37         (WebCore::XMLDocumentParser::endElementNs):
38         * xml/parser/XMLDocumentParserQt.cpp:
39         (WebCore::XMLDocumentParser::parseStartElement):
40         (WebCore::XMLDocumentParser::parseEndElement):
41
42 2013-03-27  Ryosuke Niwa  <rniwa@webkit.org>
43
44         Debug test fix after r147018.
45
46         toElement() asserts. What we want here is isElementNode().
47
48         * html/parser/HTMLConstructionSite.cpp:
49         (WebCore::HTMLConstructionSite::attachLater):
50
51 2013-03-27  Noel Gordon  <noel.gordon@gmail.com>
52
53         Add webp image color profile support
54         https://bugs.webkit.org/show_bug.cgi?id=113184
55
56         Reviewed by Eric Seidel.
57
58         Requires libwebp version 0.3.0 (decoder ABI version 0x201). For images
59         with an ICC color profile chunk, poll the incremental decoder for the
60         current decoded height with the WebPIDecGetRGB() API and color correct
61         any newly decoded rows in-situ in the frame buffer.
62
63         Note: the ICC chunk appears before the encoded image frame in the webp
64         encoding (RIFF container) format. When the incremental decoder outputs
65         decoded pixels, enough encoded data has arrived to read the entire ICC
66         color profile data chunk.
67
68         Tests: fast/images/webp-color-profile-lossless.html
69                fast/images/webp-color-profile-lossy-alpha.html
70                fast/images/webp-color-profile-lossy.html
71
72         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
73         (WebCore::WEBPImageDecoder::WEBPImageDecoder):
74         (WebCore::WEBPImageDecoder::~WEBPImageDecoder): Call clear().
75         (WebCore):
76         (WebCore::WEBPImageDecoder::clear):
77         Added. Helper to clean up the webp decoder and color transform members.
78         (WebCore::WEBPImageDecoder::createColorTransform):
79         Create m_transform using the supplied profile memory data. Note that
80         the |deviceProfile| is not owned, but the |inputProfile| temporary is
81         so release it here with qcms_release_profile().
82         (WebCore::WEBPImageDecoder::readColorProfile):
83         Called once only when the decoder begins to output decoded rows of an
84         image containing an ICC chunk, to read the ICC color profile data from
85         the encoded data stream, verify it, and use it to create m_transform.
86         (WebCore::WEBPImageDecoder::applyColorProfile):
87         Since there is no row callback in libwebp, poll for the decoded height
88         of the image so far. If new rows are decoded, color correct the pixels
89         of those new rows and re-write them back into the frame buffer using
90         buffer.setRGBA() to 1) alpha pre-multiply the pixels if needed, and 2)
91         shuffle the pixel bytes into the platform's RGBA pixel endian-ness.
92         (WebCore::WEBPImageDecoder::decode):
93         If the container format indicates the image has an ICC color profile,
94         decode the image to RGBA format for subsequent input to the QCMS color
95         correction library in applyColorProfile().
96         * platform/image-decoders/webp/WEBPImageDecoder.h:
97         (WEBPImageDecoder):
98         (WebCore::WEBPImageDecoder::colorTransform): m_transform getter.
99
100 2013-03-27  Jun Jiang  <jun.a.jiang@intel.com>
101
102         Refactor validation checks for texture uploads
103         https://bugs.webkit.org/show_bug.cgi?id=111012
104
105         Reviewed by Kenneth Russell.
106
107         Move the validation checks to the entry level of tex{Sub}Image2D, return early for invalid parameters and avoid duplicated checks.
108         Moreover, turn all the validation checks at the bottom level - tex{Sub}Image2DBase into assertions.
109
110         Already covered by current tests.
111
112         * html/canvas/WebGLRenderingContext.cpp:
113         (WebCore::WebGLRenderingContext::copyTexSubImage2D):
114         (WebCore::WebGLRenderingContext::texImage2DBase):
115         (WebCore::WebGLRenderingContext::texImage2DImpl):
116         (WebCore::WebGLRenderingContext::validateTexFunc): A helper function for tex{Sub}Image2D to check input parameters.
117         (WebCore::WebGLRenderingContext::texImage2D):
118         (WebCore::WebGLRenderingContext::texSubImage2DBase):
119         (WebCore::WebGLRenderingContext::texSubImage2DImpl):
120         (WebCore::WebGLRenderingContext::texSubImage2D):
121         (WebCore::WebGLRenderingContext::validateHTMLImageElement):
122         (WebCore::WebGLRenderingContext::validateHTMLCanvasElement):
123         (WebCore::WebGLRenderingContext::validateHTMLVideoElement):
124         * html/canvas/WebGLRenderingContext.h:
125
126 2013-03-27  Arnaud Renevier  <a.renevier@sisa.samsung.com>
127
128         remove parentsOnly variable in codeGenerator.pm
129         https://bugs.webkit.org/show_bug.cgi?id=113457
130
131         Reviewed by Kentaro Hara.
132
133         Remove unused variable parentsOnly.
134
135         No new tests: no change in behaviour.
136
137         * bindings/scripts/CodeGenerator.pm:
138         (ForAllParents):
139         (AddMethodsConstantsAndAttributesFromParentInterfaces):
140         (ParseInterface):
141         (InheritsInterface):
142         (InheritsExtendedAttribute):
143         * bindings/scripts/CodeGeneratorV8.pm:
144         (BaseInterfaceName):
145
146 2013-03-27  Beth Dakin  <bdakin@apple.com>
147
148         Need WK2 API to give a WebView a header and footer
149         https://bugs.webkit.org/show_bug.cgi?id=113352
150         -and corresponding-
151         <rdar://problem/13383835>
152
153         Reviewed by Simon Fraser.
154
155         This API will require RenderLayerCompositor to keep layers for the header and 
156         footer when the exist. It also requires the scrolling machinery to know that the 
157         size of the scrollable area will differ from the contentsSize when there is a 
158         header or footer.
159
160         setWantsLayerForHeader() and setWantsLayerForFooter() return GraphicsLayers to 
161         WK2. setHeaderHeight() and setFooterHeight() set the header and footer heights
162         respectively.
163         * WebCore.exp.in:
164         * page/FrameView.h:
165         (FrameView):
166         * page/FrameView.cpp:
167         (WebCore::FrameView::FrameView):
168         (WebCore::FrameView::setWantsLayerForHeader):
169         (WebCore::FrameView::setWantsLayerForFooter):
170         (WebCore::FrameView::setHeaderHeight):
171         (WebCore::FrameView::setFooterHeight):
172
173         Should use totalContentsSize() instead of contentsSize().
174         (WebCore::FrameView::windowClipRect):
175         (WebCore::FrameView::isScrollable):
176         * page/SpatialNavigation.cpp:
177         (WebCore::canScrollInDirection):
178
179         This should also use totalContentsSize() instead of contentsSize(), and while 
180         we're at it, re-name the variable and function names in the scrolling tree code 
181         from contentsSize to totalContentsSize.
182         * page/scrolling/ScrollingStateScrollingNode.cpp:
183         (WebCore::ScrollingStateScrollingNode::ScrollingStateScrollingNode):
184         (WebCore::ScrollingStateScrollingNode::setTotalContentsSize):
185         (WebCore::ScrollingStateScrollingNode::dumpProperties):
186         * page/scrolling/ScrollingStateScrollingNode.h:
187         (WebCore::ScrollingStateScrollingNode::totalContentsSize):
188         (ScrollingStateScrollingNode):
189         * page/scrolling/ScrollingTreeScrollingNode.cpp:
190         (WebCore::ScrollingTreeScrollingNode::updateBeforeChildren):
191         * page/scrolling/ScrollingTreeScrollingNode.h:
192         (WebCore::ScrollingTreeScrollingNode::totalContentsSize):
193         (ScrollingTreeScrollingNode):
194         * page/scrolling/mac/ScrollingCoordinatorMac.h:
195         (ScrollParameters):
196         * page/scrolling/mac/ScrollingCoordinatorMac.mm:
197         (WebCore::ScrollingCoordinatorMac::frameViewLayoutUpdated):
198         (WebCore::ScrollingCoordinatorMac::setScrollParametersForNode):
199         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
200         (WebCore::ScrollingTreeScrollingNodeMac::updateAfterChildren):
201         (WebCore::ScrollingTreeScrollingNodeMac::setScrollLayerPosition):
202         (WebCore::ScrollingTreeScrollingNodeMac::maximumScrollPosition):
203
204         Use totalContentsSize() instead of contentsSize().
205         * platform/ScrollView.cpp:
206         (WebCore::ScrollView::maximumScrollPosition):
207         (WebCore::ScrollView::setScrollOffset):
208         (WebCore::ScrollView::overhangAmount):
209         (WebCore::ScrollView::updateScrollbars):
210         (WebCore::ScrollView::calculateOverhangAreasForPainting):
211
212         scrollOffset() represents the offset within the totalContentsSize, but that is 
213         not what we need here. So subtract out the headerHeight() for the appropriate 
214         value.
215         (WebCore::ScrollView::windowToContents):
216         (WebCore::ScrollView::contentsToWindow):
217
218         Use totalContentsSize() instead of contentsSize().
219         * platform/ScrollableArea.cpp:
220         (WebCore::ScrollableArea::maximumScrollPosition):
221         (WebCore):
222         (WebCore::ScrollableArea::totalContentsSize):
223         * platform/ScrollableArea.h:
224         (WebCore::ScrollableArea::headerHeight):
225         (WebCore::ScrollableArea::footerHeight):
226         (ScrollableArea):
227         * platform/mac/ScrollAnimatorMac.mm:
228         (WebCore::ScrollAnimatorMac::adjustScrollPositionIfNecessary):
229         (WebCore::ScrollAnimatorMac::pinnedInDirection):
230         * platform/mac/ThemeMac.mm:
231         (WebCore::ThemeMac::ensuredView):
232
233         The rootContentLayer needs to be offset by the headerHeight().
234         * rendering/RenderLayerCompositor.cpp:
235         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
236
237         New member variables m_layerForHeader and m_layerForFooter. This code properly 
238         creates and manages them.
239         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
240         (WebCore::RenderLayerCompositor::updateLayerForHeader):
241         (WebCore):
242         (WebCore::RenderLayerCompositor::updateLayerForFooter):
243         (WebCore::RenderLayerCompositor::computeFixedViewportConstraints):
244         (WebCore::RenderLayerCompositor::reportMemoryUsage):
245         * rendering/RenderLayerCompositor.h:
246         (RenderLayerCompositor):
247
248         Test infrastructure. 
249         * testing/Internals.cpp:
250         (WebCore::Internals::resetToConsistentState):
251         (WebCore::Internals::setHeaderHeight):
252         (WebCore):
253         (WebCore::Internals::setFooterHeight):
254         * testing/Internals.h:
255         * testing/Internals.idl:
256
257 2013-03-27  Arnaud Renevier  <a.renevier@sisa.samsung.com>
258
259         javascriptcore bindings do not check exception after calling valueToStringWithNullCheck
260         https://bugs.webkit.org/show_bug.cgi?id=113219
261
262         Reviewed by Kentaro Hara.
263
264         When converting JSValue to native value in attribute setter, store the
265         native value in a temporary variable. After this variable assignment,
266         always check if an exception has been raised.
267
268         Update binding tests.
269
270         Test: fast/dom/exception-in-binding.html
271
272         * bindings/scripts/CodeGeneratorJS.pm:
273         (GenerateImplementation):
274         (GetNativeType):
275         (JSValueToNative):
276         * bindings/scripts/test/JS/JSTestInterface.cpp:
277         (WebCore::setJSTestInterfaceConstructorSupplementalStaticAttr):
278         (WebCore::setJSTestInterfaceSupplementalStr2):
279         (WebCore::setJSTestInterfaceSupplementalNode):
280         * bindings/scripts/test/JS/JSTestObj.cpp:
281         (WebCore::setJSTestObjConstructorStaticStringAttr):
282         (WebCore::setJSTestObjEnumAttr):
283         (WebCore::setJSTestObjShortAttr):
284         (WebCore::setJSTestObjUnsignedShortAttr):
285         (WebCore::setJSTestObjLongAttr):
286         (WebCore::setJSTestObjLongLongAttr):
287         (WebCore::setJSTestObjUnsignedLongLongAttr):
288         (WebCore::setJSTestObjStringAttr):
289         (WebCore::setJSTestObjTestObjAttr):
290         (WebCore::setJSTestObjXMLObjAttr):
291         (WebCore::setJSTestObjCreate):
292         (WebCore::setJSTestObjReflectedStringAttr):
293         (WebCore::setJSTestObjReflectedIntegralAttr):
294         (WebCore::setJSTestObjReflectedUnsignedIntegralAttr):
295         (WebCore::setJSTestObjReflectedBooleanAttr):
296         (WebCore::setJSTestObjReflectedURLAttr):
297         (WebCore::setJSTestObjReflectedCustomIntegralAttr):
298         (WebCore::setJSTestObjReflectedCustomBooleanAttr):
299         (WebCore::setJSTestObjReflectedCustomURLAttr):
300         (WebCore::setJSTestObjTypedArrayAttr):
301         (WebCore::setJSTestObjAttrWithGetterException):
302         (WebCore::setJSTestObjAttrWithSetterException):
303         (WebCore::setJSTestObjStringAttrWithGetterException):
304         (WebCore::setJSTestObjStringAttrWithSetterException):
305         (WebCore::setJSTestObjWithScriptStateAttribute):
306         (WebCore::setJSTestObjWithScriptExecutionContextAttribute):
307         (WebCore::setJSTestObjWithScriptStateAttributeRaises):
308         (WebCore::setJSTestObjWithScriptExecutionContextAttributeRaises):
309         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttribute):
310         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateAttributeRaises):
311         (WebCore::setJSTestObjWithScriptExecutionContextAndScriptStateWithSpacesAttribute):
312         (WebCore::setJSTestObjWithScriptArgumentsAndCallStackAttribute):
313         (WebCore::setJSTestObjConditionalAttr1):
314         (WebCore::setJSTestObjConditionalAttr2):
315         (WebCore::setJSTestObjConditionalAttr3):
316         (WebCore::setJSTestObjAnyAttribute):
317         (WebCore::setJSTestObjMutablePoint):
318         (WebCore::setJSTestObjImmutablePoint):
319         (WebCore::setJSTestObjStrawberry):
320         (WebCore::setJSTestObjStrictFloat):
321         (WebCore::setJSTestObjId):
322         (WebCore::setJSTestObjNullableLongSettableAttribute):
323         (WebCore::setJSTestObjNullableStringValue):
324         * bindings/scripts/test/JS/JSTestSerializedScriptValueInterface.cpp:
325         (WebCore::setJSTestSerializedScriptValueInterfaceValue):
326         (WebCore::setJSTestSerializedScriptValueInterfaceCachedValue):
327         * bindings/scripts/test/JS/JSTestTypedefs.cpp:
328         (WebCore::setJSTestTypedefsUnsignedLongLongAttr):
329         (WebCore::setJSTestTypedefsImmutableSerializedScriptValue):
330         (WebCore::setJSTestTypedefsAttrWithGetterException):
331         (WebCore::setJSTestTypedefsAttrWithSetterException):
332         (WebCore::setJSTestTypedefsStringAttrWithGetterException):
333         (WebCore::setJSTestTypedefsStringAttrWithSetterException):
334
335 2013-03-27  Arnaud Renevier  <a.renevier@sisa.samsung.com>
336
337         cache parsed interfaces in CodeGenerator.pm
338         https://bugs.webkit.org/show_bug.cgi?id=113446
339
340         Reviewed by Kentaro Hara.
341
342         When generating binding for an interface, informations about parent
343         interfaces are sometimes needed several times. This patch caches
344         those the parsed interface. When generating all WebCore bindings, this
345         results in a speedup of about 40% for JavaScriptCore and about 80% for
346         V8.
347
348         No new tests: no change in behaviour.
349
350         * bindings/scripts/CodeGenerator.pm:
351         (ParseInterface):
352
353 2013-03-27  KyungTae Kim <ktf.kim@samsung.com> and Yongjun Zhang  <yongjun_zhang@apple.com>
354
355         Add a settings to disallow initializing background-size if background shorthand doesn't include it.
356         https://bugs.webkit.org/show_bug.cgi?id=113363
357
358         Reviewed by David Kilzer.
359
360         This is based on KyungTae Kim's patch in https://bugs.webkit.org/show_bug.cgi?id=97761.  Many legacy sites set
361         background-size first and then set background for setting background-image.  For backward-compatibility
362         in some WebKit based clients, if 'background' shorthand have no 'background-size' attribute, we could add
363         a settings to let the css parser not initialize 'background-size'.
364
365         Test: fast/backgrounds/background-shorthand-after-set-backgroundSize.html
366
367         * css/CSSParser.cpp:
368         (WebCore::CSSParserContext::CSSParserContext): initialize useLegacyBackgroundSizeShorthandBehavior.
369         (WebCore::operator==):
370         (WebCore::CSSParser::useLegacyBackgroundSizeShorthandBehavior): add a method to return if we want background-size
371             to be initialized by background shorthand.
372         (WebCore):
373         (WebCore::CSSParser::parseFillShorthand): don't initialize background-size in background shorthand if we have
374             useLegacyBackgroundSizeShorthandBehavior set to true.
375         * css/CSSParser.h:
376         (CSSParser):
377         * css/CSSParserMode.h: add member useLegacyBackgroundSizeShorthandBehavior to CSSParserContext.
378         (CSSParserContext):
379         * page/Settings.in: initialize useLegacyBackgroundSizeShorthandBehavior to false.
380         * testing/InternalSettings.cpp:
381         (WebCore::InternalSettings::Backup::Backup): add the new settings useLegacyBackgroundSizeShorthandBehavior to Backup.
382         (WebCore::InternalSettings::Backup::restoreTo): restore useLegacyBackgroundSizeShorthandBehavior from Backup.
383         (WebCore::InternalSettings::setUseLegacyBackgroundSizeShorthandBehavior):
384         (WebCore):
385         * testing/InternalSettings.h:
386         (Backup):
387         (InternalSettings):
388         * testing/InternalSettings.idl: add a JS testing API setUseLegacyBackgroundSizeShorthandBehavior to turn on/off
389             the new settings.
390
391 2013-03-27  Florin Malita  <fmalita@chromium.org>
392
393         Remove unused RenderLayer::renderBox{X,Y} methods
394         https://bugs.webkit.org/show_bug.cgi?id=113408
395
396         Reviewed by Simon Fraser.
397
398         Minor cleanup - renderBoxX() and renderBox() are no longer used.
399
400         No new tests: no functional changes.
401
402         * rendering/RenderLayer.h:
403
404 2013-03-27  PhistucK  <phistuck@chromium.org>
405
406         Web Inspector: Plumb and expose cookie clearing options throughout the Resources Cookies tree and views
407         https://bugs.webkit.org/show_bug.cgi?id=87140
408
409         Reviewed by Vsevolod Vlasov.
410
411         Added cookie clearing buttons and context menu options
412         throughout the tree and views.
413         Drive by -
414         - Made sure the delete button is only visible
415         when a cookie is selected.
416         - Fixed a wrong JSDoc comment.
417
418         * inspector/front-end/CookieItemsView.js:
419         (WebInspector.CookieItemsView):
420         (WebInspector.CookieItemsView.prototype.statusBarItems):
421         (WebInspector.CookieItemsView.prototype._updateWithCookies):
422         (WebInspector.CookieItemsView.prototype.clear):
423         Added. Clears the entire cookie view.
424         (WebInspector.CookieItemsView.prototype._clearButtonClicked):
425         Added. Ditto (when clicking on the button).
426         (WebInspector.CookieItemsView.prototype._showDeleteButton):
427         Added. Shows the delete button when selecting a cookie row.
428         * inspector/CookiesTable.js:
429         (WebInspector.CookiesTable):
430         (WebInspector.CookiesTable.prototype._clearAndRefresh):
431         Added. Clears the cookies of the current table and updates it.
432         (WebInspector.CookiesTable.prototype._handleContextMenuEvent):
433         Added. Manages the context menu within the table.
434         (WebInspector.CookiesTable.prototype.clear):
435         Added. Clears the cookies of the current table.
436         (WebInspector.CookiesTable.prototype.setCookies):
437          Fixed a wrong JSDoc comment structure.
438         * inspector/front-end/ResourcesPanel.js:
439         (WebInspector.ResourcesPanel.prototype.clearCookies):
440         Added. Clears the cookies of the given domain view.
441         (WebInspector.CookieTreeElement.prototype.onattach):
442         Added. Adds a contextmenu handler.
443         (WebInspector.CookieTreeElement.prototype._handleContextMenuEvent):
444         Added. Manages the context menu within cookie tree.
445         (WebInspector.CookieTreeElement.prototype._clearCookies):
446         Added. Clears the cookies of the view of the tree item.
447         * inspector/front-end/treeoutline.js:
448         (TreeOutline): Fixed a wrong JSDoc comment.
449
450         * English.lproj/localizedStrings.js:
451         Added strings for the context menu options.
452
453 2013-03-27  Andrey Lushnikov  <lushnikov@chromium.org>
454
455         Web Inspector: [DTE] implement "tokenAtTextPosition" method
456         https://bugs.webkit.org/show_bug.cgi?id=113390
457
458         Reviewed by Pavel Feldman.
459
460         Test: inspector/editor/text-editor-token-at-position.html
461
462         - Add TextEditor.tokenAtTextPosition method
463         - Implement tokenAtTextPosition method in DefaultTextEditor
464
465         * inspector/front-end/DefaultTextEditor.js:
466         (WebInspector.DefaultTextEditor.prototype.tokenAtTextPosition):
467         (WebInspector.TextEditorMainPanel.prototype.compare):
468         (WebInspector.TextEditorMainPanel.prototype.tokenAtTextPosition):
469         (WebInspector.TextEditorMainPanel.prototype._tokenAtUnhighlightedLine):
470         (WebInspector.TextEditorMainPanel.prototype.set mimeType):
471         (WebInspector.TextEditorMainPanel.prototype.get mimeType):
472         * inspector/front-end/TextEditor.js:
473         (WebInspector.TextEditor.prototype.tokenAtTextPosition):
474         * inspector/front-end/TextEditorHighlighter.js:
475         (WebInspector.TextEditorHighlighter):
476         (WebInspector.TextEditorHighlighter.prototype.get mimeType):
477         (WebInspector.TextEditorHighlighter.prototype.set mimeType):
478
479 2013-03-27  Charles Wei  <charles.wei@torchmobile.com.cn>
480
481         Remove build warning for unused function parameters in indexeddb.
482         https://bugs.webkit.org/show_bug.cgi?id=113043
483
484         Reviewed by Tony Chang.
485
486         No new tests, just remove build warning.
487
488         * Modules/indexeddb/IDBCallbacks.h:
489         (WebCore::IDBCallbacks::onBlocked):
490         (WebCore::IDBCallbacks::onUpgradeNeeded):
491         * Modules/indexeddb/IDBCursor.cpp:
492         (WebCore::IDBCursor::stringToDirection):
493         * Modules/indexeddb/IDBCursor.h:
494         (IDBCursor):
495         * Modules/indexeddb/IDBCursorBackendImpl.cpp:
496         (WebCore::IDBCursorBackendImpl::prefetchReset):
497         * Modules/indexeddb/IDBDatabase.cpp:
498         (WebCore::IDBDatabase::transaction):
499         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
500         (WebCore::IDBDatabaseBackendImpl::setIndexesReady):
501         * Modules/indexeddb/IDBIndex.cpp:
502         (WebCore::IDBIndex::openCursor):
503         (WebCore::IDBIndex::openKeyCursor):
504         * Modules/indexeddb/IDBLevelDBCoding.cpp:
505         (IDBLevelDBCoding):
506         * Modules/indexeddb/IDBObjectStore.cpp:
507         (WebCore):
508         (WebCore::IDBObjectStore::openCursor):
509         * Modules/indexeddb/IDBTransaction.cpp:
510         (WebCore::IDBTransaction::stringToMode):
511         * Modules/indexeddb/IDBTransaction.h:
512         (IDBTransaction):
513         * inspector/InspectorIndexedDBAgent.cpp:
514         (WebCore):
515
516 2013-03-27  Sergey Ryazanov  <serya@chromium.org>
517
518         REGRESSION (r146588): Cannot correctly display Chinese SNS Renren
519         https://bugs.webkit.org/show_bug.cgi?id=113142
520
521         Reviewed by Pavel Feldman.
522
523         Changed CSS grammar to be equivalent to pre-r146588.
524         CSS error reporting disabled to prevent message overflow.
525
526         * css/CSSGrammar.y.in:
527         * css/CSSParser.cpp:
528         (WebCore::CSSParser::isLoggingErrors):
529
530 2013-03-27  Andrey Lushnikov  <lushnikov@chromium.org>
531
532         Web Inspector: enhance Popover.js to rely on hover element coordinates
533         https://bugs.webkit.org/show_bug.cgi?id=113340
534
535         Reviewed by Pavel Feldman.
536
537         No new tests: no change in behaviour.
538
539         Introduce a coordinates-based method that checks if mouse is inside hover
540         element and use it in PopoverHelper instead of DOM hierarchy.
541
542         * inspector/front-end/Popover.js:
543         (WebInspector.PopoverHelper.prototype._eventInHoverElement): Added.
544         (WebInspector.PopoverHelper.prototype._mouseDown):
545         (WebInspector.PopoverHelper.prototype._mouseMove):
546         (WebInspector.PopoverHelper.prototype._mouseOut):
547
548 2013-03-27  Andrey Lushnikov  <lushnikov@chromium.org>
549
550         Web Inspector: [CodeMirror] fix webinspector-css theme for CodeMirror
551         https://bugs.webkit.org/show_bug.cgi?id=113399
552
553         Reviewed by Alexander Pavlov.
554
555         Add style rule to highlight css properties for CodeMirror
556         webinspector-css theme.
557
558         No new tests: no change in behaviour.
559
560         * inspector/front-end/cm/cmdevtools.css:
561         (.cm-s-web-inspector-css span.cm-property):
562
563 2013-03-27  Andrey Lushnikov  <lushnikov@chromium.org>
564
565         Web Inspector: [DTE] paint overlay highlight for unhighlighted lines
566         https://bugs.webkit.org/show_bug.cgi?id=113344
567
568         Reviewed by Pavel Feldman.
569
570         No new tests.
571
572         Remove fast-return condition from paintLine method that checked for
573         highlight existence.
574
575         * inspector/front-end/DefaultTextEditor.js:
576         (WebInspector.TextEditorMainPanel.prototype._paintLine):
577
578 2013-03-27  Ryosuke Niwa  <rniwa@webkit.org>
579
580         Shift clicking on an element with -webkit-user-select: all doesn't extend selection
581         https://bugs.webkit.org/show_bug.cgi?id=113270
582
583         Reviewed by Enrica Casucci.
584
585         The bug was caused by updateSelectionForMouseDownDispatchingSelectStart always replacing selection whenever
586         the target node was inside an element with -webkit-suer-select even when we were attemping to extend selection
587         in handleMousePressEventSingleClick.
588
589         Fixed the bug by extracting this logic as a separate function (expandSelectionToRespectUserSelectAll) and deploying
590         it in handleMousePressEventSingleClick to extend selection as needed.
591
592         Test: editing/selection/user-select-all-with-shift.html
593
594         * page/EventHandler.cpp:
595         (WebCore::expandSelectionToRespectUserSelectAll): Extracted from updateSelectionForMouseDownDispatchingSelectStart.
596         (WebCore::EventHandler::updateSelectionForMouseDownDispatchingSelectStart):
597         (WebCore::EventHandler::selectClosestWordFromHitTestResult):
598         (WebCore::EventHandler::selectClosestWordOrLinkFromMouseEvent):
599         (WebCore::EventHandler::handleMousePressEventTripleClick):
600         (WebCore::EventHandler::handleMousePressEventSingleClick): Adjust "pos" as needed when extending selection.
601         Also use shouldConsiderSelectionAsDirectional() instead of manually peeking editingBehaviorType while we're at it.
602
603 2013-03-27  Zalan Bujtas  <zalan@apple.com>
604
605         REGRESSION(r143102): iframe with percentage height within table with anonymous cell fails.
606         https://bugs.webkit.org/show_bug.cgi?id=113077
607
608         Reviewed by Antti Koivisto.
609         
610         http://www.w3.org/TR/CSS21/visuren.html#anonymous-block-level
611         "Anonymous block boxes are ignored when resolving percentage values that would refer to it:
612         the closest non-anonymous ancestor box is used instead."
613         When figuring out whether auto height needs to be applied on the current box, ignore anonymous
614         ancestors until the first non-anonymous containing block is found. This matches both
615         Firefox and Opera behaviour.
616         
617         Test: fast/replaced/iframe-with-percentage-height-within-table-with-anonymous-table-cell.html
618
619         * rendering/RenderBoxModelObject.cpp:
620         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight): Switch from
621         isAnonymousBlock() to isAnonymous() to make sure all anonymous boxes are ignored.
622         Remove isTableCell() check which is a noop as table cell isn't an anonymous block.
623         
624 2013-03-27  Pierre Rossi  <pierre.rossi@gmail.com>
625
626         [Qt] Add WOFF support when using zlib
627         https://bugs.webkit.org/show_bug.cgi?id=112805
628
629         Reviewed by Allan Sandfeld Jensen.
630
631         Covered by existing test:
632         fast/css/font-face-woff.html
633
634         * Target.pri: Conditional inclusion of WOFFFileFormat
635         * platform/graphics/qt/FontCustomPlatformDataQt.cpp:
636         (WebCore::createFontCustomPlatformData): Try to unpack WOFF data, otherwise spit out a warning and bail.
637         (WebCore::FontCustomPlatformData::supportsFormat): accept WOFF webfonts if USE(ZLIB).
638
639 2013-03-27  Robert Hogan  <robert@webkit.org>
640
641         Growing a position:absolute element in a position:relative one in a table does not update scrollHeight
642         https://bugs.webkit.org/show_bug.cgi?id=111977
643
644         Reviewed by David Hyatt.
645
646         During simplified layout tables still need to know about overflow from positioned objects in any of
647         their cells.
648
649         Test: fast/table/cell-overflow-simplified-layout.html
650
651         * rendering/RenderBlock.h:
652         (RenderBlock):
653         * rendering/RenderTable.cpp:
654         (WebCore::RenderTable::simplifiedNormalFlowLayout):
655         (WebCore):
656         * rendering/RenderTable.h:
657         * rendering/RenderTableSection.cpp:
658         (WebCore::RenderTableSection::layoutRows):
659         (WebCore):
660         (WebCore::RenderTableSection::computeOverflowFromCells):
661         * rendering/RenderTableSection.h:
662         (RenderTableSection):
663
664 2013-03-22  Geoffrey Garen  <ggaren@apple.com>
665
666         Honor the setting for whether JavaScript markup is enabled
667         https://bugs.webkit.org/show_bug.cgi?id=113122
668
669         Reviewed by Ryosuke Niwa.
670
671         * dom/ScriptableDocumentParser.cpp:
672         (WebCore::ScriptableDocumentParser::ScriptableDocumentParser): Applied the
673         setting here, so all document parsing would be covered. This is similar
674         to what we do for plug-in stripping.
675
676         * html/parser/HTMLConstructionSite.cpp:
677         (WebCore::HTMLConstructionSite::insertForeignElement): Fixed a bug where
678         we would insert an SVG script element into the document even in script
679         markup disabled mode.
680
681         (This bug has existed for copy/paste for a long time, but other bugs and
682         quirks in SVG copy/paste papered over it. It's a serious issue now
683         that non-paste clients will rely on this mode.)
684
685         * html/parser/HTMLTreeBuilder.cpp:
686         (WebCore::HTMLTreeBuilder::processTokenInForeignContent): Fixed the same
687         bug -- this time in the part of the parser that executes scripts as they
688         parse.
689
690         I adopted the toScriptElement() convention for testing for a script
691         element to match the XML parser.
692
693 2013-03-27  Dean Jackson  <dino@apple.com>
694
695         Chromium Mac fails to build after r146995 because the new NSFont category
696         may conflict with the system. Add the WebCoreTheme category to the whitelist.
697
698         Unreviewed.
699
700         * WebCore.gyp/WebCore.gyp:
701
702 2013-03-27  Ryosuke Niwa  <rniwa@webkit.org>
703
704         Selection code spends a lot of time in InlineTextBox::localSelectionRect
705         https://bugs.webkit.org/show_bug.cgi?id=113364
706
707         Reviewed by Enrica Casucci.
708
709         Avoid computing the font width when we're selecting the entire line box.
710
711         This appears to be 25-26% improvement on Interactive/SelectAll:Time.
712
713         * rendering/InlineTextBox.cpp:
714         (WebCore::InlineTextBox::localSelectionRect):
715
716 2013-03-26  Timothy Hatcher  <timothy@apple.com>
717
718         Add support for dock-to-right of the Web Inspector in the Mac port.
719
720         Unfortunately this requires Safari changes, so it is disabled in the nightly builds.
721
722         https://webkit.org/b/113341
723         rdar://problem/10368152
724
725         Reviewed by Joseph Pecoraro.
726
727         * WebCore.exp.in:
728         * inspector/InspectorFrontendClient.h:
729         (InspectorFrontendClient):
730         * inspector/InspectorFrontendClientLocal.cpp:
731         (WebCore):
732         (WebCore::InspectorFrontendClientLocal::frontendLoaded):
733         (WebCore::InspectorFrontendClientLocal::requestSetDockSide):
734         (WebCore::InspectorFrontendClientLocal::canAttachWindow):
735         (WebCore::InspectorFrontendClientLocal::changeAttachedWindowWidth):
736         (WebCore::InspectorFrontendClientLocal::setAttachedWindow):
737         (WebCore::InspectorFrontendClientLocal::constrainedAttachedWindowWidth):
738         * inspector/InspectorFrontendClientLocal.h:
739         (InspectorFrontendClientLocal):
740         * inspector/InspectorFrontendHost.cpp:
741         (WebCore::InspectorFrontendHost::setAttachedWindowWidth):
742         (WebCore):
743         * inspector/InspectorFrontendHost.h:
744         (InspectorFrontendHost):
745         * inspector/InspectorFrontendHost.idl:
746         * inspector/front-end/InspectorFrontendHostStub.js:
747         (.WebInspector.InspectorFrontendHostStub.prototype.setAttachedWindowWidth):
748         * inspector/front-end/externs.js:
749         (InspectorFrontendHostAPI.prototype.setAttachedWindowWidth):
750         * testing/Internals.cpp:
751
752 2013-03-27  Eric Carlson  <eric.carlson@apple.com>
753
754         [Mac] webkitClosedCaptionsVisible doesn't work
755         https://bugs.webkit.org/show_bug.cgi?id=113417
756
757         Reviewed by Jer Noble.
758
759         Test: media/track/track-in-band-legacy-api.html
760
761         * html/HTMLMediaElement.cpp:
762         (WebCore::HTMLMediaElement::HTMLMediaElement): Delete m_disableCaptions, it is no longer used.
763         (WebCore::HTMLMediaElement::configureTextTrackGroup): Pass this to textTrackSelectionScore.
764         (WebCore::HTMLMediaElement::setClosedCaptionsVisible):  Delete m_disableCaptions, it is no longer used.
765         * html/HTMLMediaElement.h: Ditto.
766
767         * page/CaptionUserPreferences.cpp:
768         (WebCore::CaptionUserPreferences::textTrackSelectionScore): Add an HTMLMediaElement parameter.
769         * page/CaptionUserPreferences.h:
770
771         * page/CaptionUserPreferencesMac.h:
772         * page/CaptionUserPreferencesMac.mm:
773         (WebCore::CaptionUserPreferencesMac::textTrackSelectionScore): Return a score if the media element
774             is showing captions, even if the preference says captions are disabled.
775
776 2013-03-27  Eric Carlson  <eric.carlson@apple.com>
777
778         [Mac] Text track menu items sometimes labeled incorrectly
779         https://bugs.webkit.org/show_bug.cgi?id=113406
780
781         Reviewed by Jer Noble.
782
783         media/video-controls-captions-trackmenu-localized.html was updated to test this.
784
785         * page/CaptionUserPreferencesMac.mm:
786         (WebCore::trackDisplayName): Use the 'label' attribute for the menu text when necessary.
787
788 2013-03-27  Sergio Villar Senin  <svillar@igalia.com>
789
790         Inserting a blank (" ") at the end of a line does not insert anything in Overtype mode
791         https://bugs.webkit.org/show_bug.cgi?id=113413
792
793         Reviewed by Ryosuke Niwa.
794
795         Perform a "normal" insert instead of a replace when there is
796         nothing to replace (like at the end of a line) as this case is not
797         supported by the replacing code path. This will allow us to
798         properly rebalance whitespaces in those cases.
799
800         Updated the editing/execCommand/overtype.html test to check also
801         this use case.
802
803         * editing/InsertTextCommand.cpp:
804         (WebCore::InsertTextCommand::setEndingSelectionWithoutValidation):
805         (WebCore::InsertTextCommand::performTrivialReplace):
806         (WebCore::InsertTextCommand::performOverwrite):
807         (WebCore::InsertTextCommand::doApply): use the recently added
808         setEndingSelectionWithoutValidation() to avoid code duplication.
809         * editing/InsertTextCommand.h:
810         (InsertTextCommand):
811
812 2013-03-27  Dean Jackson  <dino@apple.com>
813
814         [Mac] Use fontName rather than familyName for internal fonts
815         https://bugs.webkit.org/show_bug.cgi?id=113392
816         <rdar://problem/13474743>
817
818         Reviewed by Enrica Casucci.
819
820         Some internal fonts on OS X have a family name that
821         isn't listed in availableFontFamilies. In this case
822         we should use the font name rather than the family
823         name when looking for a match.
824
825         * platform/mac/ThemeMac.h: NSFont category to provide a web-friendly family name.
826         * platform/mac/ThemeMac.mm:
827         (-[NSFont webCoreFamilyName]): Returns the font name for internal fonts, otherwise the family name.
828         (WebCore::ThemeMac::controlFont):
829         * rendering/RenderThemeMacShared.mm: Use the webCoreFamilyName.
830         (WebCore::RenderThemeMacShared::systemFont): Ditto.
831         (WebCore::RenderThemeMacShared::setFontFromControlSize): Ditto.
832
833 2013-03-26  Jer Noble  <jer.noble@apple.com>
834
835         Mac: Media Controls always hide time display elements
836         https://bugs.webkit.org/show_bug.cgi?id=113355
837
838         Reviewed by Eric Carlson.
839
840         No new tests; rebaselined existing tests against correct behavior.
841
842         A prior commit set the "min-width:0" property on the time display elements, which, combined
843         with the "-webkit-flex-box:0 0" setting, caused the flex-box container to collapse the width
844         of the elements to zero. To achieve the desired effect of hiding the time display elements,
845         first set the elements' min-width to the desired width, as the new flex-box spec treats the
846         default value of "min-width:auto" as the intrinsic width, and will collapse the text display
847         elements to the intrinsic width of its contained text node.
848
849         The above allows the timeline container to collapse beyond the sum of its childrens'
850         intrinsic width. Create a custom renderer that detects when this happens, and hide the time
851         display controls.
852
853         * css/mediaControls.css:
854         * css/mediaControlsQuickTime.css:
855         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
856             Set the "min-width:" property to equal the "width:" property.
857         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
858             Ditto.
859         * css/mediaControlsChromium.css:
860         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
861             Chromium assumes the time display controls are flex-boxes, so make that explicit.
862         * html/shadow/MediaControlElementTypes.cpp: Removed MediaControlTimeDisplayElement::createRenderer().
863         * html/shadow/MediaControlElementTypes.h:
864         (MediaControlTimeDisplayElement): Ditto.
865         * html/shadow/MediaControlElements.cpp:
866         (WebCore::MediaControlTimelineContainerElement::setTimeDisplaysHidden): Added, walks through the 
867             container's children and shows or hides time display elements.
868         (WebCore::MediaControlTimelineContainerElement::createRenderer): Added, creates a RenderMediaControlTimelineContainer.
869         (WebCore::getMediaControlTimeRemainingDisplayElementShadowPseudoId): Added, allow setTimeDisplaysHidden to
870             query against children's shadowPseudoId().
871         (WebCore::MediaControlTimeRemainingDisplayElement::shadowPseudoId): Moved contents to getMediaControlTimeRemainingDisplayElementShadowPseudoId.
872         (WebCore::getMediaControlCurrentTimeDisplayElementShadowPseudoId): Added, allow setTimeDisplaysHidden to
873             query against children's shadowPseudoId().
874         (WebCore::MediaControlCurrentTimeDisplayElement::shadowPseudoId): Moved contents to getMediaControlCurrentTimeDisplayElementShadowPseudoId.
875         * html/shadow/MediaControlElements.h:
876         (MediaControlTimelineContainerElement):
877         * rendering/RenderMediaControlElements.cpp:
878         (WebCore::RenderMediaControlTimelineContainer::RenderMediaControlTimelineContainer): Added, simple constructor.
879         (WebCore::RenderMediaControlTimelineContainer::layout): Detect when the controller's width is greater than
880             a certain value, and show or hide the time display elements in response.
881         * rendering/RenderMediaControlElements.h:
882         (RenderMediaControlTimelineContainer):
883
884 2013-03-27  Ilya Tikhonovsky  <loislo@chromium.org>
885
886         Web Inspector: CPU profiler. Swap FlameChart with Data Grid.
887         https://bugs.webkit.org/show_bug.cgi?id=113395
888
889         Reviewed by Pavel Feldman.
890
891         Looks like FlameChart is more powerful and flexible instrument
892         than plain old ProfileTree in DataGrid. The same action like
893         'look for the most expensive function in a frame' could be easily
894         done with FlameChart and need number of clicks in DataGrid.
895         So in an offline discussion we decided to place FlameChart on top of DataGrid.
896
897         * inspector/front-end/CPUProfileView.js:
898
899 2013-03-27  Chris Fleizach  <cfleizach@apple.com>
900
901         Regression in tests due to https://bugs.webkit.org/show_bug.cgi?id=113339
902         https://bugs.webkit.org/show_bug.cgi?id=113361
903
904         Fix the red bots. No review.
905
906         Ensure only pop-up buttons get the AXRequired attribute instead of all buttons.        
907
908         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
909         (-[WebAccessibilityObjectWrapper additionalAccessibilityAttributeNames]):
910         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
911
912 2013-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
913
914         Web Inspector: Breakpoint manager should restore breakpoints when uiSourceCode is added.
915         https://bugs.webkit.org/show_bug.cgi?id=113381
916
917         Reviewed by Pavel Feldman.
918
919         Breakpoint manager now restores breakpoints on UISourceCodeAdded event.
920         Breakpoint manager now only resets breakpoints in debugger when source mapping is changed to/from non identity one.
921
922         * inspector/front-end/BreakpointManager.js:
923         (WebInspector.BreakpointManager.prototype._uiSourceCodeAdded):
924         (WebInspector.BreakpointManager.prototype._resetBreakpoints):
925         (WebInspector.BreakpointManager.prototype._uiSourceCodeMappingChanged):
926         * inspector/front-end/CompilerScriptMapping.js:
927         (WebInspector.CompilerScriptMapping.prototype.get isIdentity):
928         * inspector/front-end/DefaultScriptMapping.js:
929         (WebInspector.DefaultScriptMapping.prototype.isIdentity):
930         * inspector/front-end/ResourceScriptMapping.js:
931         (WebInspector.ResourceScriptMapping.prototype.isIdentity):
932         * inspector/front-end/SASSSourceMapping.js:
933         (WebInspector.SASSSourceMapping.prototype.isIdentity):
934         * inspector/front-end/ScriptSnippetModel.js:
935         (WebInspector.SnippetScriptMapping.prototype.isIdentity):
936         * inspector/front-end/SourceMapping.js:
937         (WebInspector.SourceMapping.prototype.isIdentity):
938         * inspector/front-end/StylesSourceMapping.js:
939         (WebInspector.StylesSourceMapping.prototype.isIdentity):
940         * inspector/front-end/UISourceCode.js:
941         (WebInspector.UISourceCode.prototype.setSourceMapping):
942
943 2013-03-27  Yury Semikhatsky  <yurys@chromium.org>
944
945         Web Inspector: update Timeline.TimelineEvent definition to include DOM counters and native memory stats
946         https://bugs.webkit.org/show_bug.cgi?id=113376
947
948         Reviewed by Vsevolod Vlasov.
949
950         Fixed assertion failure in debug mode after r146975.
951
952         * inspector/InspectorTimelineAgent.cpp:
953         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
954
955 2013-03-27  Ilya Tikhonovsky  <loislo@chromium.org>
956
957         Web Inspector: FlameChart. Provide 15px padding left for the chart so developers will see the first divider with '0' title.
958         https://bugs.webkit.org/show_bug.cgi?id=113404
959
960         Reviewed by Pavel Feldman.
961
962         15px paddingLeft was added to the code for the chart.
963
964         * inspector/front-end/FlameChart.js:
965         (WebInspector.FlameChart):
966         (WebInspector.FlameChart.Calculator.prototype._updateBoundaries):
967         (WebInspector.FlameChart.Calculator.prototype.computePosition):
968         (WebInspector.FlameChart.prototype.draw):
969
970 2013-03-27  Kent Tamura  <tkent@chromium.org>
971
972         Rename HTMLFormControlElement::readOnly to isReadOnly
973         https://bugs.webkit.org/show_bug.cgi?id=113297
974
975         Reviewed by Alexey Proskuryakov.
976
977         HTMLFormControlElement::readOnly is not an implementation of
978         'readOnly' IDL attribute. It's confusing and we don't need to
979         violate our naming convention.
980
981         No new tests. Just a refactoring.
982
983         * accessibility/AccessibilityNodeObject.cpp:
984         (WebCore::AccessibilityNodeObject::isReadOnly):
985         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
986         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerReadOnly):
987         * html/HTMLFormControlElement.cpp:
988         (WebCore::HTMLFormControlElement::HTMLFormControlElement):
989         (WebCore::HTMLFormControlElement::parseAttribute):
990         * html/HTMLFormControlElement.h:
991         (WebCore::HTMLFormControlElement::isReadOnly):
992         (WebCore::HTMLFormControlElement::isDisabledOrReadOnly):
993         * html/HTMLInputElement.cpp:
994         (WebCore::HTMLInputElement::matchesReadOnlyPseudoClass):
995         (WebCore::HTMLInputElement::matchesReadWritePseudoClass):
996         * html/HTMLTextAreaElement.cpp:
997         (WebCore::HTMLTextAreaElement::matchesReadOnlyPseudoClass):
998         (WebCore::HTMLTextAreaElement::matchesReadWritePseudoClass):
999         * html/shadow/SliderThumbElement.cpp:
1000         (WebCore::SliderThumbElement::defaultEventHandler):
1001         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
1002         (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
1003         * html/shadow/TextControlInnerElements.cpp:
1004         (WebCore::InputFieldSpeechButtonElement::willRespondToMouseClickEvents):
1005         (WebCore::InputFieldSpeechButtonElement::setRecognitionResult):
1006         * html/shadow/TextFieldDecorationElement.cpp:
1007         (WebCore::TextFieldDecorationElement::updateImage):
1008         * rendering/RenderTextControl.cpp:
1009         (WebCore::updateUserModifyProperty):
1010         * rendering/RenderThemeMacShared.mm:
1011         (WebCore::RenderThemeMacShared::paintSearchFieldCancelButton):
1012
1013 2013-03-27  Yury Semikhatsky  <yurys@chromium.org>
1014
1015         Web Inspector: update Timeline.TimelineEvent definition to include DOM counters and native memory stats
1016         https://bugs.webkit.org/show_bug.cgi?id=113376
1017
1018         Reviewed by Vsevolod Vlasov.
1019
1020         Added missing fields to Timeline.TimelineEvent type definition in Inspector.json
1021
1022         * inspector/Inspector.json:
1023         * inspector/InspectorTimelineAgent.cpp:
1024         (WebCore::InspectorTimelineAgent::innerAddRecordToTimeline):
1025         (WebCore::InspectorTimelineAgent::setDOMCounters):
1026         Switched InspectorTimelineAgent to the new typed event builders.
1027         (WebCore::InspectorTimelineAgent::setNativeHeapStatistics):
1028         * inspector/InspectorTimelineAgent.h:
1029         (InspectorTimelineAgent):
1030
1031 2013-03-27  Vsevolod Vlasov  <vsevik@chromium.org>
1032
1033         Web Inspector: Follow-up to r146898: test that uiSourceCodes are not leaking in breakpoint manager.
1034         https://bugs.webkit.org/show_bug.cgi?id=113368
1035
1036         Reviewed by Pavel Feldman.
1037
1038         Added a missed line and a test.
1039
1040         * inspector/front-end/BreakpointManager.js:
1041         (WebInspector.BreakpointManager.prototype._projectWillReset):
1042
1043 2013-03-27  Andrey Lushnikov  <lushnikov@chromium.org>
1044
1045         Web Inspector: [CodeMirror] CodeMirrorTextEditor.highlightRange has bugs
1046         https://bugs.webkit.org/show_bug.cgi?id=113348
1047
1048         Reviewed by Vsevolod Vlasov.
1049
1050         No new tests.
1051
1052         - Append additional "<class>-start" class to the first highlighted span
1053         and "<class>-end" class to the last highlighted span to provide a way
1054         to set up a css classes with borders.
1055         - Increment end column of the markup range to simulate inclusive range.
1056
1057         * inspector/front-end/CodeMirrorTextEditor.js:
1058         (WebInspector.CodeMirrorTextEditor.prototype.highlightRange):
1059
1060 2013-03-27  Andrey Lushnikov  <lushnikov@chromium.org>
1061
1062         Web Inspector: Add isClean/markClean method pair to textEditor.js
1063         https://bugs.webkit.org/show_bug.cgi?id=112815
1064
1065         Reviewed by Vsevolod Vlasov.
1066
1067         No new tests: no change in behaviour.
1068
1069         - Add TextEditor.isClean and TextEditor.markClean methods
1070         - Implement these methods in DefaultTextEditor
1071         - Implement these methods in CodeMirrorTextEditor
1072
1073         * inspector/front-end/CodeMirrorTextEditor.js:
1074         (WebInspector.CodeMirrorTextEditor.prototype.isClean):
1075         (WebInspector.CodeMirrorTextEditor.prototype.markClean):
1076         * inspector/front-end/DefaultTextEditor.js:
1077         (WebInspector.DefaultTextEditor.prototype.isClean):
1078         (WebInspector.DefaultTextEditor.prototype.markClean):
1079         * inspector/front-end/TextEditor.js:
1080         (WebInspector.TextEditor.prototype.isClean):
1081         (WebInspector.TextEditor.prototype.markClean):
1082         * inspector/front-end/TextEditorModel.js:
1083         (WebInspector.TextEditorModel.endsWithBracketRegex.):
1084
1085 2013-03-27  Ilya Tikhonovsky  <loislo@chromium.org>
1086
1087         Unreviewed. Web Inspector. rename method Timeline.Calculator.grandMinimumBoundary to Timeline.Calculator.zeroTime
1088
1089         No changes in behaviour.
1090
1091         * inspector/front-end/FlameChart.js:
1092         (WebInspector.FlameChart.Calculator.prototype.zeroTime):
1093         (WebInspector.FlameChart.OverviewCalculator.prototype.zeroTime):
1094         * inspector/front-end/NetworkPanel.js:
1095         (WebInspector.NetworkBaseCalculator.prototype.zeroTime):
1096         * inspector/front-end/TimelineGrid.js:
1097         (WebInspector.TimelineGrid.prototype.updateDividers):
1098         (WebInspector.TimelineGrid.Calculator.prototype.zeroTime):
1099         * inspector/front-end/TimelineOverviewPane.js:
1100         (WebInspector.TimelineOverviewCalculator.prototype.zeroTime):
1101         * inspector/front-end/TimelinePanel.js:
1102         (WebInspector.TimelineCalculator.prototype.zeroTime):
1103
1104 2013-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
1105
1106         Web Inspector: Timeline. Scroll dividers with the underlying events.
1107         https://bugs.webkit.org/show_bug.cgi?id=113315
1108
1109         Reviewed by Pavel Feldman.
1110
1111         Now when TimelineGrid is able to draw dividers with any offset
1112         we could cut away paddingLeft member of Timeline.Calculator
1113         and clear the code of TimelineGrid.
1114
1115         * inspector/front-end/TimelineGrid.js:
1116         (WebInspector.TimelineGrid.prototype.updateDividers):
1117         * inspector/front-end/TimelinePanel.js:
1118         (WebInspector.TimelinePanel.prototype._refresh):
1119         (WebInspector.TimelineCalculator.prototype.computePosition):
1120         (WebInspector.TimelineCalculator.prototype.setDisplayWindow):
1121         (WebInspector.TimelineCalculator.prototype.grandMinimumBoundary):
1122         * inspector/front-end/inspectorCommon.css:
1123         (.resources-dividers-label-bar):
1124
1125 2013-03-27  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1126
1127         [CoordGfx] Support to share GraphicsSurface flags with client.
1128         https://bugs.webkit.org/show_bug.cgi?id=112982
1129
1130         Reviewed by Noam Rosenthal.
1131
1132         Covered by existing WebGL tests.
1133
1134         This patch adds support to pass GraphicsSurface flags during it's client creation.
1135         This would be helpful to determine cases when blending can be disabled on client
1136         side i.e When AlphaSupport is disabled during Graphics Surface creation.
1137         With GLX, we rely on Window to provide us with necessary information on client side.
1138         This might not be the case on other platforms or when not using Window on X.
1139         This patch doesn't change original behaviour of creating GraphicsSurface client
1140         with default flags GraphicsSurface::SupportsTextureTarget and GraphicsSurface::SupportsSharing.
1141
1142         * platform/graphics/texmap/TextureMapperPlatformLayer.h:
1143         (WebCore::TextureMapperPlatformLayer::graphicsSurfaceFlags):
1144         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1145         (WebCore::CoordinatedGraphicsLayer::createCanvasIfNeeded):
1146         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1147         (WebCore::CoordinatedGraphicsScene::createCanvasIfNeeded):
1148         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
1149         (CoordinatedGraphicsLayerState):
1150         * platform/graphics/efl/GraphicsContext3DPrivate.cpp:
1151         (WebCore):
1152         (WebCore::GraphicsContext3DPrivate::graphicsSurfaceFlags):
1153         * platform/graphics/efl/GraphicsContext3DPrivate.h:
1154         (GraphicsContext3DPrivate):
1155         * platform/graphics/surfaces/efl/GraphicsSurfaceCommon.cpp:
1156         (WebCore::GraphicsSurfacePrivate::GraphicsSurfacePrivate):
1157         (WebCore::GraphicsSurfacePrivate::initializeClient):
1158
1159 2013-03-26  Takashi Sakamoto  <tasak@google.com>
1160
1161         [shadow] styleForText should consider the case where parent node has no style
1162         https://bugs.webkit.org/show_bug.cgi?id=113275
1163
1164         If a text node is distributed, its parent node for rendering and
1165         styling might have no style. In the case, styleForText should return
1166         default style.
1167
1168         Reviewed by Hajime Morrita.
1169
1170         Test: fast/dom/shadow/text-node-distributed-crash.html
1171
1172         * css/StyleResolver.cpp:
1173         (WebCore::StyleResolver::styleForText):
1174         Check whether a parent node has any style or not. If not, return
1175         default style. This is the same behavior as styleForElement.
1176
1177 2013-03-26  Takeshi Yoshino  <tyoshino@chromium.org>
1178
1179         Make SocketStreamHandle (Chromium port) fully use IPC window in send()
1180         https://bugs.webkit.org/show_bug.cgi?id=113304
1181
1182         Reviewed by Kent Tamura.
1183
1184         socket_stream of Chromium buffers send data up to 32KiB (exact) bytes.
1185
1186         However, SocketStreamHandleInternal::send() method now keeps in-flight
1187         send data not greater than m_maxPendingSendAllowed - 1 that is
1188         32KiB - 1. This means that SocketStreamHandleInternal consumes the
1189         buffered data in SocketStreamHandleBase by 32KiB - 1. It makes memory
1190         copy operations unaligned unnecessarily. It should just use the
1191         allowed size fully.
1192
1193         * platform/network/chromium/SocketStreamHandle.cpp:
1194         (WebCore::SocketStreamHandleInternal::send):
1195         (WebCore):
1196
1197 2013-03-26  Hayato Ito  <hayato@chromium.org>
1198
1199         Allow ShadowContents in HitTests by default.
1200         https://bugs.webkit.org/show_bug.cgi?id=113171
1201
1202         Reviewed by Dimitri Glazkov.
1203
1204         HitTestRequest is widely used in WebCore, but AllowShadowContents
1205         flag is not turned on by default.  In most places, we can set the
1206         flag on.
1207
1208         This change makes HitTests allow shadow contents by default.
1209
1210         To track all existing HitTests which do not allow shadow contents,
1211         and discourage such a HitTest in the future, I've introduced
1212         disallowShadowContenet flag so that callers must turn on this flag
1213         explicitly if they want to disallow shadow contents in their HitTests.
1214
1215         This change should be refactoring and should not include any
1216         behavior changes.  After this change, we'll investigate each place
1217         where disallowShadowContents is used step by step and get rid of
1218         the flag if it is okay to remove.
1219
1220         No new tests, no behavior change.
1221
1222         * dom/Document.h:
1223         (Document):
1224         * dom/TreeScope.cpp:
1225         (WebCore::nodeFromPoint):
1226         * editing/FrameSelection.cpp:
1227         (WebCore::FrameSelection::contains):
1228         * page/DragController.cpp:
1229         (WebCore::elementUnderMouse):
1230         (WebCore::DragController::canProcessDrag):
1231         (WebCore::DragController::startDrag):
1232         * page/EventHandler.cpp:
1233         (WebCore::EventHandler::handleMouseDraggedEvent):
1234         (WebCore::EventHandler::eventMayStartDrag):
1235         (WebCore::EventHandler::updateSelectionForMouseDrag):
1236         (WebCore::EventHandler::hitTestResultAtPoint):
1237         (WebCore::EventHandler::handleMousePressEvent):
1238         (WebCore::EventHandler::handleMouseDoubleClickEvent):
1239         (WebCore::EventHandler::handleMouseMoveEvent):
1240         (WebCore::EventHandler::handleMouseReleaseEvent):
1241         (WebCore::EventHandler::updateDragAndDrop):
1242         (WebCore::EventHandler::isInsideScrollbar):
1243         (WebCore::EventHandler::handleWheelEvent):
1244         (WebCore::EventHandler::handleGestureEvent):
1245         (WebCore::EventHandler::handleGestureLongPress):
1246         (WebCore::EventHandler::handleGestureScrollBegin):
1247         (WebCore::EventHandler::bestClickableNodeForTouchPoint):
1248         (WebCore::EventHandler::bestContextMenuNodeForTouchPoint):
1249         (WebCore::EventHandler::bestZoomableAreaForTouchPoint):
1250         (WebCore::EventHandler::sendContextMenuEvent):
1251         (WebCore::EventHandler::sendContextMenuEventForKey):
1252         (WebCore::EventHandler::hoverTimerFired):
1253         (WebCore::EventHandler::dragSourceEndedAt):
1254         (WebCore::EventHandler::handleDrag):
1255         (WebCore::EventHandler::handleTouchEvent):
1256         (WebCore::EventHandler::dispatchSyntheticTouchEventIfEnabled):
1257         * page/EventHandler.h:
1258         (EventHandler):
1259         * page/FocusController.cpp:
1260         (WebCore::updateFocusCandidateIfNeeded):
1261         * page/Frame.cpp:
1262         (WebCore::Frame::visiblePositionForPoint):
1263         * page/TouchDisambiguation.cpp:
1264         (WebCore::findGoodTouchTargets):
1265         * rendering/HitTestRequest.h:
1266         (WebCore::HitTestRequest::disallowsShadowContent):
1267         * rendering/HitTestResult.cpp:
1268         (WebCore::HitTestResult::addNodeToRectBasedTestResult):
1269         * rendering/RenderFlowThread.cpp:
1270         (WebCore::RenderFlowThread::hitTestFlowThreadPortionInRegion):
1271         * rendering/svg/RenderSVGResourceClipper.cpp:
1272         (WebCore::RenderSVGResourceClipper::hitTestClipContent):
1273         * testing/Internals.cpp:
1274         (WebCore::Internals::nodesFromRect):
1275
1276 2013-03-26  Tim Horton  <timothy_horton@apple.com>
1277
1278         [ca] Tell CA to clean up unused resources if a given WebProcess won't be drawing
1279         https://bugs.webkit.org/show_bug.cgi?id=107539
1280         <rdar://problem/13032692>
1281
1282         Reviewed by Simon Fraser.
1283
1284         Update WebCoreSystemInterface.
1285
1286         * platform/mac/WebCoreSystemInterface.h:
1287         * platform/mac/WebCoreSystemInterface.mm:
1288
1289 2013-03-26  Antti Koivisto  <antti@apple.com>
1290
1291         Test if non-immediate descendants obscure background
1292         https://bugs.webkit.org/show_bug.cgi?id=113137
1293
1294         Reviewed by Simon Fraser.
1295
1296         The current obscuration test only covers immediate children. We can find more cases by looking deeper into descendants.
1297         
1298         The patch makes the test sufficiently smart to stop a heavy fully obscured gif animation on micrsoft.com.
1299
1300         * loader/cache/CachedImage.cpp:
1301         (WebCore::CachedImage::animationAdvanced):
1302         * rendering/RenderBox.cpp:
1303         (WebCore::RenderBox::styleDidChange):
1304         
1305             Invalidate parents to max test depth.
1306
1307         (WebCore::RenderBox::backgroundPaintedExtent):
1308         
1309             Background painting is pixel snapped.
1310
1311         (WebCore::isCandidateForOpaquenessTest):
1312         (WebCore::RenderBox::foregroundIsKnownToBeOpaqueInRect):
1313         
1314             Separate foreground testing and make it recursive.
1315             Add fast bailout for common static positioned case.
1316             Remove maximum child count, the fast bailouts should prevent long tests.
1317             Add maximum depth so we know how deep we need to invalidate in styleDidChange.
1318
1319         (WebCore::RenderBox::computeBackgroundIsKnownToBeObscured):
1320         (WebCore):
1321         * rendering/RenderBox.h:
1322         (RenderBox):
1323         * rendering/RenderImage.cpp:
1324         (WebCore::RenderImage::foregroundIsKnownToBeOpaqueInRect):
1325         (WebCore):
1326         (WebCore::RenderImage::computeBackgroundIsKnownToBeObscured):
1327         
1328         * rendering/RenderImage.h:
1329         (RenderImage):
1330
1331 2013-03-26  Benjamin Poulain  <bpoulain@apple.com>
1332
1333         Regression (r145601): out-of-bounds read in line breaking / new width cache
1334         https://bugs.webkit.org/show_bug.cgi?id=113347
1335
1336         Reviewed by Geoffrey Garen.
1337
1338         The values zero and 0xffff have special values with the default HashTraits. Those values
1339         are also valid values for UChar.
1340
1341         To avoid any table inconsitency, switch from UChar to uint32_t as the key type for
1342         the WidthCache's single char map. The traits is also changed to allow zero as a normal
1343         value.
1344
1345         This makes no space or time change over the previous code because:
1346         -The struct KeyValuePair was already 64bits due to the ABI alignment restrictions on floats.
1347         -The two hashes take the same number of instructions.
1348
1349         * platform/graphics/WidthCache.h:
1350         (WidthCache):
1351
1352 2013-03-26  Kent Tamura  <tkent@chromium.org>
1353
1354         Make HTMLProgressElement::isDeterminate private
1355         https://bugs.webkit.org/show_bug.cgi?id=113299
1356
1357         Reviewed by Kentaro Hara.
1358
1359         The only callsite of isDeterminate outside of HTMLProgressElement
1360         is in StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes,
1361         and we can replace it with Element::shouldAppearIndeterminate.
1362
1363         No new tests. Just a refactoring.
1364
1365         * css/StyleResolver.cpp:
1366         (WebCore::StyleResolver::sharingCandidateHasIdenticalStyleAffectingAttributes):
1367         Use Element::shouldAppearIndeterminate.
1368         * html/HTMLProgressElement.h:
1369         (HTMLProgressElement): Make isDeterminate private.
1370
1371 2013-03-26  David Grogan  <dgrogan@chromium.org>
1372
1373         IndexedDB: Histogram cause of LevelDB write errors
1374         https://bugs.webkit.org/show_bug.cgi?id=113350
1375
1376         Reviewed by Tony Chang.
1377
1378         Add histogram for source of LevelDB errors on Write in addition to
1379         Open.
1380
1381         No new tests - no good way to test histogram code.
1382
1383         * platform/leveldb/LevelDBDatabase.cpp:
1384         (WebCore::histogramLevelDBError):
1385         (WebCore):
1386         (WebCore::LevelDBDatabase::open):
1387         (WebCore::LevelDBDatabase::write):
1388
1389 2013-03-26  Chris Fleizach  <cfleizach@apple.com>
1390
1391         WebKit does not expose @required or @aria-required as AXRequired on select elements
1392         https://bugs.webkit.org/show_bug.cgi?id=113339
1393
1394         Reviewed by Tim Horton.
1395
1396         Make sure button types can return the AXRequired attribute.
1397
1398         Tests: platform/mac/accessibility/aria-required-popup-button.html
1399
1400         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1401         (-[WebAccessibilityObjectWrapper accessibilityAttributeNames]):
1402
1403 2013-03-26  Dean Jackson  <dino@apple.com>
1404
1405         When a primary plugin is restarted, also start similar plugins
1406         https://bugs.webkit.org/show_bug.cgi?id=113265
1407
1408         Reviewed by Tim Horton.
1409
1410         If we detect a primary plugin that is snapshotted, we immediately restart it.
1411         When this happens, we should also restart any other plugins that
1412         match the same origin and type. This allows sites with a lot of
1413         (geometrically) nearby plugins to behave as if they are a single big plugin.
1414
1415         Tests: plugins/snapshotting/autoplay-similar-to-dominant-after-delay.html
1416                plugins/snapshotting/autoplay-similar-to-dominant.html
1417
1418         * WebCore.exp.in: Export mimeTypeFromURL.
1419         * html/HTMLPlugInImageElement.cpp:
1420         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin): Use loadedMimeType helper.
1421         (WebCore::HTMLPlugInImageElement::restartSimilarPlugIns): New method, which copied the
1422             existing code from userDidClickSnapshot.
1423         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Move the similar plugin detection
1424             out into another function and call it.
1425         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Call restartSimilarPlugIns.
1426         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Use loadedMimeType helper.
1427         * html/HTMLPlugInImageElement.h: Declaration of restartSimilarPlugIns.
1428         (WebCore::HTMLPlugInImageElement::loadedMimeType): New helper method since this
1429             code was being often duplicated.
1430
1431 2013-03-26  Brent Fulgham  <bfulgham@webkit.org>
1432
1433         [Windows, WinCairo] Scroll offset being applied to plugins during print operations.
1434         https://bugs.webkit.org/show_bug.cgi?id=39889
1435
1436         Reviewed by Anders Carlsson.
1437
1438         This must be tested manually. See the issue for details.
1439
1440         * plugins/win/PluginViewWin.cpp:
1441         (WebCore::PluginView::paintWindowedPluginIntoContext):
1442         Revise the Windows implementation of the PluginView class
1443         paintWindowedPluginIntoContext to use the containing window
1444         position when computing the plugin's position for printing.
1445
1446 2013-03-26  Xianzhu Wang  <wangxianzhu@chromium.org>
1447
1448         Non-paintsContent fixed position layer should not cause slow scrolling
1449         https://bugs.webkit.org/show_bug.cgi?id=113238
1450
1451         Reviewed by James Robinson.
1452
1453         Added NotCompositedForNoVisibleContent in ViewportConstrainedNotCompositedReason and set it in RLC.
1454
1455         Test: compositing/layer-creation/fixed-position-no-content-scroll-reason.html
1456
1457         * rendering/RenderLayer.h: Add NotCompositedForNoVisibleContent.
1458         * rendering/RenderLayerCompositor.cpp:
1459         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): Set NotCompositedForNoVisibleContent reason when the fixed position layer has no visible content.
1460
1461 2013-03-26  Zoltan Horvath  <zoltan@webkit.org>
1462
1463         [CSS Exclusions] The radius of a circle should be computed based on the shorter available dimension
1464         https://bugs.webkit.org/show_bug.cgi?id=113255
1465
1466         Reviewed by Julien Chaffraix.
1467
1468         When we decide what should be the radius of a circle, we should choose the smallest available space. For instance when the
1469         width or height is not resolvable for the circle we should not have a radius for it. This change modifies the behavior to
1470         use the smaller available space, so we won't render unnecessary circle shapes.
1471
1472         Test: fast/exclusions/shape-inside/shape-inside-on-nested-container-with-unresolved-height.html
1473
1474         * rendering/ExclusionShape.cpp:
1475         (WebCore::ExclusionShape::createExclusionShape):
1476
1477 2013-03-26  Timothy Hatcher  <timothy@apple.com>
1478
1479         Make the Web Inspector console work in strict mode with JavaScriptCore.
1480
1481         https://webkit.org/b/65829
1482         rdar://problem/11271238
1483
1484         Reviewed by Joseph Pecoraro.
1485
1486         * inspector/InjectedScriptSource.js:
1487         (InjectedScript.prototype._evaluateOn): Don't use 'eval' parameter (it isn't
1488         allowed in strict mode). Swap window.eval with our known eval instead.
1489
1490 2013-03-26  Ryosuke Niwa  <rniwa@webkit.org>
1491
1492         Heap-use-after-free regression
1493         https://bugs.webkit.org/show_bug.cgi?id=113337
1494
1495         Reviewed by Abhishek Arya and Alexey Proskuryakov.
1496
1497         Use RefPtr instead of raw pointer in m_associatedFormControls.
1498
1499         * dom/Document.cpp:
1500         (WebCore::Document::didAssociateFormControlsTimerFired):
1501         * dom/Document.h:
1502         (Document):
1503         * loader/EmptyClients.h:
1504         (WebCore::EmptyChromeClient::didAssociateFormControls):
1505         * page/ChromeClient.h:
1506         (WebCore::ChromeClient::didAssociateFormControls):
1507
1508 2013-03-26  Alexey Proskuryakov  <ap@apple.com>
1509
1510         <rdar://problem/13194263> Crashes in NetworkProcess due to threading issues
1511         https://bugs.webkit.org/show_bug.cgi?id=113256
1512
1513         Reviewed by Brady Eidson.
1514
1515         Added a new code path in ResourceHandle/ResourceHandleClient that doesn't need
1516         blocking calls. Implemented it for NSURLConnection by changing NSOperationQueue
1517         version to forward calls to main thread.
1518
1519         * WebCore.exp.in: Export new methods.
1520         * WebCore.xcodeproj/project.pbxproj: Added WebCoreResourceHandleAsOperationQueueDelegate.
1521
1522         * platform/network/CredentialStorage.cpp: Assert that unprotected global map operations
1523         happen on main thread.
1524
1525         * platform/network/ResourceHandle.cpp: Added default implementations of functions
1526         that handle async responses.
1527
1528         * platform/network/chromium/ResourceHandle.cpp: Ditto.
1529
1530         * platform/network/ResourceHandle.h: Added functions that are called in response
1531         to new async functions in ResourceHandleClient. Changed Mac delegate type to id,
1532         ast can now be either WebCoreResourceHandleAsDelegate or WebCoreResourceHandleAsOperationQueueDelegate.
1533
1534         * platform/network/ResourceHandleClient.cpp:
1535         (WebCore::ResourceHandleClient::willSendRequestAsync):
1536         (WebCore::ResourceHandleClient::shouldUseCredentialStorageAsync):
1537         (WebCore::ResourceHandleClient::canAuthenticateAgainstProtectionSpaceAsync):
1538         (WebCore::ResourceHandleClient::willCacheResponseAsync):
1539         Default implementations of async client functions. These match default behavior of
1540         sync versions.
1541
1542         * platform/network/ResourceHandleClient.h: Added async functions. A ResourceHandle
1543         should use these when the client returns true from usesAsyncCallbacks().
1544
1545         * platform/network/ResourceHandleInternal.h: Changed to use id for delegate type
1546         here, too.
1547
1548         * platform/network/mac/ResourceHandleMac.mm:
1549         (WebCore::ResourceHandle::delegate): Create an appropriate delegate for the client.
1550         (WebCore::ResourceHandle::willSendRequest): Since this function has a lot of common
1551         behavior in sync and async cases, implement the new code path as a branch inside
1552         it, not as a new function.
1553         (WebCore::ResourceHandle::continueWillSendRequest): Unblock the connection when
1554         response is known.
1555         (WebCore::ResourceHandle::shouldUseCredentialStorage): Branched here too, for consistency.
1556         Perhaps we'll want to break this into separate functions though.
1557         (WebCore::ResourceHandle::continueShouldUseCredentialStorage): Unblock the connection.
1558         (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace): Same change as above.
1559         (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace): Ditto.
1560         (WebCore::ResourceHandle::continueWillCacheResponse): Ditto. Currently, delegate
1561         calls the client directly, so we only have a "continue" function, and no "willCacheResponse".
1562
1563         * platform/network/mac/WebCoreResourceHandleAsDelegate.mm:
1564         (-[WebCoreResourceHandleAsDelegate connection:willCacheResponse:]): Removed some
1565         nonsense code.
1566
1567         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h: Copied from Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.h.
1568         This delegate is responsible for forwarding calls to main thread. Unfortunately,
1569         this adds some code duplication, which I tried to rectify somewhat in previous patches
1570         by moving more logic to ResourceHandle.
1571
1572         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: Copied from Source/WebCore/platform/network/mac/WebCoreResourceHandleAsDelegate.mm.
1573         (-[WebCoreResourceHandleAsOperationQueueDelegate detachHandle]): Unblock waiting
1574         threads if we don't expect a response any more.
1575         (-[WebCoreResourceHandleAsOperationQueueDelegate dealloc]): Release the semaphore.
1576         (-[WebCoreResourceHandleAsOperationQueueDelegate continueWillSendRequest:]): Unblock
1577         a waiting thread with a response.
1578         (-[WebCoreResourceHandleAsOperationQueueDelegate continueShouldUseCredentialStorage:]): Ditto.
1579         (-[WebCoreResourceHandleAsOperationQueueDelegate continueCanAuthenticateAgainstProtectionSpace:]): Ditto.
1580         (-[WebCoreResourceHandleAsOperationQueueDelegate continueWillCacheResponse:]): Ditto.
1581         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
1582         Run code that uses WebCore objects on main thread.
1583         (-[WebCoreResourceHandleAsOperationQueueDelegate connectionShouldUseCredentialStorage:]): Ditto.
1584         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveAuthenticationChallenge:]): Ditto.
1585         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didCancelAuthenticationChallenge:]): Ditto.
1586         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]): Ditto.
1587         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]): Ditto.
1588         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveDataArray:]): Ditto.
1589         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveData:lengthReceived:]): Ditto.
1590         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willStopBufferingData:]): Ditto.
1591         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:]): Ditto.
1592         (-[WebCoreResourceHandleAsOperationQueueDelegate connectionDidFinishLoading:]): Ditto.
1593         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didFailWithError:]): Ditto.
1594         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]): Ditto.
1595
1596 2013-03-26  Tony Chang  <tony@chromium.org>
1597
1598         Autogenerate the scrollAnimatorEnabled setting in Settings.in
1599         https://bugs.webkit.org/show_bug.cgi?id=113253
1600
1601         Reviewed by James Robinson.
1602
1603         Convert scrollAnimatorEnabled into an autogenerated setting. This involves renaming
1604         the setter from setEnableScrollAnimator(bool) to setScrollAnimatorEnabled(bool) and
1605         updating the callers. I didn't change any WebKit API methods.
1606
1607         Also remove the code in InternalSettings since it's never used and will now be
1608         autogenerated with proper resetting code.
1609
1610         No new tests, this is a refactor and should compile.
1611
1612         * page/Settings.cpp:
1613         (WebCore::Settings::Settings): Remove code that is now autogenerated.
1614         * page/Settings.h:
1615         (Settings): Remove code that is now autogenerated.
1616         * page/Settings.in: Add entry for scrollAnimatorEnabled.
1617         * testing/InternalSettings.cpp: Remove unused code.
1618         * testing/InternalSettings.h: Remove unused code.
1619         * testing/InternalSettings.idl: Remove unused code.
1620
1621 2013-03-26  Joe Mason  <jmason@blackberry.com>
1622
1623         [BlackBerry] In RSSFilterStream, don't swallow headers when there's no body
1624         https://bugs.webkit.org/show_bug.cgi?id=113334
1625
1626         Reviewed by Rob Buis.
1627
1628         RIM PR 316345
1629
1630         When receiving an HTTP response that has a Content-Type header such as text/xml, but no
1631         body, RSSFilterStream::notifyHeadersReceived reads the Content-Type as "potential RSS", and
1632         calls saveHeaders. It expects to sniff the body in notifyDataReceived to see if it's RSS,
1633         and then call sendSavedHeaders to pass on the headers. But since there is no body,
1634         notifyDataReceived is never called. So call sendSavedHeaders in notifyClose too (it will not
1635         send them again if they were already sent.)
1636
1637         * platform/network/blackberry/rss/RSSFilterStream.cpp:
1638         (WebCore::RSSFilterStream::notifyClose):
1639
1640 2013-03-26  Dmitry Zvorygin  <zvorygin@chromium.org>
1641
1642         Web Inspector: Faster drawer animation.
1643         https://bugs.webkit.org/show_bug.cgi?id=113330
1644
1645         250ms -> 100ms
1646
1647         Reviewed by Pavel Feldman.
1648
1649         * inspector/front-end/inspector.css:
1650         (.animate #main):
1651         (.animate #floating-status-bar-container):
1652         (.animate #drawer):
1653         (.animate #bottom-status-bar-container > *):
1654
1655 2013-03-26  Brent Fulgham  <bfulgham@webkit.org>
1656
1657         [WinCairo] Unreviewed Build fix.
1658
1659         * platform/graphics/win/FontCustomPlatformDataCairo.h:
1660         (FontCustomPlatformData): Correct signature in header to match
1661         required implementation.
1662
1663 2013-03-26  Arvid Nilsson  <anilsson@rim.com>
1664
1665         [BlackBerry] Scrolling up and down can cause the screen to flash black
1666         https://bugs.webkit.org/show_bug.cgi?id=113269
1667
1668         Reviewed by Rob Buis.
1669
1670         PR 296106
1671
1672         The LayerRenderer should never clear before drawing the layers, from
1673         now on that's the responsibility of the caller.
1674
1675         Only manually testable.
1676
1677         * platform/graphics/blackberry/LayerRenderer.cpp:
1678         (WebCore::LayerRenderer::setViewport):
1679         * platform/graphics/blackberry/LayerRendererClient.h:
1680         (LayerRendererClient):
1681
1682 2013-03-26  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1683
1684         [Qt] editing/pasteboard/can-read-in-dragstart-event.html and /can-read-in-copy-and-cut-events.html are crashing
1685         https://bugs.webkit.org/show_bug.cgi?id=113126
1686
1687         Reviewed by Jocelyn Turcotte.
1688
1689         Make it possible to read from a writable Clipboard.
1690
1691         Test: editing/pasteboard/can-read-in-copy-and-cut-events.html
1692
1693         * platform/qt/ClipboardQt.cpp:
1694         (WebCore::ClipboardQt::getData):
1695         (WebCore::ClipboardQt::types):
1696         (WebCore::ClipboardQt::files):
1697         (WebCore::ClipboardQt::readClipboardData):
1698         (WebCore::ClipboardQt::hasData):
1699         (WebCore::ClipboardQt::items):
1700         * platform/qt/ClipboardQt.h:
1701         (ClipboardQt):
1702
1703 2013-03-26  Brent Fulgham  <bfulgham@webkit.org>
1704
1705         [WinCairo] Unreviewed build correction.
1706
1707         * platform/graphics/win/FontCustomPlatformDataCairo.cpp:
1708         (WebCore::FontCustomPlatformData::fontPlatformData): Update
1709         method signature to match CG variant.
1710
1711 2013-03-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1712
1713         Code duplication between HTTPParsers and HTTPValidation
1714         https://bugs.webkit.org/show_bug.cgi?id=113283
1715
1716         Reviewed by Alexey Proskuryakov.
1717
1718         Merged isValidHTTPToken() from HTTPValidation.h and isRFC2616Token() from
1719         HTTPParsers.h. They were doing exactly the same thing and their
1720         implementation was almost the same.
1721
1722         Removed HTTPValidation.* and moved remaining code to HTTPParsers.* as this
1723         seems like the proper place and it seems odd to keep HTTPValidation for
1724         just one function.
1725
1726         No new tests, no behavior change for layout tests.
1727
1728         * CMakeLists.txt:
1729         * GNUmakefile.list.am:
1730         * Target.pri:
1731         * WebCore.gypi:
1732         * WebCore.vcproj/WebCore.vcproj:
1733         * WebCore.vcxproj/WebCore.vcxproj:
1734         * WebCore.vcxproj/WebCore.vcxproj.filters:
1735         * WebCore.xcodeproj/project.pbxproj:
1736         * platform/network/HTTPParsers.cpp:
1737         (WebCore::isValidHTTPHeaderValue):
1738         (WebCore):
1739         (WebCore::isValidHTTPToken): Implementation is slightly simplified based on
1740         isValidHTTPToken() from HTTPValidation.cpp. (c >= 0x80 || c == 0x7F) is
1741         replaced by (c >= 0x7F). (c <= 0x1F ||  c == ' ' || c == '\t') is replaced
1742         by (c <= 0x20). Those expressions are shorter but equivalent.
1743         (WebCore::contentDispositionType):
1744         * platform/network/HTTPParsers.h:
1745         * platform/network/HTTPValidation.cpp: Removed.
1746         * platform/network/HTTPValidation.h: Removed.
1747         * xml/XMLHttpRequest.cpp: Stop including HTTPValidation.h.
1748
1749 2013-03-26  Sergio Villar Senin  <svillar@igalia.com>
1750
1751         Implement overtype mode for editable content
1752         https://bugs.webkit.org/show_bug.cgi?id=112126
1753
1754         Reviewed by Ryosuke Niwa.
1755
1756         Tests: editing/execCommand/overtype-support.html
1757                editing/execCommand/overtype.html
1758
1759         Add a new Overwrite command to the editor. This command will
1760         perform overtype operations when enabled instead of "normal" text
1761         insertions. As IE does, we maintain a single toggle state in the
1762         editor (enabled/disabled) for all the editable content in the
1763         page.
1764
1765         This new command will be only available for richly editable
1766         content via keybindings or the context menu. For testing purposes
1767         it is also accessible via internals.
1768
1769         * editing/CompositeEditCommand.cpp:
1770         (WebCore::CompositeEditCommand::replaceTextInNode): Use RefPtr for
1771         local variables.
1772         * editing/Editor.cpp:
1773         (WebCore::Editor::Editor):
1774         * editing/Editor.h:
1775         (WebCore::Editor::isOverwriteModeEnabled):
1776         (WebCore::Editor::toggleOverwriteModeEnabled):
1777         (Editor): Added two new functions and a new attribute.
1778         * editing/EditorCommand.cpp:
1779         (WebCore::executeToggleOverwrite): Enables/disables overwrite mode.
1780         (WebCore):
1781         (WebCore::createCommandMap): New OverWrite command.
1782         * editing/InsertTextCommand.cpp:
1783         (WebCore::InsertTextCommand::setEndingSelectionWithoutValidation):
1784         Refactored from performTrivialReplace(), shared by
1785         performOverwrite().
1786         (WebCore):
1787         (WebCore::InsertTextCommand::performTrivialReplace):
1788         (WebCore::InsertTextCommand::performOverwrite):
1789         (WebCore::InsertTextCommand::doApply): Perform overwrite if enabled.
1790         * editing/InsertTextCommand.h:
1791         (InsertTextCommand):
1792         * testing/Internals.cpp:
1793         (WebCore::Internals::resetToConsistentState): Reset OverWrite mode
1794         to false.
1795         (WebCore::Internals::isOverwriteModeEnabled):
1796         (WebCore):
1797         (WebCore::Internals::toggleOverwriteModeEnabled): Provide access
1798         to overwrite functionality in Editor for testing purposes.
1799         * testing/Internals.h:
1800         (Internals):
1801         * testing/Internals.idl:
1802
1803 2013-03-26  Arvid Nilsson  <anilsson@rim.com>
1804
1805         [BlackBerry] WebOverlay::pixelViewportRect() should return pixel viewport coordinates
1806         https://bugs.webkit.org/show_bug.cgi?id=113263
1807
1808         Reviewed by Rob Buis.
1809
1810         PR 312404
1811
1812         Fix WebOverlay::pixelViewportRect() to return the pixel viewport rect
1813         instead of the window rect. These are different if the web page is
1814         rendered starting at a window coordinate other than 0,0. The clip rect
1815         encodes the position we're rendered at, and can be used to translate
1816         the rect expressed in window coordinates to the pixel viewport
1817         coordinate system.
1818
1819         Also perform some cleanup of related code.
1820
1821         Only manually testable.
1822
1823         * platform/graphics/blackberry/LayerCompositingThread.cpp:
1824         (WebCore::LayerCompositingThread::getTransformedHolePunchRect):
1825         (WebCore::LayerCompositingThread::drawTextures):
1826         * platform/graphics/blackberry/LayerRenderer.cpp:
1827         (WebCore::toPixelCoordinates):
1828         (WebCore):
1829         (WebCore::LayerRenderer::toWindowCoordinates):
1830         (WebCore::LayerRenderer::toPixelViewportCoordinates):
1831         (WebCore::LayerRenderer::toDocumentViewportCoordinates):
1832         (WebCore::LayerRenderer::updateLayersRecursive):
1833         * platform/graphics/blackberry/LayerRenderer.h:
1834         (LayerRenderer):
1835
1836 2013-03-26  Sheriff Bot  <webkit.review.bot@gmail.com>
1837
1838         Unreviewed, rolling out r146901.
1839         http://trac.webkit.org/changeset/146901
1840         https://bugs.webkit.org/show_bug.cgi?id=113321
1841
1842         Was landed to soon (Requested by pfeldman on #webkit).
1843
1844         * inspector/front-end/ConsoleView.js:
1845         (WebInspector.ConsoleView.prototype.):
1846         (WebInspector.ConsoleView.prototype.filter):
1847         (WebInspector.ConsoleView.prototype._scheduleScrollIntoView.scrollIntoView):
1848         (WebInspector.ConsoleView.prototype._scheduleScrollIntoView):
1849         (WebInspector.ConsoleView.prototype._consoleMessageAdded):
1850         (WebInspector.ConsoleView.prototype._appendConsoleMessage):
1851         (WebInspector.ConsoleView.prototype._consoleCleared):
1852         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.monitoringXHRItemAction):
1853         (WebInspector.ConsoleView.prototype._handleContextMenuEvent.get preserveLogItemAction):
1854         (WebInspector.ConsoleView.prototype._shouldBeVisible):
1855         (WebInspector.ConsoleView.prototype._updateMessageList):
1856         (WebInspector.ConsoleView.prototype._promptKeyDown):
1857         (WebInspector.ConsoleView.prototype._printResult):
1858         (WebInspector.ConsoleCommand.prototype.highlightSearchResults):
1859         * inspector/front-end/inspector.css:
1860         (.console-warning-level, .console-error-level, .console-log-level, .console-debug-level):
1861         (.filter-all .console-debug-level, .filter-debug .console-debug-level):
1862         (.filter-all .console-debug-level.repeated-message, .filter-debug .console-debug-level.repeated-message):
1863
1864 2013-03-26  Rafael Weinstein  <rafaelw@chromium.org>
1865
1866         HTMLStackItem should include <template> as a special tag
1867         https://bugs.webkit.org/show_bug.cgi?id=113016
1868
1869         Reviewed by Eric Seidel.
1870
1871         New test added to html5lib suite.
1872
1873         * html/parser/HTMLStackItem.h:
1874         (WebCore::HTMLStackItem::isSpecialNode):
1875
1876 2013-03-26  Vsevolod Vlasov  <vsevik@chromium.org>
1877
1878         Web Inspector: Distinguish breakpoints and breakpoint locations in BreakpointManager API
1879         https://bugs.webkit.org/show_bug.cgi?id=113311
1880
1881         Reviewed by Pavel Feldman.
1882
1883         Made independent handling of breakpoints and breakpoint location in breakpoint manager consistent.
1884         JavaScriptSourceFrame now removes breakpoints originally set in it based on primary UI location.
1885
1886         * inspector/front-end/BreakpointManager.js:
1887         (WebInspector.BreakpointManager.prototype.breakpointsForUISourceCode):
1888         (WebInspector.BreakpointManager.prototype.allBreakpoints):
1889         (WebInspector.BreakpointManager.prototype.breakpointLocationsForUISourceCode):
1890         (WebInspector.BreakpointManager.prototype.allBreakpointLocations):
1891         (WebInspector.BreakpointManager.prototype._projectWillReset.get for):
1892         (WebInspector.BreakpointManager.prototype._projectWillReset):
1893         * inspector/front-end/JavaScriptSourceFrame.js:
1894         (WebInspector.JavaScriptSourceFrame.prototype.onUISourceCodeContentChanged):
1895         (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
1896         (WebInspector.JavaScriptSourceFrame.prototype._removeAllBreakpoints):
1897
1898 2013-03-26  Dmitry Zvorygin  <zvorygin@chromium.org>
1899
1900         Web Inspector: Remove remainings of CSS-based console message filtering.
1901         https://bugs.webkit.org/show_bug.cgi?id=112710
1902
1903         Reviewed by Pavel Feldman.
1904
1905         * inspector/front-end/ConsoleView.js:
1906         (WebInspector.ConsoleView.get this):
1907         (WebInspector.ConsoleView.prototype.):
1908         (WebInspector.ConsoleView.prototype.filter):
1909         (WebInspector.ConsoleView.prototype._consoleMessageAdded):
1910         (WebInspector.ConsoleView.prototype._appendConsoleMessage):
1911         (WebInspector.ConsoleView.prototype._consoleCleared):
1912         (WebInspector.ConsoleView.prototype._shouldBeVisible):
1913         (WebInspector.ConsoleView.prototype._updateMessageList):
1914         (WebInspector.ConsoleView.prototype._promptKeyDown):
1915         (WebInspector.ConsoleView.prototype._printResult):
1916         (WebInspector.ConsoleCommand.prototype.highlightSearchResults):
1917         * inspector/front-end/inspector.css:
1918         (.console-debug-level.repeated-message):
1919
1920 2013-03-26  Peter Rybin  <prybin@chromium.org>
1921
1922         Web Inspector: refactor code duplication: WebInspector.ObjectPropertyTreeElement.wrapPropertyAsElements
1923         https://bugs.webkit.org/show_bug.cgi?id=113211
1924
1925         Reviewed by Yury Semikhatsky.
1926
1927         A new method WebInspector.ObjectPropertyTreeElement.wrapPropertyAsElements is added and used
1928         from 2 sites.
1929
1930         * inspector/front-end/ObjectPropertiesSection.js:
1931         (WebInspector.ObjectPropertiesSection.prototype.update.callback):
1932         (WebInspector.ObjectPropertiesSection.prototype.update):
1933         (WebInspector.ObjectPropertiesSection.prototype.updateProperties):
1934         (.callback):
1935         (WebInspector.ObjectPropertyTreeElement.populate):
1936         (WebInspector.ObjectPropertyTreeElement.wrapPropertyAsElements):
1937         * inspector/front-end/WatchExpressionsSidebarPane.js:
1938         (WebInspector.WatchExpressionsSection.prototype.update.appendResult):
1939         (WebInspector.WatchExpressionsSection.prototype.update):
1940
1941 2013-03-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
1942
1943         HTTPHeaderMap::copyData() could call uncheckedAppend()
1944         https://bugs.webkit.org/show_bug.cgi?id=113279
1945
1946         Reviewed by Alexey Proskuryakov.
1947
1948         HTTPHeaderMap::copyData() calls reserveInitialCapacity() on the Vector
1949         but then appends items using append() function. Since we already know
1950         the capacity is sufficient, it is more efficient to call uncheckedAppend()
1951         instead to bypass capacity checks.
1952
1953         No new tests, no behavior change for layout tests.
1954
1955         * platform/network/HTTPHeaderMap.cpp:
1956         (WebCore::HTTPHeaderMap::copyData):
1957
1958 2013-03-26  Vsevolod Vlasov  <vsevik@chromium.org>
1959
1960         Web Inspector: UISourceCodes are leaking on reload sometimes.
1961         https://bugs.webkit.org/show_bug.cgi?id=113310
1962
1963         Reviewed by Pavel Feldman.
1964
1965         * inspector/front-end/BreakpointManager.js:
1966         (WebInspector.BreakpointManager.prototype._projectWillReset.get for):
1967         (WebInspector.BreakpointManager.prototype._projectWillReset):
1968         * inspector/front-end/ConsoleModel.js:
1969         (WebInspector.ConsoleModel.prototype.clearMessages):
1970
1971 2013-03-26  Alexander Pavlov  <apavlov@chromium.org>
1972
1973         Web Inspector: [Elements] Unable to "Edit as HTML" XHTML/SVG documents.
1974         https://bugs.webkit.org/show_bug.cgi?id=113290
1975
1976         Reviewed by Pavel Feldman.
1977
1978         DOMPatchSupport has been slightly augmented to handle XML (XHTML and SVG) documents.
1979
1980         Test: inspector/elements/set-outer-html-for-xhtml.xhtml
1981
1982         * inspector/DOMPatchSupport.cpp:
1983         (WebCore::DOMPatchSupport::patchDocument):
1984         (WebCore::DOMPatchSupport::patchNode):
1985         * inspector/InspectorDOMAgent.cpp:
1986         (WebCore::InspectorDOMAgent::setOuterHTML): Let HTML, XHTML, and SVG documents through.
1987
1988 2013-03-26  Hajime Morrita  <morrita@google.com>
1989
1990         https://bugs.webkit.org/show_bug.cgi?id=113164
1991         Custom Elements: readyCallback should be called for outerHTML and insertAdjecentHTML
1992
1993         These APIs also create new elements thus should have V8DeliverCustomElementCallbacks attribute.
1994
1995         Reviewed by Dimitri Glazkov.
1996
1997         Test: Updated lifecycle-ready-creation-api.html.
1998
1999         * html/HTMLElement.idl:
2000
2001 2013-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
2002
2003         Unreviewed. WebInspector: remove unnecessary method.
2004
2005         * inspector/front-end/OverviewGrid.js:
2006         (WebInspector.OverviewGrid.Window):
2007
2008 2013-03-22  Ilya Tikhonovsky  <loislo@chromium.org>
2009
2010         Web Inspector: Flame Chart. Scroll dividers together with underlying chart.
2011         http://bugs.webkit.org/show_bug.cgi?id=113080
2012
2013         Reviewed by Pavel Feldman.
2014
2015         * inspector/front-end/FlameChart.js:
2016         (WebInspector.FlameChart.Calculator.prototype.grandMinimumBoundary):
2017         (WebInspector.FlameChart.prototype._canvasDragging):
2018         * inspector/front-end/TimelineGrid.js:
2019         (WebInspector.TimelineGrid.prototype.updateDividers):
2020
2021 2013-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
2022
2023         Web Inspector: Flame Chart. Scroll dividers together with underlying chart.
2024         http://bugs.webkit.org/show_bug.cgi?id=113080
2025
2026         Reviewed by Pavel Feldman.
2027
2028         The only thing we need to do for this feature is to automatically adjust
2029         the initial offset for the dividers. I measured the speed of scrolling and found
2030         no difference. The speed is about 16ms so we have 60fps on dragging.
2031
2032         * inspector/front-end/FlameChart.js:
2033         (WebInspector.FlameChart.Calculator.prototype.grandMinimumBoundary):
2034         (WebInspector.FlameChart.OverviewCalculator.prototype.grandMinimumBoundary):
2035         (WebInspector.FlameChart.prototype._canvasDragging):
2036         * inspector/front-end/NetworkPanel.js:
2037         (WebInspector.NetworkBaseCalculator.prototype.grandMinimumBoundary):
2038         * inspector/front-end/TimelineGrid.js:
2039         (WebInspector.TimelineGrid.prototype.updateDividers):
2040         (WebInspector.TimelineGrid.Calculator.prototype.grandMinimumBoundary):
2041         * inspector/front-end/TimelineOverviewPane.js:
2042         (WebInspector.TimelineOverviewCalculator.prototype.grandMinimumBoundary):
2043         * inspector/front-end/TimelinePanel.js:
2044         (WebInspector.TimelineCalculator.prototype.grandMinimumBoundary):
2045
2046 2013-03-26  Mike West  <mkwst@chromium.org>
2047
2048         CSP 1.1: Experiment with 'base-uri' directive.
2049         https://bugs.webkit.org/show_bug.cgi?id=113307
2050
2051         Reviewed by Jochen Eisinger.
2052
2053         The 'base-uri' directive was introduced[1] as an experimental directive
2054         in CSP 1.1 after a bit of discussion[2][3]. The exact semantics will
2055         likely change, but it would be good for us to get some implementation
2056         experience with the API as currently specified, and to allow folks to
2057         play with the implementation to determine whether it meets the
2058         requirements the way we think it might.
2059
2060         This patch is a first pass at that implementation: it will have no
2061         effect on ports that haven't enabled the CSP_NEXT flag.
2062
2063         [1]: https://dvcs.w3.org/hg/content-security-policy/rev/4b89c246ea16
2064         [2]: http://lists.w3.org/Archives/Public/public-webappsec/2012Oct/0022.html
2065         [3]: http://lists.w3.org/Archives/Public/public-webappsec/2013Feb/0074.html
2066
2067         Tests: http/tests/security/contentSecurityPolicy/1.1/base-uri-allow.html
2068                http/tests/security/contentSecurityPolicy/1.1/base-uri-deny.html
2069
2070         * dom/Document.cpp:
2071         (WebCore::Document::processBaseElement):
2072             Check that the new base URI is allowed by CSP before using it as
2073             the document's base URI.
2074         * page/ContentSecurityPolicy.cpp:
2075             Add a constant for the new directive name (and, as a drive-by, split
2076             the list into CSP 1.0 and CSP 1.1 for clarity).
2077         (CSPDirectiveList):
2078             Add a property to hold the base URI policy directive value.
2079         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
2080             Customize the error message iff we're dealing with 'base-uri'.
2081         (WebCore::CSPDirectiveList::allowBaseURI):
2082             Check the given URI against the 'base-uri' directive's value,
2083             exactly as we do for every other source-list type of directive.
2084         (WebCore::CSPDirectiveList::addDirective):
2085             Accept 'base-uri' as a valid directive iff CSP_NEXT is set, and
2086             the embedder has opted-in via the runtime flag.
2087         (WebCore::ContentSecurityPolicy::allowBaseURI):
2088             Expose an API method on ContentSecurityPolicy to check URIs against
2089             the 'base-uri' directive's value.
2090
2091 2013-03-26  Arvid Nilsson  <anilsson@rim.com>
2092
2093         [BlackBerry] Main frame fixed divs not positioned correctly
2094         https://bugs.webkit.org/show_bug.cgi?id=112889
2095
2096         Reviewed by Carlos Garcia Campos.
2097
2098         PR 283363
2099
2100         This was a regression from bug #112806. It caused main frame fixed
2101         handling to enter the iframe/scrollable div code path in LayerRenderer.
2102
2103         Fixed by not setting the container for fixed flag on the main frame,
2104         the LayerRenderer expects this flag to be set only on non-mainframe
2105         containers.
2106
2107         Only manually testable.
2108
2109         * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.cpp:
2110         (WebCore::scrollLayerForFrame):
2111         (WebCore):
2112         (WebCore::ScrollingCoordinatorBlackBerry::setLayerIsContainerForFixedPositionLayers):
2113         (WebCore::ScrollingCoordinatorBlackBerry::setLayerIsFixedToContainerLayer):
2114
2115 2013-03-26  Christophe Dumez  <ch.dumez@sisa.samsung.com>
2116
2117         FormData::deepCopy() could use Vector::uncheckedAppend()
2118         https://bugs.webkit.org/show_bug.cgi?id=113309
2119
2120         Reviewed by Kenneth Rohde Christiansen.
2121
2122         FormData::deepCopy() calls reserveInitialCapacity() on the Vector but then uses the
2123         regular append() method. This patch switches to using uncheckedAppend() method
2124         instead to bypass capacity checks as we already know it is sufficient.
2125
2126         No new tests, no behavior change.
2127
2128         * platform/network/FormData.cpp:
2129         (WebCore::FormData::deepCopy):
2130
2131 2013-03-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2132
2133         Unreviewed, rolling out r146879.
2134         http://trac.webkit.org/changeset/146879
2135         https://bugs.webkit.org/show_bug.cgi?id=113312
2136
2137         Multiple layout test crashes in
2138         WebCore::RenderListItem::updateListMarkerNumbers (Requested by
2139         yurys on #webkit).
2140
2141         * dom/Node.cpp:
2142         * dom/Node.h:
2143         (Node):
2144         * dom/NodeTraversal.cpp:
2145         * dom/NodeTraversal.h:
2146         (ElementTraversal):
2147         (NodeTraversal):
2148         * html/HTMLLIElement.cpp:
2149         (WebCore::HTMLLIElement::attach):
2150         * html/HTMLOListElement.cpp:
2151         (WebCore::HTMLOListElement::updateItemValues):
2152         (WebCore::HTMLOListElement::recalculateItemCount):
2153         * rendering/RenderCounter.cpp:
2154         (WebCore::previousInPreOrder):
2155         (WebCore::previousSiblingOrParent):
2156         (WebCore::parentElement):
2157         (WebCore::nextInPreOrder):
2158         * rendering/RenderListItem.cpp:
2159         (WebCore::enclosingList):
2160         (WebCore::RenderListItem::nextListItem):
2161         (WebCore::previousListItem):
2162         (WebCore::RenderListItem::calcValue):
2163         (WebCore::RenderListItem::explicitValueChanged):
2164         (WebCore::previousOrNextItem):
2165         (WebCore::RenderListItem::updateListMarkerNumbers):
2166         * rendering/RenderListItem.h:
2167         (RenderListItem):
2168
2169 2013-03-26  Hajime Morrita  <morrita@google.com>
2170
2171         remoeveAllEventListeners() should be called to shadow trees
2172         https://bugs.webkit.org/show_bug.cgi?id=113037
2173
2174         Reviewed by Dimitri Glazkov.
2175
2176         Document::removeAllEventListeners() doesn't traverse shadow tree, but we should.
2177         This change override Element::removeAllEventListeners() so that it cleans its shadow trees up.
2178
2179         Test: fast/dom/shadow/shadow-tree-listener-clearance.html
2180
2181         * dom/Element.cpp:
2182         (WebCore::Element::removeAllEventListeners):
2183         (WebCore):
2184         * dom/Element.h:
2185         (Element):
2186         * dom/ElementShadow.cpp:
2187         (WebCore::ElementShadow::removeAllEventListeners): Added.
2188         (WebCore):
2189         * dom/ElementShadow.h:
2190         (ElementShadow):
2191
2192 2013-03-26  Andrei Bucur  <abucur@adobe.com>
2193
2194         Use DOM ordering for list counts
2195         https://bugs.webkit.org/show_bug.cgi?id=110352
2196
2197         Reviewed by Elliott Sprehn.
2198
2199         Currently the list items ordering is made by traversing the render tree. This gives bad results for:
2200         - list items flown inside regions because they are not rendered as descendants of their DOM list ancestors.
2201         - list items matched to insertion points inside a shadow tree. The insertion point may be a child of a
2202         list so the numbering gets broken.
2203
2204         To implement correct DOM ordering I've taken into account the fact that pseudo-elements can have display: list-item
2205         so they should be included when traversing the DOM tree. I've added helper methods on the NodeTraversal
2206         namespace that should allow easily traversing the tree including the pseudo-elements (e.g. firstChildWithPseudo
2207         for an element with pseudo-before will return the before PseudoElement). Using these helper methods I've implemented
2208         pre-order traversal methods aware of the pseudo-elements.
2209         An effect of this change is how the list items inside shadow tree update their counting. With the patch, if there's
2210         no <ol> or <ul> element on the ancestor chain of a <li> element to the shadow root, the list node will be considered the
2211         first parent of the <li> or the shadow root if there is no ancestor.
2212         The RenderListItem class now makes use of this new method of traversal, replacing the one based on the render tree.
2213         To simplify the CSS counters implementation, I've changed the traversal functions inside RenderCounter to also make use
2214         of this method. The CSS counters and the list items now have the same traversal algorithm.
2215
2216         In later patches I'll add tests that should cover the regions and shadow DOM use cases.
2217         Tests bug for shadow DOM: https://bugs.webkit.org/show_bug.cgi?id=113193
2218         Tests bug for regions: https://bugs.webkit.org/show_bug.cgi?id=103975
2219
2220         Tests: no new tests is this patch; added the correct expectations for fast/lists/positioned-count-crash.html
2221         and fast/dom/shadow/shadow-and-list-elements.html
2222
2223         * dom/Node.cpp:
2224         (WebCore::Node::pseudoAwarePreviousSibling):
2225         (WebCore):
2226         (WebCore::Node::pseudoAwareNextSibling):
2227         (WebCore::Node::pseudoAwareFirstChild):
2228         (WebCore::Node::pseudoAwareLastChild):
2229         * dom/Node.h:
2230         (Node):
2231         * dom/NodeTraversal.cpp:
2232         (WebCore):
2233         (WebCore::NodeTraversal::previousIncludingPseudo):
2234         (NodeTraversal):
2235         (WebCore::NodeTraversal::nextIncludingPseudo):
2236         (WebCore::NodeTraversal::nextIncludingPseudoSkippingChildren):
2237         * dom/NodeTraversal.h:
2238         (ElementTraversal):
2239         (NodeTraversal):
2240         (WebCore::ElementTraversal::previousIncludingPseudo):
2241         (WebCore::ElementTraversal::nextIncludingPseudo):
2242         (WebCore::ElementTraversal::nextIncludingPseudoSkippingChildren):
2243         (WebCore::ElementTraversal::pseudoAwarePreviousSibling):
2244         * html/HTMLLIElement.cpp:
2245         (WebCore::HTMLLIElement::attach):
2246         * html/HTMLOListElement.cpp:
2247         (WebCore::HTMLOListElement::updateItemValues):
2248         (WebCore::HTMLOListElement::recalculateItemCount):
2249         * rendering/RenderCounter.cpp:
2250         (WebCore::previousInPreOrder):
2251         (WebCore::previousSiblingOrParent):
2252         (WebCore::parentElement):
2253         (WebCore::nextInPreOrder):
2254         * rendering/RenderListItem.cpp:
2255         (WebCore):
2256         (WebCore::enclosingList):
2257         (WebCore::RenderListItem::nextListItem):
2258         (WebCore::previousListItem):
2259         (WebCore::RenderListItem::calcValue):
2260         (WebCore::RenderListItem::explicitValueChanged):
2261         (WebCore::previousOrNextItem):
2262         (WebCore::RenderListItem::updateListMarkerNumbers):
2263         * rendering/RenderListItem.h:
2264         (RenderListItem):
2265
2266 2013-03-26  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2267
2268         [Qt] Poor rounding in GraphicsContext::drawLineForText
2269         https://bugs.webkit.org/show_bug.cgi?id=113301
2270
2271         Reviewed by Jocelyn Turcotte.
2272
2273         Round the position of the line decoration, so lines on subpixel
2274         coordinates are not always rounded up.
2275
2276         * platform/graphics/qt/GraphicsContextQt.cpp:
2277         (WebCore::GraphicsContext::drawLineForText):
2278
2279 2013-03-26  Vsevolod Vlasov  <vsevik@chromium.org>
2280
2281         Web Inspector: Decorations in several consecutive lines are not moved correctly in DTE.
2282         https://bugs.webkit.org/show_bug.cgi?id=113296
2283
2284         Reviewed by Pavel Feldman.
2285
2286         Separated removing and adding decorations so that moved decorations are not removed when next line is processed.
2287
2288         * inspector/front-end/DefaultTextEditor.js:
2289         (WebInspector.TextEditorGutterPanel.prototype.textChanged):
2290
2291 2013-03-26  Yury Semikhatsky  <yurys@chromium.org>
2292
2293         Remove references to non-chromium entries from WebCore.gypi (part 2)
2294         https://bugs.webkit.org/show_bug.cgi?id=103124
2295
2296         Reviewed by Pavel Feldman.
2297
2298         * WebCore.gypi: removed unused references to gtk, cf, win and mac
2299
2300 2013-03-26  Sheriff Bot  <webkit.review.bot@gmail.com>
2301
2302         Unreviewed, rolling out r146767.
2303         http://trac.webkit.org/changeset/146767
2304         https://bugs.webkit.org/show_bug.cgi?id=113295
2305
2306         Rolling out until nicer fonts / sizes are chosen (Requested by
2307         pfeldman on #webkit).
2308
2309         * inspector/front-end/dataGrid.css:
2310         (.data-grid table):
2311         (.data-grid td):
2312         * inspector/front-end/inspector.css:
2313         (.toolbar-label):
2314         (body.show-toolbar-icons .toolbar-label):
2315         (.console-message .bubble):
2316         (li .status .bubble):
2317         (.source-frame-breakpoint-message):
2318         (.soft-context-menu):
2319         (.drawer-header-close-button):
2320         * inspector/front-end/inspectorCommon.css:
2321         (body):
2322         * inspector/front-end/networkLogView.css:
2323         (.network-log-grid.data-grid td):
2324         (.network-log-grid.data-grid.small td):
2325         * inspector/front-end/tabbedPane.css:
2326         (.tabbed-pane-header-tab):
2327         (.tabbed-pane-header-tab-close-button):
2328         * inspector/front-end/timelinePanel.css:
2329         (.timeline-tree-item .count):
2330         (.timeline-records-stats, .storage-application-cache-status, .storage-application-cache-connectivity):
2331         (.memory-counter-sidebar-info):
2332         (.memory-counter-value):
2333
2334 2013-03-26  Arpita Bahuguna  <a.bah@samsung.com>
2335
2336         Unable to insert a paragraph in between some text whose previous sibling is a non-editable block.
2337         https://bugs.webkit.org/show_bug.cgi?id=113007
2338
2339         Reviewed by Ryosuke Niwa.
2340
2341         Unable to insert a line break in between a text that follows a
2342         non-editable block but is itself contained within an editable
2343         block.
2344
2345         While comparing the positions from the start block till the
2346         insertion position, we should ignore the nodes that do not
2347         generate a visiblePosition for the position before the node.
2348         This ultimately results in an assert within comparePositions().
2349
2350         For this case, the firstChild of the start block is a text
2351         node with no renderer which would thus not generate a candidate
2352         position for itself.
2353         There is also no candidate previous to it, and since
2354         the position after it lies within a different editable element (root),
2355         no candidate after it as well.
2356         Such a point will thus return a null visiblePosition.
2357
2358         Test: editing/inserting/insert-paragraph-between-text.html
2359
2360         * editing/InsertParagraphSeparatorCommand.cpp:
2361         (WebCore::InsertParagraphSeparatorCommand::doApply):
2362         Added a check to verify the generated visiblePosition (for the
2363         position before the node) prior to carrying out a comparison with
2364         the insertion point.
2365
2366 2013-03-26  Ilya Tikhonovsky  <loislo@chromium.org>
2367
2368         Web Inspector: OverviewGrid. Dragged window may change its width due to accumulating rounding error.
2369         https://bugs.webkit.org/show_bug.cgi?id=113138
2370
2371         Reviewed by Pavel Feldman.
2372
2373         The old version had problem with rounding because it recalculates the window size on each event.
2374         The new version just calculates the dragging delta and moves the window
2375         to the new position based on the initial values and the delta.
2376
2377         * inspector/front-end/OverviewGrid.js:
2378         (WebInspector.OverviewGrid.Window.prototype._startWindowDragging):
2379         (WebInspector.OverviewGrid.Window.prototype._windowDragging):
2380         (WebInspector.OverviewGrid.Window.prototype._onMouseWheel):
2381
2382 2013-03-26  Kent Tamura  <tkent@chromium.org>
2383
2384         Rename HTMLInputElement::isIndeterminate to Element::shouldAppearIndeterminate
2385         https://bugs.webkit.org/show_bug.cgi?id=113264
2386
2387         Reviewed by Kentaro Hara.
2388
2389         HTMLInputElement had indeterminate() and isIndeterminate(). It's very
2390         confusing.
2391
2392         Because indeterminate is a public DOM function and isIndeterminate is
2393         for CSS and rendering, we rename isIndetermiante to
2394         shouldAppearIndeterminate. Also, HTMLProgressElement, which support
2395         :indeterminate pseudo class, should follow it. We add
2396         shouldAppearIndeterminate to Element.
2397
2398         No new tests. Just a refactoring.
2399
2400         * dom/Element.cpp:
2401         (WebCore::Element::shouldAppearIndeterminate): Added. Returns false.
2402         * dom/Element.h:
2403         (Element): Declare shouldAppearIndeterminate.
2404         * html/HTMLInputElement.cpp:
2405         (WebCore::HTMLInputElement::shouldAppearIndeterminate):
2406         Renamed from isIndeterminate.
2407         * html/HTMLInputElement.h:
2408         (HTMLInputElement): Rename isIndeterminate to shouldAppearIndeterminate,
2409         and overrides Element::shouldAppearIndeterminate.
2410         * html/HTMLProgressElement.cpp:
2411         (WebCore::HTMLProgressElement::shouldAppearIndeterminate): Added.
2412         * html/HTMLProgressElement.h: Add shouldAppearIndeterminate.
2413
2414         * accessibility/AccessibilityNodeObject.cpp:
2415         (WebCore::AccessibilityNodeObject::isIndeterminate):
2416         Use shouldAppearIndeterminate.
2417         * css/SelectorChecker.cpp:
2418         (WebCore::SelectorChecker::checkOne): Ditto.
2419         * css/StyleResolver.cpp:
2420         (WebCore::StyleResolver::canShareStyleWithControl): Ditto.
2421         * rendering/RenderTheme.cpp:
2422         (WebCore::RenderTheme::isIndeterminate): Ditto.
2423
2424 2013-03-26  Pan Deng  <pan.deng@intel.com>
2425
2426         Web Inspector: [FlameChart] Make function bar highlighted consistent with cursor.
2427         https://bugs.webkit.org/show_bug.cgi?id=113266.
2428
2429         Reviewed by Vsevolod Vlasov.
2430
2431         In Flamechart, the highlighted function bar is not consistent with cursor sometimes, 
2432         reason is that time range that converted from cursor position is truncated by floor. 
2433         Actually float value is expected to compare with function startTime and duration.
2434
2435         No new tests.
2436
2437         * inspector/front-end/FlameChart.js:
2438         (WebInspector.FlameChart.prototype._coordinatesToNodeIndex): Remove floor
2439
2440 2013-03-26  Mihnea Ovidenie  <mihnea@adobe.com>
2441
2442         [CSSRegions]: Crash accessing offsetParent for contentNodes inside a flow thread
2443         https://bugs.webkit.org/show_bug.cgi?id=112730
2444
2445         Reviewed by Levi Weintraub.
2446
2447         When computing the offsetParent for an element inside a flow thread, do not
2448         let the algorithm process past the flow thread boundaries, until we figure out
2449         the proper behavior. When reaching the flow thread, offsetParent will return 0,
2450         thus preventing the assert while calling toElement inside Element::offsetParent.
2451
2452         The attached test sets the ground work and will be changed to match the right behavior.
2453         For now, it makes sure we do not crash or return HTMLDocument as offsetParent for
2454         elements inside the flow thread.
2455
2456         Test: fast/regions/offsetParent-in-flow-thread.html
2457
2458         * rendering/RenderObject.cpp:
2459         (WebCore::RenderObject::offsetParent):
2460
2461 2013-03-26  Dominik Röttsches  <dominik.rottsches@intel.com>
2462
2463         Remove HarfBuzzShaperBase
2464         https://bugs.webkit.org/show_bug.cgi?id=112087
2465
2466         Reviewed by Martin Robinson.
2467
2468         Folding HarfBuzzShaperBase into HarfBuzzShaper since
2469         there is no harfbuzz-old vs. harfbuzz-ng distinction anymore.
2470
2471         No new tests, no change in behavior.
2472
2473         * GNUmakefile.list.am: Removing HarfBuzzShaperBase.*
2474         * PlatformEfl.cmake: Removing HarfBuzzShaperBase.*
2475         * WebCore.gypi: Removing HarfBuzzShaperBase.*
2476         * platform/graphics/harfbuzz/HarfBuzzShaper.cpp: Folding base class members and methods into HarfBuzzShaper.
2477         (WebCore::HarfBuzzShaper::HarfBuzzShaper):
2478         (WebCore::normalizeSpacesAndMirrorChars):
2479         (WebCore):
2480         (WebCore::HarfBuzzShaper::setNormalizedBuffer):
2481         (WebCore::HarfBuzzShaper::isWordEnd):
2482         (WebCore::HarfBuzzShaper::determineWordBreakSpacing):
2483         (WebCore::HarfBuzzShaper::setPadding):
2484         * platform/graphics/harfbuzz/HarfBuzzShaper.h: Folding base class members and methods into HarfBuzzShaper.
2485         (HarfBuzzShaper):
2486         (WebCore::HarfBuzzShaper::isCodepointSpace):
2487         * platform/graphics/harfbuzz/HarfBuzzShaperBase.cpp: Removed.
2488         * platform/graphics/harfbuzz/HarfBuzzShaperBase.h: Removed.
2489
2490 2013-03-22  Hajime Morrita  <morrita@google.com>
2491
2492         Listening touch events on ShadowRoot can crash.
2493         https://bugs.webkit.org/show_bug.cgi?id=113035
2494
2495         Reviewed by Kentaro Hara.
2496
2497         TreeScope destructor clears a document reference on ShadowRoot but
2498         destructors of ContainerNode and Node assumed it being available
2499         and tried to access it for some cleanup purposes.
2500
2501         This change extracts such cleanup to Node::willBeDeletedFrom() and
2502         calls it from ShadowRoot dtor before the document reference gets cleared.
2503
2504         Test: fast/dom/shadow/shadow-root-touch-listener-crash.html
2505
2506         * dom/ContainerNode.cpp:
2507         (WebCore::ContainerNode::~ContainerNode): Adopted willBeDeletedFrom()
2508         * dom/Node.cpp:
2509         (WebCore::Node::~Node): Adopted willBeDeletedFrom()
2510         (WebCore::Node::willBeDeletedFrom): Extracted from Node and ContainerNode
2511         (WebCore):
2512         * dom/Node.h:
2513         * dom/ShadowRoot.cpp:
2514         (WebCore::ShadowRoot::~ShadowRoot): Adopted willBeDeletedFrom()
2515
2516 2013-03-25  Hajime Morrita  <morrita@google.com>
2517
2518         Custom Elements Refactoring: The name V8CustomElement is confusing.
2519         https://bugs.webkit.org/show_bug.cgi?id=113165
2520
2521         Reviewed by Kent Tamura.
2522
2523         This change moves functions from V8CustomElement to CustomElementHelpers and
2524         removes V8CustomElement. V8CustomElement is just a heritage of old design
2525         and no longer makes sense.
2526
2527         No new tests. No behavior change.
2528
2529         * WebCore.gypi:
2530         * bindings/v8/CustomElementHelpers.cpp:
2531         (WebCore::CustomElementHelpers::createWrapper):
2532         (WebCore):
2533         * bindings/v8/CustomElementHelpers.h:
2534         (CustomElementHelpers):
2535         (WebCore::CustomElementHelpers::wrap):
2536         (WebCore):
2537         (WebCore::CustomElementHelpers::constructorOf):
2538         * bindings/v8/V8CustomElement.cpp: Removed.
2539         * bindings/v8/V8CustomElement.h: Removed.
2540         * bindings/v8/custom/V8CustomElementConstructorCustom.cpp:
2541         (WebCore::V8CustomElementConstructor::callAsFunctionCallback):
2542         * dom/make_names.pl:
2543         (printWrapperFactoryCppFile):
2544
2545 2013-03-25  Eugene Klyuchnikov  <eustas@chromium.org>
2546
2547         Web Inspector: [Timeline] Records sidebar is clipped.
2548         https://bugs.webkit.org/show_bug.cgi?id=113177
2549
2550         Reviewed by Pavel Feldman.
2551
2552         Analysis: depending on CSS injection order sidebar rule that overwrites
2553         "bottom" property may win.
2554
2555         Fix: make timeline-specific rule "important".
2556
2557         * inspector/front-end/timelinePanel.css:
2558         (.timeline .sidebar): Make "bottom" value "important".
2559
2560 2013-03-25  Kent Tamura  <tkent@chromium.org>
2561
2562         Rename ENABLE_INPUT_TYPE_DATETIME
2563         https://bugs.webkit.org/show_bug.cgi?id=113254
2564
2565         Reviewed by Kentaro Hara.
2566
2567         Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE.
2568         Actually I'd like to remove the code, but we shouldn't remove it yet
2569         because we shipped products with it on some platforms.
2570
2571         * Configurations/FeatureDefines.xcconfig:
2572         * bindings/generic/RuntimeEnabledFeatures.cpp:
2573         (WebCore):
2574         * bindings/generic/RuntimeEnabledFeatures.h:
2575         (RuntimeEnabledFeatures):
2576         * css/html.css:
2577         * html/DateTimeInputType.cpp:
2578         * html/DateTimeInputType.h:
2579         * html/InputType.cpp:
2580         (WebCore::createInputTypeFactoryMap):
2581
2582 2013-03-25  Timothy Hatcher  <timothy@apple.com>
2583
2584         Make the Web Inspector console work in strict mode with JavaScriptCore.
2585
2586         https://webkit.org/b/65829
2587         rdar://problem/11271238
2588
2589         Reviewed by Oliver Hunt.
2590
2591         * bindings/js/JSInjectedScriptHostCustom.cpp:
2592         (WebCore::JSInjectedScriptHost::evaluate):
2593         Return the evalFunction directly.
2594
2595         * inspector/InjectedScriptHost.h:
2596         (WebCore::InjectedScriptHost::evaluateReturnsEvalFunction):
2597         Added. Return true on JSC and false on V8.
2598
2599         * inspector/InjectedScriptHost.idl:
2600         Added evaluateReturnsEvalFunction and change evaluate to an attribute on JSC.
2601
2602         * inspector/InjectedScriptSource.js:
2603         (InjectedScript.prototype._evaluateOn): Change from using 'with' statements to creating
2604         a closure that evaluates the expression. The command line APIs are passed as parameters
2605         to the closure so they are in scope but not injected. This allows the code evaluated in
2606         the console to stay in strict mode (if is was already set), or to get strict mode by
2607         prefixing expressions with 'use strict';.
2608
2609 2013-03-25  Tony Chang  <tony@chromium.org>
2610
2611         Image alt text not included in plain-text version when copying
2612         https://bugs.webkit.org/show_bug.cgi?id=11200
2613
2614         Reviewed by Ryosuke Niwa.
2615
2616         Add a setting to enable copying image alt text to the clipboard and drag and drop pasteboard.
2617         This setting is disabled by default, so each port can enable if they want to match IE10 and
2618         Firefox's behavior.
2619
2620         Test: editing/pasteboard/copy-image-with-alt-text.html
2621
2622         * editing/Editor.cpp:
2623         (WebCore::Editor::cut): Explicitly ask that the selection on the pasteboard as being for the clipboard.
2624         (WebCore::Editor::copy): Explicitly ask that the selection on the pasteboard as being for the clipboard.
2625         (WebCore::Editor::selectedText): Add a private version of selectedText() that can choose between having image alt text or not.
2626         (WebCore::Editor::selectedTextForClipboard): Ask for image alt text if the setting is enabled.
2627         * editing/Editor.h:
2628         * editing/TextIterator.cpp:
2629         (WebCore::TextIterator::TextIterator): Add a bool to keep track of whether or not to emit image alt text.
2630         (WebCore::TextIterator::handleReplacedElement): If there's alt text, point the iterator to it.
2631         * editing/TextIterator.h:
2632         (TextIterator):
2633         * editing/mac/EditorMac.mm:
2634         (WebCore::Editor::takeFindStringFromSelection): Use the same text as on the clipboard.
2635         (WebCore::Editor::writeSelectionToPasteboard): Don't include image alt text since this is
2636         used by Services.
2637         (WebCore::Editor::stringSelectionForPasteboard): Don't include image alt text since this is
2638         used by Services.
2639         * page/DragController.cpp:
2640         (WebCore::DragController::startDrag): Use image alt text (matches Firefox).
2641         * page/Settings.in: Add a setting that disables image alt text by default.
2642         * platform/Pasteboard.h:
2643         * platform/blackberry/PasteboardBlackBerry.cpp:
2644         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
2645         * platform/chromium/ClipboardChromium.cpp:
2646         (WebCore::ClipboardChromium::writeRange): Use clipboard text when writing ranges (used by d&d).
2647         * platform/chromium/PasteboardChromium.cpp:
2648         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
2649         * platform/efl/PasteboardEfl.cpp:
2650         (WebCore::Pasteboard::writeSelection): Update function param.
2651         * platform/gtk/ClipboardGtk.cpp:
2652         (WebCore::ClipboardGtk::writeRange): Use clipboard text when writing ranges (used by d&d).
2653         * platform/gtk/PasteboardGtk.cpp:
2654         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
2655         * platform/mac/ClipboardMac.mm:
2656         (WebCore::ClipboardMac::writeRange): Use clipboard text when writing ranges (used by d&d).
2657         * platform/mac/PasteboardMac.mm:
2658         (WebCore::Pasteboard::getStringSelection): Use ShouldSerializeSelectedTextForClipboard to determine whether the selected
2659         text is for the clipboard or not.
2660         (WebCore::Pasteboard::writeSelectionForTypes): Pass ShouldSerializeSelectedTextForClipboard through.
2661         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
2662         * platform/qt/ClipboardQt.cpp:
2663         (WebCore::ClipboardQt::writeRange): Use clipboard text when writing ranges (used by d&d).
2664         * platform/qt/PasteboardQt.cpp:
2665         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
2666         * platform/win/ClipboardWin.cpp:
2667         (WebCore::ClipboardWin::writeRange): Use clipboard text when writing ranges (used by d&d).
2668         * platform/win/PasteboardWin.cpp:
2669         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
2670         * platform/wince/PasteboardWinCE.cpp:
2671         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
2672         * platform/wx/PasteboardWx.cpp:
2673         (WebCore::Pasteboard::writeSelection): Add ShouldSerializeSelectedTextForClipboard parameter.
2674         * rendering/RenderImage.h:
2675         (WebCore::RenderImage::altText): Add a getter for the alt text.
2676
2677 2013-03-25  Dean Jackson  <dino@apple.com>
2678
2679         Remove autostart hashing code from WebCore
2680         https://bugs.webkit.org/show_bug.cgi?id=113242
2681
2682         Reviewed by Tim Horton.
2683
2684         Remove PlugInOriginHash and all the related build entries.
2685
2686         * CMakeLists.txt:
2687         * GNUmakefile.list.am:
2688         * Target.pri:
2689         * WebCore.gypi:
2690         * WebCore.vcproj/WebCore.vcproj:
2691         * WebCore.vcxproj/WebCore.vcxproj:
2692         * WebCore.vcxproj/WebCore.vcxproj.filters:
2693         * WebCore.xcodeproj/project.pbxproj:
2694         * html/HTMLPlugInImageElement.cpp:
2695         * plugins/PlugInOriginHash.cpp: Removed.
2696         * plugins/PlugInOriginHash.h: Removed.
2697
2698 2013-03-25  Roger Fong  <roger_fong@apple.com>
2699
2700         Unreviewed. Wrong place to enable RuntimeEnabledFeature for Windows.
2701
2702         * bindings/generic/RuntimeEnabledFeatures.cpp:
2703         (WebCore):
2704
2705 2013-03-25  James Robinson  <jamesr@chromium.org>
2706
2707         [chromium] Support GraphicsLayer::setContentsToSolidColor
2708         https://bugs.webkit.org/show_bug.cgi?id=104396
2709
2710         Reviewed by Adrienne Walker.
2711
2712         This enables and implements the GraphicsLayer::setContentsToSolidColor
2713         path for Chromium.
2714
2715         Tested by reftests in compositing/background-color/ and several other
2716         compositing/ tests.
2717
2718         * platform/graphics/GraphicsLayer.h:
2719         (WebCore::GraphicsLayer::supportsBackgroundColorContent):
2720         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2721         (WebCore::GraphicsLayerChromium::setContentsToSolidColor):
2722         (WebCore):
2723         * platform/graphics/chromium/GraphicsLayerChromium.h:
2724         (WebKit):
2725         (GraphicsLayerChromium):
2726
2727 2013-03-25  Victor Carbune  <vcarbune@chromium.org>
2728
2729         TextTrack Extension for WebVTT Regions
2730         https://bugs.webkit.org/show_bug.cgi?id=109820
2731
2732         Reviewed by Eric Carlson.
2733
2734         Implemented the TextTrackRegionList and extended TextTrack with
2735         methods required for proper interaction with TextTrackRegion objects.
2736
2737         Test: media/track/regions-webvtt/text-track-region-list.html
2738
2739         * WebCore.gypi: Added files for proper building of TextTrackRegionList.
2740         * html/track/TextTrack.cpp:
2741         (WebCore::TextTrack::TextTrack):
2742         (WebCore):
2743         (WebCore::TextTrack::ensureTextTrackRegionList): Method for creating a
2744         TextTrackRegionList associated with the current track, if it does exist
2745         already.
2746         (WebCore::TextTrack::regions): Getter for the regions object.
2747         (WebCore::TextTrack::addRegion): Method for adding a region.
2748         (WebCore::TextTrack::removeRegion): Method for removing a region.
2749         * html/track/TextTrack.h:
2750         (WebCore):
2751         (TextTrack):
2752         * html/track/TextTrack.idl: Added methods specific for region handling.
2753         * html/track/TextTrackRegion.cpp:
2754         (WebCore::TextTrackRegion::TextTrackRegion): Initialized the track member variable.
2755         (WebCore::TextTrackRegion::setTrack): Added internal setter for the track attribute.
2756         (WebCore):
2757         (WebCore::TextTrackRegion::updateParametersFromRegion): Method to copy the parameters
2758         from a different region object.
2759         * html/track/TextTrackRegion.h: Added track member variable and copy method.
2760         (WebCore::TextTrackRegion::track): Getter retrieves now the member variable.
2761         (TextTrackRegion):
2762         * html/track/TextTrackRegionList.cpp: Implemented methods required by the IDL.
2763         (WebCore):
2764         (WebCore::TextTrackRegionList::TextTrackRegionList):
2765         (WebCore::TextTrackRegionList::length):
2766         (WebCore::TextTrackRegionList::item):
2767         (WebCore::TextTrackRegionList::getRegionById):
2768         (WebCore::TextTrackRegionList::add):
2769         (WebCore::TextTrackRegionList::remove):
2770         (WebCore::TextTrackRegionList::clear):
2771         * html/track/TextTrackRegionList.h:
2772         (WebCore):
2773         (TextTrackRegionList):
2774         (WebCore::TextTrackRegionList::create):
2775         (WebCore::TextTrackRegionList::~TextTrackRegionList):
2776         * html/track/TextTrackRegionList.idl: IDL defined by the specification.
2777
2778 2013-03-25  Dean Jackson  <dino@apple.com>
2779
2780         Cleanup plugin snapshotting autostart decision making
2781         https://bugs.webkit.org/show_bug.cgi?id=113231
2782
2783         Reviewed by Tim Horton.
2784
2785         Move the code that creates a hash of plugin origin info
2786         out of WebCore. All WebCore needs to do now is simply ask its
2787         host layer whether or not a tuple of (pluginOrigin, pageOrigin, mimeType)
2788         should autostart or not.
2789
2790         As a drive-by, the code in subframeLoaderWillCreatePlugIn was not quite
2791         restarting properly when the displayState was Restarting or
2792         RestartingWithPendingMouseClick. It still worked most of the time, but usually
2793         because the code ran soon after a mouse click. Now it should be explicit and
2794         also allowed us to be more clear about snapshotting at the end of the method.
2795
2796         * html/HTMLPlugInElement.h: No more pluginOriginHash().
2797         * html/HTMLPlugInImageElement.cpp:
2798         (WebCore::addPlugInsFromNodeListMatchingPlugInOrigin): Change signature to accept the tuple
2799             described above, and compare strings rather than hashes.
2800         (WebCore::HTMLPlugInImageElement::userDidClickSnapshot): Tell host layer the origin
2801             info rather than hash info.
2802         (WebCore::HTMLPlugInImageElement::subframeLoaderWillCreatePlugIn): Remember the url that
2803             the plugin was loaded from. Make some of the logging messages more clear. Test for
2804             plugin and page origin rather than hash.
2805         * html/HTMLPlugInImageElement.h:
2806         (WebCore::HTMLPlugInImageElement::loadedUrl): New loadedURL member function.
2807         * page/PlugInClient.h:
2808         (PlugInClient): Change signature of virtual class to accept origin and mimeType info
2809             rather than hash.
2810
2811 2013-03-25  Sheriff Bot  <webkit.review.bot@gmail.com>
2812
2813         Unreviewed, rolling out r146793.
2814         http://trac.webkit.org/changeset/146793
2815         https://bugs.webkit.org/show_bug.cgi?id=113248
2816
2817         Fix did not work (Requested by rfong on #webkit).
2818
2819         * bindings/scripts/preprocessor.pm:
2820         (applyPreprocessor):
2821
2822 2013-03-25  Brandon Jones  <bajones@google.com>
2823
2824         WEBGL_compressed_texture_pvrtc needs implementation
2825         https://bugs.webkit.org/show_bug.cgi?id=110497
2826
2827         Reviewed by Kenneth Russell.
2828
2829         Test: webgl/conformance/extensions/webgl-compressed-texture-pvrtc.html
2830
2831         Exposes the WEBGL_compressed_texture_pvrtc extension, but is unverified since no desktop hardware supports
2832         the format that I am aware of. Should enable mobile ports to expose the format, however.
2833
2834         * CMakeLists.txt:
2835         * DerivedSources.make:
2836         * DerivedSources.pri:
2837         * GNUmakefile.list.am:
2838         * Target.pri:
2839         * WebCore.gypi:
2840         * WebCore.xcodeproj/project.pbxproj:
2841         * bindings/js/JSWebGLRenderingContextCustom.cpp:
2842         (WebCore::toJS):
2843         * bindings/v8/custom/V8WebGLRenderingContextCustom.cpp:
2844         (WebCore::toV8Object):
2845         * html/canvas/WebGLCompressedTexturePVRTC.cpp: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
2846         (WebCore):
2847         (WebCore::WebGLCompressedTexturePVRTC::WebGLCompressedTexturePVRTC):
2848         (WebCore::WebGLCompressedTexturePVRTC::~WebGLCompressedTexturePVRTC):
2849         (WebCore::WebGLCompressedTexturePVRTC::getName):
2850         (WebCore::WebGLCompressedTexturePVRTC::create):
2851         (WebCore::WebGLCompressedTexturePVRTC::supported):
2852         * html/canvas/WebGLCompressedTexturePVRTC.h: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
2853         (WebCore):
2854         (WebGLCompressedTexturePVRTC):
2855         * html/canvas/WebGLCompressedTexturePVRTC.idl: Copied from Source/WebCore/html/canvas/WebGLExtension.h.
2856         * html/canvas/WebGLExtension.h:
2857         * html/canvas/WebGLRenderingContext.cpp:
2858         (WebCore):
2859         (WebCore::WebGLRenderingContext::paintRenderingResultsToCanvas):
2860         (WebCore::WebGLRenderingContext::getExtension):
2861         (WebCore::WebGLRenderingContext::getSupportedExtensions):
2862         (WebCore::WebGLRenderingContext::validateCompressedTexFuncData):
2863         * html/canvas/WebGLRenderingContext.h:
2864         (WebCore):
2865         (WebGLRenderingContext):
2866
2867 2013-03-25  Roger Fong  <roger_fong@apple.com>
2868
2869         Enable CSS_REGIONS and CSS_EXCLUSIONS.
2870         https://bugs.webkit.org/show_bug.cgi?id=87519
2871
2872         Reviewed by Timothy Horton.
2873
2874         * bindings/generic/RuntimeEnabledFeatures.cpp:
2875         (WebCore):
2876
2877 2013-03-25  Mikhail Pozdnyakov  <mikhail.pozdnyakov@intel.com>
2878
2879         Remove unused code from Frame class destructor
2880         https://bugs.webkit.org/show_bug.cgi?id=113181
2881
2882         Reviewed by Alexey Proskuryakov.
2883
2884         No new tests. No new functionality.
2885
2886         * page/Frame.cpp:
2887         (WebCore::Frame::~Frame):
2888
2889             Removed the code which could never have been executed
2890             as m_view had been set to '0'.
2891
2892 2013-03-25  Eric Seidel  <eric@webkit.org>
2893
2894         Incorrect parsing due to hash collision
2895         https://bugs.webkit.org/show_bug.cgi?id=113235
2896
2897         Reviewed by Adam Barth.
2898
2899         Test: fast/parser/tag-hash-collision.html
2900
2901         * html/parser/HTMLIdentifier.cpp:
2902         (WebCore::HTMLIdentifier::findIndex):
2903
2904 2013-03-25  Adenilson Cavalcanti  <cavalcantii@gmail.com>
2905
2906         Compile without SVG will fail
2907         https://bugs.webkit.org/show_bug.cgi?id=113234
2908
2909         Reviewed by Timothy Hatcher.
2910
2911         Only make the cast to SVGStyleElement if we have SVG support built.
2912
2913         * inspector/InspectorCSSAgent.cpp:
2914         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
2915
2916 2013-03-25  Patrick Gansterer  <paroga@webkit.org>
2917
2918         Enable STORE_FONT_CUSTOM_PLATFORM_DATA for all platforms
2919         https://bugs.webkit.org/show_bug.cgi?id=108438
2920
2921         Reviewed by Andreas Kling.
2922
2923         Remove the conditional code so it is turned on for all platforms.
2924
2925         * loader/cache/CachedFont.cpp:
2926         (WebCore::CachedFont::~CachedFont):
2927         (WebCore::CachedFont::ensureCustomFontData):
2928         (WebCore::CachedFont::platformDataFromCustomData):
2929         (WebCore::CachedFont::allClientsRemoved):
2930         (WebCore::CachedFont::reportMemoryUsage):
2931
2932 2013-03-25  Eric Carlson  <eric.carlson@apple.com>
2933
2934         REGRESSION(r146380): media/track/track-user-preferences.html
2935         https://bugs.webkit.org/show_bug.cgi?id=113083
2936
2937         Reviewed by Jer Noble.
2938
2939         Ignore track change notifications triggered by automatic track selection so the 
2940         configuration is not changed.
2941
2942         No new tests, this fixes an existing test.
2943
2944         * html/HTMLMediaElement.cpp:
2945         (WebCore::HTMLMediaElement::configureTextTrackGroup): Clear m_processingPreferenceChange after all
2946             track configuration is finished.
2947         (WebCore::HTMLMediaElement::configureTextTrackDisplay): Do nothing if m_processingPreferenceChange
2948             is true.
2949
2950 2013-03-25  Martin Robinson  <mrobinson@igalia.com>
2951
2952         [GTK] [gyp] Build the final piece of WebCore
2953         https://bugs.webkit.org/show_bug.cgi?id=113216
2954
2955         Reviewed by Nico Weber.
2956
2957         * WebCore.gyp/WebCoreGTK.gyp: Add the rest of the WebCore source files to the WebCore build target.
2958
2959 2013-03-25  Martin Robinson  <mrobinson@igalia.com>
2960
2961         [GTK] [gyp] Adding support for building WebCore rendering
2962         https://bugs.webkit.org/show_bug.cgi?id=113213
2963
2964         Reviewed by Gustavo Noronha Silva.
2965
2966         * WebCore.gyp/WebCoreGTK.gyp: Build the rendering directory into a shared library.
2967
2968 2013-03-25  Tony Chang  <tony@chromium.org>
2969
2970         Remove TextIterator argumentless constructor
2971         https://bugs.webkit.org/show_bug.cgi?id=113226
2972
2973         Reviewed by Ryosuke Niwa.
2974
2975         The TextIterator argumentless constructors are never used and wouldn't be useful
2976         since you can't specify a range.
2977
2978         No new tests, removing dead code. There should be no behavior change.
2979
2980         * editing/TextIterator.cpp: Remove constructors.
2981         * editing/TextIterator.h:
2982         (TextIterator):
2983         (SimplifiedBackwardsTextIterator):
2984         (CharacterIterator):
2985         (BackwardsCharacterIterator):
2986         (WordAwareIterator):
2987
2988 2013-03-25  Brandon Jones  <bajones@chromium.org>
2989
2990         Enabled canvas.getContext("webgl") on Desktop Chrome
2991         https://bugs.webkit.org/show_bug.cgi?id=113079
2992
2993         Reviewed by Dean Jackson.
2994
2995         Test: fast/canvas/webgl/webgl-unprefixed-context-id.html
2996
2997         * bindings/v8/custom/V8HTMLCanvasElementCustom.cpp:
2998         (WebCore::V8HTMLCanvasElement::getContextMethodCustom):
2999         * html/HTMLCanvasElement.cpp:
3000         (WebCore::HTMLCanvasElement::getContext):
3001
3002 2013-03-25  Roger Fong  <roger_fong@apple.com>
3003
3004         Unreviewed. Remove some suspicious looking code in an attempt to fix EWS bots.
3005
3006         * bindings/scripts/preprocessor.pm:
3007         (applyPreprocessor):
3008
3009 2013-03-25  Martin Robinson  <mrobinson@igalia.com>
3010
3011         [GTK] [gyp] Add support for building the platform directory
3012         https://bugs.webkit.org/show_bug.cgi?id=113212
3013
3014         Reviewed by Nico Weber.
3015
3016         * WebCore.gyp/WebCoreGTK.gyp: Add support for building the platform directory including
3017         two libraries, one for platform and one for geometry files. This follows the approach
3018         of Chromium.
3019
3020 2013-03-25  Jochen Eisinger  <jochen@chromium.org>
3021
3022         Swap both the error and change event queue before processing fullscreen events
3023         https://bugs.webkit.org/show_bug.cgi?id=113194
3024
3025         Reviewed by Jer Noble.
3026
3027         While processing the change events, not only new change events but
3028         also new error events might get generated. However, for the timer, we
3029         should only process preexisting events.
3030
3031         This is covered by fullscreen/full-screen-restrictions.html which times
3032         out depending on the delay between requesting fullscreen and granting
3033         fullscreen.
3034
3035         * dom/Document.cpp:
3036         (WebCore::Document::fullScreenChangeDelayTimerFired):
3037
3038 2013-03-25  Marja Hölttä  <marja@chromium.org>
3039
3040         [V8] Generate specialized callbacks for the main world
3041         https://bugs.webkit.org/show_bug.cgi?id=112430
3042
3043         Reviewed by Kentaro Hara.
3044
3045         The new specialized bindings will be faster, because they don't need to
3046         do the "main world, isolated world or a worker" check, but can right
3047         away assume that we're in the main world.
3048
3049         This patch generates main world bindings for getters and setters for a
3050         small amount of frequently used functions / functions used by Dromaeo.
3051
3052         Added tests to TestObj.idl and updated bindings tests.
3053
3054         * bindings/scripts/CodeGeneratorV8.pm:
3055         (GenerateOverloadedFunction):
3056         (GenerateFunctionCallback):
3057         (GenerateFunction):
3058         (GenerateParametersCheck):
3059         (GenerateSingleConstructorCallback):
3060         (GenerateNonStandardFunction):
3061         (GenerateImplementation):
3062         (GenerateFunctionCallString):
3063         * bindings/scripts/test/TestObj.idl:
3064         * bindings/scripts/test/V8/V8Float64Array.cpp:
3065         (WebCore):
3066         * bindings/scripts/test/V8/V8TestCustomNamedGetter.cpp:
3067         (WebCore):
3068         * bindings/scripts/test/V8/V8TestEventTarget.cpp:
3069         (WebCore):
3070         * bindings/scripts/test/V8/V8TestInterface.cpp:
3071         (WebCore):
3072         * bindings/scripts/test/V8/V8TestMediaQueryListListener.cpp:
3073         (WebCore):
3074         * bindings/scripts/test/V8/V8TestObj.cpp:
3075         (WebCore::TestObjV8Internal::perWorldReadOnlyAttributeAttrGetter):
3076         (TestObjV8Internal):
3077         (WebCore::TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterCallback):
3078         (WebCore::TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterForMainWorld):
3079         (WebCore::TestObjV8Internal::perWorldReadOnlyAttributeAttrGetterCallbackForMainWorld):
3080         (WebCore::TestObjV8Internal::perWorldAttributeAttrGetter):
3081         (WebCore::TestObjV8Internal::perWorldAttributeAttrGetterCallback):
3082         (WebCore::TestObjV8Internal::perWorldAttributeAttrGetterForMainWorld):
3083         (WebCore::TestObjV8Internal::perWorldAttributeAttrGetterCallbackForMainWorld):
3084         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetter):
3085         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetterCallback):
3086         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetterForMainWorld):
3087         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetterCallbackForMainWorld):
3088         (WebCore::TestObjV8Internal::perWorldMethodMethod):
3089         (WebCore::TestObjV8Internal::perWorldMethodMethodForMainWorld):
3090         (WebCore::TestObjV8Internal::perWorldMethodMethodCallback):
3091         (WebCore::TestObjV8Internal::perWorldMethodMethodCallbackForMainWorld):
3092         (WebCore::TestObjV8Internal::overloadedPerWorldMethod1Method):
3093         (WebCore::TestObjV8Internal::overloadedPerWorldMethod1MethodForMainWorld):
3094         (WebCore::TestObjV8Internal::overloadedPerWorldMethod2Method):
3095         (WebCore::TestObjV8Internal::overloadedPerWorldMethod2MethodForMainWorld):
3096         (WebCore::TestObjV8Internal::overloadedPerWorldMethodMethod):
3097         (WebCore::TestObjV8Internal::overloadedPerWorldMethodMethodForMainWorld):
3098         (WebCore::TestObjV8Internal::overloadedPerWorldMethodMethodCallback):
3099         (WebCore::TestObjV8Internal::overloadedPerWorldMethodMethodCallbackForMainWorld):
3100         (WebCore):
3101         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
3102         (WebCore):
3103         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
3104         (WebCore):
3105         * bindings/v8/V8DOMConfiguration.cpp:
3106         (WebCore::V8DOMConfiguration::batchConfigureCallbacks):
3107         (WebCore::V8DOMConfiguration::configureTemplate):
3108         * bindings/v8/V8DOMConfiguration.h:
3109         (BatchedMethod):
3110         (V8DOMConfiguration):
3111         * dom/Document.idl:
3112         * dom/Element.idl:
3113         * dom/Node.idl:
3114         * page/DOMWindow.idl:
3115
3116 2013-03-25  Daniel Cheng  <dcheng@chromium.org>
3117
3118         Don't allow drags to start after a mouse press that creates a context menu
3119         https://bugs.webkit.org/show_bug.cgi?id=112079
3120
3121         Reviewed by Tony Chang.
3122
3123         This appears to be the intent of the original code anyway (the comments in the corresponding
3124         context menu handlers indicate that they set m_mousePressed to false in order to suppress
3125         drags from starting). Since exact platform behavior differs quite a bit in this area, this
3126         will also make the behavior more consistent across different WebKit implementations.
3127
3128         Manually testable using context-menu-during-drag-selection.html.
3129
3130         * page/EventHandler.cpp:
3131         (WebCore::EventHandler::handleMouseDraggedEvent):
3132
3133 2013-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
3134
3135         Web Inspector: [Regression] Provisional breakpoints are not shown on reload.
3136         https://bugs.webkit.org/show_bug.cgi?id=113210
3137
3138         Reviewed by Pavel Feldman.
3139
3140         * inspector/front-end/BreakpointManager.js:
3141         (WebInspector.BreakpointManager.prototype._restoreBreakpoints):
3142         (WebInspector.BreakpointManager.prototype._projectWillReset.get for):
3143         (WebInspector.BreakpointManager.prototype._projectWillReset):
3144         (WebInspector.BreakpointManager.prototype._breakpointResolved):
3145         * inspector/front-end/utilities.js:
3146
3147 2013-03-25  Sergey Ryazanov  <serya@chromium.org>
3148
3149         Web Inspector: Remove console warnings for *_ prefixed CSS styles
3150         https://bugs.webkit.org/show_bug.cgi?id=113175
3151
3152         Reviewed by Pavel Feldman.
3153
3154         Added separate error message for syntax CSS error in declaration list when no property detected.
3155         Added filter for messages starting with '*'.
3156
3157         * css/CSSGrammar.y.in:
3158
3159 2013-03-25  Alexis Hetu  <sugoi@chromium.org>
3160
3161         Integration of the Skia displacement mapping into WebKit
3162         https://bugs.webkit.org/show_bug.cgi?id=112927
3163
3164         Reviewed by Stephen White.
3165
3166         Added displacement mapping to effect-reference.html and
3167         effect-reference-hw.html
3168
3169         * WebCore.gypi:
3170         * platform/graphics/filters/FEDisplacementMap.h:
3171         (FEDisplacementMap):
3172         Adding Skia specific declarations
3173         * platform/graphics/filters/skia/FEDisplacementMapSkia.cpp: Added.
3174         (WebCore):
3175         (WebCore::toSkiaMode):
3176         Provides conversion between the WebKit displacement mapping mode and
3177         the Skia displacement mapping mode
3178         (WebCore::FEDisplacementMap::platformApplySkia):
3179         Displacement through the Skia API. (Accelerated only for now)
3180         (WebCore::FEDisplacementMap::createImageFilter):
3181         Displacement image filter creation through the Skia API.
3182
3183 2013-03-25  Vladislav Kaznacheev  <kaznacheev@chromium.org>
3184
3185         Web Inspector: Graduate some new Inspector APIs to public
3186         https://bugs.webkit.org/show_bug.cgi?id=113176
3187
3188         Reviewed by Pavel Feldman.
3189
3190         Summary of changes:
3191             DOM.highlightNode.nodeId: required parameter is now optional
3192             Input: domain has been added
3193             Runtime.enable: command has been added
3194             Runtime.executionContextCreated: event has been added
3195             Page.clearGeolocationOverride: command has been added
3196             Page.setGeolocationOverride: command has been added
3197             Page.captureScreenshot: command has been added
3198             Debugger.setBreakpointByUrl.locations: optional response parameter is now required
3199
3200
3201         * inspector/Inspector.json:
3202
3203 2013-03-25  Andrey Kosyakov  <caseq@chromium.org>
3204
3205         Web Inspector: [Timeline] set glue records mode off by default
3206         https://bugs.webkit.org/show_bug.cgi?id=113189
3207
3208         Reviewed by Pavel Feldman.
3209
3210         * inspector/front-end/TimelinePanel.js: /glueRecordsSetting/s/true/false/
3211
3212 2013-03-25  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
3213
3214         [EFL] Fix build break when media source is enabled
3215         https://bugs.webkit.org/show_bug.cgi?id=113143
3216
3217         Unreviewed. Build error needs to be fixed in order to start to implement
3218         media source functionality.
3219
3220         * CMakeLists.txt:
3221         * platform/efl/MIMETypeRegistryEfl.cpp:
3222         (WebCore):
3223         (WebCore::MIMETypeRegistry::isSupportedMediaSourceMIMEType):
3224         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
3225         (WebCore):
3226         (WebCore::MediaPlayerPrivateGStreamer::load):
3227         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
3228         (MediaPlayerPrivateGStreamer):
3229
3230 2013-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
3231
3232         Web Inspector: Toggling breakpoint with shortcut should be freezed as well while editing.
3233         https://bugs.webkit.org/show_bug.cgi?id=113188
3234
3235         Reviewed by Pavel Feldman.
3236
3237         * inspector/front-end/JavaScriptSourceFrame.js:
3238         (WebInspector.JavaScriptSourceFrame.prototype.toggleBreakpointOnCurrentLine):
3239
3240 2013-03-25  Vsevolod Vlasov  <vsevik@chromium.org>
3241
3242         Web Inspector: Remove unneeded code from JavaScriptSourceFrame.
3243         https://bugs.webkit.org/show_bug.cgi?id=113182
3244
3245         Reviewed by Pavel Feldman.
3246
3247         * inspector/front-end/JavaScriptSourceFrame.js:
3248         (WebInspector.JavaScriptSourceFrame):
3249
3250 2013-03-25  Alexei Filippov  <alph@chromium.org>
3251
3252         Web Inspector: Fonts refactoring
3253         https://bugs.webkit.org/show_bug.cgi?id=113047
3254
3255         Reviewed by Pavel Feldman.
3256
3257         Unify fonts usage across inspector.
3258         Make inspector default font depend on platform.
3259
3260         * inspector/front-end/dataGrid.css:
3261         (.data-grid table):
3262         (.data-grid td):
3263         * inspector/front-end/inspector.css:
3264         (.toolbar-label):
3265         (body.show-toolbar-icons .toolbar-label):
3266         (.console-message .bubble):
3267         (li .status .bubble):
3268         (.source-frame-breakpoint-message):
3269         (.soft-context-menu):
3270         * inspector/front-end/inspectorCommon.css:
3271         (body):
3272         * inspector/front-end/networkLogView.css:
3273         (.network-log-grid.data-grid td):
3274         (.network-log-grid.data-grid.small td):
3275         * inspector/front-end/tabbedPane.css:
3276         (.tabbed-pane-header-tab):
3277         (select.tabbed-pane-header-tabs-drop-down-select):
3278         * inspector/front-end/timelinePanel.css:
3279         (.memory-counter-value):
3280
3281 2013-03-25  Vladislav Kaznacheev  <kaznacheev@chromium.org>
3282
3283         Web Inspector: Use generate-inspector-protocol-version to list valid public API changes
3284         https://bugs.webkit.org/show_bug.cgi?id=113148
3285
3286         Added --show-changes command line option.
3287         Used existing compare_schemas method to do a reverse compare.
3288         Fixed a number of small problems (missing domain name in the message,
3289         incorrect error messages for command parameters).
3290
3291         Reviewed by Pavel Feldman.
3292
3293         * inspector/generate-inspector-protocol-version:
3294         (named_list_to_map):
3295         (removed):
3296         (required):
3297         (compare_schemas):
3298         (compare_domains):
3299         (compare_commands):
3300         (compare_events):
3301         (compare_params_list):
3302         (compare_types):
3303         (self_test):
3304         (self_test.create_test_schema_1):
3305         (self_test.create_test_schema_2):
3306         (self_test.is_subset):
3307         (self_test.errors_match):
3308         (main):
3309
3310 2013-03-25  Alec Flett  <alecflett@chromium.org>
3311
3312         Support Quota API in Workers
3313         https://bugs.webkit.org/show_bug.cgi?id=112972
3314
3315         Reviewed by Adam Barth.
3316
3317         Tests: fast/workers/shared-worker-storagequota-query-usage.html
3318                fast/workers/worker-storagequota-query-usage.html
3319
3320         * Modules/quota/WorkerNavigatorStorageQuota.cpp: Added.
3321         * Modules/quota/WorkerNavigatorStorageQuota.h: Added.
3322         * Modules/quota/WorkerNavigatorStorageQuota.idl: Added.
3323         * WebCore.gypi: Add entries for WorkerNavigatorStorageQuota.
3324         * page/WorkerNavigator.h: Add a Navigator supplement that extends the worker navigator.
3325
3326 2013-03-25  Mike West  <mkwst@chromium.org>
3327
3328         CSP 1.1: Rename SecurityPolicyViolationEvent::sourceURL to ::sourceFile.
3329         https://bugs.webkit.org/show_bug.cgi?id=113033
3330
3331         Reviewed by Jochen Eisinger.
3332
3333         Bringing our experimental implementation into line with the spec, which
3334         has landed on the de facto standard name Gecko has been sending out for
3335         years and years.
3336
3337         Spec: https://dvcs.w3.org/hg/content-security-policy/rev/e44f4003e158
3338         Thread: http://lists.w3.org/Archives/Public/public-webappsec/2013Mar/0087.html
3339
3340         * dom/SecurityPolicyViolationEvent.h:
3341         (SecurityPolicyViolationEventInit):
3342         (WebCore::SecurityPolicyViolationEvent::sourceFile):
3343         (WebCore::SecurityPolicyViolationEvent::SecurityPolicyViolationEvent):
3344         (SecurityPolicyViolationEvent):
3345         * dom/SecurityPolicyViolationEvent.idl:
3346         * page/ContentSecurityPolicy.cpp:
3347         (WebCore::gatherSecurityPolicyViolationEventData):
3348             s/sourceURL/sourceFile/
3349
3350 2013-03-25  Michelangelo De Simone  <michelangelo@webkit.org>
3351
3352         [CSS Filters] Using negative drop-shadow radius values has slow performance
3353         https://bugs.webkit.org/show_bug.cgi?id=107848
3354
3355         Setting negative blur radius values in drop-shadow() and box-shadow() led to
3356         significant rendering performance loss. The invalid value overflowed and the
3357         embedder became unresponsive for few seconds.
3358         This impacted SVG too (SVGFEDropShadow and SVGFEGaussianBlur).
3359
3360         Reviewed by Dirk Schulze.
3361
3362         Tests: css3/filters/effect-drop-shadow-negative-radius.html
3363                fast/box-shadow/box-shadow-parsing-invalid.html
3364                svg/filters/feDropShadow-negative-deviation-expected.svg
3365                svg/filters/feDropShadow-negative-deviation.svg
3366                svg/filters/feDropShadow-zero-deviation.svg
3367                svg/filters/feGaussianBlur-negative-deviation-expected.svg
3368                svg/filters/feGaussianBlur-negative-deviation.svg
3369                svg/filters/feGaussianBlur-zero-deviation.svg
3370
3371         * css/CSSParser.cpp:
3372         (WebCore::CSSParser::parseShadow): Negative values are skipped during parsing: as per
3373         CSS Background and Borders specs, negative values shall not be allowed.
3374         * platform/graphics/filters/FEGaussianBlur.cpp:
3375         (WebCore::FEGaussianBlur::calculateUnscaledKernelSize): Added "non-negative" assertion for
3376         negative deviations.
3377         * svg/SVGFEDropShadowElement.cpp:
3378         (WebCore::SVGFEDropShadowElement::build): If a negative standard deviation is encountered, don't
3379         build the filter and returns earlier, this avoids unnecessary calls: FEGaussianBlur is not being
3380         created with wrong and potentially overflowing values.
3381         * svg/SVGFEGaussianBlurElement.cpp:
3382         (WebCore::SVGFEGaussianBlurElement::build): Ditto.
3383
3384 2013-03-25  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3385
3386         [Qt] REGRESSION(r146630): 8 text related test asserts on debug builds
3387         https://bugs.webkit.org/show_bug.cgi?id=113179
3388
3389         Reviewed by Jocelyn Turcotte.
3390
3391         Test if range.start is within the valid range before testing the value at that point.
3392
3393         * platform/graphics/qt/FontQt.cpp:
3394         (WebCore::Font::initFormatForTextLayout):
3395
3396 2013-03-25  Alexander Pavlov  <apavlov@chromium.org>
3397
3398         Web Inspector: Properly handle the rule addition to an XML or SVG document.
3399         https://bugs.webkit.org/show_bug.cgi?id=113185
3400
3401         Reviewed by Pavel Feldman.
3402
3403         * inspector/InspectorCSSAgent.cpp:
3404         (WebCore::InspectorCSSAgent::viaInspectorStyleSheet):
3405
3406 2013-03-25  Peter Rybin  <prybin@chromium.org>
3407
3408         Web Inspector: support changing local variables in frontend
3409         https://bugs.webkit.org/show_bug.cgi?id=112470
3410
3411         Reviewed by Yury Semikhatsky.
3412
3413         ScopeRef type is added to RemoteObject and setPropertyValue is patched accordingly.
3414
3415         Test: inspector/debugger/debugger-change-variable.html
3416
3417         * inspector/front-end/DebuggerModel.js:
3418         (WebInspector.DebuggerModel.CallFrame.prototype.get id):
3419         * inspector/front-end/ObjectPropertiesSection.js:
3420         (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate.didGetDetails):
3421         (WebInspector.FunctionScopeMainTreeElement.prototype.onpopulate):
3422         * inspector/front-end/RemoteObject.js:
3423         (WebInspector.RemoteObject):
3424         (WebInspector.RemoteObject.fromScopePayload):
3425         (WebInspector.RemoteObject.prototype.):
3426         (WebInspector.RemoteObject.prototype.setPropertyValue):
3427         (WebInspector.RemoteObject.prototype.setVariableValueCallback):
3428         (WebInspector.RemoteObject.prototype._setDeclarativeVariableValue):
3429         (WebInspector.ScopeRef):
3430         * inspector/front-end/ScopeChainSidebarPane.js:
3431         (WebInspector.ScopeChainSidebarPane.prototype.update):
3432
3433 2013-03-25  Mike West  <mkwst@chromium.org>
3434
3435         CSP 1.1: Strip URLs in SecurityPolicyViolationEvents, just as we do for POSTed violation reports.
3436         https://bugs.webkit.org/show_bug.cgi?id=113039
3437
3438         Reviewed by Jochen Eisinger.
3439
3440         I'd originally assumed that we didn't need to be quite so careful when
3441         handing URLs to JavaScript via SecurityPolicyViolationEvents. This was
3442         a mistake. Cross-origin URLs aren't accessible to JavaScript currently
3443         and there's no reason that we should begin exposing them via an event.
3444
3445         This patch extracts the stripping logic from the existing reports into
3446         stripURLForUseInReport(), and uses that new method when populating the
3447         event and report objects.
3448
3449         Relatedly, we were doing the wrong thing with 'file:' URLs, which this
3450         patch made clear. Now they're treated the same as 'data:' et al.
3451
3452         Spec: https://dvcs.w3.org/hg/content-security-policy/rev/45f6ccaba0ef
3453
3454         Tests: http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image-from-script.html
3455                http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-cross-origin-image.html
3456                http/tests/security/contentSecurityPolicy/1.1/securitypolicyviolation-block-image-from-script.html
3457                http/tests/security/contentSecurityPolicy/report-blocked-file-uri.html
3458
3459         * page/ContentSecurityPolicy.cpp:
3460         (WebCore::stripURLForUseInReport):