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