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