[BlackBerry] Implement ScrollingCoordinator::frameViewLayoutUpdated()
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-04-02  Carlos Garcia Campos  <cgarcia@igalia.com>
2
3         [BlackBerry] Implement ScrollingCoordinator::frameViewLayoutUpdated()
4         https://bugs.webkit.org/show_bug.cgi?id=113763
5
6         Reviewed by Rob Buis.
7
8         PR 318945
9         Internally reviewed by Jakob Petsovits.
10
11         And remove the BlackBerry specific methods
12         frameViewFrameRectDidChange and frameViewContentsSizeDidChange.
13
14         * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.cpp:
15         (WebCore::ScrollingCoordinatorBlackBerry::frameViewLayoutUpdated):
16         Called when the frame view has been laid out. Update the contents
17         rectangle and visible area of the scroll layer for the given frame
18         view.
19         * page/scrolling/blackberry/ScrollingCoordinatorBlackBerry.h:
20         (ScrollingCoordinatorBlackBerry):
21         * platform/graphics/blackberry/LayerWebKitThread.h:
22         (WebCore::LayerWebKitThread::setFrameVisibleRect): Return early if
23         value hasn't changed.
24         (WebCore::LayerWebKitThread::setFrameContentsSize): Ditto.
25
26 2013-04-02  Andrey Lushnikov  <lushnikov@chromium.org>
27
28         Web Inspector: Separate JavaScriptSourceFrame popover from knowledge of editor's DOM
29         https://bugs.webkit.org/show_bug.cgi?id=113412
30
31         Reviewed by Pavel Feldman.
32
33         - Use TextEditor.coordinatesToCursorPosition,
34         TextEditor.cursorPositionToCoordinates and TextEditor.tokenAtTextPosition to figure out
35         hovering area and create popover anchor.
36         - Use TextEditor.highlightRange/TextEditor.removeHighlight methods to
37         highlight hovering text in editor.
38
39         No new tests: no change in behaviour.
40
41         * inspector/front-end/DefaultTextEditor.js:
42         * inspector/front-end/JavaScriptSourceFrame.js:
43         (WebInspector.JavaScriptSourceFrame):
44         (WebInspector.JavaScriptSourceFrame.prototype.willHide):
45         (WebInspector.JavaScriptSourceFrame.prototype._getPopoverAnchor):
46         (WebInspector.JavaScriptSourceFrame.prototype.):
47         (WebInspector.JavaScriptSourceFrame.prototype._resolveObjectForPopover):
48         (WebInspector.JavaScriptSourceFrame.prototype._onHidePopover):
49         * inspector/front-end/inspector.css:
50         (.popover-anchor):
51         (.source-frame-eval-expression):
52
53 2013-04-02  Mihnea Ovidenie  <mihnea@adobe.com>
54
55         [CSSRegions] RenderFlowThread should not be created as a Document renderer
56         https://bugs.webkit.org/show_bug.cgi?id=113658
57
58         Reviewed by Julien Chaffraix.
59
60         After https://bugs.webkit.org/show_bug.cgi?id=107138, RenderFlowThread should not be constructed as a renderer for Document.
61         Since it does not have an element associated, it will be constructed using the pattern for anonymous blocks.
62         However, since I do not want the flow thread to be collapsed as anonymous blocks are, i changed RenderObject::isAnonymousBlock
63         to return false for a RenderFlowThread (the alternative would have been to patch more call sites to prevent RenderFlowThread
64         collapsing as anonymous block).
65
66         Covered by existing tests.
67
68         * rendering/FlowThreadController.cpp:
69         (WebCore::FlowThreadController::ensureRenderFlowThreadWithName):
70         * rendering/RenderFlowThread.cpp:
71         (WebCore::RenderFlowThread::RenderFlowThread):
72         * rendering/RenderFlowThread.h:
73         * rendering/RenderMultiColumnBlock.cpp:
74         (WebCore::RenderMultiColumnBlock::addChild):
75         * rendering/RenderMultiColumnFlowThread.cpp:
76         (WebCore::RenderMultiColumnFlowThread::RenderMultiColumnFlowThread):
77         (WebCore::RenderMultiColumnFlowThread::createAnonymous):
78         * rendering/RenderMultiColumnFlowThread.h:
79         (RenderMultiColumnFlowThread):
80         * rendering/RenderNamedFlowThread.cpp:
81         (WebCore::RenderNamedFlowThread::createAnonymous):
82         (WebCore::RenderNamedFlowThread::RenderNamedFlowThread):
83         * rendering/RenderNamedFlowThread.h:
84         (RenderNamedFlowThread):
85         * rendering/RenderObject.h:
86         (WebCore::RenderObject::isAnonymousBlock):
87
88 2013-04-02  Shinya Kawanaka  <shinyak@chromium.org>
89
90         Unreviewed, rolling out r147383.
91         http://trac.webkit.org/changeset/147383
92         https://bugs.webkit.org/show_bug.cgi?id=112369
93
94         Speculative rollout because of lots of layout test failure
95
96         * html/parser/HTMLDocumentParser.cpp:
97         (WebCore::HTMLDocumentParser::~HTMLDocumentParser):
98         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
99         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
100         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
101         (WebCore::HTMLDocumentParser::insert):
102         * html/parser/HTMLParserScheduler.cpp:
103         (WebCore::PumpSession::PumpSession):
104         * html/parser/HTMLParserScheduler.h:
105
106 2013-04-02  Eugene Klyuchnikov  <eustas@chromium.org>
107
108         Web Inspector: [HeapProfiler] Table rows do not appear when resizing.
109         https://bugs.webkit.org/show_bug.cgi?id=113760
110
111         Reviewed by Yury Semikhatsky.
112
113         Analysis: custom-made split-view doesn't notify content panes about
114         resizing.
115
116         * inspector/front-end/HeapSnapshotView.js:
117         (WebInspector.HeapSnapshotView.prototype._updateRetainmentViewHeight):
118         Notify content pane about resize.
119
120 2013-04-02  Mihnea Ovidenie  <mihnea@adobe.com>
121
122         [CSSRegions] Clean-up RenderFlowThread::updateRegionsFlowThreadPortionRect
123         https://bugs.webkit.org/show_bug.cgi?id=113659
124
125         Reviewed by Julien Chaffraix.
126
127         RenderRegion::logicalHeightOfAllFlowThreadContent already contains the
128         override logical content height for auto-height regions in normal layout phase.
129         Therefore, there is no need to explicitly override region's rect height with
130         the region's overrideLogicalContentHeight as the region rect already contains
131         the right value.
132
133         No change in functionality, covered by existing tests.
134
135         * rendering/RenderFlowThread.cpp:
136         (WebCore::RenderFlowThread::updateRegionsFlowThreadPortionRect):
137         * rendering/RenderRegion.cpp:
138         (WebCore::RenderRegion::pageLogicalHeight):
139         (WebCore::RenderRegion::logicalHeightOfAllFlowThreadContent):
140
141 2013-04-02  Mike West  <mkwst@chromium.org>
142
143         X-Frame-Options: Blocked frames should not inherit their parent's SecurityOrigin.
144         https://bugs.webkit.org/show_bug.cgi?id=112903
145
146         Reviewed by Adam Barth.
147
148         This change brings WebKit in line with IE and Gecko's behavior, both of
149         which treat the blocked frame as being cross-origin for the purposes of
150         access checks ('[frame].contentWindow.location.href' is inaccessible,
151         for example).
152
153         * dom/Document.cpp:
154         (WebCore::Document::processHttpEquiv):
155             Rather than redirecting to 'about:blank', redirect to
156             'data:text/html,<p></p>' which does not inherit the SecurityOrigin
157             of the parent.
158         * loader/DocumentLoader.cpp:
159         (WebCore::DocumentLoader::responseReceived):
160             Before calling cancelMainResourceLoad, ensure that the frame's
161             document is sandboxed into a unique origin so that it doesn't
162             inherit the parent's SecurityOrigin.
163
164 2013-04-01  Elliott Sprehn  <esprehn@chromium.org>
165
166         RenderObject::offsetParent should return Element*
167         https://bugs.webkit.org/show_bug.cgi?id=113739
168
169         Reviewed by Abhishek Arya.
170
171         The offsetParent of a node should always be an Element, ensure this
172         by fixing RenderObject::offsetParent to return an Element* and clean up
173         the method to match the algorithm in the spec which lets us remove the
174         comments that were trying to explain what was going on.
175
176         This also hardens against badness where RenderObject::offsetParent
177         could have returned a renderer with a non-Element node which would result
178         in a bad cast in Element::offsetParent. We fixed all cases of this, but
179         this patch makes sure such things never happen again.
180
181         No new tests, no change in behavior.
182
183         * dom/Element.cpp:
184         (WebCore::Element::offsetParent):
185         * rendering/RenderBoxModelObject.cpp:
186         (WebCore::RenderBoxModelObject::adjustedPositionRelativeToOffsetParent):
187         * rendering/RenderObject.cpp:
188         (WebCore::RenderObject::offsetParent): Now returns Element*.
189         * rendering/RenderObject.h:
190         (RenderObject):
191
192 2013-04-01  Alpha Lam  <hclam@chromium.org>
193
194         Simply GIFImageReader error handling
195         https://bugs.webkit.org/show_bug.cgi?id=113718
196
197         Reviewed by Adam Barth.
198
199         When GIFImageReader encounters a parsing error it should just return
200         without doing any more work. Current code saves a boolean before return,
201         this is not necessary.
202
203         Tested with existing unit tests.
204         Tested locally with ASAN build with 60k GIF images.
205
206         * platform/image-decoders/gif/GIFImageDecoder.cpp:
207         (WebCore::GIFImageDecoder::repetitionCount):
208         * platform/image-decoders/gif/GIFImageReader.cpp:
209         (GIFImageReader::decode):
210         * platform/image-decoders/gif/GIFImageReader.h:
211         (GIFImageReader::GIFImageReader):
212         (GIFImageReader):
213
214 2013-04-01  Elliott Sprehn  <esprehn@chromium.org>
215
216         Make all v8 weak callbacks type safe
217         https://bugs.webkit.org/show_bug.cgi?id=111802
218
219         Reviewed by Adam Barth.
220
221         Make all v8 handle weak callbacks typesafe by adding a new class WeakHandleListner
222         that uses templates to generate the callback proxies that have the correct type
223         arguments. Now getting the arguments wrong will fail compilation.
224
225         No new tests, no change in behavior.
226
227         * bindings/v8/DOMDataStore.h:
228         (WebCore::::callback):
229         * bindings/v8/DOMWrapperMap.h:
230         (WebCore::DOMWrapperMap::DOMWrapperMap):
231         (WebCore::DOMWrapperMap::set):
232         (WebCore::DOMWrapperMap::reportMemoryUsage):
233         (DOMWrapperMap):
234         * bindings/v8/DOMWrapperWorld.cpp:
235         (WebCore::::callback):
236         (WebCore::DOMWrapperWorld::makeContextWeak):
237         * bindings/v8/ScriptState.cpp:
238         (WebCore::::callback):
239         (WebCore::ScriptState::ScriptState):
240         * bindings/v8/ScriptState.h:
241         (ScriptState):
242         * bindings/v8/ScriptWrappable.h:
243         (ScriptWrappable):
244         (WebCore::ScriptWrappable::setWrapper):
245         (WebCore::::callback):
246         * bindings/v8/V8AbstractEventListener.cpp:
247         (WebCore::::callback):
248         (WebCore::V8AbstractEventListener::setListenerObject):
249         * bindings/v8/V8AbstractEventListener.h:
250         (V8AbstractEventListener):
251         * bindings/v8/V8MutationCallback.cpp:
252         (WebCore::::callback):
253         (WebCore::V8MutationCallback::V8MutationCallback):
254         * bindings/v8/V8MutationCallback.h:
255         (V8MutationCallback):
256         * bindings/v8/V8NPObject.cpp:
257         (V8NPTemplateMap):
258         (WebCore::V8NPTemplateMap::set):
259         (WebCore::::callback):
260         (WebCore::staticNPObjectMap):
261         * bindings/v8/V8Utilities.h:
262         (WeakHandleListener):
263         (WebCore::WeakHandleListener::makeWeak):
264         (WebCore::WeakHandleListener::WeakHandleListener):
265         (WebCore::WeakHandleListener::invokeWeakCallback):
266         * bindings/v8/V8ValueCache.cpp:
267         (WebCore::::callback):
268         (WebCore::StringCache::v8ExternalStringSlow):
269         * bindings/v8/custom/V8InjectedScriptManager.cpp:
270         (WebCore::::callback):
271         (WebCore::createInjectedScriptHostV8Wrapper):
272
273 2013-04-01  Tien-Ren Chen  <trchen@chromium.org>
274
275         Hide non-coordinated scrollbars for Android M26
276         https://bugs.webkit.org/show_bug.cgi?id=113738
277
278         Reviewed by Simon Fraser.
279
280         This patch will hide any non-coordinated scrollbars on Android.
281         Coordinated scrollbars won't be affected.
282
283         Currently all scrollbars are coordinated on Android. The sole purpose
284         of this patch is to be cherry-picked to the M26 branch.
285
286         No new tests. Please revert immediately after landed.
287
288         * platform/ScrollView.cpp:
289         (WebCore::positionScrollbarLayer):
290         * rendering/RenderLayerBacking.cpp:
291         (WebCore::RenderLayerBacking::positionOverflowControlsLayers):
292
293 2013-04-01  Chris Evans  <cevans@google.com>
294
295         Crash in Node::enclosingBlockFlowElement()
296         https://bugs.webkit.org/show_bug.cgi?id=113712
297
298         Reviewed by Abhishek Arya.
299
300         Fix a bad Node assumption if we walk up to the document root.
301
302         Test: editing/execCommand/format-block-at-root.html
303
304         * dom/Node.cpp:
305         (WebCore::Node::isBlockFlowElement): Check we found an Element Node and rename from isBlockFlow().
306         (WebCore::Node::enclosingBlockFlowElement): Use the new toElement().
307         * editing/FormatBlockCommand.cpp:
308         (WebCore::FormatBlockCommand::formatRange): Check for NULL.
309         * editing/InsertListCommand.cpp:
310         (WebCore::InsertListCommand::doApplyForSingleParagraph):
311         * editing/ReplaceSelectionCommand.cpp:
312         (WebCore::enclosingInline): Impact from method rename.
313
314 2013-04-01  James Simonsen  <simonjam@chromium.org>
315
316         [Resource Timing] Expose timing information for iframes
317         https://bugs.webkit.org/show_bug.cgi?id=103927
318
319         Reviewed by Nate Chapin.
320
321         The only catch with main documents is that we only want to record the load that was initiated by
322         adding the <iframe> to a document. We don't want any subsequent navigations within the iframe to
323         be reported.
324
325         Test: http/tests/w3c/webperf/submission/Google/resource-timing/html/test_resource_iframe_self_navigation.html
326
327         * loader/cache/CachedResourceLoader.cpp:
328         (WebCore::CachedResourceLoader::revalidateResource):
329         (WebCore::CachedResourceLoader::loadResource):
330         (WebCore::CachedResourceLoader::loadDone): Make sure iframes are reported in the parent.
331
332 2013-04-01  Konrad Piascik  <kpiascik@blackberry.com>
333
334         [BlackBerry] Move Path into it's own header
335         https://bugs.webkit.org/show_bug.cgi?id=113724
336
337         Reviewed by Rob Buis.
338
339         No behavioural change.
340
341         * platform/graphics/blackberry/PathBlackBerry.cpp:
342
343 2013-04-01  Konrad Piascik  <kpiascik@blackberry.com>
344
345         [BlackBerry] canvas is not rendering correctly for www.html5-benchmark.com
346         https://bugs.webkit.org/show_bug.cgi?id=113716
347
348         Reviewed by Rob Buis.
349
350         PR 317205
351         Internally reivewed by: Mike Lattanzio, Jacky Jiang
352
353         This is a site issue where they detect physical pixels by multiplying
354         availWidth * devicePixelRatio.  This gives us an invalid result since
355         we don't round the CSS pixels that are reported to availWidth and availHeight.
356
357         * platform/blackberry/PlatformScreenBlackBerry.cpp:
358         (WebCore::toUserSpace):
359
360 2013-04-01  Hans Muller  <hmuller@adobe.com>
361
362         [CSS Exclusions] shape-outside on floats fails to respect shape-margin's vertical extent
363         https://bugs.webkit.org/show_bug.cgi?id=113600
364
365         Reviewed by Dirk Schulze.
366
367         ExclusionShapeInsideInfo classes need to depend on the ExclusionShape's padded boundary and
368         ExclusionShapeOutsideInfo classes should depend on the ExclusionShape's margin boundary. Added
369         a virtual method to the ExclusionShapeInfo that returns the ExclusionShape's logical bounding box -
370         computedShapeLogicalBoundingBox() - and overrode that method in the subclasses to return the
371         value of the appropriate ExclusionShape method. Added shapeMarginLogicalBoundingBox() and
372         shapePaddingLogicalBoundingBox() methods to ExclusionShape and removed the shapeLogicalBoundingBox()
373         method, which did not take shape-margin or shape-padding into account.
374
375         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-bottom.html
376
377         * rendering/ExclusionPolygon.h: Defined the padding and margin bounding box virtual methods.
378         * rendering/ExclusionRectangle.h: Defined the padding and margin bounding box virtual methods.
379         * rendering/ExclusionShape.h: Added the padding and margin bounding box virtual abstract methods. Removed shapeLogicalBoundingBox().
380         (ExclusionShape):
381         * rendering/ExclusionShapeInfo.h:
382         (WebCore::ExclusionShapeInfo::shapeLogicalTop): Now calls computedShapeLogicalBoundingBox().
383         (WebCore::ExclusionShapeInfo::shapeLogicalBottom): Ditto.
384         (WebCore::ExclusionShapeInfo::shapeLogicalLeft): Ditto.
385         (WebCore::ExclusionShapeInfo::shapeLogicalRight): Ditto.
386         (WebCore::ExclusionShapeInfo::shapeLogicalWidth): Ditto.
387         (WebCore::ExclusionShapeInfo::shapeLogicalHeight): Ditto.
388         (ExclusionShapeInfo): Added computedShapeLogicalBoundingBox().
389         * rendering/ExclusionShapeInsideInfo.h:
390         (ExclusionShapeInsideInfo):
391         (WebCore::ExclusionShapeInsideInfo::computedShapeLogicalBoundingBox): Gets the padded shape's bounding box.
392         * rendering/ExclusionShapeOutsideInfo.h:
393         (ExclusionShapeOutsideInfo):
394         (WebCore::ExclusionShapeOutsideInfo::computedShapeLogicalBoundingBox): Gets the margin shape's bounding box.
395
396 2013-04-01  Adam Barth  <abarth@webkit.org>
397
398         Assertion failure !m_lastChunkBeforeScript in HTMLDocumentParser during inspector/debugger/pause-in-inline-script.html
399         https://bugs.webkit.org/show_bug.cgi?id=112369
400
401         Reviewed by Eric Seidel.
402
403         The threaded HTML parser wasn't correctly handling the nested event
404         loops that can arise from the JavaScript debugger and from
405         showModalDialog. When the parser received a chunk from the background
406         parser, it was always processing it immediately, which lead to
407         re-entrancy. Now, we'll queue the chunk in the speculation buffer and
408         process it once the stack unwinds.
409
410         * html/parser/HTMLDocumentParser.cpp:
411         (WebCore::HTMLDocumentParser::~HTMLDocumentParser):
412         (WebCore::HTMLDocumentParser::didReceiveParsedChunkFromBackgroundParser):
413         (WebCore::HTMLDocumentParser::processParsedChunkFromBackgroundParser):
414         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
415         (WebCore::HTMLDocumentParser::insert):
416         * html/parser/HTMLParserScheduler.cpp:
417         (WebCore::PumpSession::PumpSession):
418         * html/parser/HTMLParserScheduler.h:
419
420 2013-04-01  Michael Pruett  <michael@68k.org>
421
422         [JSC] IndexedDB: Exceptions not thrown for non-cloneable values
423         https://bugs.webkit.org/show_bug.cgi?id=113689
424
425         Reviewed by Kentaro Hara.
426
427         ScriptValue::serialize() should not clear exceptions thrown during
428         serialization. This change is needed to match behavior in V8.
429
430         Tests: storage/indexeddb/clone-exception.html
431                storage/indexeddb/exceptions.html
432                storage/indexeddb/structured-clone.html
433
434         * bindings/js/ScriptValue.cpp:
435         (WebCore::ScriptValue::serialize):
436
437 2013-04-01  Joshua Bell  <jsbell@chromium.org>
438
439         [Chromium] IndexedDB: Turn "should only be true in unit tests" comments into ASSERTs
440         https://bugs.webkit.org/show_bug.cgi?id=113597
441
442         Reviewed by Adam Barth.
443
444         In the vein of wkbug.com/111233 and wkbug.com/110820 don't just comment that
445         some condition is true only in unit tests - ASSERT that Chromium's unitTestSupport()
446         is non-null to catch errors during development.
447
448         Exercised by Chromium's webkit_unit_tests.
449
450         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
451         (WebCore::IDBDatabaseBackendImpl::openConnection):
452         (WebCore::IDBDatabaseBackendImpl::close):
453
454 2013-04-01  Roger Fong  <roger_fong@apple.com>
455
456         VS2010 WebCoreGenerated build scripts should use new feature-defines script.
457         https://bugs.webkit.org/show_bug.cgi?id=113737.
458
459         Reviewed by Timothy Horton.
460
461         * WebCore.vcxproj/build-generated-files.sh:
462
463 2013-04-01  Tim Horton  <timothy_horton@apple.com>
464
465         Autosize should use documentRect height instead of scrollHeight
466         https://bugs.webkit.org/show_bug.cgi?id=112770
467
468         Reviewed by David Levin.
469
470         Autosizing fails to compute the correct height if the root element is very
471         small but the document has significant overflow.
472
473         Also, unconditionally start laying out from the minimum height, so that the
474         documentRect can shrink below its previous height if needed.
475
476         No new tests; autosizing is not currently exposed in a testable way on Mac.
477
478         * page/FrameView.cpp:
479         (WebCore::FrameView::autoSizeIfEnabled):
480
481 2013-04-01  Hayato Ito  <hayato@chromium.org>
482
483         [Shadow DOM] Change the order of event dispatching at AT_TARGET phase.
484         https://bugs.webkit.org/show_bug.cgi?id=113676
485
486         Reviewed by Dimitri Glazkov.
487
488         Change the order of event dispatching at AT_TARGET phase so that it mimics bubbling events.
489
490         The spec side bug is:
491         https://www.w3.org/Bugs/Public/show_bug.cgi?id=21404
492
493         Example:
494
495         Given the event path, from Node A (top-most) to Node G (target,
496         inner-most), where C and D are shadow hosts and G is the target,
497         the event dispatching order in the current WebKit implementation is:
498         (T: AT_TARGET, C: CAPTURING, B: BUBBLING)
499
500         For bubbling events:
501
502           A          1 (C)  11 (B)
503           B          2 (C)  10 (B)
504           C (SH)     3 (T)
505           D          4 (C)   9 (B)
506           E (SH)     5 (T)
507           F          6 (C)   8 (B)
508           G (Target) 7 (T)
509
510         For non-bubbling events:
511
512           A          1 (C)
513           B          2 (C)
514           C (SH)     3 (T)
515           D          4 (C)
516           E (SH)     5 (T)
517           F          6 (C)
518           G (Target) 7 (T)
519
520         This patch has changed the order of event dispatching as follows:
521
522         For bubbling events:
523
524           A          1 (C)  11 (B)
525           B          2 (C)  10 (B)
526           C (SH)             9 (T)
527           D          3 (C)   8 (B)
528           E (SH)             7 (T)
529           F          4 (C)   6 (B)
530           G (Target)         5 (T)
531
532         For non-bubbling events:
533
534           A          1 (C)
535           B          2 (C)
536           C (SH)            7 (T)
537           D          3 (C)
538           E (SH)            6 (T)
539           F          4 (C)
540           G (Target)        5 (T)
541
542         No new tests, updating existing layouts.
543
544         * dom/EventDispatcher.cpp:
545         (WebCore::EventDispatcher::dispatchEventAtCapturing):
546         (WebCore::EventDispatcher::dispatchEventAtBubbling):
547         * dom/EventDispatcher.h:
548         (EventDispatcher):
549
550 2013-04-01  Nate Chapin  <japhet@chromium.org>
551
552         Crash in WebCore::HTMLMediaElement::~HTMLMediaElement.
553         https://bugs.webkit.org/show_bug.cgi?id=113531
554
555         Reviewed by Adam Barth.
556
557         No new tests, though this is intermittently reproducible with
558         http/tests/misc/delete-frame-during-readystatechange.html under ASAN.
559
560         * html/HTMLMediaElement.cpp:
561         (WebCore::HTMLMediaElement::~HTMLMediaElement): Clear the media player manually
562             before the destructor exits. Clearing the media player may cancel a resource load,
563             which can trigger a readystatechange event. It's possible for the HTMLMediaElement
564             to attempt to fire an abort event within the readystatechange event, even though it is
565             now in an inconsistent state. Clearling the media player before finishing the destructor
566             ensures that the HTMLMediaElement will at least still be alive if this case is triggered.
567             Set m_completelyLoaded to true to ensure that if userCancelledLoad() is called, it doesn't
568             attempt to fire events while destructing.
569
570 2013-04-01  Sheriff Bot  <webkit.review.bot@gmail.com>
571
572         Unreviewed, rolling out r146373.
573         http://trac.webkit.org/changeset/146373
574         https://bugs.webkit.org/show_bug.cgi?id=113731
575
576         broke autosizing shrinking past previous size (Requested by
577         thorton on #webkit).
578
579         * page/FrameView.cpp:
580         (WebCore::FrameView::autoSizeIfEnabled):
581
582 2013-04-01  Timothy Hatcher  <timothy@apple.com>
583
584         Allow changing Web Inspector dock sides without undocking first.
585
586         https://webkit.org/b/113661
587         rdar://problem/13543127
588
589         Reviewed by Joseph Pecoraro.
590
591         * inspector/InspectorFrontendClientLocal.cpp:
592         (WebCore::InspectorFrontendClientLocal::InspectorFrontendClientLocal): Initialize m_dockSide.
593
594         (WebCore::InspectorFrontendClientLocal::canAttachWindow): If we are already attached, allow
595         attaching again to allow switching sides.
596
597         (WebCore::InspectorFrontendClientLocal::setAttachedWindow): Set m_dockSide.
598
599         * inspector/InspectorFrontendClientLocal.h:
600         (InspectorFrontendClientLocal): Added m_dockSide.
601
602 2013-04-01  Alexey Proskuryakov  <ap@apple.com>
603
604         https://bugs.webkit.org/show_bug.cgi?id=113721
605         <rdar://problem/13549181> REGRESSION (r146929): HTTP auth credentials not reused during session
606
607         Reviewed by Brady Eidson.
608
609         * platform/network/mac/ResourceHandleMac.mm:
610         (WebCore::ResourceHandle::start):
611         (WebCore::ResourceHandle::didReceiveAuthenticationChallenge):
612         Added FIXMEs.
613
614 2013-04-01  Timothy Hatcher  <timothy@apple.com>
615
616         Make 'this' evaluate to the correct object when paused in the Debugger.
617
618         https://webkit.org/b/113607
619         rdar://problem/13538351
620
621         Reviewed by Joseph Pecoraro.
622
623         * inspector/InjectedScriptSource.js:
624         (InjectedScript.prototype._evaluateOn): Bind 'this' to the expression function.
625
626 2013-04-01  Victor Carbune  <vcarbune@chromium.org>
627
628         TextTrackCue Extension for WebVTT Regions
629         https://bugs.webkit.org/show_bug.cgi?id=109821
630
631         Reviewed by Eric Carlson.
632
633         The TextTrackCue gets a new attribute and setting, regionId, which specifies
634         to which region the cue belongs to. The attribute is guarded by WEBVTT_REGIONS
635         and is by default disabled in ports.
636
637         Test: media/track/regions-webvtt/text-track-cue-region-attribute.html
638
639         * html/track/TextTrackCue.cpp:
640         (WebCore::TextTrackCue::TextTrackCue): Added member variable for the regionId attribute.
641         (WebCore):
642         (WebCore::TextTrackCue::setRegionId): Setter for the regionId attribute.
643         (WebCore::TextTrackCue::settingName): Added RegionId setting name.
644         (WebCore::TextTrackCue::setCueSettings): Parsed the "region:" cue setting.
645         * html/track/TextTrackCue.h:
646         (TextTrackCue):
647         (WebCore::TextTrackCue::regionId): Getter for the regionId attribute.
648         * html/track/TextTrackCue.idl: Updated to match the WebVTT Regions Extension.
649
650 2013-03-05  Anders Carlsson  <andersca@apple.com>
651
652         Apply changes from storage events locally
653         https://bugs.webkit.org/show_bug.cgi?id=111502
654
655         Reviewed by Sam Weinig.
656
657         Add and export a helper function for setting an item without taking
658         into account the quota for the map. Also, reindent StorageMap.h
659
660         * WebCore.exp.in:
661         * storage/StorageMap.cpp:
662         (WebCore::StorageMap::setItemIgnoringQuota):
663         (WebCore):
664         * storage/StorageMap.h:
665         (StorageMap):
666         (WebCore::StorageMap::quota):
667
668 2013-04-01  Benjamin Poulain  <benjamin@webkit.org>
669
670         Remove a couple of malloc from ExceptionBase construction
671         https://bugs.webkit.org/show_bug.cgi?id=113681
672
673         Reviewed by Darin Adler.
674
675         * dom/ExceptionBase.cpp:
676         (WebCore::ExceptionBase::ExceptionBase):
677         When the condition is true, we were creating a new String for
678         description.name. The constructor had already allocated a string for
679         that: m_name. Use that string instead of creating a new one.
680
681         When the condition is false, we were creating a String for typeName
682         just to use the string operators. This is a waste of time, we can use
683         makeString() to invoke the string concatenation functions directly.
684
685 2013-04-01  Emil A Eklund  <eae@chromium.org>
686
687         Move remaining marquee applying code to StyleBuilder
688         https://bugs.webkit.org/show_bug.cgi?id=113298
689
690         Reviewed by Allan Sandfeld Jensen.
691
692         Move applying logic for CSSPropertyWebkitMarqueeIncrement,
693         CSSPropertyWebkitMarqueeRepetition and CSSPropertyWebkitMarqueeSpeed
694         from StyleResolver::applyProperty.
695
696         No new tests, no change in functionality.
697
698         * css/StyleBuilder.cpp:
699         (ApplyPropertyMarqueeIncrement):
700         (WebCore::ApplyPropertyMarqueeIncrement::applyValue):
701         (WebCore::ApplyPropertyMarqueeIncrement::createHandler):
702         (WebCore):
703         (ApplyPropertyMarqueeRepetition):
704         (WebCore::ApplyPropertyMarqueeRepetition::applyValue):
705         (WebCore::ApplyPropertyMarqueeRepetition::createHandler):
706         (ApplyPropertyMarqueeSpeed):
707         (WebCore::ApplyPropertyMarqueeSpeed::applyValue):
708         (WebCore::ApplyPropertyMarqueeSpeed::createHandler):
709         (WebCore::StyleBuilder::StyleBuilder):
710         * css/StyleResolver.cpp:
711         (WebCore::StyleResolver::applyProperty):
712         Move marquee applying logic from StyleResolver to StyleBuilder.
713         
714         * rendering/style/RenderStyle.h:
715         Change setMarqueeIncrement to pass Length by value instead of const
716         reference. This is consistent with other length setters and works with
717         the ApplyPropertyLength template.
718
719 2013-04-01  Philip Rogers  <pdr@google.com>
720
721         [SVG2] Add support for the buffered-rendering hint
722         https://bugs.webkit.org/show_bug.cgi?id=104207
723
724         Reviewed by Stephen Chenney.
725
726         This patch adds the SVG2 buffered-rendering property and implements it for the image
727         element. For reference, the spec can be found at:
728             https://svgwg.org/svg2-draft/single-page.html#painting-BufferedRendering
729
730         The buffered-rendering hint causes our implementation to create a temporary image buffer
731         for caching an element's foreground rendering. This behavior has been designed to support
732         other graphical and container elements in followup patches (such as the use and g elements).
733         This patch should not affect rendering, and a test has been added showing the image
734         results are unchanged. 
735
736         The performance aspects of this patch can be tested using the following test:
737             http://philbit.com/bouncingTigers.html
738         Without the patch, rendering is below 1fps. With the patch, rendering is fluid.
739
740         Tests: svg/css/buffered-rendering.html
741                svg/repaint/buffered-rendering-dynamic-image.html
742                svg/repaint/buffered-rendering-static-image.html
743
744         Other than the changes to RenderSVGImage and SVGRenderingContext, the changes below are to
745         support the new buffered-rendering property:
746
747         * css/CSSComputedStyleDeclaration.cpp:
748         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
749         * css/CSSPrimitiveValueMappings.h:
750         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
751         (WebCore):
752         (WebCore::CSSPrimitiveValue::operator EBufferedRendering):
753         * css/CSSProperty.cpp:
754         (WebCore::CSSProperty::isInheritedProperty):
755         * css/SVGCSSComputedStyleDeclaration.cpp:
756         (WebCore::CSSComputedStyleDeclaration::getSVGPropertyCSSValue):
757         * css/SVGCSSParser.cpp:
758         (WebCore::CSSParser::parseSVGValue):
759         * css/SVGCSSPropertyNames.in:
760         * css/SVGCSSStyleSelector.cpp:
761         (WebCore::StyleResolver::applySVGProperty):
762         * css/SVGCSSValueKeywords.in:
763         * rendering/style/SVGRenderStyle.cpp:
764         (WebCore::SVGRenderStyle::diff):
765         * rendering/style/SVGRenderStyle.h:
766         (WebCore::SVGRenderStyle::initialBufferedRendering):
767         (WebCore::SVGRenderStyle::setBufferedRendering):
768         (WebCore::SVGRenderStyle::bufferedRendering):
769         (WebCore::SVGRenderStyle::setBitDefaults):
770         * rendering/style/SVGRenderStyleDefs.h:
771         * rendering/svg/RenderSVGImage.cpp:
772         (WebCore::RenderSVGImage::paint):
773
774             The foreground painting has been extracted out into a separate function. This has also
775             been changed so that if the buffered-rendering hint is present, bufferForeground
776             is used.
777
778         (WebCore::RenderSVGImage::paintForeground):
779         (WebCore):
780         (WebCore::RenderSVGImage::invalidateBufferedForeground):
781
782             This function could be replaced with "m_bufferedForeground.clear()" but other renderers
783             (such as container elements) will require more complex invalidation logic. To
784             maintain consistency with this future code, invalidateBufferedForeground has been used.
785
786         (WebCore::RenderSVGImage::imageChanged):
787         * rendering/svg/RenderSVGImage.h:
788         (RenderSVGImage):
789         * rendering/svg/SVGRenderingContext.cpp:
790         (WebCore::SVGRenderingContext::bufferForeground):
791         (WebCore):
792         * rendering/svg/SVGRenderingContext.h:
793         (SVGRenderingContext):
794         * svg/SVGStyledElement.cpp:
795         (WebCore::SVGStyledElement::cssPropertyIdForSVGAttributeName):
796         (WebCore::cssPropertyToTypeMap):
797         * svg/svgattrs.in:
798
799 2013-04-01  Mike West  <mkwst@chromium.org>
800
801         CSP 1.1: Remove 'type' parameter from CSPDirectiveList::checkSourceAndReportViolation.
802         https://bugs.webkit.org/show_bug.cgi?id=113502
803
804         Reviewed by Adam Barth.
805
806         Now that we're passing in 'effectiveDirective', we don't need the 'type'
807         parameter to generate the proper error message prefix when reporting
808         violations.
809
810         While I'm here, I'll slightly tweak the grammar for the error messages.
811         Changes are covered via rebaselines of existing tests.
812
813         * page/ContentSecurityPolicy.cpp:
814         (WebCore::CSPDirectiveList::checkSourceAndReportViolation):
815             Drop the 'type' parameter. We don't need to pass in a type since
816             we're now passing in the 'effectiveDirective'; we can use the latter
817             to generate the correct error message prefix.
818         (WebCore::CSPDirectiveList::allowScriptFromSource):
819         (WebCore::CSPDirectiveList::allowObjectFromSource):
820         (WebCore::CSPDirectiveList::allowChildFrameFromSource):
821         (WebCore::CSPDirectiveList::allowImageFromSource):
822         (WebCore::CSPDirectiveList::allowStyleFromSource):
823         (WebCore::CSPDirectiveList::allowFontFromSource):
824         (WebCore::CSPDirectiveList::allowMediaFromSource):
825         (WebCore::CSPDirectiveList::allowConnectToSource):
826         (WebCore::CSPDirectiveList::allowFormAction):
827         (WebCore::CSPDirectiveList::allowBaseURI):
828             Drop the 'type' parameter from the callsites, which has the lovely
829             property of allowing us to throw away a bunch of statically allocated
830             strings that we don't need anymore.
831
832 2013-04-01  James Craig  <james@cookiecrook.com>
833
834         AX: "video element controller" is an overly verbose default description for the playback controls; how about just "playback"
835         https://bugs.webkit.org/show_bug.cgi?id=113549
836
837         Reviewed by Chris Fleizach.
838
839         Existing test coverage. 
840
841         Updating the video/audio element's default accessibility labels to be less verbose.
842         Also cleaned up some erroneous comments related to the sub-level controls on these elements.
843
844         * English.lproj/Localizable.strings:
845         * platform/LocalizedStrings.cpp:
846         (WebCore::localizedMediaControlElementString):
847         (WebCore::localizedMediaControlElementHelpText):
848         * platform/gtk/LocalizedStringsGtk.cpp:
849         (WebCore::localizedMediaControlElementString):
850
851 2013-04-01  Nate Chapin  <japhet@chromium.org>
852
853         Make a bunch of DocumentLoader functions private
854         https://bugs.webkit.org/show_bug.cgi?id=113601
855
856         Reviewed by Alexey Proskuryakov.
857
858         No new tests, cleanup only.
859
860         * loader/DocumentLoader.cpp:
861         * loader/DocumentLoader.h:
862
863 2013-04-01  Kangil Han  <kangil.han@samsung.com>
864
865         Minor code cleanup by removing duplicated null checks
866         https://bugs.webkit.org/show_bug.cgi?id=113701
867
868         Reviewed by Darin Adler.
869
870         Duplicated null check is code redundancy, so delete those.
871
872         * editing/FrameSelection.cpp:
873         (WebCore::FrameSelection::setFocusedNodeIfNeeded):
874         * platform/Arena.cpp:
875         (WebCore::FreeArenaList):
876
877 2013-04-01  Pavel Feldman  <pfeldman@chromium.org>
878
879         Web Inspector: follow up to r147323, popover is empty on network panel.
880         Not reviewed.
881
882         * inspector/front-end/DOMExtension.js:
883         (Element.prototype.measurePreferredSize):
884         * inspector/front-end/Popover.js:
885         (WebInspector.Popover.prototype._innerShow):
886
887 2013-04-01  Dmitry Zvorygin  <zvorygin@chromium.org>
888
889         Web Inspector: Exception in console on attempt to filter javascript messages.
890         https://bugs.webkit.org/show_bug.cgi?id=113327
891
892         Fixed non-css filtration if console message groups are present. Message groups elements are always shown and are
893         never filtered out.
894
895         Reviewed by Pavel Feldman.
896
897         * inspector/front-end/ConsoleMessage.js:
898         (WebInspector.ConsoleMessageImpl.prototype.updateRepeatCount):
899         * inspector/front-end/ConsoleView.js:
900         (WebInspector.ConsoleView.get this):
901         (WebInspector.ConsoleView.prototype._consoleMessageAdded):
902         (WebInspector.ConsoleView.prototype._appendConsoleMessage):
903         (WebInspector.ConsoleView.prototype._consoleCleared):
904         (WebInspector.ConsoleView.prototype._shouldBeVisible):
905         (WebInspector.ConsoleView.prototype._updateMessageList):
906         (WebInspector.ConsoleView.prototype._printResult):
907
908 2013-04-01  Victor Carbune  <vcarbune@chromium.org>
909
910         Parsing WebVTT Region Header Metadata
911         https://bugs.webkit.org/show_bug.cgi?id=109818
912
913         Reviewed by Eric Carlson.
914
915         This patch enables reading regions from the metadata section of
916         a WebVTT file. The work for defining generic metadata within the
917         WebVTT file header is still work in progress in the TextTrack CG.
918
919         As previous patches, everything is guarded by WEBVTT_REGIONS and
920         is by default disabled in all ports.
921
922         Test: media/track/regions-webvtt/text-track-region-parser.html
923
924         * html/track/LoadableTextTrack.cpp:
925         (WebCore):
926         (WebCore::LoadableTextTrack::newRegionsAvailable): Added method
927         to be called as soon as regions have finished parsing.
928         * html/track/LoadableTextTrack.h:
929         (LoadableTextTrack):
930         * html/track/TextTrack.h: Changed the access modifiers.
931         (TextTrack):
932         * html/track/TextTrackRegion.cpp:
933         (WebCore::TextTrackRegion::setRegionSettings): Entry point for
934         parsing the region settings from a string.
935         (WebCore):
936         (WebCore::TextTrackRegion::getSettingFromString): Maps a string
937         to a RegionSetting value.
938         (WebCore::TextTrackRegion::parseSettingValue): Parses the value
939         of a specific setting.
940         (WebCore::TextTrackRegion::parseSetting): Parses a setting string.
941         * html/track/TextTrackRegion.h:
942         * html/track/WebVTTParser.cpp:
943         (WebCore):
944         (WebCore::WebVTTParser::parseFloatPercentageValue): Helper method
945         to parse a float percentage value (e.g. "50.1%")
946         (WebCore::WebVTTParser::parseFloatPercentageValuePair): Helper method
947         to parse a float percentage value pair (e.g. "50.1%, 30.5%")
948         (WebCore::WebVTTParser::getNewRegions): Retrieves the new regions
949         available for processing.
950         (WebCore::WebVTTParser::parseBytes):
951         (WebCore::WebVTTParser::collectHeader): Generic function to collect
952         header in the metadata region.
953         (WebCore::WebVTTParser::createNewRegion): Creates new region using
954         the existing metadata header name and value.
955         * html/track/WebVTTParser.h:
956         (WebVTTParserClient):
957         (WebVTTParser):
958         * loader/TextTrackLoader.cpp:
959         (WebCore):
960         (WebCore::TextTrackLoader::newRegionsParsed): Called when the
961         regions have been succesfully parsed.
962         (WebCore::TextTrackLoader::getNewRegions): Gets the new regions.
963         * loader/TextTrackLoader.h:
964         (TextTrackLoaderClient): Added methods that need to be implemented.
965         (TextTrackLoader):
966
967 2013-04-01  Pavel Feldman  <pfeldman@chromium.org>
968
969         Web Inspector: Go to line dialog has 0 height, viewport dialogs have empty gaps.
970         https://bugs.webkit.org/show_bug.cgi?id=113702
971
972         Reviewed by Yury Semikhatsky.
973
974         * inspector/front-end/DOMExtension.js:
975         (Element.prototype.measurePreferredSize):
976         * inspector/front-end/Popover.js:
977         (WebInspector.Popover.prototype._innerShow):
978         * inspector/front-end/ViewportControl.js:
979         (WebInspector.ViewportControl.prototype.refresh):
980         * inspector/front-end/dialog.css:
981         (.dialog-contents):
982
983 2013-04-01  Andrey Lushnikov  <lushnikov@chromium.org>
984
985         Web Inspector: [DTE] Convertion between text and coordinates
986         https://bugs.webkit.org/show_bug.cgi?id=113389
987
988         Reviewed by Pavel Feldman.
989
990         Test: inspector/editor/text-editor-char-to-coordinates.html
991
992         Implement cursorPositionToCoordinates and coordinatesToCursorPosition
993         methods pair in DefaultTextEditor.
994
995         * inspector/front-end/DefaultTextEditor.js:
996         (WebInspector.DefaultTextEditor.prototype.cursorPositionToCoordinates):
997         (WebInspector.DefaultTextEditor.prototype.coordinatesToCursorPosition):
998         (WebInspector.TextEditorMainPanel.prototype.cursorPositionToCoordinates):
999         (WebInspector.TextEditorMainPanel.prototype.coordinatesToCursorPosition):
1000         * inspector/front-end/TextEditor.js:
1001         (WebInspector.TextEditor.prototype.cursorPositionToCoordinates):
1002         (WebInspector.TextEditor.prototype.coordinatesToCursorPosition):
1003
1004 2013-04-01  Sergey Ryazanov  <serya@chromium.org>
1005
1006         Web Inspector: Rename "Copy to Curl" menu item command to "Copy to cURL"
1007         https://bugs.webkit.org/show_bug.cgi?id=113575
1008
1009         Reviewed by Pavel Feldman.
1010
1011         Fix the name to the offical way of capitalization.
1012
1013         * English.lproj/localizedStrings.js:
1014         * inspector/front-end/NetworkPanel.js:
1015         (WebInspector.NetworkLogView.prototype._contextMenu):
1016
1017 2013-04-01  Koji Ishii  <kojiishi@gmail.com>
1018
1019         ASSERTION FAILED: m_purgePreventCount when clicking text with emphasis marks
1020         https://bugs.webkit.org/show_bug.cgi?id=85266
1021
1022         Reviewed by Darin Adler.
1023
1024         Font::glyphDataAndPageForCharacter may call FontCache::getFontDataForCharacters
1025         if system fallback occurs, which may return SimpleFontData with DoNotRetain,
1026         so callers must prevent possible font cache purging.
1027
1028         Test: fast/text/emphasis-height-crash.html
1029
1030         * platform/graphics/FontFastPath.cpp:
1031         (WebCore::Font::emphasisMarkAscent): Add FontCachePurgePreventer.
1032         (WebCore::Font::emphasisMarkDescent): ditto.
1033         (WebCore::Font::emphasisMarkHeight): ditto.
1034         (WebCore::Font::drawEmphasisMarks): ditto.
1035
1036 2013-04-01  Vladislav Kaznacheev  <kaznacheev@chromium.org>
1037
1038         Web Inspector: Fixed DOM Breakpoint pane styles.
1039         https://bugs.webkit.org/show_bug.cgi?id=113688
1040
1041         Reviewed by Pavel Feldman.
1042
1043         The required stylesheet (breakpointsList.css) was not loaded because of
1044         the peculiar way DOMBreakpointsSidebarPane is included in two panels
1045         (Sources and Elements) via a proxy pane. Since DOMBreakpointsSidebarPane
1046         was never shown directly the registerRequiredCSS call in its base class
1047         NativeBreakpointsSidebarPane constructor had no effect.
1048         Addin a registerRequiredCSS call to the proxy pane constructor fixes the
1049         problem.
1050
1051
1052         * inspector/front-end/DOMBreakpointsSidebarPane.js:
1053         (WebInspector.DOMBreakpointsSidebarPane.Proxy):
1054
1055 2013-04-01  Ilya Tikhonovsky  <loislo@chromium.org>
1056
1057         Web Inspector: Flame Chart. Extract item to coordinates conversion into a separate function.
1058         https://bugs.webkit.org/show_bug.cgi?id=113682
1059
1060         Reviewed by Yury Semikhatsky.
1061
1062         The calculation was extracted into entryToAnchorBox.
1063
1064         Drive by fixes: unnecessary members were removed.
1065
1066         * inspector/front-end/FlameChart.js:
1067         (WebInspector.FlameChart):
1068         (WebInspector.FlameChart.Entry):
1069         (WebInspector.FlameChart.prototype._calculateTimelineData):
1070         (WebInspector.FlameChart.prototype._calculateTimelineDataForSamples):
1071         (WebInspector.FlameChart.prototype._getPopoverAnchor):
1072         (WebInspector.FlameChart.prototype._entryToAnchorBox):
1073         (WebInspector.FlameChart.prototype.draw):
1074
1075 2013-03-31  Zalan Bujtas  <zalan@apple.com>
1076
1077         Gradient background does not get repainted when child box is expanded.
1078         https://bugs.webkit.org/show_bug.cgi?id=113644
1079
1080         Reviewed by Antti Koivisto.
1081         
1082         The initial value for background-size is SizeNone and remains, unless it is
1083         set explicitly. However, when the background shorthand is used,
1084         the size property defaults to SizeLength. The repaint
1085         logic in mustRepaintFillLayers expects to have this value set correctly.
1086
1087         Test: fast/repaint/background-shorthand-with-gradient-and-height-changes.html
1088
1089         * rendering/RenderObject.cpp:
1090         (WebCore::mustRepaintFillLayers): code cleanup. no functionality change.
1091         * rendering/style/FillLayer.cpp:
1092         (WebCore::FillLayer::FillLayer):
1093         * rendering/style/FillLayer.h:    use SizeNone as initial value.
1094         (WebCore::FillLayer::initialFillSizeType):
1095         (WebCore::FillLayer::initialFillSize):
1096
1097 2013-03-31  Hayato Ito  <hayato@chromium.org>
1098
1099         Text representation of pseudo elements, '::-webkit-distributed', is wrong in CSSSelector::selectorText().
1100         https://bugs.webkit.org/show_bug.cgi?id=113560
1101
1102         Reviewed by Dimitri Glazkov.
1103
1104         Fix the text representation of distributed functional pseudo elements in CSSSelector::selectorText().
1105
1106         Test: fast/dom/shadow/distributed-pseudo-element-css-text.html
1107
1108         * css/CSSSelector.cpp:
1109         (WebCore::CSSSelector::selectorText):
1110         * css/CSSSelector.h:
1111         (CSSSelector):
1112
1113 2013-03-31  Adam Barth  <abarth@webkit.org>
1114
1115         [Chromium] Yarr should build using a separate GYP file from JavaScriptCore
1116         https://bugs.webkit.org/show_bug.cgi?id=113652
1117
1118         Reviewed by Nico Weber.
1119
1120         * WebCore.gyp/WebCore.gyp:
1121             - Update references to yarr.gyp.
1122
1123 2013-03-31  Kangil Han  <kangil.han@samsung.com>
1124
1125         [EFL] Remove unused stdio.h includes
1126         https://bugs.webkit.org/show_bug.cgi?id=113655
1127
1128         Reviewed by Andreas Kling.
1129
1130         We do not have to include unused header file.
1131
1132         * platform/efl/CursorEfl.cpp:
1133         * platform/efl/FileSystemEfl.cpp:
1134         * platform/efl/PlatformKeyboardEventEfl.cpp:
1135         * platform/efl/ScrollbarThemeEfl.cpp:
1136
1137 2013-03-31  Rafael Weinstein  <rafaelw@chromium.org>
1138
1139         HTMLLinkElement should resolve resource URLs when resources will be fetched
1140         https://bugs.webkit.org/show_bug.cgi?id=113630
1141
1142         HTMLLinkElement was resolving its URL when the href attribute was processed and caching it without ever
1143         invalidating the cached URL. This patch removes the cached URL and adds getURL() which resolve the
1144         URL dynamically.
1145
1146         Reviewed by Eric Seidel.
1147
1148         Test: fast/dom/HTMLLinkElement/resolve-url-on-insertion.html
1149
1150         * html/HTMLLinkElement.cpp:
1151         (WebCore::HTMLLinkElement::getURL):
1152         (WebCore):
1153         (WebCore::HTMLLinkElement::parseAttribute):
1154         (WebCore::HTMLLinkElement::shouldLoadLink):
1155         (WebCore::HTMLLinkElement::process):
1156         * html/HTMLLinkElement.h:
1157         (HTMLLinkElement):
1158
1159 2013-03-31  Brady Eidson  <beidson@apple.com>
1160
1161         NetworkProcess crashes in WebCoreResourceHandleAsOperationQueueDelegate callbacks.
1162         <rdar://problem/13541868> and https://bugs.webkit.org/show_bug.cgi?id=113664
1163
1164         Reviewed by Dan Bernstein.
1165
1166         In the "two-part" callbacks that involve waiting on a semaphore for the async block to finish,
1167         the delegate might have been destroyed by the time the wait completes.
1168
1169         A RetainPtr<> protector will fix that up nicely.
1170
1171         * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm:
1172         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]):
1173         (-[WebCoreResourceHandleAsOperationQueueDelegate connectionShouldUseCredentialStorage:]):
1174         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]):
1175         (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]):
1176
1177 2013-03-30  Adam Barth  <abarth@webkit.org>
1178
1179         Remove unused include of RegularExpression.h
1180         https://bugs.webkit.org/show_bug.cgi?id=113649
1181
1182         Reviewed by Dimitri Glazkov.
1183
1184         * Modules/filesystem/DOMFilePath.cpp:
1185             - This include isn't used.
1186
1187 2013-03-30  Tom Sepez  <tsepez@chromium.org>
1188
1189         Cross-Origin copy&paste / drag&drop allowing XSS via srcdoc attribute.
1190         https://bugs.webkit.org/show_bug.cgi?id=113443
1191
1192         Reviewed by Adam Barth.
1193
1194         Tested by LayoutTests/editing/pasteboard/paste-noscript.html
1195
1196         * dom/Element.h:
1197         (Element):
1198         (WebCore::Element::isHTMLContentAttribute):
1199         Adds an isHTMLContentAttribute() method to determine whether an attribute can contain
1200         (potentially unsafe) HTML content. Currently, the iframe's srcdoc attribute is the only
1201         such attribute, but clever folks might add more in the future.
1202         Rename stripJavaScriptAttributes() method to stripScriptingAttributes(), to better reflect
1203         the reality that scripting content may appear as above.
1204         Adds missing consts and consolidate isJavaScriptAttribute() method.
1205
1206         * dom/Element.cpp:
1207         (WebCore::Element::isJavaScriptURLAttribute):
1208         (WebCore::Element::stripScriptingAttributes):
1209         Consolidated methods.
1210         
1211         * html/HTMLFrameElementBase.cpp:
1212         (WebCore::HTMLFrameElementBase::isHTMLContentAttribute):
1213         (WebCore):
1214         * html/HTMLFrameElementBase.h:
1215         (HTMLFrameElementBase):
1216         Indicate that for frames, the srcdoc attribute contains HTML content.
1217         
1218         * html/parser/HTMLConstructionSite.cpp:
1219         (WebCore::setAttributes):
1220         * xml/parser/XMLDocumentParserLibxml2.cpp:
1221         (WebCore::setAttributes):
1222         * xml/parser/XMLDocumentParserQt.cpp:
1223         (WebCore::setAttributes):
1224         Rename stripJavaScriptAttribute calls to match Element.h
1225
1226 2013-03-30  Tom Sepez  <tsepez@chromium.org>
1227
1228         View-source iframes are dangerous (and not very useful).
1229         https://bugs.webkit.org/show_bug.cgi?id=113345
1230
1231         Reviewed by Adam Barth.
1232
1233         * html/HTMLFrameElementBase.cpp:
1234         (WebCore::HTMLFrameElementBase::parseAttribute):
1235         Conditionalize viewsource attribute on ENABLE(VIEWSOURCE_ATTRIBUTE).
1236
1237 2013-03-30  Philippe Normand  <pnormand@igalia.com>
1238
1239         [GTK] Should use GStreamer codec installation infrastructure
1240         https://bugs.webkit.org/show_bug.cgi?id=34085
1241
1242         Reviewed by Martin Robinson.
1243
1244         Initial support for the GStreamer codec installer. The player will
1245         handle missing-plugins messages and use the pbutils codec
1246         installer facilities to install the missing GStreamer
1247         plugins. Once the plugins are installed reset the pipeline state.
1248
1249         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
1250         (WebCore::mediaPlayerPrivatePluginInstallerResultFunction): This
1251         method is used to notify the player that the missing plugins were installed.
1252         (WebCore):
1253         (WebCore::MediaPlayerPrivateGStreamer::MediaPlayerPrivateGStreamer):
1254         (WebCore::MediaPlayerPrivateGStreamer::handleMessage): Ignore
1255         errors while installing plugins and handle the missing-plugin message.
1256         (WebCore::MediaPlayerPrivateGStreamer::handlePluginInstallerResult):
1257         This method is invoked after the installer finished its task.
1258         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.h:
1259         (MediaPlayerPrivateGStreamer):
1260
1261 2013-03-30  Praveen R Jadhav  <praveen.j@samsung.com>
1262
1263         g_slist_reverse() may not be required in webKitWebAudioSrcLoop
1264         https://bugs.webkit.org/show_bug.cgi?id=113568
1265
1266         Reviewed by Philippe Normand.
1267
1268         Decremental 'for' loop logic implemented to avoid using g_slist_reverse().
1269
1270         Original code            - 2.025230 micro seconds per loop
1271         Original code + patch    - 1.964759 micro seconds per loop
1272
1273         This patch is covered by existing webaudio tests.
1274
1275         * platform/audio/gstreamer/WebKitWebAudioSourceGStreamer.cpp:
1276         (webKitWebAudioSrcLoop):
1277
1278 2013-03-30  Alexei Filippov  <alph@chromium.org>
1279
1280         Web Inspector: Fonts refactoring
1281         https://bugs.webkit.org/show_bug.cgi?id=113047
1282
1283         Reviewed by Pavel Feldman.
1284
1285         Unify fonts usage across inspector.
1286         Make inspector default font depend on platform.
1287
1288         * inspector/front-end/breakpointsList.css:
1289         * inspector/front-end/dataGrid.css:
1290         (.data-grid):
1291         (.data-grid table):
1292         (.data-grid td):
1293         (.data-grid th.sort-ascending > div::after):
1294         (.data-grid th.sort-descending > div::after):
1295         (.data-grid button):
1296         * inspector/front-end/heapProfiler.css:
1297         (.heap-snapshot-view .class-view-toolbar input.class-name-filter):
1298         (.heap-snapshot-view .retainers-view-header):
1299         * inspector/front-end/inspector.css:
1300         (.toolbar-item):
1301         (.toolbar-label):
1302         (.console-message .bubble):
1303         (.outline-disclosure > ol):
1304         (.source-code):
1305         (.scope-bar li):
1306         (.sidebar-tree, .sidebar-tree .children):
1307         (.sidebar-tree-section):
1308         (li .status .bubble):
1309         (.sidebar-tree-item.selected):
1310         (.sidebar-tree-item .titles):
1311         (.sidebar-tree-item .subtitle):
1312         (.sidebar-tree-item.selected .subtitle):
1313         (.source-frame-breakpoint-message):
1314         (.soft-context-menu):
1315         * inspector/front-end/inspectorCommon.css:
1316         (body):
1317         (.resources-divider-label):
1318         * inspector/front-end/navigatorView.css:
1319         (.navigator li):
1320         (.navigator li.selected .selection):
1321         (.navigator .base-navigator-tree-element-title):
1322         * inspector/front-end/networkLogView.css:
1323         (.network-log-grid.data-grid td):
1324         (.network-log-grid.data-grid.small td):
1325         (.network-log-grid.data-grid th):
1326         (.network-log-grid.data-grid select):
1327         (.network-graph-label):
1328         (.network-timeline-grid .resources-divider-label):
1329         (.network-log-grid.data-grid .network-summary-bar td):
1330         * inspector/front-end/resourcesPanel.css:
1331         (.resources.panel .sidebar li):
1332         (.resources.panel .sidebar li.selected):
1333         (.resources.panel .sidebar li.selected .selection):
1334         * inspector/front-end/sidebarPane.css:
1335         (.sidebar-pane > .body .info):
1336         (.sidebar-pane-title):
1337         (.sidebar-pane-toolbar):
1338         (.sidebar-pane-subtitle):
1339         * inspector/front-end/tabbedPane.css:
1340         (.tabbed-pane-header-tab):
1341         (.tabbed-pane-header-tab-close-button):
1342         (select.tabbed-pane-header-tabs-drop-down-select):
1343         * inspector/front-end/timelinePanel.css:
1344         (.memory-counter-value):
1345
1346 2013-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1347
1348         Unreviewed, rolling out r147263.
1349         http://trac.webkit.org/changeset/147263
1350         https://bugs.webkit.org/show_bug.cgi?id=113632
1351
1352         Breaks test fast/loader/display-image-unset-allows-cached-
1353         image-load.html (Requested by mlam on #webkit).
1354
1355         * loader/cache/CachedResource.cpp:
1356         (WebCore::CachedResource::freshnessLifetime):
1357
1358 2013-03-29  Roger Fong  <roger_fong@apple.com>
1359
1360         Unreviewed. AppleWin VS2010 build fix.
1361
1362         * WebCore.vcxproj/WebCore.vcxproj:
1363         * WebCore.vcxproj/WebCore.vcxproj.filters:
1364
1365 2013-03-29  Yongjun Zhang  <yongjun_zhang@apple.com>
1366
1367         When releasing a CGImage, we should also remove it from the subimage cache.
1368         https://bugs.webkit.org/show_bug.cgi?id=102453
1369
1370         Reviewed by Simon Fraser.
1371
1372         When we release an image(CGImageRef) from BitmapImage's cachedFrames, if the image was already
1373         cached in subimage cache, it's ref count won't drop to 0 and the image won't be deleted.  Usually,
1374         the subimage cache will clear the whole cache in a timer with 1 sec delay.  However, if WebCore has
1375         to paint another subimage (not necessarily from the same CGImageRef) before this timer fires, we
1376         will restart the timer and images inside the cache will stay longer than they should.
1377
1378         This patch does two things:
1379             - move SubimageCacheWithTimer and related helper struct into a separate file.
1380             - remove the image from subimage cache when we releasing the CGImageRef, this prevent subimage
1381         cache holding the image after we released it.
1382
1383         No new tests, manually verified the CGImageRef is also removed from subimage cache
1384         when we releasing the image from FrameData::clear.
1385
1386         * WebCore.vcproj/WebCore.vcproj:
1387         * WebCore.xcodeproj/project.pbxproj:
1388         * platform/graphics/cg/BitmapImageCG.cpp:
1389         (WebCore::FrameData::clear): remove the image from subimage cache before we releasing it.
1390         * platform/graphics/cg/GraphicsContextCG.cpp:
1391         (WebCore):
1392         (WebCore::GraphicsContext::drawNativeImage):
1393         * platform/graphics/cg/SubimageCacheWithTimer.cpp: Added.
1394         (WebCore):
1395         (SubimageRequest):
1396         (WebCore::SubimageRequest::SubimageRequest):
1397         (WebCore::SubimageCacheAdder::hash):
1398         (SubimageCacheAdder):
1399         (WebCore::SubimageCacheAdder::equal):
1400         (WebCore::SubimageCacheAdder::translate):
1401         (WebCore::SubimageCacheWithTimer::SubimageCacheWithTimer):
1402         (WebCore::SubimageCacheWithTimer::invalidateCacheTimerFired):
1403         (WebCore::SubimageCacheWithTimer::getSubimage):
1404         (WebCore::SubimageCacheWithTimer::clearImage):
1405         (WebCore::subimageCache):
1406         * platform/graphics/cg/SubimageCacheWithTimer.h: Added.
1407         (WebCore):
1408         (SubimageCacheWithTimer): Added a data member m_images to record which image and its subimages are cached.
1409         (SubimageCacheEntry):
1410         (SubimageCacheEntryTraits):
1411         (WebCore::SubimageCacheWithTimer::SubimageCacheEntryTraits::isEmptyValue):
1412         (WebCore::SubimageCacheWithTimer::SubimageCacheEntryTraits::constructDeletedValue):
1413         (WebCore::SubimageCacheWithTimer::SubimageCacheEntryTraits::isDeletedValue):
1414         (WebCore::SubimageCacheWithTimer::SubimageCacheHash::hash):
1415         (WebCore::SubimageCacheWithTimer::SubimageCacheHash::equal):
1416         (SubimageCacheHash):
1417
1418 2013-03-29  Andy Estes  <aestes@apple.com>
1419
1420         Let cached resources from file: schemes expire immediately
1421         https://bugs.webkit.org/show_bug.cgi?id=113626
1422
1423         Reviewed by Brady Eidson
1424
1425         When a CachedResource was loaded from a file: URL, we would give it an
1426         indefinite freshness lifetime. This means that we would continue to
1427         serve a stale resource from the memory cache even if the file was
1428         changed on disk. With the introduction of main resource caching, this
1429         behavior broke at least one third-party WebKit app (see <rdar://problem/13313769>).
1430
1431         We should instead let file resources expire immediately. Modern
1432         filesystems implement their own caching, so we should get good
1433         performance for multiple reads of unmodified files without doing our
1434         own caching.
1435
1436         * loader/cache/CachedResource.cpp:
1437         (WebCore::CachedResource::freshnessLifetime): file: URLs should have a
1438         0 freshness lifetime.
1439
1440 2013-03-29  Ojan Vafai  <ojan@chromium.org>
1441
1442         Flexitems no longer default min-width to min-content
1443         https://bugs.webkit.org/show_bug.cgi?id=111790
1444
1445         Reviewed by Tony Chang.
1446
1447         * css/CSSParser.cpp:
1448         (WebCore::CSSParser::parseValue):
1449         Disallow auto as a valid min-size value.
1450
1451         * css/html.css:
1452         (input::-webkit-datetime-edit):
1453         (input[type="range"]::-webkit-slider-container, input[type="range"]::-webkit-media-slider-container):
1454         (input[type="range"]::-webkit-slider-runnable-track):
1455         Remove now unnecessary min-width: 0's.
1456
1457         * css/mediaControlsChromium.css:
1458         (audio::-webkit-media-controls-enclosure, video::-webkit-media-controls-enclosure):
1459         (video::-webkit-media-controls-enclosure):
1460         Set a flex-shrink: 0 to avoid shrinking these items below the designated height.
1461
1462         * rendering/RenderBox.cpp:
1463         (WebCore::RenderBox::constrainLogicalHeightByMinMax):
1464         (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
1465         (WebCore::RenderBox::computeLogicalWidthInRegionUsing):
1466         (WebCore::RenderBox::computeLogicalHeight):
1467         (WebCore::RenderBox::computeLogicalHeightUsing):
1468         (WebCore::RenderBox::computeContentLogicalHeight):
1469         (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
1470         (WebCore::RenderBox::computeReplacedLogicalWidth):
1471         (WebCore::RenderBox::computeReplacedLogicalWidthRespectingMinMaxWidth):
1472         (WebCore::RenderBox::computeReplacedLogicalWidthUsing):
1473         (WebCore::RenderBox::computeReplacedLogicalHeight):
1474         (WebCore::RenderBox::computeReplacedLogicalHeightRespectingMinMaxHeight):
1475         (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
1476         (WebCore::RenderBox::availableLogicalHeightUsing):
1477         (WebCore::RenderBox::computePositionedLogicalWidth):
1478         (WebCore::RenderBox::computePositionedLogicalWidthUsing):
1479         (WebCore::RenderBox::computePositionedLogicalHeight):
1480         (WebCore::RenderBox::computePositionedLogicalHeightUsing):
1481         Remove all the unneeded SizeType arguments now that we don't need to
1482         specially handle MinSize in all these functions.
1483
1484         * rendering/RenderBox.h:
1485         * rendering/RenderButton.cpp:
1486         (WebCore::RenderButton::styleWillChange):
1487         (WebCore::RenderButton::setupInnerStyle):
1488         No longer need to explicitly set min-width:0.
1489
1490         * rendering/RenderFlexibleBox.cpp:
1491         (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
1492         (WebCore::RenderFlexibleBox::computeMainAxisPreferredSizes):
1493         (WebCore::RenderFlexibleBox::adjustChildSizeForMinAndMax):
1494         Remove the code for specially handling auto.
1495
1496         * rendering/RenderGrid.cpp:
1497         (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
1498         * rendering/RenderRegion.cpp:
1499         (WebCore::RenderRegion::maxPageLogicalHeight):
1500         * rendering/RenderReplaced.cpp:
1501         (WebCore::RenderReplaced::computeReplacedLogicalWidth):
1502         (WebCore::RenderReplaced::computeReplacedLogicalHeight):
1503         Remove all the now unneeded SizeType arguments.
1504
1505         * rendering/style/RenderStyle.h:
1506         Change the default min-size back to 0.
1507
1508 2013-03-29  Alexey Proskuryakov  <ap@apple.com>
1509
1510         Expose FeatureObserver data to WebKit clients
1511         https://bugs.webkit.org/show_bug.cgi?id=113613
1512
1513         Reviewed by Sam Weinig.
1514
1515         FeatureObserver used to depend on chromium-only HistogramSupport, which is not
1516         really usable on Mac at least.
1517
1518         Instead of adding parallel feature reporting machinery, I'm adding a way to
1519         generically relay the data from FeatureObserver to port code.
1520
1521         * loader/FrameLoader.cpp:
1522         (WebCore::FrameLoader::loadWithDocumentLoader):
1523         (WebCore::FrameLoader::commitProvisionalLoad):
1524         (WebCore::FrameLoader::reportMemoryUsage):
1525         * loader/FrameLoader.h:
1526         (WebCore::FrameLoader::previousURL):
1527         Exposed m_previousURL, renaming it to follow WebKit style.
1528
1529         * page/FeatureObserver.cpp:
1530         (WebCore::FeatureObserver::~FeatureObserver):
1531         (WebCore::FeatureObserver::updateMeasurements):
1532         * page/FeatureObserver.h:
1533         (WebCore::FeatureObserver::accumulatedFeatureBits):
1534         Exposed the data to clients, and made reporting through HistogramSupport
1535         chromium only for clarity.
1536
1537 2013-03-29  Bem Jones-Bey  <bjonesbe@adobe.com>
1538
1539         [CSS Exclusions] shape outside segments not properly calculated for ellipses
1540         https://bugs.webkit.org/show_bug.cgi?id=112587
1541
1542         Reviewed by Julien Chaffraix.
1543
1544         When converting the line top coordinates from the parent's coordinate
1545         space to the coordinate space of the float, the offset given by the
1546         shape was not being accounted for. This patch accounts for that
1547         offset.
1548
1549         Test: fast/exclusions/shape-outside-floats/shape-outside-floats-non-zero-y.html
1550
1551         * rendering/RenderBlock.cpp:
1552         (WebCore::RenderBlock::logicalLeftOffsetForLine): Fix the coordinate conversion.
1553         (WebCore::RenderBlock::logicalRightOffsetForLine): Ditto.
1554         * rendering/RenderBlockLineLayout.cpp:
1555         (WebCore::LineWidth::shrinkAvailableWidthForNewFloatIfNeeded): Ditto.
1556
1557 2013-03-29  Hans Muller  <hmuller@adobe.com>
1558
1559         [CSS Exclusions] Incorrect margin corner radii formula
1560         https://bugs.webkit.org/show_bug.cgi?id=111186
1561
1562         Reviewed by Dirk Schulze.
1563
1564         Corrected an error in the forumla for the margin ellipse's radii.
1565
1566         Tests: fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-left.html
1567                fast/exclusions/shape-outside-floats/shape-outside-floats-ellipse-margin-right.html
1568
1569         * rendering/ExclusionRectangle.cpp:
1570         (WebCore::FloatRoundedRect::marginBounds):
1571
1572 2013-03-19  Ojan Vafai  <ojan@chromium.org>
1573
1574         min-width/max-width of min-content/max-content don't work correctly if width is specified
1575         https://bugs.webkit.org/show_bug.cgi?id=106143
1576
1577         Reviewed by Tony Chang.
1578
1579         Test: fast/css-intrinsic-dimensions/intrinsic-sized-blocks.html
1580
1581         * rendering/RenderBlock.cpp:
1582         (WebCore::RenderBlock::computeIntrinsicLogicalWidths):
1583         Expose this so that we don't use the preferred widths when calculating intrinsic width
1584         values since the preferred width will be the regular width value if it is set.
1585         Also, simplified the logic around table cells and scrollbar widths. The old code was
1586         wrong and unnecessarily complicated.
1587
1588         (WebCore::RenderBlock::computePreferredLogicalWidths):
1589         Use the new computeIntrinsicLogicalWidths method.
1590
1591         (WebCore::RenderBlock::computeInlinePreferredLogicalWidths):
1592         (WebCore::RenderBlock::computeBlockPreferredLogicalWidths):
1593         Pass in the min/max values as out params so they can be called from computeIntrinsicLogicalWidths.
1594         Also, make computeBlockPreferredLogicalWidths const.
1595
1596         * rendering/RenderBlock.h:
1597
1598 2013-03-29  Joshua Bell  <jsbell@chromium.org>
1599
1600         IndexedDB: Use WTF::TemporaryChange rather than manually resetting a flag
1601         https://bugs.webkit.org/show_bug.cgi?id=113594
1602
1603         Reviewed by Tony Chang.
1604
1605         Split out from another patch: rather than m_foo = true; ... m_foo = false; use
1606         the handy WTF::TemporaryChange scoped variable change doohickey.
1607
1608         Test: http/tests/inspector/indexeddb/database-structure.html
1609
1610         * Modules/indexeddb/IDBDatabaseBackendImpl.cpp:
1611         (WebCore::IDBDatabaseBackendImpl::close):
1612
1613 2013-03-29  Joshua Bell  <jsbell@chromium.org>
1614
1615         [V8] IndexedDB: Exceptions thrown inconsistently for non-cloneable values
1616         https://bugs.webkit.org/show_bug.cgi?id=113091
1617
1618         Reviewed by Kentaro Hara.
1619
1620         The exception thrown by SerializedScriptValue into the JS engine is not
1621         observable by ScriptState. (We should fix that, but it appears non-trivial.)
1622         Ask the SerializedScriptValue directly if it failed to clone. If so, don't
1623         set an exception - one was already set so let that be processed normally.
1624
1625         Test: storage/indexeddb/clone-exception.html
1626
1627         * Modules/indexeddb/IDBObjectStore.cpp:
1628         (WebCore::IDBObjectStore::put):
1629
1630 2013-03-29  Dean Jackson  <dino@apple.com>
1631
1632         Snapshotted plugins must be able to restart on appropriate mouseup events
1633         https://bugs.webkit.org/show_bug.cgi?id=113577
1634
1635         Reviewed by Tim Horton.
1636
1637         If the page content prevents the default behaviour of a mousedown event, then a snapshotted
1638         plugin would never receive a click event, and thus be unable to restart. We have to also
1639         look for a mouseup that happens with an associated mousedown, and trigger restart. This
1640         won't call any page code - it's just behind the scenes.
1641
1642         * rendering/RenderSnapshottedPlugIn.cpp:
1643         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn): Initialize new member variable.
1644         (WebCore::RenderSnapshottedPlugIn::handleEvent): Track the state of mousedown and up pairs, and restart
1645             if you see an appropriate mouseup.
1646         * rendering/RenderSnapshottedPlugIn.h: New member variable to track mouse state.
1647
1648 2013-03-29  Simon Fraser  <simon.fraser@apple.com>
1649
1650         removeViewportConstrainedLayer() should remove the layer from m_viewportConstrainedLayersNeedingUpdate too
1651         https://bugs.webkit.org/show_bug.cgi?id=113596
1652
1653         Reviewed by Tim Horton.
1654         
1655         It's possible, with some combination of position:fixed and opacity transitions
1656         in iframes, to end up with a RenderLayer in m_viewportConstrainedLayersNeedingUpdate
1657         that has been removed from m_viewportConstrainedLayers, which leads to later assertions
1658         and/or crashes.
1659         
1660         Fix by removing a layer from m_viewportConstrainedLayersNeedingUpdate when we
1661         remove it from m_viewportConstrainedLayers.
1662
1663         I was not able to come up with a testcase that reliably reproduces this.
1664
1665         * rendering/RenderLayerCompositor.cpp:
1666         (WebCore::RenderLayerCompositor::removeViewportConstrainedLayer):
1667
1668 2013-03-29  Greg Hughes  <ghughes@apple.com>
1669
1670         Allow multiple searchKeys to be passed to AXUIElementCopyParameterizedAttributeValue
1671         https://bugs.webkit.org/show_bug.cgi?id=112276
1672
1673         Reviewed by Chris Fleizach.
1674
1675         Added support for accessibility search predicates to accept multiple search keys. The search will return the first item that matches any one of the provided search keys.
1676
1677         * accessibility/AccessibilityObject.cpp:
1678         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatchAtIndex):
1679         (WebCore::AccessibilityObject::isAccessibilityObjectSearchMatch):
1680         (WebCore):
1681         * accessibility/AccessibilityObject.h:
1682         (AccessibilitySearchCriteria):
1683         (WebCore::AccessibilitySearchCriteria::AccessibilitySearchCriteria):
1684         (AccessibilityObject):
1685         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
1686         (-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
1687
1688 2013-03-29  Joshua Bell  <jsbell@chromium.org>
1689
1690         IndexedDB: Bind lifetime of in-memory backing stores to IDBFactory backend
1691         https://bugs.webkit.org/show_bug.cgi?id=110820
1692
1693         Reviewed by Tony Chang.
1694
1695         Backing stores are dropped as soon as all connections are closed. That makes sense for
1696         disk-backed stores to free up memory (although there's a performance trade-off...). But
1697         for memory-backed stores, the expected lifetime should match the lifetime of the factory
1698         so that an open/write/close/re-open/read yields the written data.
1699
1700         Test: Chromium's webkit_unit_tests, IDBFactoryBackendTest.MemoryBackingStoreLifetime
1701
1702         * Modules/indexeddb/IDBBackingStore.cpp:
1703         (WebCore::IDBBackingStore::IDBBackingStore): Pass comparator into constructor since it was always
1704         assigned immediately afterwards anyway.
1705         (WebCore::IDBBackingStore::open): Split into three parts - open() which is disk-backed...
1706         (WebCore::IDBBackingStore::openInMemory): ...explit in-memory creation (previously: specified by empty path)
1707         (WebCore::IDBBackingStore::create): ... and the common logic which calls the constructor.
1708         * Modules/indexeddb/IDBBackingStore.h: Headers for the above.
1709         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
1710         (WebCore::IDBFactoryBackendImpl::openBackingStore): Add in-memory backing stores to dependent set.
1711         * Modules/indexeddb/IDBFactoryBackendImpl.h: Add member to track dependent backing stores.
1712
1713 2013-03-29  Nate Chapin  <japhet@chromium.org>
1714
1715         ASSERT d->m_defersLoading != defers on detik.com and drive.google.com
1716         https://bugs.webkit.org/show_bug.cgi?id=111902
1717
1718         Reviewed by Alexey Proskuryakov.
1719
1720         Test: http/tests/navigation/same-url-iframes-defer-crash.html
1721
1722         * loader/DocumentLoader.cpp:
1723         (WebCore::DocumentLoader::setDefersLoading): If multiple DocumentLoaders are
1724            using loading the same main resource, ensure only one of them can call
1725            ResourceLoader::setDefersLoading.
1726
1727 2013-03-29  Vsevolod Vlasov  <vsevik@chromium.org>
1728
1729         Web Inspector: Content should not be lost when uiSourceCode's file was removed externally on file system.
1730         https://bugs.webkit.org/show_bug.cgi?id=113581
1731
1732         Reviewed by Pavel Feldman.
1733
1734         * inspector/front-end/IsolatedFileSystem.js:
1735         (WebInspector.IsolatedFileSystem.prototype.errorHandler):
1736         (WebInspector.IsolatedFileSystem.prototype.requestFileContent):
1737         (WebInspector.IsolatedFileSystem.prototype.fileSystemLoaded):
1738         * inspector/front-end/UISourceCode.js:
1739         (WebInspector.UISourceCode.prototype.checkContentUpdated.contentLoaded):
1740         (WebInspector.UISourceCode.prototype.checkContentUpdated):
1741         (WebInspector.UISourceCode.prototype._commitContent):
1742
1743 2013-03-29  Vsevolod Vlasov  <vsevik@chromium.org>
1744
1745         Web Inspector: Prompt before closing dirty tab.
1746         https://bugs.webkit.org/show_bug.cgi?id=113576
1747
1748         Reviewed by Pavel Feldman.
1749
1750         * inspector/front-end/TabbedEditorContainer.js:
1751         (WebInspector.TabbedEditorContainer):
1752         (WebInspector.TabbedEditorContainer.prototype._maybeCloseTab):
1753         (WebInspector.TabbedEditorContainer.prototype._closeTabs):
1754         (WebInspector.EditorContainerTabDelegate):
1755         (WebInspector.EditorContainerTabDelegate.prototype.closeTabs):
1756         * inspector/front-end/TabbedPane.js:
1757         (WebInspector.TabbedPane.prototype.setTabDelegate):
1758         (WebInspector.TabbedPane.prototype.appendTab):
1759         (WebInspector.TabbedPane.prototype.allTabs):
1760         (WebInspector.TabbedPane.prototype.otherTabs):
1761         (WebInspector.TabbedPaneTab.prototype.setDelegate):
1762         (WebInspector.TabbedPaneTab.prototype._tabClicked):
1763         (WebInspector.TabbedPaneTab.prototype._closeTabs):
1764         (WebInspector.TabbedPaneTab.prototype._tabContextMenu):
1765         (WebInspector.TabbedPaneTab.prototype._tabContextMenu.closeOthers):
1766         (WebInspector.TabbedPaneTab.prototype._tabContextMenu.closeAll):
1767         (WebInspector.TabbedPaneTabDelegate):
1768         (WebInspector.TabbedPaneTabDelegate.prototype.closeTabs):
1769         * inspector/front-end/UISourceCode.js:
1770         (WebInspector.UISourceCode.prototype.resetWorkingCopy):
1771
1772 2013-03-29  Ilya Tikhonovsky  <loislo@chromium.org>
1773
1774         Web Inspector: Flame Chart. Remove hopping ancorElement and use anchorBox instead.
1775         https://bugs.webkit.org/show_bug.cgi?id=113579
1776
1777         Reviewed by Pavel Feldman.
1778
1779         Initially I made a fake anchor element and moved it according to the highlighted element position.
1780         It was a hack and after http://trac.webkit.org/changeset/147209 I'm able to remove it.
1781
1782         Drive by fix: the code was moved from onMouseMove to getPopoverAnchor.
1783
1784         * inspector/front-end/FlameChart.js:
1785         (WebInspector.FlameChart):
1786         (WebInspector.FlameChart.prototype._getPopoverAnchor):
1787         -(WebInspector.FlameChart.prototype._onMouseMove)
1788         * inspector/front-end/flameChart.css:
1789
1790 2013-03-29  Kondapally Kalyan  <kalyan.kondapally@intel.com>
1791
1792         [EFL][EGL] Add support for creating offscreen surface.
1793         https://bugs.webkit.org/show_bug.cgi?id=113359
1794
1795         Reviewed by Noam Rosenthal.
1796
1797         This is in preparation for enabling EGL and GLES2
1798         support for EFL port. This patch adds support for using
1799         EGLPixmapSurface as an offscreensurface.
1800
1801         * PlatformEfl.cmake:
1802         * platform/graphics/opengl/GLPlatformSurface.cpp:
1803         (WebCore::GLPlatformSurface::createOffScreenSurface):
1804         * platform/graphics/surfaces/efl/GLTransportSurface.cpp:
1805         (WebCore::GLTransportSurface::createTransportSurface):
1806         * platform/graphics/surfaces/egl/EGLConfigSelector.cpp:
1807         (WebCore::EGLConfigSelector::EGLConfigSelector):
1808         (WebCore::EGLConfigSelector::pixmapContextConfig):
1809         (WebCore::EGLConfigSelector::surfaceContextConfig):
1810         (WebCore::EGLConfigSelector::nativeVisualId):
1811         (WebCore::EGLConfigSelector::reset):
1812         (WebCore::EGLConfigSelector::createConfig):
1813         * platform/graphics/surfaces/egl/EGLConfigSelector.h:
1814         (EGLConfigSelector):
1815
1816          Added logic to select EGLConfig supporting alpha and
1817          opaque as needed. Moved Code related to display to
1818          EGLHelper class.
1819
1820         * platform/graphics/surfaces/egl/EGLHelper.cpp: Added.
1821         (WebCore):
1822         (EGLDisplayConnection):
1823         (WebCore::EGLDisplayConnection::EGLDisplayConnection):
1824         (WebCore::EGLDisplayConnection::~EGLDisplayConnection):
1825         (WebCore::EGLDisplayConnection::display):
1826         (WebCore::EGLDisplayConnection::terminate):
1827         (WebCore::EGLHelper::eglDisplay):
1828         * platform/graphics/surfaces/egl/EGLHelper.h: Copied from Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.h.
1829         (WebCore):
1830         (EGLHelper):
1831         * platform/graphics/surfaces/egl/EGLSurface.cpp:
1832         (WebCore::EGLTransportSurface::createTransportSurface):
1833         (WebCore::EGLTransportSurface::EGLTransportSurface):
1834         (WebCore::EGLTransportSurface::attributes):
1835         (WebCore::EGLTransportSurface::~EGLTransportSurface):
1836         (WebCore::EGLTransportSurface::destroy):
1837         (WebCore::EGLTransportSurface::configuration):
1838         (WebCore::EGLOffScreenSurface::createOffScreenSurface):
1839         (WebCore::EGLOffScreenSurface::EGLOffScreenSurface):
1840         (WebCore::EGLOffScreenSurface::~EGLOffScreenSurface):
1841         (WebCore::EGLOffScreenSurface::attributes):
1842         (WebCore::EGLOffScreenSurface::configuration):
1843         (WebCore::EGLOffScreenSurface::destroy):
1844         * platform/graphics/surfaces/egl/EGLSurface.h:
1845         (WebCore):
1846         (EGLTransportSurface):
1847         (EGLOffScreenSurface):
1848         * platform/graphics/surfaces/egl/EGLXSurface.cpp: Copied from Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.cpp.
1849         (WebCore):
1850         (WebCore::EGLWindowTransportSurface::EGLWindowTransportSurface):
1851         (WebCore::EGLWindowTransportSurface::~EGLWindowTransportSurface):
1852         (WebCore::EGLWindowTransportSurface::swapBuffers):
1853         (WebCore::EGLWindowTransportSurface::destroy):
1854         (WebCore::EGLPixmapSurface::EGLPixmapSurface):
1855         (WebCore::EGLPixmapSurface::~EGLPixmapSurface):
1856         (WebCore::EGLPixmapSurface::destroy):
1857         * platform/graphics/surfaces/egl/EGLXSurface.h: Copied from Source/WebCore/platform/graphics/surfaces/egl/EGLSurface.h.
1858         (WebCore):
1859         (EGLWindowTransportSurface):
1860         (EGLPixmapSurface):
1861
1862         EGLPixmapSurface implementation.
1863
1864 2013-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
1865
1866         Unreviewed, rolling out r147218.
1867         http://trac.webkit.org/changeset/147218
1868         https://bugs.webkit.org/show_bug.cgi?id=113585
1869
1870         We should rethink UI of this feature. (Requested by vsevik on
1871         #webkit).
1872
1873         * inspector/InjectedScriptSource.js:
1874         (.):
1875         * inspector/front-end/ObjectPropertiesSection.js:
1876         (WebInspector.ObjectPropertyTreeElement.populateWithProperties):
1877         * inspector/front-end/RemoteObject.js:
1878         (WebInspector.RemoteObject.prototype.set else):
1879         (WebInspector.RemoteObjectProperty):
1880         * inspector/front-end/inspector.css:
1881
1882 2013-03-29  Andrey Kosyakov  <caseq@chromium.org>
1883
1884         Web Inspector: extract common base for 3 timeline overview controls (Events/Frames/Memory)
1885         https://bugs.webkit.org/show_bug.cgi?id=113572
1886
1887         Reviewed by Yury Semikhatsky.
1888
1889         Refactoring, covered by existing tests.
1890
1891         - introduce TimelineOverviewBase as a common base for 3 overview controls;
1892         - make every overview control a view.
1893
1894         This does not yet take advantage of common base (subject of the next patch).
1895
1896         * inspector/front-end/OverviewGrid.js:
1897         (WebInspector.OverviewGrid.prototype.gridElement):
1898         (WebInspector.OverviewGrid.prototype.itemsGraphsElement):
1899         * inspector/front-end/TimelineOverviewPane.js:
1900         (WebInspector.TimelineOverviewPane):
1901         (WebInspector.TimelineOverviewPane.prototype.setMode):
1902         (WebInspector.TimelineOverviewPane.prototype._update):
1903         (WebInspector.TimelineOverviewBase):
1904         (WebInspector.TimelineOverviewBase.prototype.update):
1905         (WebInspector.TimelineMemoryOverview):
1906         (WebInspector.TimelineEventOverview):
1907         (WebInspector.TimelineEventOverview.prototype._renderBar):
1908         (WebInspector.TimelineFrameOverview):
1909         (WebInspector.TimelineFrameOverview.prototype.update):
1910         (WebInspector.TimelineFrameOverview.prototype._renderBars):
1911         (WebInspector.TimelineFrameOverview.prototype._drawFPSMarks):
1912         (WebInspector.TimelineFrameOverview.prototype._renderBar):
1913
1914 2013-03-29  Peter Rybin  <prybin@chromium.org>
1915
1916         Web Inspector: gather accessor property getter and setter under a single tree node
1917         https://bugs.webkit.org/show_bug.cgi?id=113357
1918
1919         Reviewed by Yury Semikhatsky.
1920
1921         A new tree element class AccessorPropertyTreeElemenet is added.
1922         RemoteObjectProperty can now represent accessor property (if value is null).
1923         New tree element is supported in CSS stylesheet.
1924
1925         Testing code is slightly modified for exploring new tree elements.
1926
1927         * inspector/InjectedScriptSource.js:
1928         (.):
1929         * inspector/front-end/ObjectPropertiesSection.js:
1930         (WebInspector.ObjectPropertyTreeElement.populateWithProperties):
1931         (WebInspector.AccessorPropertyTreeElement):
1932         (WebInspector.AccessorPropertyTreeElement.prototype.onattach):
1933         (WebInspector.AccessorPropertyTreeElement.prototype.update):
1934         (WebInspector.AccessorPropertyTreeElement.prototype.onpopulate):
1935         * inspector/front-end/RemoteObject.js:
1936         * inspector/front-end/inspector.css:
1937         (.accessor-property-name):
1938
1939 2013-03-29  Ilya Tikhonovsky  <loislo@chromium.org>
1940
1941         Web Inspector: Flame Chart. Developers will have more clue
1942         if two different profiles will have same colors for same functions.
1943         https://bugs.webkit.org/show_bug.cgi?id=113410
1944
1945         Reviewed by Pavel Feldman.
1946
1947         The code related to color generator was extracted into a separate class.
1948         The instance of the class was stored as static private member of the FlameChart class,
1949         so all the profiles will share the same instance and will use same colors.
1950         The colors itself were slightly adjusted.
1951
1952         Drive by fix: coordinatesToNodeIndex was fixed. The error was introduced in the patch about left padding.
1953
1954         * inspector/front-end/FlameChart.js:
1955         (WebInspector.FlameChart):
1956         (WebInspector.FlameChart.ColorGenerator):
1957         (WebInspector.FlameChart.ColorGenerator.prototype._colorPairForID):
1958         (WebInspector.FlameChart.prototype._calculateTimelineData):
1959         (WebInspector.FlameChart.prototype._calculateTimelineDataForSamples):
1960         (WebInspector.FlameChart.prototype._coordinatesToNodeIndex):
1961
1962 2013-03-29  Charles Wei  <charles.wei@torchmobile.com.cn>
1963
1964         [BlackBerry] Cleanup the CONTEXT_MENUS in BlackBerry porting
1965         https://bugs.webkit.org/show_bug.cgi?id=113562
1966
1967         Reviewed by George Staikos.
1968         Internally reviewed by Mike Fenton and Gen Mak.
1969
1970         No new tests, just disable CONTEXT_MENUS for blackberry porting. 
1971
1972         * platform/blackberry/ContextMenuBlackBerry.cpp:
1973         * platform/blackberry/ContextMenuItemBlackBerry.cpp:
1974
1975 2013-03-29  KwangYong Choi  <ky0.choi@samsung.com>
1976
1977         Fix build warning after r147022
1978         https://bugs.webkit.org/show_bug.cgi?id=113567
1979
1980         Reviewed by Kentaro Hara.
1981
1982         Use UNUSED_PARAM macro to fix -Wunused-parameter build warning.
1983         No new tests, no change on behavior.
1984
1985         * page/EventHandler.cpp:
1986         (WebCore::expandSelectionToRespectUserSelectAll):
1987
1988 2013-03-29  Andrey Lushnikov  <lushnikov@chromium.org>
1989
1990         Web Inspector: ability to use AnchorBox as an anchor for Popover
1991         https://bugs.webkit.org/show_bug.cgi?id=113563
1992
1993         Reviewed by Pavel Feldman.
1994
1995         No new test: no change in behaviour.
1996
1997         - Ability to pass AnchorBox instead of Element for popover anchor.
1998
1999         * inspector/front-end/Popover.js:
2000         (WebInspector.Popover.prototype._positionElement):
2001         (WebInspector.PopoverHelper.prototype._eventInHoverElement):
2002
2003 2013-03-29  Andrey Kosyakov  <caseq@chromium.org>
2004
2005         Web Inspector: assign Scroll events to rendering category (was painting)
2006         https://bugs.webkit.org/show_bug.cgi?id=113564
2007
2008         Reviewed by Pavel Feldman.
2009
2010         * inspector/front-end/TimelinePresentationModel.js: /ScrollLayer.*category/s/painting/rendering/
2011         (WebInspector.TimelinePresentationModel._initRecordStyles):
2012
2013 2013-03-28  Philippe Normand  <pnormand@igalia.com>
2014
2015         [GStreamer] playback gets bumpy sometimes when on-disk buffering is slow
2016         https://bugs.webkit.org/show_bug.cgi?id=113512
2017
2018         Reviewed by Martin Robinson.
2019
2020         When the HTTP source element is slow downloading data for on-disk
2021         buffering the playback position might reach an unbuffered region
2022         and have bad consequences, pausing the pipeline beforehand
2023         prevents this case to happen.
2024
2025         * platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
2026         (WebCore::MediaPlayerPrivateGStreamer::processBufferingStats):
2027
2028 2013-03-29  Keishi Hattori  <keishi@webkit.org>
2029
2030         Add the event handler content attributes that are defined in the spec to HTMLElement
2031         https://bugs.webkit.org/show_bug.cgi?id=86363
2032
2033         Reviewed by Ryosuke Niwa.
2034
2035         Test: fast/events/event-attribute.html
2036
2037         We are missing some event handler content attributes from HTMLElement that are defined in the spec.
2038         http://www.whatwg.org/specs/web-apps/current-work/multipage/webappapis.html#event-handlers-on-elements,-document-objects,-and-window-objects
2039
2040         * html/HTMLElement.cpp:
2041         (WebCore::HTMLElement::eventNameForAttributeName): Returns event name for a given attribute name by looking it up on a HashMap.
2042         (WebCore::HTMLElement::parseAttribute): Sets up event listeners for content attributes.
2043         * html/HTMLFormElement.cpp:
2044         (WebCore::HTMLFormElement::parseAttribute): Removed event listener content attributes that was added to HTMLElement.
2045         * html/HTMLFrameElementBase.cpp:
2046         (WebCore::HTMLFrameElementBase::parseAttribute): Ditto.
2047         * html/HTMLImageElement.cpp:
2048         (WebCore::HTMLImageElement::parseAttribute): Ditto.
2049         * html/HTMLLinkElement.cpp:
2050         (WebCore::HTMLLinkElement::parseAttribute): Ditto.
2051         * html/HTMLObjectElement.cpp:
2052         (WebCore::HTMLObjectElement::parseAttribute): Ditto.
2053         * html/HTMLScriptElement.cpp:
2054         (WebCore::HTMLScriptElement::parseAttribute): Ditto.
2055         * html/HTMLSelectElement.cpp:
2056         (WebCore::HTMLSelectElement::parseAttribute): Ditto.
2057         * html/HTMLStyleElement.cpp:
2058         (WebCore::HTMLStyleElement::parseAttribute): Ditto.
2059         * html/HTMLTextFormControlElement.cpp:
2060         (WebCore::HTMLTextFormControlElement::parseAttribute): Ditto.
2061         * html/HTMLTrackElement.cpp:
2062         (WebCore::HTMLTrackElement::parseAttribute): Ditto.
2063
2064 2013-03-22  Andrey Kosyakov  <caseq@chromium.org>
2065
2066         Web Inspector: timeline paint rectangles are off for transformed layers
2067         https://bugs.webkit.org/show_bug.cgi?id=112919
2068
2069         Reviewed by Pavel Feldman.
2070
2071         - pass RenderObject instead of Frame to InspectorInstrumentation::didPaint;
2072         - take transforms into account and convert paint clip rect into quad;
2073         - emit quads, not rects as Paint and Layout record data;
2074         - adjust client to using quads, compute width/height from quad coords.
2075
2076         * inspector/InspectorInstrumentation.cpp: Pass RenderObject, not frame to {will,did}Paint.
2077         (WebCore):
2078         (WebCore::InspectorInstrumentation::willPaintImpl):
2079         (WebCore::InspectorInstrumentation::didPaintImpl):
2080         (WebCore::InspectorInstrumentation::instrumentingAgentsForRenderer): Added.
2081         * inspector/InspectorInstrumentation.h:
2082         (WebCore):
2083         (InspectorInstrumentation):
2084         (WebCore::InspectorInstrumentation::willPaint):
2085         (WebCore::InspectorInstrumentation::didPaint):
2086         * inspector/InspectorTimelineAgent.cpp:
2087         (WebCore::InspectorTimelineAgent::didLayout):
2088         (WebCore::InspectorTimelineAgent::didPaint):
2089         (WebCore::InspectorTimelineAgent::localToPageQuad): Convert local clip rect to transformed quad.
2090         (WebCore):
2091         * inspector/InspectorTimelineAgent.h:
2092         (WebCore):
2093         (InspectorTimelineAgent):
2094         * inspector/TimelineRecordFactory.cpp: Emit quads as Paint and Layout records data.
2095         (WebCore::createQuad):
2096         (WebCore):
2097         (WebCore::TimelineRecordFactory::createPaintData):
2098         (WebCore::TimelineRecordFactory::createLayoutData):
2099         * inspector/TimelineRecordFactory.h:
2100         (WebCore):
2101         (TimelineRecordFactory):
2102         * inspector/front-end/TimelinePanel.js: Highlight a quad iff formatted record has highlightQuad field.
2103         (WebInspector.TimelinePanel.prototype._mouseOut):
2104         (WebInspector.TimelinePanel.prototype._mouseMove):
2105         (WebInspector.TimelinePanel.prototype._highlightQuad):
2106         (WebInspector.TimelinePanel.prototype._hideQuadHighlight):
2107         * inspector/front-end/TimelinePresentationModel.js:
2108         (WebInspector.TimelinePresentationModel.Record): Set highlightQuad for Paint and Layout
2109         (WebInspector.TimelinePresentationModel.Record.prototype._generatePopupContentWithImagePreview):
2110         (WebInspector.TimelinePresentationModel.Record.prototype._getRecordDetails):
2111         (WebInspector.TimelinePresentationModel.quadWidth):
2112         (WebInspector.TimelinePresentationModel.quadHeight):
2113         * page/FrameView.cpp:
2114         (WebCore::FrameView::paintContents):
2115         * rendering/RenderLayerBacking.cpp:
2116         (WebCore::RenderLayerBacking::paintContents):
2117
2118 2013-03-21  Andrey Kosyakov  <caseq@chromium.org>
2119
2120         Web Inspector: generalize InspectorDOMAgent::highlightRect() to highlightQuad()
2121         https://bugs.webkit.org/show_bug.cgi?id=112911
2122
2123         Reviewed by Pavel Feldman.
2124
2125         - added Quad type and DOMAgent.highlightQuad() to protocol;
2126         - retained DOMAgent.highlightRect(), but implement it via highlightQuad.
2127
2128         * inspector/Inspector.json:
2129         * inspector/InspectorDOMAgent.cpp:
2130         (WebCore::parseQuad):
2131         (WebCore):
2132         (WebCore::InspectorDOMAgent::highlightRect):
2133         (WebCore::InspectorDOMAgent::highlightQuad):
2134         (WebCore::InspectorDOMAgent::innerHighlightQuad):
2135         * inspector/InspectorDOMAgent.h:
2136         (InspectorDOMAgent):
2137         * inspector/InspectorOverlay.cpp: Mostly just renames of rect to quad.
2138         (WebCore::InspectorOverlay::paint):
2139         (WebCore::InspectorOverlay::getHighlight):
2140         (WebCore::InspectorOverlay::hideHighlight):
2141         (WebCore::InspectorOverlay::highlightQuad):
2142         (WebCore::InspectorOverlay::update):
2143         (WebCore::InspectorOverlay::drawQuadHighlight):
2144         (WebCore::InspectorOverlay::reportMemoryUsage):
2145         * inspector/InspectorOverlay.h:
2146         (InspectorOverlay):
2147         * inspector/InspectorOverlayPage.html: Ditto.
2148
2149 2013-03-29  Zalan Bujtas  <zalan@apple.com>
2150
2151         REGRESSION(r143102): Ignore table cell's height attribute when checking if containing block has auto height.
2152         https://bugs.webkit.org/show_bug.cgi?id=113526
2153
2154         It matches shipping Safari and Firefox behaviour.
2155         
2156         Reviewed by Antti Koivisto.
2157
2158         Test: fast/replaced/iframe-with-percentage-height-within-table-with-table-cell-ignore-height.html
2159
2160         * rendering/RenderBoxModelObject.cpp:
2161         (WebCore::RenderBoxModelObject::hasAutoHeightOrContainingBlockWithAutoHeight):
2162
2163 2013-03-28  Eugene Klyuchnikov  <eustas@chromium.org>
2164
2165         Web Inspector: [Cookies] CookiesTable should integrate with DataGrid context menu.
2166         https://bugs.webkit.org/show_bug.cgi?id=113496
2167
2168         Reviewed by Pavel Feldman.
2169
2170         Integrate CookiesTable with DataGrid context menu
2171         instead of overriding it.
2172
2173         * inspector/front-end/CookiesTable.js:
2174         Pass context menu callback to DataGrid constructor.
2175         * inspector/front-end/DataGrid.js:
2176         Added context menu callback constructor parameter. Fixed JSDoc.
2177
2178 2013-03-28  Philip Rogers  <pdr@google.com>
2179
2180         Fix compiler warning in IDBTransaction::modeToString
2181         https://bugs.webkit.org/show_bug.cgi?id=113547
2182
2183         Reviewed by Darin Adler.
2184
2185         Not all compilers are smart enough to handle this switch. This patch refactors
2186         modeToString to not return from the default case.
2187
2188         No new tests as this is just a compiler fix.
2189
2190         * Modules/indexeddb/IDBTransaction.cpp:
2191         (WebCore::IDBTransaction::modeToString):
2192
2193 2013-03-28  Simon Fraser  <simon.fraser@apple.com>
2194
2195         GraphicsLayerCA::recomputeVisibleRects() shouldn't actually set the visible rect
2196         https://bugs.webkit.org/show_bug.cgi?id=113544
2197
2198         Reviewed by Tim Horton.
2199         
2200         The functions added in r147058 to update the visible rects of GraphicsLayerCAs
2201         should not have actually set the m_visibleRect on the layer, because this
2202         caused a later call to adjustTiledLayerVisibleRect() to think that the visible
2203         rect had not changed, so it did no expansion.
2204         
2205         Clarify the logic to ask the GraphicsLayer whether, given a new visible
2206         rect, it would need to make new tiles (which happens later during a flush).
2207         
2208         Add a function to RenderLayerCompositor to call this code (but which has
2209         no callers yet).
2210
2211         * platform/graphics/GraphicsLayer.h:
2212         (WebCore::GraphicsLayer::visibleRectChangeRequiresFlush): Make private.
2213         * platform/graphics/ca/GraphicsLayerCA.cpp:
2214         (WebCore::GraphicsLayerCA::recursiveVisibleRectChangeRequiresFlush):
2215         (WebCore::GraphicsLayerCA::visibleRectChangeRequiresFlush):
2216         * platform/graphics/ca/GraphicsLayerCA.h:
2217         * rendering/RenderLayerCompositor.cpp:
2218         (WebCore::RenderLayerCompositor::noteVisibleRectChanged):
2219         * rendering/RenderLayerCompositor.h:
2220         (RenderLayerCompositor):
2221
2222 2013-03-28  Rafael Weinstein  <rafaelw@chromium.org>
2223
2224         [HTMLTemplateElement] <template> should be able to be a foster parent
2225         https://bugs.webkit.org/show_bug.cgi?id=113541
2226
2227         Reviewed by Eric Seidel
2228
2229         This adds to the check in findFosterSite to include whether the parent is a DocumentFragment which is a template contents.
2230
2231         Tests added to html5lib suite.
2232
2233         * html/parser/HTMLConstructionSite.cpp:
2234         (WebCore::HTMLConstructionSite::findFosterSite):
2235
2236 2013-03-28  Xianzhu Wang  <wangxianzhu@chromium.org>
2237
2238         [Chromium] Don't create SolidColorLayer for full transparent background
2239         https://bugs.webkit.org/show_bug.cgi?id=113524
2240
2241         Reviewed by James Robinson.
2242
2243         Test: GraphicsLayerChromiumTest.setContentsToSolidColor
2244
2245         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2246         (WebCore::GraphicsLayerChromium::setContentsToSolidColor):
2247
2248 2013-03-28  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2249
2250         use XMLHttpRequestResponseType enumeration in XMLHttpRequest.idl
2251         https://bugs.webkit.org/show_bug.cgi?id=113518
2252
2253         Reviewed by Kentaro Hara.
2254
2255         Use enum XMLHttpRequestResponseType type instead of DOMString for
2256         XMLHttpRequest responseType.
2257
2258         Argument validation now happens in the bindings. 
2259         XMLHttpRequest::setResponseType should then never receive invalid
2260         arguments. So, replace console message with ASSERT_NOT_REACHED();
2261
2262         Test: fast/xmlhttprequest/xmlhttprequest-set-responsetype.html
2263
2264         * xml/XMLHttpRequest.cpp:
2265         (WebCore::XMLHttpRequest::setResponseType):
2266         * xml/XMLHttpRequest.idl:
2267
2268 2013-03-28  Lamarque V. Souza  <Lamarque.Souza@basyskom.com>
2269
2270         [css3-text] Add platform support for "wavy" text decoration style
2271         https://bugs.webkit.org/show_bug.cgi?id=92868
2272
2273         Reviewed by Benjamin Poulain.
2274
2275         This patch uses GraphicsContext::strokePath() to implement
2276         wavy decoration for the CSS3 property "text-decoration-style".
2277
2278         No new tests as this is covered with existing tests.
2279
2280         * rendering/InlineTextBox.cpp:
2281         (WebCore::textDecorationStyleToStrokeStyle): Remove obsolete comment.
2282         (WebCore::adjustStepToDecorationLength): Add function to adjust
2283         variables used to calculate the lenght of Bezier curves.
2284         (WebCore::strokeWavyTextDecoration): Add function to stroke wavy
2285         decoration based on cubic Bezier curve.
2286         (WebCore::InlineTextBox::paintDecoration): Call
2287         strokeWavyTextDecoration when necessary.
2288
2289 2013-03-28  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2290
2291         REGRESSION(r147149): breaks binding test on Mac. (Requested by mlam_ on #webkit).
2292         https://bugs.webkit.org/show_bug.cgi?id=113538
2293
2294         Reviewed by Simon Fraser.
2295
2296         Run run-bindings-tests --reset-results to fix broken tests after
2297         r147149.
2298
2299         * bindings/scripts/test/V8/V8TestInterface.cpp:
2300         (WebCore::TestInterfaceV8Internal::supplementalNodeAttrSetter):
2301         * bindings/scripts/test/V8/V8TestObj.cpp:
2302         (WebCore::TestObjV8Internal::shortAttrAttrSetter):
2303         (WebCore::TestObjV8Internal::unsignedShortAttrAttrSetter):
2304         (WebCore::TestObjV8Internal::longAttrAttrSetter):
2305         (WebCore::TestObjV8Internal::longLongAttrAttrSetter):
2306         (WebCore::TestObjV8Internal::unsignedLongLongAttrAttrSetter):
2307         (WebCore::TestObjV8Internal::testObjAttrAttrSetter):
2308         (WebCore::TestObjV8Internal::XMLObjAttrAttrSetter):
2309         (WebCore::TestObjV8Internal::createAttrSetter):
2310         (WebCore::TestObjV8Internal::reflectedIntegralAttrAttrSetter):
2311         (WebCore::TestObjV8Internal::reflectedUnsignedIntegralAttrAttrSetter):
2312         (WebCore::TestObjV8Internal::reflectedBooleanAttrAttrSetter):
2313         (WebCore::TestObjV8Internal::reflectedCustomIntegralAttrAttrSetter):
2314         (WebCore::TestObjV8Internal::reflectedCustomBooleanAttrAttrSetter):
2315         (WebCore::TestObjV8Internal::typedArrayAttrAttrSetter):
2316         (WebCore::TestObjV8Internal::attrWithGetterExceptionAttrSetter):
2317         (WebCore::TestObjV8Internal::attrWithSetterExceptionAttrSetter):
2318         (WebCore::TestObjV8Internal::withScriptStateAttributeAttrSetter):
2319         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeAttrSetter):
2320         (WebCore::TestObjV8Internal::withScriptStateAttributeRaisesAttrSetter):
2321         (WebCore::TestObjV8Internal::withScriptExecutionContextAttributeRaisesAttrSetter):
2322         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeAttrSetter):
2323         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateAttributeRaisesAttrSetter):
2324         (WebCore::TestObjV8Internal::withScriptExecutionContextAndScriptStateWithSpacesAttributeAttrSetter):
2325         (WebCore::TestObjV8Internal::withScriptArgumentsAndCallStackAttributeAttrSetter):
2326         (WebCore::TestObjV8Internal::conditionalAttr1AttrSetter):
2327         (WebCore::TestObjV8Internal::conditionalAttr2AttrSetter):
2328         (WebCore::TestObjV8Internal::conditionalAttr3AttrSetter):
2329         (WebCore::TestObjV8Internal::anyAttributeAttrSetter):
2330         (WebCore::TestObjV8Internal::enabledAtRuntimeAttr1AttrSetter):
2331         (WebCore::TestObjV8Internal::enabledAtRuntimeAttr2AttrSetter):
2332         (WebCore::TestObjV8Internal::enabledPerContextAttr1AttrSetter):
2333         (WebCore::TestObjV8Internal::enabledPerContextAttr2AttrSetter):
2334         (WebCore::TestObjV8Internal::floatArrayAttrSetter):
2335         (WebCore::TestObjV8Internal::doubleArrayAttrSetter):
2336         (WebCore::TestObjV8Internal::mutablePointAttrSetter):
2337         (WebCore::TestObjV8Internal::immutablePointAttrSetter):
2338         (WebCore::TestObjV8Internal::strawberryAttrSetter):
2339         (WebCore::TestObjV8Internal::strictFloatAttrSetter):
2340         (WebCore::TestObjV8Internal::idAttrSetter):
2341         (WebCore::TestObjV8Internal::nullableLongSettableAttributeAttrSetter):
2342         (WebCore::TestObjV8Internal::nullableStringValueAttrSetter):
2343         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetter):
2344         (WebCore::TestObjV8Internal::perWorldAttributeAttrSetterForMainWorld):
2345         * bindings/scripts/test/V8/V8TestSerializedScriptValueInterface.cpp:
2346         (WebCore::TestSerializedScriptValueInterfaceV8Internal::valueAttrSetter):
2347         (WebCore::TestSerializedScriptValueInterfaceV8Internal::cachedValueAttrSetter):
2348         * bindings/scripts/test/V8/V8TestTypedefs.cpp:
2349         (WebCore::TestTypedefsV8Internal::unsignedLongLongAttrAttrSetter):
2350         (WebCore::TestTypedefsV8Internal::immutableSerializedScriptValueAttrSetter):
2351         (WebCore::TestTypedefsV8Internal::attrWithGetterExceptionAttrSetter):
2352         (WebCore::TestTypedefsV8Internal::attrWithSetterExceptionAttrSetter):
2353
2354 2013-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2355
2356         Unreviewed, rolling out r147130.
2357         http://trac.webkit.org/changeset/147130
2358         https://bugs.webkit.org/show_bug.cgi?id=113539
2359
2360         Not needed now that we do not sleep in preprocessor.pm
2361         (Requested by jamesr on #webkit).
2362
2363         * WebCore.gyp/WebCore.gyp:
2364         * bindings/scripts/CodeGenerator.pm:
2365         (ParseInterface):
2366         * bindings/scripts/IDLParser.pm:
2367         (Parse):
2368         * bindings/scripts/generate-bindings.pl:
2369         * bindings/scripts/generate-preprocessed-idls.pl: Removed.
2370         * bindings/scripts/preprocessor.pm:
2371         (applyPreprocessor):
2372
2373 2013-03-28  Nate Chapin  <japhet@chromium.org>
2374
2375         Don't grant local content permissions for appcache loads.
2376         https://bugs.webkit.org/show_bug.cgi?id=112542
2377
2378         Reviewed by Antti Koivisto.
2379
2380         No new tests, fixing http/tests/appcache/local-content.html
2381
2382         * loader/DocumentLoader.cpp:
2383         (WebCore::DocumentLoader::DocumentLoader):
2384         (WebCore::DocumentLoader::commitData): Don't grant local load permissions
2385             to all SubstituteData loads, only give them to loads that were SubstituteData
2386             loads at the time of DocumentLoader construction. This constitutes all
2387             SubstituteData loads except those triggered by appcache.
2388         * loader/DocumentLoader.h:
2389         * loader/FrameLoader.cpp:
2390         (WebCore::FrameLoader::didBeginDocument): Move granting local load
2391             permissions for SubstituteData loads to DocumentLoader::commitData().
2392
2393 2013-03-28  Mike West  <mkwst@chromium.org>
2394
2395         X-Frame-Options: Blocked resources should fire load events.
2396         https://bugs.webkit.org/show_bug.cgi?id=113192
2397
2398         Reviewed by Nate Chapin.
2399
2400         * loader/DocumentLoader.cpp:
2401         (WebCore::DocumentLoader::responseReceived):
2402             Fire a load event on the frame's owner element when denying access
2403             due to X-Frame-Options header content. This brings us in-line with
2404             Gecko and IE, which both trigger load events currently.
2405
2406 2013-03-28  Tien-Ren Chen  <trchen@chromium.org>
2407
2408         Support bottom-right anchored fixed-position elements during a pinch gesture
2409         https://bugs.webkit.org/show_bug.cgi?id=111670
2410
2411         Reviewed by James Robinson.
2412
2413         This patch adds support to bottom-right fixed-position elements by
2414         introducing WebLayerPositionConstraint to WebLayer.
2415
2416         No new tests. Can't test until chromium patch landed.
2417
2418         * page/scrolling/ScrollingCoordinator.h:
2419         (WebCore::ScrollingCoordinator::updateLayerPositionConstraint):
2420         * page/scrolling/chromium/ScrollingCoordinatorChromium.cpp:
2421         (WebCore::clearPositionConstraintExceptForLayer):
2422         (WebCore):
2423         (WebCore::computePositionConstraint):
2424         (WebCore::ScrollingCoordinatorChromium::updateLayerPositionConstraint):
2425         * page/scrolling/chromium/ScrollingCoordinatorChromium.h:
2426         (ScrollingCoordinatorChromium):
2427         * rendering/RenderLayerBacking.cpp:
2428         (WebCore::RenderLayerBacking::registerScrollingLayers):
2429         * rendering/RenderLayerBacking.h:
2430         (WebCore::RenderLayerBacking::contentsContainmentLayer):
2431         (RenderLayerBacking):
2432         * rendering/RenderLayerCompositor.cpp:
2433         * rendering/RenderLayerCompositor.h:
2434
2435 2013-03-28  James Robinson  <jamesr@chromium.org>
2436
2437         Remove unnecessary 1 second sleep on windows from preprocessor.pm
2438         https://bugs.webkit.org/show_bug.cgi?id=113536
2439
2440         Unreviewed, partial rollout of r146661.
2441
2442         This rolls out one line of 146661 that slows down the windows build significantly.
2443
2444         * bindings/scripts/preprocessor.pm:
2445         (applyPreprocessor):
2446
2447 2013-03-28  Levi Weintraub  <leviw@chromium.org>
2448
2449         Enable font measurement optimization for Chromium-mac when there are no font-feature-settings.
2450
2451         Enable measure-once optimization on Chromium-Mac
2452         https://bugs.webkit.org/show_bug.cgi?id=113243
2453
2454         Reviewed by Eric Seidel.
2455
2456         Bugs in Chromium-mac's -webkit-font-feature-settings support prevented us from enabling the
2457         optimization when it was enabled for all other platforms. This was believed to be related to
2458         kerning, but the bug shows up when there are any font-feature-settings specified. For now,
2459         optimizing the common case and only turning off the optimization when there are font-feature-
2460         settings in play.
2461
2462         Updated test fast/text/shaping/shaping-selection-rect.html to avoid breaking due to
2463         https://bugs.webkit.org/show_bug.cgi?id=113418
2464
2465         * rendering/RenderBlockLineLayout.cpp:
2466         (WebCore::setLogicalWidthForTextRun):
2467
2468 2013-03-28  Zoltan Horvath  <zoltan@webkit.org>
2469
2470         [CSS Exclusions][CSS Regions] Block children do not layout inline content correctly in a region with shape-inside set
2471         https://bugs.webkit.org/show_bug.cgi?id=112177
2472
2473         Reviewed by David Hyatt.
2474
2475         When we had two multiple regions and a shape-inside was applied on the second region, but not on the first region and the content contained
2476         paragraphs, the content was pushed down almost to the bottom in the second region. In a flow thread this behavior caused by the lack of the 
2477         proper updating of absoluteLogicalTop in RenderBlock::layoutRunsAndFloatsInRange function.
2478
2479         Tests: fast/regions/shape-inside/shape-inside-on-additional-regions.html
2480                fast/regions/shape-inside/shape-inside-on-regions.html
2481
2482         * rendering/RenderBlockLineLayout.cpp:
2483         (WebCore::RenderBlock::layoutRunsAndFloatsInRange): Update the value of absoluteLogicalTop in every run when we are in a flow thread.
2484
2485 2013-03-28  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2486
2487         exceptions are not checked after toInt32 calls in bindings.
2488         https://bugs.webkit.org/show_bug.cgi?id=113218
2489
2490         Reviewed by Kentaro Hara.
2491
2492         In attribute setter, wrap JSValue to native value conversion in a try
2493         catch block.
2494
2495         Define a new macro binding: V8TRYCATCH_VOID
2496
2497         No new tests: covered by fast/dom/exception-in-binding.html
2498
2499         * bindings/scripts/CodeGeneratorV8.pm:
2500         (GenerateNormalAttrSetter):
2501         * bindings/v8/V8BindingMacros.h:
2502         (WebCore):
2503
2504 2013-03-28  ChangSeok Oh  <changseok.oh@collabora.com>
2505
2506         [GTK][AC] Use transform property of ClutterActor
2507         https://bugs.webkit.org/show_bug.cgi?id=113317
2508
2509         Reviewed by Gustavo Noronha Silva.
2510
2511         ClutterActor has a transform property to set transformation matrix directly
2512         since version 1.12. So we don't need to keep and use the matrix property of GraphicsLayerActor.
2513
2514         No new tests because of no functionality change.
2515
2516         * platform/graphics/clutter/GraphicsLayerActor.cpp:
2517         (_GraphicsLayerActorPrivate):
2518         (graphicsLayerActorDispose):
2519         (graphicsLayerActorApplyTransform):
2520         * platform/graphics/clutter/GraphicsLayerActor.h:
2521         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2522         (WebCore::GraphicsLayerClutter::updateTransform):
2523         * platform/graphics/clutter/PlatformClutterAnimation.cpp:
2524         (WebCore::PlatformClutterAnimation::addTransformTransition):
2525
2526 2013-03-28  Sheriff Bot  <webkit.review.bot@gmail.com>
2527
2528         Unreviewed, rolling out r143834.
2529         http://trac.webkit.org/changeset/143834
2530         https://bugs.webkit.org/show_bug.cgi?id=113530
2531
2532         Multiple use-after-free regressions on ClusterFuzz (Requested
2533         by inferno-sec on #webkit).
2534
2535         * dom/Attr.cpp:
2536         (WebCore::Attr::Attr):
2537         (WebCore::Attr::setValue):
2538         (WebCore::Attr::childrenChanged):
2539         * dom/Attr.h:
2540         (Attr):
2541         * dom/Element.cpp:
2542         (WebCore::Element::setAttributeInternal):
2543         * dom/Element.h:
2544         (Element):
2545
2546 2013-03-28  Julien Chaffraix  <jchaffraix@webkit.org>
2547
2548         [CSS Grid Layout] Before / start paddings and borders are not accounted for when placing the grid items
2549         https://bugs.webkit.org/show_bug.cgi?id=113351
2550
2551         Reviewed by Tony Chang.
2552
2553         Tests: fast/css-grid-layout/grid-element-border-grid-item.html
2554                fast/css-grid-layout/grid-element-border-padding-grid-item.html
2555                fast/css-grid-layout/grid-element-padding-grid-item.html
2556
2557         * rendering/RenderBoxModelObject.h:
2558         (WebCore::RenderBoxModelObject::borderAndPaddingBefore):
2559         Added this helper function (we do have borderAndPaddingStart but didn't have this
2560         one for some reason).
2561
2562         * rendering/RenderGrid.cpp:
2563         (WebCore::RenderGrid::findChildLogicalPosition):
2564         Shifted |offset| by the paddings and borders before / start.
2565
2566 2013-03-28  Zan Dobersek  <zdobersek@igalia.com>
2567
2568         [GTK] Build GTK-specific, non-layer-violating source code into WebCore-independent libPlatformGtk.la
2569         https://bugs.webkit.org/show_bug.cgi?id=112546
2570
2571         Reviewed by Martin Robinson.
2572
2573         No new tests - no new functionality.
2574
2575         * GNUmakefile.am: Passing the DATA_DIR value through the cppflags is not required anymore as the affected source is now
2576         built into libPlatformGtk.la.
2577         * GNUmakefile.list.am: Build the GTK-specific source files that are already independent of WebCore into the
2578         libPlatformGtk.la by assigning the build targets listing to the platformgtk_sources variable.
2579         * platform/gtk/GtkVersioning.c: Renamed from Source/Platform/gtk/GtkVersioning.c.
2580         * platform/gtk/GtkVersioning.h: Renamed from Source/Platform/gtk/GtkVersioning.h.
2581
2582 2013-03-28  Matt Falkenhagen  <falken@chromium.org>
2583
2584         Refactoring: Replace Element::disabled and isEnabledFormControl with isDisabledFormControl
2585         https://bugs.webkit.org/show_bug.cgi?id=113273
2586
2587         Reviewed by Kent Tamura.
2588
2589         Element::disabled is about form controls and Element::isEnabledFormControl
2590         is redundant with it, so replace them with a single function
2591         Element::isDisabledFormControl.
2592
2593         No new tests, there should be no behavior change.
2594
2595         * accessibility/AccessibilityListBox.cpp:
2596         (WebCore::AccessibilityListBox::canSetSelectedChildrenAttribute):
2597         * accessibility/AccessibilityListBoxOption.cpp:
2598         (WebCore::AccessibilityListBoxOption::canSetSelectedAttribute):
2599         * accessibility/AccessibilityMenuList.cpp:
2600         (WebCore::AccessibilityMenuList::canSetFocusAttribute):
2601         * accessibility/AccessibilityMenuListOption.cpp:
2602         (WebCore::AccessibilityMenuListOption::isEnabled):
2603         * accessibility/AccessibilityNodeObject.cpp:
2604         (WebCore::AccessibilityNodeObject::isEnabled):
2605         (WebCore::AccessibilityNodeObject::actionElement):
2606         (WebCore::AccessibilityNodeObject::canSetFocusAttribute):
2607         * css/SelectorChecker.cpp:
2608         (WebCore::SelectorChecker::checkOne):
2609         * css/StyleResolver.cpp:
2610         (WebCore::StyleResolver::canShareStyleWithControl):
2611         * dom/Element.cpp:
2612         (WebCore::Element::isDisabledFormControl):
2613         * dom/Element.h:
2614         (Element):
2615         (WebCore::isDisabledFormControl): Add helper function for convenience.
2616         (WebCore):
2617         * dom/EventDispatcher.cpp:
2618         (WebCore::EventDispatcher::dispatchSimulatedClick):
2619         * dom/GestureEvent.cpp:
2620         (WebCore::GestureEventDispatchMediator::dispatchEvent):
2621         * dom/MouseEvent.cpp:
2622         (WebCore::MouseEventDispatchMediator::dispatchEvent):
2623         * dom/Node.cpp:
2624         (WebCore::Node::handleLocalEvents):
2625         (WebCore::Node::willRespondToMouseMoveEvents):
2626         (WebCore::Node::willRespondToMouseClickEvents):
2627         (WebCore::Node::willRespondToTouchEvents):
2628         * html/BaseMultipleFieldsDateAndTimeInputType.cpp:
2629         (WebCore::BaseMultipleFieldsDateAndTimeInputType::isEditControlOwnerDisabled):
2630         * html/DOMFormData.cpp:
2631         (WebCore::DOMFormData::DOMFormData):
2632         * html/FileInputType.cpp:
2633         (WebCore::FileInputType::handleDOMActivateEvent):
2634         (WebCore::FileInputType::disabledAttributeChanged):
2635         * html/HTMLButtonElement.cpp:
2636         (WebCore::HTMLButtonElement::defaultEventHandler):
2637         (WebCore::HTMLButtonElement::willRespondToMouseClickEvents):
2638         (WebCore::HTMLButtonElement::isSuccessfulSubmitButton):
2639         * html/HTMLCollection.cpp:
2640         (WebCore::isMatchingElement):
2641         * html/HTMLFormControlElement.cpp:
2642         (WebCore::HTMLFormControlElement::updateAncestorDisabledState):
2643         (WebCore::HTMLFormControlElement::isDisabledFormControl):
2644         (WebCore::HTMLFormControlElement::supportsFocus):
2645         * html/HTMLFormControlElement.h:
2646         (HTMLFormControlElement):
2647         (WebCore::HTMLFormControlElement::isDisabledOrReadOnly):
2648         * html/HTMLInputElement.cpp:
2649         (WebCore::HTMLInputElement::isSuccessfulSubmitButton):
2650         (WebCore::HTMLInputElement::willRespondToMouseClickEvents):
2651         * html/HTMLOptGroupElement.cpp:
2652         (WebCore::HTMLOptGroupElement::isDisabledFormControl):
2653         * html/HTMLOptGroupElement.h:
2654         (HTMLOptGroupElement):
2655         * html/HTMLOptionElement.cpp:
2656         (WebCore::HTMLOptionElement::isDisabledFormControl):
2657         * html/HTMLOptionElement.h:
2658         (HTMLOptionElement):
2659         * html/HTMLPlugInElement.cpp:
2660         (WebCore::HTMLPlugInElement::willRespondToMouseClickEvents):
2661         * html/HTMLSelectElement.cpp:
2662         (WebCore::HTMLSelectElement::nextValidIndex):
2663         (WebCore::HTMLSelectElement::updateListBoxSelection):
2664         (WebCore::HTMLSelectElement::recalcListItems):
2665         (WebCore::HTMLSelectElement::appendFormData):
2666         (WebCore::HTMLSelectElement::updateSelectedState):
2667         (WebCore::HTMLSelectElement::listBoxDefaultEventHandler):
2668         (WebCore::HTMLSelectElement::defaultEventHandler):
2669         (WebCore::HTMLSelectElement::optionAtIndex):
2670         * html/ImageInputType.cpp:
2671         (WebCore::ImageInputType::handleDOMActivateEvent):
2672         * html/ResetInputType.cpp:
2673         (WebCore::ResetInputType::handleDOMActivateEvent):
2674         * html/SubmitInputType.cpp:
2675         (WebCore::SubmitInputType::handleDOMActivateEvent):
2676         * html/shadow/SliderThumbElement.cpp:
2677         (WebCore::SliderThumbElement::isDisabledFormControl):
2678         (WebCore::SliderThumbElement::defaultEventHandler):
2679         (WebCore::SliderThumbElement::willRespondToMouseMoveEvents):
2680         (WebCore::SliderThumbElement::willRespondToMouseClickEvents):
2681         * html/shadow/SliderThumbElement.h:
2682         (SliderThumbElement):
2683         * html/shadow/SpinButtonElement.h:
2684         * html/shadow/TextFieldDecorationElement.cpp:
2685         (WebCore::TextFieldDecorationElement::updateImage):
2686         * loader/FormSubmission.cpp:
2687         (WebCore::FormSubmission::create):
2688         * page/DragController.cpp:
2689         (WebCore::DragController::tryDocumentDrag):
2690         (WebCore::DragController::concludeEditDrag):
2691         * rendering/RenderListBox.cpp:
2692         (WebCore::RenderListBox::addFocusRingRects):
2693         (WebCore::RenderListBox::paintItemForeground):
2694         * rendering/RenderMenuList.cpp:
2695         (WebCore::RenderMenuList::itemIsEnabled):
2696         * rendering/RenderTextControl.cpp:
2697         (WebCore::updateUserModifyProperty):
2698         * rendering/RenderTheme.cpp:
2699         (WebCore::RenderTheme::isEnabled):
2700         * rendering/RenderThemeMac.mm:
2701         (WebCore::getMediaUIPartStateFlags):
2702         * rendering/RenderThemeMacShared.mm:
2703         (WebCore::RenderThemeMacShared::adjustMenuListStyle):
2704         (WebCore::RenderThemeMacShared::paintSearchFieldCancelButton):
2705         * rendering/RenderThemeSafari.cpp:
2706         (WebCore::RenderThemeSafari::adjustMenuListStyle):
2707
2708 2013-03-28  Brady Eidson  <beidson@apple.com>
2709
2710         Remove workaround for <rdar://problem/5321972>.
2711         <rdar://problem/12022862> and https://bugs.webkit.org/show_bug.cgi?id=113516
2712
2713         Reviewed by Sam Weinig.
2714
2715         No new tests (No point in testing the removal of bizarre behavior).
2716
2717         * platform/network/mac/WebCoreURLResponse.mm:
2718         (WebCore::adjustMIMETypeIfNecessary): This workaround isn't needed on Lion+
2719
2720 2013-03-28  Arnaud Renevier  <a.renevier@sisa.samsung.com>
2721
2722         use CanvasWindingRule enumeration in CanvasRenderingContext2D.idl
2723         https://bugs.webkit.org/show_bug.cgi?id=113456
2724
2725         Reviewed by Kentaro Hara.
2726
2727         Use enum CanvasWindingRule type instead of DOMString for winding
2728         arguments when needed. Changed methods are: fill, stroke and isPointInPath.
2729
2730         Test: fast/canvas/winding-enumeration.html
2731
2732         * html/canvas/CanvasRenderingContext2D.idl:
2733
2734 2013-03-28  Scott Graham  <scottmg@chromium.org>
2735
2736         Move preprocessing of idl to pre-pass for gyp
2737         https://bugs.webkit.org/show_bug.cgi?id=113448
2738
2739         Reviewed by Tony Chang.
2740
2741         Moves the preprocessor invocations when parsing IDL files to a
2742         pre-pass to avoid reinvocations when IDLs are referenced from others.
2743         This reduces the number of invocations of the preprocessor from 20071
2744         to 633, which reduces the runtime from 12m30 to 1m (on a Windows box).
2745
2746         No new tests, this is a build time improvement, and shouldn't have any
2747         visible effect.
2748
2749         * WebCore.gyp/WebCore.gyp:
2750         * bindings/scripts/CodeGenerator.pm:
2751         (ParseInterface):
2752         * bindings/scripts/IDLParser.pm:
2753         (Parse):
2754         * bindings/scripts/generate-bindings.pl:
2755         * bindings/scripts/generate-preprocessed-idls.pl: Added.
2756         * bindings/scripts/preprocessor.pm:
2757         (applyPreprocessor):
2758
2759 2013-03-28  Alok Priyadarshi  <alokp@chromium.org>
2760
2761         RenderBox::backgroundIsKnownToBeOpaqueInRect may be wrong for theme-painted elements
2762         https://bugs.webkit.org/show_bug.cgi?id=113419
2763
2764         Reviewed by Simon Fraser.
2765
2766         Do not consider control elements as opaque. They are typically theme painted, and we cannot assume opaqueness on the behalf of theme. It can be improved by asking the theme if it paints opaque.
2767
2768         Test: compositing/contents-opaque/control-layer.html
2769
2770         * rendering/RenderBox.cpp:
2771         (WebCore::RenderBox::backgroundIsKnownToBeOpaqueInRect):
2772
2773 2013-03-28  ChangSeok Oh  <changseok.oh@collabora.com>
2774
2775         [GTK][AC] Animating layer disappears while running with clutter backend
2776         https://bugs.webkit.org/show_bug.cgi?id=110470
2777
2778         Reviewed by Gustavo Noronha Silva.
2779
2780         The reason of this issue is that clutter_actor_remove_child leads to stopping animations
2781         of child actor. ClutterActor's animation could be defined only when it has a parent actor.
2782         So we should avoid the case calling the api as much as we can. At least we don't
2783         need to reset a actor's parent at all if the current parent is same with new one.
2784         If we can't avoid invoking clutter_actor_remove_child for an animating actor, we may apply
2785         a more complicated way to keep the animation. But I haven't faced such a case yet.
2786
2787         Covered by existing animation tests.
2788
2789         * platform/graphics/clutter/GraphicsLayerActor.cpp:
2790         (graphicsLayerActorSetSublayers):
2791         * platform/graphics/clutter/GraphicsLayerClutter.cpp:
2792         (WebCore::GraphicsLayerClutter::recursiveCommitChanges):
2793         (WebCore::GraphicsLayerClutter::updateSublayerList):
2794
2795 2013-03-28  Xianzhu Wang  <wangxianzhu@chromium.org>
2796
2797         Non-painting fixed elements should not cause repaints on scroll
2798         https://bugs.webkit.org/show_bug.cgi?id=110430
2799
2800         Reviewed by Simon Fraser.
2801
2802         Test: compositing/repaint/scroll-fixed-layer-no-content.html
2803         Test: compositing/repaint/scroll-fixed-layer-out-of-view.html
2804
2805         * page/FrameView.cpp:
2806         (WebCore::FrameView::scrollContentsFastPath): Check for no-content and out-of-view flag set by RLC.
2807         * rendering/RenderLayerCompositor.cpp:
2808         (WebCore::RenderLayerCompositor::requiresCompositingForPosition): Moved the check for no-content above out-of-view because it's faster.
2809
2810 2013-03-28  Alexander Pavlov  <apavlov@chromium.org>
2811
2812         Unreviewed, revert accidentally added line committed in r147117.
2813
2814         * inspector/front-end/ElementsTreeOutline.js:
2815
2816 2013-03-28  Alexander Pavlov  <apavlov@chromium.org>
2817
2818         Web Inspector: [Elements] Syntax-highlight the "Edit as HTML" editor
2819         https://bugs.webkit.org/show_bug.cgi?id=113306
2820
2821         Reviewed by Vsevolod Vlasov.
2822
2823         Use CodeMirror as the raw HTML editor for the "Edit as HTML" menu item
2824         (and all multiline editors for WebInspector.startEditing()).
2825         Drive-by fix for handling the editing when the editor has been invoked on the closing tag.
2826
2827         * inspector/front-end/ElementsTreeOutline.js:
2828         (WebInspector.ElementsTreeElement.prototype.commit):
2829         (WebInspector.ElementsTreeElement.prototype._startEditingAsHTML):
2830         * inspector/front-end/UIUtils.js:
2831         (WebInspector.EditingConfig.prototype.setMultiline):
2832         (WebInspector.startEditing):
2833         (WebInspector.CodeMirrorCSSLoadView): A bogus view to load-unload CodeMirror-related CSS on demand.
2834         * inspector/front-end/elementsPanel.css:
2835         (#elements-content .CodeMirror):
2836         (#elements-content .CodeMirror pre):
2837         (#elements-content .CodeMirror-lines):
2838         * inspector/front-end/elementsPanel.css: CodeMirror styles for the "Edit as HTML" editor.
2839         * inspector/front-end/externs.js: Declare CodeMirror type with some members, as it is third-party code.
2840         * inspector/front-end/inspector.html: Fix script order (UIUtils.js requires View.js).
2841
2842 2013-03-28  Hajime Morrita  <morrita@google.com>
2843
2844         Custom Elements: should support non-HTML namespaces.
2845         https://bugs.webkit.org/show_bug.cgi?id=111693
2846
2847         Reviewed by Dimitri Glazkov.
2848
2849         Some existing code assumes that the element extends HTMLElements.
2850         This change allow it to extend from Element. Note that the
2851         namespace URI of a custom element is determined by given element
2852         prototype: An element will have XHTML namespace if its prototype
2853         chain includes HTMLElements, SVGElement leads SVG namespace and
2854         null otherwise, respectively.
2855
2856         Test: fast/dom/custom/document-register-namespace.html
2857
2858         * bindings/v8/CustomElementHelpers.cpp:
2859         (WebCore::hasValidPrototypeChainFor): Factored out from isValidPrototypeParameter()
2860         (WebCore::CustomElementHelpers::isValidPrototypeParameter): Extend to support non HTMLElement prototype
2861         (WebCore::CustomElementHelpers::findLocalName): Support non-HTML element names.
2862         * bindings/v8/CustomElementHelpers.h:
2863         (CustomElementHelpers):
2864         * dom/CustomElementConstructor.cpp:
2865         (WebCore::CustomElementConstructor::createElementInternal):
2866         * dom/CustomElementRegistry.cpp:
2867         (WebCore::CustomElementRegistry::registerElement): No longer hard-codes namespace and picks one based on the prototype value.
2868         * dom/CustomElementRegistry.h:
2869         (CustomElementRegistry):
2870
2871 2013-03-28  Hans Muller  <hmuller@adobe.com>
2872
2873         [CSS Exclusions] Add support for the simple case of padding a polygonal shape-inside
2874         https://bugs.webkit.org/show_bug.cgi?id=112592
2875
2876         Reviewed by Dirk Schulze.
2877
2878         First pass at computing the padded or inset boundary of a polygon.  This version does not handle
2879         self-intersecting polygons, or values of shape-padding large enough to change the shape of the
2880         original polygon. The implementation computes an offset edge for each polgon edge, where the offset
2881         edge is parallel to the original edge and separated by shape-padding. The padded polygon's vertices
2882         are the intersections of each pair of adjacent offset edges. When adjacent offset edges do not intersect,
2883         because they share a reflex vertex in the original polygon, an approximation to a circular arc
2884         connects the offset edges.
2885
2886         Tests: fast/exclusions/shape-inside/shape-inside-polygon-padding-001.html
2887                fast/exclusions/shape-inside/shape-inside-polygon-padding-002.html
2888                fast/exclusions/shape-inside/shape-inside-polygon-padding-003.html
2889
2890         * rendering/ExclusionPolygon.cpp:
2891         (WebCore::isReflexVertex): Just moved this function earlier in the file.
2892         (WebCore::inwardEdgeNormal): Unit vector that's perpindicular to the edge and that points inwards.
2893         (WebCore::outwardEdgeNormal): Unit vector that's perpindicular to the edge and that points outwards.
2894         (WebCore::appendArc): Append a linear approximation to a circular arc to a vector of vertices.
2895         (WebCore::computeShapePaddingBounds): Return a polygon whose edges are all inset by shape-padding from m_polygon.
2896         (WebCore::computeShapeMarginBounds): Just a stub, see bug 112917.
2897         (WebCore::ExclusionPolygon::shapePaddingBounds): Lazily use computeShapePaddingBounds() to initialize m_paddingBounds.
2898         (WebCore::ExclusionPolygon::shapeMarginBounds): Lazily use computeShapeMarginBounds() to initialize m_marginBounds.
2899         (WebCore::ExclusionPolygon::getIncludedIntervals): Now based on the value of shapePaddingBounds().
2900         (WebCore::ExclusionPolygon::firstIncludedIntervalLogicalTop): Now based on the value of shapePaddingBounds().
2901         * rendering/ExclusionPolygon.h:
2902         (WebCore::ExclusionPolygon::ExclusionPolygon):
2903
2904 2013-03-28  Chris Hutten-Czapski  <chutten@blackberry.com>
2905
2906         [BlackBerry] Handle EXIF orientation for ImageDocuments
2907         https://bugs.webkit.org/show_bug.cgi?id=113423
2908
2909         Internal Bug: PR 293648
2910         Informally Reviewed by Jeff Rogers
2911         Reviewed by Rob Buis.
2912
2913         Support image orientation in our image draw calls, and advertise
2914         the capability to the calling code. This allows us to respect EXIF
2915         orientation data.
2916
2917         * platform/graphics/BitmapImage.h:
2918         * platform/graphics/blackberry/ImageBlackBerry.cpp:
2919         (WebCore::BitmapImage::draw):
2920         (WebCore):
2921         * rendering/RenderObject.cpp:
2922         (WebCore::RenderObject::shouldRespectImageOrientation):
2923
2924 2013-03-28  Andrey Kosyakov  <caseq@chromium.org>
2925
2926         Web Inspector: name timeline overview controls consistently
2927         https://bugs.webkit.org/show_bug.cgi?id=113503
2928
2929         Reviewed by Yury Semikhatsky.
2930
2931         Refactoring, covered by existing tests.
2932
2933         - rename HeapGraph to TimelineMemoryOverview;
2934         - rename TimelineCategoryStrips to TimelineEventOvrview.
2935
2936         * inspector/front-end/TimelineOverviewPane.js:
2937         (WebInspector.TimelineOverviewPane):
2938         (WebInspector.TimelineOverviewPane.prototype.setMode):
2939         (WebInspector.TimelineOverviewPane.prototype._setFrameMode):
2940         (WebInspector.TimelineOverviewPane.prototype._onCategoryVisibilityChanged):
2941         (WebInspector.TimelineOverviewPane.prototype._update):
2942         (WebInspector.TimelineOverviewPane.prototype.setMinimumRecordDuration):
2943         (WebInspector.TimelineMemoryOverview):
2944         (WebInspector.TimelineEventOverview):
2945         (WebInspector.TimelineEventOverview.prototype._renderBar):
2946
2947 2013-03-28  Eli Fidler  <efidler@blackberry.com>
2948
2949         [BlackBerry] Correct glyph contour winding direction when fake-bolding
2950         https://bugs.webkit.org/show_bug.cgi?id=113411
2951
2952         Reviewed by Rob Buis.
2953
2954         * platform/graphics/blackberry/FontPlatformDataBlackBerry.cpp:
2955         (WebCore::FontPlatformData::applyState):
2956
2957 2013-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
2958
2959         Web Inspector: Make JavaScriptSourceFrame work correctly with breakpoints when uiSourceCode does not have a scriptFile.
2960         https://bugs.webkit.org/show_bug.cgi?id=113500
2961
2962         Reviewed by Pavel Feldman.
2963
2964         JavaScriptSourceFrame now listens for uiSourceCode working copy related events and supports muting breakpoints without script file.
2965
2966         * inspector/front-end/JavaScriptSourceFrame.js:
2967         (WebInspector.JavaScriptSourceFrame):
2968         (WebInspector.JavaScriptSourceFrame.prototype._workingCopyChanged):
2969         (WebInspector.JavaScriptSourceFrame.prototype._workingCopyCommitted):
2970         (WebInspector.JavaScriptSourceFrame.prototype._updateScriptFile):
2971         (WebInspector.JavaScriptSourceFrame.prototype.dispose):
2972
2973 2013-03-22  Andrey Kosyakov  <caseq@chromium.org>
2974
2975         Web Inspector: factor out node search controller from inspector.js
2976         https://bugs.webkit.org/show_bug.cgi?id=112689
2977
2978         Reviewed by Pavel Feldman.
2979
2980         This just extracts the existing logic of toggling node search
2981         from inspector.js into a class of its own, InspectElementModeController.
2982         Drive-by: add CtrlOrMeta+Shift+C to help screen.
2983
2984         * English.lproj/localizedStrings.js:
2985         * WebCore.gypi:
2986         * WebCore.vcproj/WebCore.vcproj:
2987         * WebCore.vcxproj/WebCore.vcxproj:
2988         * WebCore.vcxproj/WebCore.vcxproj.filters:
2989         * inspector/compile-front-end.py:
2990         * inspector/front-end/InspectElementModeController.js: Added.
2991         (WebInspector.InspectElementModeController):
2992         (WebInspector.InspectElementModeController.createShortcut):
2993         (WebInspector.InspectElementModeController.prototype.enabled):
2994         (WebInspector.InspectElementModeController.prototype.disable):
2995         (WebInspector.InspectElementModeController.prototype.toggleSearch.callback):
2996         (WebInspector.InspectElementModeController.prototype.toggleSearch):
2997         (WebInspector.InspectElementModeController.prototype.handleShortcut):
2998         * inspector/front-end/InspectorFrontendAPI.js:
2999         (InspectorFrontendAPI.enterInspectElementMode):
3000         * inspector/front-end/WebKit.qrc:
3001         * inspector/front-end/inspector.html:
3002         * inspector/front-end/inspector.js:
3003         (WebInspector._createGlobalStatusBarItems):
3004         (WebInspector._registerShortcuts):
3005         (WebInspector.documentKeyDown):
3006         (WebInspector._updateFocusedNode):
3007
3008 2013-03-28  Eugene Klyuchnikov  <eustas@chromium.org>
3009
3010         Web Inspector: [Settings] "previouslyViewedFiles" exceeds local storage quota.
3011         https://bugs.webkit.org/show_bug.cgi?id=113375
3012
3013         Reviewed by Pavel Feldman.
3014
3015         Serialized "previouslyViewedFiles" may make local storage overflow.
3016         Two fixed applied:
3017         - limit number of history log items
3018         - limit length of URIs that get serialized;
3019           this would affect only data-url URIs.
3020
3021         * inspector/front-end/TabbedEditorContainer.js:
3022         (WebInspector.TabbedEditorContainer.HistoryItem.prototype.serializeToObject):
3023         Added length check.
3024         (WebInspector.TabbedEditorContainer.History.prototype.set _serializeToObject):
3025         Added output array length limit.
3026
3027 2013-03-28  Alexei Filippov  <alph@chromium.org>
3028
3029         Web Inspector: Heap snapshots retained size falls out of the grid if column is too narrow
3030         https://bugs.webkit.org/show_bug.cgi?id=113497
3031
3032         Reviewed by Pavel Feldman.
3033
3034         * inspector/front-end/HeapSnapshotGridNodes.js:
3035         (WebInspector.HeapSnapshotGridNode.prototype._createValueCell):
3036         * inspector/front-end/heapProfiler.css:
3037         (.heap-snapshot-view .data-grid div.heap-snapshot-multiple-values):
3038
3039 2013-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
3040
3041         Web Inspector: ResourceScriptFile should check if resource content really matches VM script when determining hasDiverged state.
3042         https://bugs.webkit.org/show_bug.cgi?id=113488
3043
3044         Reviewed by Pavel Feldman.
3045
3046         Enabled support for checking that file content matches VM script in ResourceScriptFile (For script resources only).
3047         This check is never done before content is loaded in corresponding editor to avoid regressing performance.
3048         File - script content matching is done bearing in mind sourceURLs. 
3049         Live edit keeps sourceURL in script content now even if it is not present in file's content.
3050
3051         * inspector/front-end/JavaScriptSourceFrame.js:
3052         (WebInspector.JavaScriptSourceFrame.prototype._updateScriptFile):
3053         (WebInspector.JavaScriptSourceFrame.prototype.onTextEditorContentLoaded):
3054         * inspector/front-end/LiveEditSupport.js:
3055         (WebInspector.LiveEditScriptFile.prototype.checkMapping):
3056         * inspector/front-end/ResourceScriptMapping.js:
3057         (WebInspector.ResourceScriptMapping.prototype._bindUISourceCodeToScripts):
3058         (WebInspector.ScriptFile.prototype.checkMapping):
3059         (WebInspector.ResourceScriptFile):
3060         (WebInspector.ResourceScriptFile.prototype._workingCopyCommitted):
3061         (WebInspector.ResourceScriptFile.prototype._isDiverged):
3062         (WebInspector.ResourceScriptFile.prototype._sourceMatchesScriptSource):
3063         (WebInspector.ResourceScriptFile.prototype._sourceEndsWithSourceURL):
3064         (WebInspector.ResourceScriptFile.prototype.checkMapping.callback):
3065         (WebInspector.ResourceScriptFile.prototype.checkMapping):
3066         * inspector/front-end/ScriptSnippetModel.js:
3067         (WebInspector.SnippetScriptFile.prototype.checkMapping):
3068
3069 2013-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
3070
3071         Web Inspector: Simplify ResourceScriptFile so that it stores hasDiverged state in it.
3072         https://bugs.webkit.org/show_bug.cgi?id=113489
3073
3074         Reviewed by Pavel Feldman.
3075
3076         ResourceScriptFile._hasDiverged is the one flag that shows whether we have diverged from VM.
3077         It's values is based both on dirty flag on uiSourceCode and information about live edit failures stored in _lastLiveEditFailed field.
3078         Removed willMerge/Diverge events from ScriptFile.
3079         JavaScriptSourceFrame now uses isMergingToVM/DivergingFromVM methods on ScriptFile.
3080         to determine whether breakpointAdded/Removed events should be ignored.
3081         Introduced muted state on JavaScriptSourceFrame to determine whether it should ignore user attempts to set/remove breakpoints.
3082
3083         * inspector/front-end/JavaScriptSourceFrame.js:
3084         (WebInspector.JavaScriptSourceFrame):
3085         (WebInspector.JavaScriptSourceFrame.prototype._didMergeToVM):
3086         (WebInspector.JavaScriptSourceFrame.prototype._didDivergeFromVM):
3087         (WebInspector.JavaScriptSourceFrame.prototype._muteBreakpointsWhileEditing):
3088         (WebInspector.JavaScriptSourceFrame.prototype._restoreBreakpointsAfterEditing):
3089         (WebInspector.JavaScriptSourceFrame.prototype._addBreakpointDecoration):
3090         (WebInspector.JavaScriptSourceFrame.prototype._removeBreakpointDecoration):
3091         (WebInspector.JavaScriptSourceFrame.prototype._shouldIgnoreExternalBreakpointEvents):
3092         (WebInspector.JavaScriptSourceFrame.prototype._breakpointAdded):
3093         (WebInspector.JavaScriptSourceFrame.prototype._breakpointRemoved):
3094         (WebInspector.JavaScriptSourceFrame.prototype._updateScriptFile):
3095         (WebInspector.JavaScriptSourceFrame.prototype.onTextEditorContentLoaded):
3096         * inspector/front-end/LiveEditSupport.js:
3097         (WebInspector.LiveEditScriptFile.prototype.isMergingToVM):
3098         * inspector/front-end/ResourceScriptMapping.js:
3099         (WebInspector.ResourceScriptMapping.prototype.rawLocationToUILocation):
3100         (WebInspector.ScriptFile.prototype.isMergingToVM):
3101         (WebInspector.ResourceScriptFile):
3102         (WebInspector.ResourceScriptFile.prototype._workingCopyCommitted):
3103         (WebInspector.ResourceScriptFile.prototype._isDiverged):
3104         (WebInspector.ResourceScriptFile.prototype._workingCopyChanged):
3105         (WebInspector.ResourceScriptFile.prototype._update):
3106         (WebInspector.ResourceScriptFile.prototype._divergeFromVM):
3107         (WebInspector.ResourceScriptFile.prototype._mergeToVM):
3108         (WebInspector.ResourceScriptFile.prototype.hasDivergedFromVM):
3109         (WebInspector.ResourceScriptFile.prototype.isMergingToVM):
3110         * inspector/front-end/ScriptSnippetModel.js:
3111         (WebInspector.SnippetScriptFile.prototype.isMergingToVM):
3112
3113 2013-03-25  Andrey Kosyakov  <caseq@chromium.org>
3114
3115         Web Inspector: DOMContentLoaded event divider is not shown on Timeline's main view
3116         https://bugs.webkit.org/show_bug.cgi?id=113196
3117
3118         Reviewed by Pavel Feldman.
3119
3120         - keep event divider records in TimelinePresentationModel, not in TimelinePanel;
3121         - process event divider records on every level, not just on top.
3122
3123         * inspector/front-end/TimelinePanel.js:
3124         (WebInspector.TimelinePanel.prototype._updateEventDividers):
3125         (WebInspector.TimelinePanel.prototype._innerAddRecordToTimeline.checkVisible):
3126         (WebInspector.TimelinePanel.prototype._resetPanel):
3127         * inspector/front-end/TimelinePresentationModel.js:
3128         (WebInspector.TimelinePresentationModel.prototype.reset):
3129         (WebInspector.TimelinePresentationModel.prototype._innerAddRecord):
3130         (WebInspector.TimelinePresentationModel.prototype.eventDividerRecords):
3131
3132 2013-03-28  Vsevolod Vlasov  <vsevik@chromium.org>
3133
3134         Unreviewed inspector front-end closure compilation fix.
3135
3136         * inspector/front-end/CookiesTable.js:
3137
3138 2013-03-28  Andrey Lushnikov  <lushnikov@chromium.org>
3139
3140         Web Inspector: [DTE] Paint overlay highlight over line background color
3141         https://bugs.webkit.org/show_bug.cgi?id=113346
3142
3143         Reviewed by Pavel Feldman.
3144
3145         No new tests: no change in behaviour.
3146
3147         - Append spans instead of text nodes to lineRows.
3148         - Set positioning of all spans inside of webkit-line-content as
3149         relative
3150         - Set z-index property so that overlay highlight is above line
3151         background but under text.
3152
3153         * inspector/front-end/DefaultTextEditor.js:
3154         (WebInspector.TextEditorMainPanel.prototype._measureHighlightDescriptor):
3155         (WebInspector.TextEditorMainPanel.prototype._measureSpans):
3156         (WebInspector.TextEditorMainPanel.prototype._renderRanges):
3157         (WebInspector.TextEditorMainPanel.prototype._insertSpanBefore):
3158         * inspector/front-end/textEditor.css:
3159         (.webkit-line-content > .text-editor-overlay-highlight):
3160         (.webkit-line-content > *):
3161
3162 2013-03-28  Alexander Pavlov  <apavlov@chromium.org>
3163
3164         Web Inspector: [REGRESSION] [Styles] Pasting a property in the "name" field is broken
3165         https://bugs.webkit.org/show_bug.cgi?id=113491
3166
3167         Reviewed by Pavel Feldman.
3168
3169         Update the CSSProperty name and value upon pasting properties into the Styles pane.
3170         Drive-by: start editing the next/new property name after pasting.
3171
3172         Test: inspector/styles/paste-property.html
3173
3174         * inspector/front-end/StylesSidebarPane.js:
3175         (.selectElement):
3176         (.moveDirection.alreadyNew):
3177
3178 2013-03-28  Alexei Filippov  <alph@chromium.org>
3179
3180         Web Inspector: Auto expand retaining path until there are more than one retainer.
3181         https://bugs.webkit.org/show_bug.cgi?id=112596
3182
3183         Reviewed by Yury Semikhatsky.
3184
3185         When retainers view gets opened automatically expand retaining path
3186         for objects having just a single retainer.
3187
3188         Test: inspector/profiler/heap-snapshot-summary-retainers.html
3189
3190         * inspector/front-end/HeapSnapshotDataGrids.js:
3191         (WebInspector.HeapSnapshotRetainmentDataGrid.prototype.populateComplete):
3192         (WebInspector.HeapSnapshotRetainmentDataGrid.prototype.setDataSource):
3193         * inspector/front-end/HeapSnapshotGridNodes.js:
3194         (WebInspector.HeapSnapshotGridNode.prototype.childrenRetrieved):
3195         (WebInspector.HeapSnapshotGridNode.prototype._populateChildren):
3196
3197 2013-03-28  Vladislav Kaznacheev  <kaznacheev@chromium.org>
3198
3199         Web Inspector: Fixed property text indentation in Styles sidebar.
3200         https://bugs.webkit.org/show_bug.cgi?id=113409
3201
3202         Reviewed by Alexander Pavlov.
3203
3204         When the sidebar is too narrow and the property text wraps around it breaks the indentation.
3205         This was introduced in r143207 which spuriously modified DOM elements order.
3206
3207         * inspector/front-end/StylesSidebarPane.js:
3208
3209 2013-03-28  Arpita Bahuguna  <a.bah@samsung.com>
3210
3211         Regression: Crash when selecting Hebrew and numbers in a list
3212         https://bugs.webkit.org/show_bug.cgi?id=111894
3213
3214         Reviewed by Ryosuke Niwa.
3215
3216         There is a crash when trying to click/select an anonymous
3217         renderer.
3218
3219         This is a regression due to r143313 which tries to add border/padding
3220         to the computed caret rect in RenderBox::localCaretRect().
3221         The patch calls on the node() method for the corresponding
3222         renderer. For an anonymous renderer though, node() returns
3223         null. Since no check had been added for this, a crash occurs when
3224         caret rect for an anonymous renderer is being computed.
3225
3226         Test: editing/selection/click-on-anonymous-content-crash.html
3227
3228         * rendering/RenderBox.cpp:
3229         (WebCore::RenderBox::localCaretRect):
3230         Added a check for validating the return from the node() call.
3231
3232 2013-03-28  Mike West  <mkwst@chromium.org>
3233
3234         X-Frame-Options: Multiple headers are ignored completely.
3235         https://bugs.webkit.org/show_bug.cgi?id=113387
3236
3237         Reviewed by Nate Chapin.
3238
3239         If a server sends multiple 'X-Frame-Options' headers, we end up with a
3240         value like 'SAMEORIGIN, SAMEORIGIN'. Currently, we're treating that as
3241         invalid, and ignoring the header. It would be safer to follow Gecko's
3242         lead[1] by:
3243
3244         - Folding duplicated entries into their common value (that is:
3245           'sameorigin, sameorigin' -> 'sameorigin').
3246
3247         - Failing closed in the case of conflicts (that is:
3248           'sameorigin, allowall' -> 'deny').
3249
3250         [1]: https://bugzilla.mozilla.org/show_bug.cgi?id=761655
3251
3252         Tests: http/tests/security/XFrameOptions/x-frame-options-multiple-headers-conflict.html
3253                http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-allow.html
3254                http/tests/security/XFrameOptions/x-frame-options-multiple-headers-sameorigin-deny.html
3255
3256         * loader/FrameLoader.cpp:
3257         (WebCore::FrameLoader::shouldInterruptLoadForXFrameOptions):
3258             Call out to parseXFrameOptionsHeader to get the header's disposition
3259             and deal with each case in a switch statement for clarity. Add a new
3260             console warning for the conflict case described above.
3261         * platform/network/HTTPParsers.cpp:
3262         (WebCore::parseXFrameOptionsHeader):
3263         * platform/network/HTTPParsers.h:
3264             Move X-Frame-Options parsing out into HTTPParsers, as it's getting
3265             more and more complicated. To do this, the patch defines a new enum
3266             to pass around the header's disposition.
3267
3268 2013-03-28  Mihnea Ovidenie  <mihnea@adobe.com>
3269
3270         [CSSRegions] Consolidate use of RenderRegion::isValid
3271         https://bugs.webkit.org/show_bug.cgi?id=113154
3272
3273         Reviewed by David Hyatt.
3274
3275         After https://bugs.webkit.org/show_bug.cgi?id=98752, the list of invalid regions is kept separately than the list of valid regions.
3276         A valid region has always a valid flow thread attached. We can use isValid() throughout the RenderRegion code
3277         instead of testing for both isValid() and m_flowThread.
3278
3279         No new tests since there is no change is functionality, just code refactoring.
3280
3281         * rendering/RenderNamedFlowThread.cpp:
3282         (WebCore::RenderNamedFlowThread::addRegionToNamedFlowThread): Added a new function to keep the code
3283         used in addRegionToThread and checkInvalidRegions.
3284         (WebCore::RenderNamedFlowThread::addRegionToThread):
3285         (WebCore::RenderNamedFlowThread::checkInvalidRegions):
3286         * rendering/RenderNamedFlowThread.h:
3287         * rendering/RenderRegion.cpp:
3288         (WebCore::RenderRegion::overflowRectForFlowThreadPortion):
3289         (WebCore::RenderRegion::isFirstRegion):
3290         (WebCore::RenderRegion::isLastRegion):
3291         (WebCore::RenderRegion::paintObject):
3292         (WebCore::RenderRegion::nodeAtPoint):
3293         (WebCore::RenderRegion::incrementAutoLogicalHeightCount):
3294         (WebCore::RenderRegion::decrementAutoLogicalHeightCount):
3295         (WebCore::RenderRegion::layoutBlock):
3296         (WebCore::RenderRegion::repaintFlowThreadContentRectangle):
3297         (WebCore::RenderRegion::attachRegion):
3298         (WebCore::RenderRegion::renderBoxRegionInfo):
3299         (WebCore::RenderRegion::setRenderBoxRegionInfo):
3300         (WebCore::RenderRegion::logicalTopOfFlowThreadContentRect):
3301         (WebCore::RenderRegion::logicalBottomOfFlowThreadContentRect):
3302         (WebCore::RenderRegion::computePreferredLogicalWidths):
3303
3304 2013-03-27  Ilya Tikhonovsky  <loislo@chromium.org>
3305
3306         Web Inspector: Timeline. Refresh is slow when user drags the overview window.
3307         https://bugs.webkit.org/show_bug.cgi?id=113371
3308
3309         Reviewed by Pavel Feldman.
3310
3311         The root of problem is the 300ms delay in scheduleRefresh method.
3312         It was introduced for the case when we add a huge number of records per second.
3313         The scheduleRefresh was written such a way that refresh happened immediately
3314         only for the scrolling operations. Actually we would like to see fast
3315         refresh every time when it is forced by an user action.
3316
3317         In this patch additional flag newRecordWasAdded was added to the
3318         _invalidateAndScheduleRefresh. I made it mandatory because the function
3319         is also used as a callback for an event and it is easy to make a mistake and
3320         interpret the event as the flag.
3321
3322         * inspector/front-end/TimelinePanel.js:
3323         (WebInspector.TimelinePanel.prototype._onCategoryCheckboxClicked):
3324         (WebInspector.TimelinePanel.prototype._durationFilterChanged):
3325         (WebInspector.TimelinePanel.prototype._repopulateRecords):
3326         (WebInspector.TimelinePanel.prototype._onTimelineEventRecorded):
3327         (WebInspector.TimelinePanel.prototype._onRecordsCleared):
3328         (WebInspector.TimelinePanel.prototype._invalidateAndScheduleRefresh):
3329         (WebInspector.TimelinePanel.prototype._scheduleRefresh):
3330         (WebInspector.TimelinePanel.prototype._revealRecord):
3331         (WebInspector.TimelinePanel.prototype._refreshRecords):
3332         (WebInspector.TimelinePanel.prototype.performFilter):
3333
3334 2013-03-27  Keishi Hattori  <keishi@webkit.org>
3335
3336         Dragging to edge should always snap to min/max.
3337         https://bugs.webkit.org/show_bug.cgi?id=113477
3338
3339         Reviewed by Kent Tamura.
3340
3341         Dragging to the edge of a slider should always snap to the min/max.
3342
3343         Test: fast/forms/range/range-slow-drag-to-edge.html
3344
3345         * html/shadow/SliderThumbElement.cpp:
3346         (WebCore::SliderThumbElement::setPositionFromPoint):
3347
3348 2013-03-27  Simon Fraser  <simon.fraser@apple.com>
3349
3350         Add a way to update GraphicsLayerCA visibleRects without having to do a flush
3351         https://bugs.webkit.org/show_bug.cgi?id=113459
3352
3353         Reviewed by Tim Horton.
3354         
3355         Some platforms need to update TiledBacking visible rects from
3356         outside of WebKit, for example if they use delegated scrolling.
3357         They want to avoid forcing layout to be up-to-date when doing this.
3358         
3359         Currently, updating the visibleRect happens when the GraphicsLayerCA
3360         layer are being flushed, but that makes some assumptions about
3361         layout being up-to-date.
3362         
3363         To fix this, add a light-weight pass over the layer tree that
3364         uses TransformState to compute the visibleRect for each
3365         layer, and only if the visibleRect would cause a change in the
3366         tiles in a TiledBacking trigger a layer flush.
3367
3368         * platform/graphics/GraphicsLayer.h:
3369         (WebCore::GraphicsLayer::recomputeVisibleRects):
3370         * platform/graphics/TiledBacking.h:
3371         * platform/graphics/ca/GraphicsLayerCA.cpp:
3372         (WebCore::GraphicsLayerCA::recursiveComputeVisibleRect):
3373         (WebCore::GraphicsLayerCA::recomputeVisibleRects):
3374         (WebCore::GraphicsLayerCA::computeVisibleRect):
3375         * platform/graphics/ca/GraphicsLayerCA.h:
3376         * platform/graphics/ca/mac/TileController.h:
3377         * platform/graphics/ca/mac/TileController.mm:
3378         (WebCore::TileController::tilesWouldChangeForVisibleRect):
3379         (WebCore::TileController::computeTileCoverageRect):
3380         (WebCore::TileController::revalidateTiles):
3381
3382 2013-03-27  Philip Rogers  <pdr@google.com>
3383
3384         Rename toScriptElement -> toScriptElementIfPossible
3385         https://bugs.webkit.org/show_bug.cgi?id=113473
3386
3387         Reviewed by Ryosuke Niwa.
3388
3389         Rename ScriptElement::toScriptElement to ScriptElement::toScriptElementIfPossible to
3390         differentiate this function from other to*Element functions, and to better describe the
3391         function's behavior. Other to*Element functions do not return null if the cast fails,
3392         whereas toScriptElementIfPossible does.
3393
3394         No new tests as this is just a refactoring.
3395
3396         * dom/ScriptElement.cpp:
3397         (WebCore::toScriptElementIfPossible):
3398         * dom/ScriptElement.h:
3399         (WebCore):
3400         * dom/ScriptRunner.cpp:
3401         (WebCore::ScriptRunner::timerFired):
3402
3403             This is the only unchecked return value but there isn't a security issue here.
3404
3405         * html/HTMLOptionElement.cpp:
3406         (WebCore::HTMLOptionElement::collectOptionInnerText):
3407         * html/parser/HTMLConstructionSite.cpp:
3408         (WebCore::HTMLConstructionSite::attachLater):
3409         (WebCore::HTMLConstructionSite::insertForeignElement):
3410         * html/parser/HTMLScriptRunner.cpp:
3411         (WebCore::HTMLScriptRunner::executePendingScriptAndDispatchEvent):
3412         (WebCore::HTMLScriptRunner::requestPendingScript):
3413         (WebCore::HTMLScriptRunner::runScript):
3414         * xml/parser/XMLDocumentParser.cpp:
3415         (WebCore::XMLDocumentParser::notifyFinished):
3416         * xml/parser/XMLDocumentParserLibxml2.cpp:
3417         (WebCore::XMLDocumentParser::startElementNs):
3418         (WebCore::XMLDocumentParser::endElementNs):
3419         * xml/parser/XMLDocumentParserQt.cpp:
3420         (WebCore::XMLDocumentParser::parseStartElement):
3421         (WebCore::XMLDocumentParser::parseEndElement):
3422
3423 2013-03-27  Ryosuke Niwa  <rniwa@webkit.org>
3424
3425         Debug test fix after r147018.
3426
3427         toElement() asserts. What we want here is isElementNode().
3428
3429         * html/parser/HTMLConstructionSite.cpp:
3430         (WebCore::HTMLConstructionSite::attachLater):
3431
3432 2013-03-27  Noel Gordon  <noel.gordon@gmail.com>
3433
3434         Add webp image color profile support
3435         https://bugs.webkit.org/show_bug.cgi?id=113184
3436
3437         Reviewed by Eric Seidel.
3438
3439         Requires libwebp version 0.3.0 (decoder ABI version 0x201). For images
3440         with an ICC color profile chunk, poll the incremental decoder for the
3441         current decoded height with the WebPIDecGetRGB() API and color correct
3442         any newly decoded rows in-situ in the frame buffer.
3443
3444         Note: the ICC chunk appears before the encoded image frame in the webp
3445         encoding (RIFF container) format. When the incremental decoder outputs
3446         decoded pixels, enough encoded data has arrived to read the entire ICC
3447         color profile data chunk.
3448
3449         Tests: fast/images/webp-color-profile-lossless.html
3450                fast/images/webp-color-profile-lossy-alpha.html
3451                fast/images/webp-color-profile-lossy.html
3452
3453         * platform/image-decoders/webp/WEBPImageDecoder.cpp:
3454         (WebCore::WEBPImageDecoder::WEBPImageDecoder):
3455         (WebCore::WEBPImageDecoder::~WEBPImageDecoder): Call clear().
3456         (WebCore):