581e79f021aa12970fd77b83c55edb104fa4fb1c
[WebKit-https.git] / Source / WebCore / ChangeLog
1 2013-03-11  Xan Lopez  <xlopez@igalia.com>
2
3         [BlackBerry] PlatformBlackBerry.cmake: create thin AR archives
4         https://bugs.webkit.org/show_bug.cgi?id=110580
5
6         Reviewed by Rob Buis.
7
8         Otherwise libwebcore.a goes beyond the 4Gb file size limit and the
9         link phase fails.
10
11         * PlatformBlackBerry.cmake:
12
13 2013-03-11  Pavel Feldman  <pfeldman@chromium.org>
14
15         Web Inspector: fix styles toolbar in the vertical mode.
16         Not reviewed: swapped two lines.
17
18         * inspector/front-end/ElementsPanel.js:
19         (WebInspector.ElementsPanel.prototype._splitVertically):
20
21 2013-03-11  Andrey Lushnikov  <lushnikov@chromium.org>
22
23         Web Inspector: [CodeMirror] add token highlight feature
24         https://bugs.webkit.org/show_bug.cgi?id=112009
25
26         Reviewed by Pavel Feldman.
27
28         Handle CodeMirror's "cursorActivity" event, check selection for being
29         a word and highlight all its occurrences via CodeMirror.addOverlay method.
30
31         No new tests.
32
33         * inspector/front-end/CodeMirrorTextEditor.js:
34         (WebInspector.CodeMirrorTextEditor):
35         (WebInspector.CodeMirrorTextEditor.TokenHighlighter):
36         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._cursorChange):
37         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._isWord):
38         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._removeHighlight):
39         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight.nextToken):
40         (WebInspector.CodeMirrorTextEditor.TokenHighlighter.prototype._addHighlight):
41         * inspector/front-end/cm/cmdevtools.css:
42         (.cm-token-highlight):
43
44 2013-03-11  Andrey Lushnikov  <lushnikov@chromium.org>
45
46         Web Inspector: [CodeMirror] set indentation size according to devtools settings
47         https://bugs.webkit.org/show_bug.cgi?id=111717
48
49         Reviewed by Pavel Feldman.
50
51         Set up codemirror indent size according to devtools settings.
52
53         No new tests.
54
55         * inspector/front-end/CodeMirrorTextEditor.js:
56         (.get if):
57         (WebInspector.CodeMirrorTextEditor):
58
59 2013-03-11  Yury Semikhatsky  <yurys@chromium.org>
60
61         Web Inspector: add per image statistics to the native memory snapshot
62         https://bugs.webkit.org/show_bug.cgi?id=112011
63
64         Reviewed by Pavel Feldman.
65
66         Added per-image statistics to the native memory distribution table.
67
68         * inspector/front-end/HeapSnapshotProxy.js:
69         (WebInspector.HeapSnapshotWorker):
70         (WebInspector.HeapSnapshotWorker.prototype.createLoader):
71         (WebInspector.HeapSnapshotWorker.prototype.wrapCallback):
72         (WebInspector.HeapSnapshotWorker.prototype.callFactoryMethod):
73         (WebInspector.HeapSnapshotProxyObject.prototype.callFactoryMethod): the method now accepts
74         proxy constructor function instead of its name. This eliminates unnecessary function lookup.
75         (WebInspector.HeapSnapshotLoaderProxy):
76         (WebInspector.HeapSnapshotLoaderProxy.prototype.close):
77         (WebInspector.HeapSnapshotProxy.prototype.createEdgesProvider):
78         (WebInspector.HeapSnapshotProxy.prototype.createRetainingEdgesProvider):
79         (WebInspector.HeapSnapshotProxy.prototype.createAddedNodesProvider):
80         (WebInspector.HeapSnapshotProxy.prototype.createDeletedNodesProvider):
81         (WebInspector.HeapSnapshotProxy.prototype.createNodesProvider):
82         (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForClass):
83         (WebInspector.HeapSnapshotProxy.prototype.createNodesProviderForDominator):
84         (WebInspector.NativeHeapSnapshotProxy):
85         (WebInspector.NativeHeapSnapshotProxy.prototype.images):
86         * inspector/front-end/HeapSnapshotView.js:
87         (WebInspector.HeapProfileHeader.prototype.snapshotProxyConstructor):
88         (WebInspector.HeapProfileHeader.prototype._setupWorker):
89         * inspector/front-end/NativeHeapSnapshot.js:
90         (WebInspector.NativeHeapSnapshot.prototype.images):
91         * inspector/front-end/NativeMemorySnapshotView.js:
92         (WebInspector.NativeSnapshotNode):
93         (WebInspector.NativeSnapshotNode.prototype._createSizeCell):
94         (WebInspector.NativeSnapshotNode.prototype._populate):
95         (WebInspector.NativeSnapshotNode.prototype._addChildrenFromGraph):
96         (WebInspector.NativeSnapshotNode.prototype._addImageDetails.didLoad.didReceiveImages):
97         (WebInspector.NativeSnapshotNode.prototype._addImageDetails):
98         (WebInspector.NativeSnapshotProfileHeader.prototype.snapshotProxyConstructor):
99
100 2013-03-11  Allan Sandfeld Jensen  <allan.jensen@digia.com>
101
102         [Qt] Enable tiled shadow blur for inset box shadows
103         https://bugs.webkit.org/show_bug.cgi?id=111736
104
105         Reviewed by Noam Rosenthal.
106
107         Paint inset box-shadows using the optimized tiled shadow blur, instead of
108         applying shadow blur to the entire painted rect.
109
110         This optimizes the default CSS on common pastebin sites.
111
112         Tested by existing tests.
113
114         * platform/graphics/GraphicsContext.cpp:
115         * platform/graphics/ShadowBlur.cpp:
116         (WebCore::ShadowBlur::drawInsetShadowWithTiling):
117             Must set fill color before calling clearShadow, as that might clear m_color.
118         (WebCore::ShadowBlur::drawLayerPieces):
119             Ditto.
120         * platform/graphics/qt/GraphicsContextQt.cpp:
121         (WebCore::GraphicsContext::fillPath):
122         (WebCore::GraphicsContext::fillRectWithRoundedHole):
123
124 2013-03-11  Alberto Garcia  <agarcia@igalia.com>
125
126         [BlackBerry] GraphicsLayer: rename notifySyncRequired to notifyFlushRequired
127         https://bugs.webkit.org/show_bug.cgi?id=111997
128
129         Reviewed by Rob Buis.
130
131         This changed in r130439 but the old name was introduced again by
132         mistake in r144465.
133
134         * platform/graphics/blackberry/GraphicsLayerBlackBerry.h:
135         (WebCore::GraphicsLayerBlackBerry::notifyFlushRequired):
136         * platform/graphics/blackberry/LayerWebKitThread.cpp:
137         (WebCore::LayerWebKitThread::setNeedsCommit):
138
139 2013-03-11  Kent Tamura  <tkent@chromium.org>
140
141         Inappropriate validation message for required number/date input elements
142         https://bugs.webkit.org/show_bug.cgi?id=111982
143
144         Reviewed by Kentaro Hara.
145
146         For validation message, badInput messages should take precedence
147         over valueMissing messages because users already filled out the
148         field with a bad value.
149
150         Tests: Update fast/forms/validationMessage.html
151
152         * html/InputType.cpp:
153         (WebCore::InputType::validationMessage):
154         Check badInput first.
155
156 2013-03-11  Yury Semikhatsky  <yurys@chromium.org>
157
158         Web Inspector: extract common parts of native profiles
159         https://bugs.webkit.org/show_bug.cgi?id=111965
160
161         Reviewed by Alexander Pavlov.
162
163         Extracted common parts of native profiles into NativeProfileTypeBase. Memory
164         domain dispatcher is now a separate class as it is shared by two native memory
165         profile types.
166
167         Both native memory profile types now capture native heap graph.
168
169         * inspector/front-end/NativeMemorySnapshotView.js:
170         (WebInspector.MemoryAgentDispatcher.instance):
171         (WebInspector.NativeProfileTypeBase.prototype.buttonClicked.didReceiveMemorySnapshot):
172         (WebInspector.NativeProfileTypeBase.prototype.buttonClicked):
173         (WebInspector.NativeSnapshotProfileType):
174         (WebInspector.NativeSnapshotProfileHeader.prototype._didReceiveMemorySnapshot):
175         (WebInspector.NativeMemoryProfileType):
176         (WebInspector.NativeMemoryProfileHeader.prototype._updateSnapshotStatus):
177         (WebInspector.NativeMemoryProfileHeader.prototype._didReceiveMemorySnapshot):
178
179 2013-03-11  Sheriff Bot  <webkit.review.bot@gmail.com>
180
181         Unreviewed, rolling out r145349.
182         http://trac.webkit.org/changeset/145349
183         https://bugs.webkit.org/show_bug.cgi?id=111966
184
185         Missing code history of Element,PageRuleCollector. (Requested
186         by tasak on #webkit).
187
188         * CMakeLists.txt:
189         * GNUmakefile.list.am:
190         * Target.pri:
191         * WebCore.gypi:
192         * WebCore.xcodeproj/project.pbxproj:
193         * css/CSSAllInOne.cpp:
194         * css/DocumentRuleSets.cpp:
195         (WebCore::ShadowDistributedRules::collectMatchRequests):
196         * css/DocumentRuleSets.h:
197         * css/ElementRuleCollector.cpp: Removed.
198         * css/ElementRuleCollector.h: Removed.
199         * css/PageRuleCollector.cpp: Removed.
200         * css/PageRuleCollector.h: Removed.
201         * css/StyleResolver.cpp:
202         (WebCore::leftToRightDeclaration):
203         (WebCore):
204         (WebCore::rightToLeftDeclaration):
205         (WebCore::StyleResolver::State::ensureRuleList):
206         (WebCore::StyleResolver::State::clear):
207         (WebCore::StyleResolver::addMatchedProperties):
208         (WebCore::StyleResolver::addElementStyleProperties):
209         (MatchingUARulesScope):
210         (WebCore::MatchingUARulesScope::MatchingUARulesScope):
211         (WebCore::MatchingUARulesScope::~MatchingUARulesScope):
212         (WebCore::MatchingUARulesScope::isMatchingUARules):
213         (WebCore::StyleResolver::collectMatchingRules):
214         (WebCore::StyleResolver::collectMatchingRulesForRegion):
215         (WebCore::StyleResolver::sortAndTransferMatchedRules):
216         (WebCore::StyleResolver::matchScopedAuthorRules):
217         (WebCore::StyleResolver::matchHostRules):
218         (WebCore::StyleResolver::matchAuthorRules):
219         (WebCore::StyleResolver::matchUserRules):
220         (WebCore::StyleResolver::matchUARules):
221         (WebCore::StyleResolver::collectMatchingRulesForList):
222         (WebCore::compareRules):
223         (WebCore::StyleResolver::sortMatchedRules):
224         (WebCore::StyleResolver::matchAllRules):
225         (WebCore::StyleResolver::State::initForStyleResolve):
226         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
227         (WebCore::StyleResolver::styleForElement):
228         (WebCore::StyleResolver::styleForKeyframe):
229         (WebCore::StyleResolver::pseudoStyleForElement):
230         (WebCore::StyleResolver::styleForPage):
231         (WebCore::StyleResolver::pseudoStyleRulesForElement):
232         (WebCore::StyleResolver::ruleMatches):
233         (WebCore::StyleResolver::checkRegionSelector):
234         (WebCore::comparePageRules):
235         (WebCore::StyleResolver::matchPageRules):
236         (WebCore::checkPageSelectorComponents):
237         (WebCore::StyleResolver::matchPageRulesForList):
238         (WebCore::StyleResolver::isLeftPage):
239         (WebCore::StyleResolver::isFirstPage):
240         (WebCore::StyleResolver::pageName):
241         * css/StyleResolver.h:
242         (WebCore::MatchRequest::MatchRequest):
243         (MatchRequest):
244         (StyleResolver):
245         (MatchResult):
246         (WebCore::StyleResolver::State::State):
247         (State):
248         (WebCore::StyleResolver::State::takeRuleList):
249         (WebCore::StyleResolver::State::setSameOriginOnly):
250         (WebCore::StyleResolver::State::isSameOriginOnly):
251         (WebCore::StyleResolver::State::pseudoStyleRequest):
252         (WebCore::StyleResolver::State::setMode):
253         (WebCore::StyleResolver::State::mode):
254         (WebCore::StyleResolver::State::matchedRules):
255         (WebCore::StyleResolver::State::addMatchedRule):
256         * inspector/InspectorCSSAgent.cpp:
257         (WebCore::InspectorCSSAgent::willMatchRule):
258         * inspector/InspectorCSSAgent.h:
259         (WebCore):
260         (InspectorCSSAgent):
261         * inspector/InspectorInstrumentation.cpp:
262         (WebCore):
263         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
264         * inspector/InspectorInstrumentation.h:
265         (WebCore):
266         (InspectorInstrumentation):
267         (WebCore::InspectorInstrumentation::willMatchRule):
268
269 2013-03-11  Marja Hölttä  <marja@chromium.org>
270
271         [V8] Fix V8InjectedScriptManager
272         https://bugs.webkit.org/show_bug.cgi?id=111968
273
274         Reviewed by Kentaro Hara.
275
276         This is needed to make the inspector work after templates for main world
277         and non-main worlds are separated (bug 111724).
278
279         No new tests (no changes in functionality).
280
281         * bindings/v8/custom/V8InjectedScriptManager.cpp:
282         (WebCore::InjectedScriptManager::canAccessInspectedWindow):
283
284 2013-03-11  Hayato Ito  <hayato@chromium.org>
285
286         Make sure that CSSSelector::setValue() is never called after parsing its pseudoType.
287         https://bugs.webkit.org/show_bug.cgi?id=111957
288
289         Reviewed by Hajime Morrita.
290
291         It'd be nice to have an assertion here since
292         CSSSelector::pseudoType() will never parse a new value after it
293         parses a value and m_pseudoType is set to non-PseudoNotParsed.
294
295         No new tests (no change in behaviour).
296
297         * css/CSSSelector.h:
298         (WebCore::CSSSelector::setValue):
299
300 2013-03-11  Takashi Sakamoto  <tasak@google.com>
301
302         [Refactoring] Implement RuleCollector
303         https://bugs.webkit.org/show_bug.cgi?id=109916
304
305         Reviewed by Antti Koivisto.
306
307         Implemented rule collector for an element and collector for a page.
308         Not all members in class State are required entire while resolving
309         a style.
310
311         No new tests, because just refactoring.
312
313         * CMakeLists.txt:
314         * GNUmakefile.list.am:
315         * Target.pri:
316         * WebCore.gypi:
317         * WebCore.xcodeproj/project.pbxproj:
318         * css/CSSAllInOne.cpp:
319         Added ElementRuleCollector and PageRuleCollector.
320         * css/DocumentRuleSets.cpp:
321         (WebCore::ShadowDistributedRules::collectMatchRequests):
322         Since behaviorAtBoundary is a state owned by ElementRuleCollector,
323         removed from here.
324         * css/DocumentRuleSets.h:
325         (WebCore::ShadowDistributedRules::isEmpty):
326         Added to quickly check whether there exist any ShadowDistributedRules
327         or not.
328         * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
329         (WebCore):
330         (WebCore::ElementRuleCollector::matchedResult):
331         (WebCore::ElementRuleCollector::matchedRuleList):
332         (WebCore::ElementRuleCollector::addMatchedRule):
333         (WebCore::ElementRuleCollector::clearMatchedRules):
334         (WebCore::ElementRuleCollector::ensureRuleList):
335         (WebCore::ElementRuleCollector::addElementStyleProperties):
336         (WebCore::ElementRuleCollector::collectMatchingRules):
337         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
338         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
339         (WebCore::ElementRuleCollector::matchScopedAuthorRules):
340         (WebCore::ElementRuleCollector::matchHostRules):
341         (WebCore::ElementRuleCollector::matchShadowDistributedRules):
342         (WebCore::ElementRuleCollector::matchAuthorRules):
343         (WebCore::ElementRuleCollector::matchUserRules):
344         (WebCore::ElementRuleCollector::matchUARules):
345         (WebCore::ElementRuleCollector::ruleMatches):
346         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
347         (WebCore::ElementRuleCollector::sortMatchedRules):
348         (WebCore::ElementRuleCollector::matchAllRules):
349         Moved these methods from StyleResolver to this class.
350         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
351         This method is used for checking whether a given element can share
352         a cache.
353         * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
354         (WebCore):
355         (WebCore::ElementRuleCollector::ElementRuleCollector):
356         Use styleResolver instance to initialize its member variables, i.e.
357         SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
358         StyleScopedResolver.
359         (ElementRuleCollector):
360         (WebCore::ElementRuleCollector::setMode):
361         (WebCore::ElementRuleCollector::setPseudoStyleRequest):
362         (WebCore::ElementRuleCollector::setSameOriginOnly):
363         (WebCore::ElementRuleCollector::setRegionForStyling):
364         Mode, SameOriginOnly, RegionForStyling are only used while collecting
365         matched rules.
366         (WebCore::ElementRuleCollector::setMedium):
367         Need to know which default stylesheet should be looked up.
368         (WebCore::ElementRuleCollector::document):
369         * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
370         (WebCore::comparePageRules):
371         (WebCore::PageRuleCollector::isLeftPage):
372         (WebCore::PageRuleCollector::isFirstPage):
373         (WebCore::PageRuleCollector::pageName):
374         (WebCore::PageRuleCollector::matchAllPageRules):
375         (WebCore::PageRuleCollector::matchPageRules):
376         (WebCore::checkPageSelectorComponents):
377         (WebCore::PageRuleCollector::matchPageRulesForList):
378         Moved from StyleResolver.
379         * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
380         (WebCore):
381         (WebCore::PageRuleCollector::PageRuleCollector):
382         (PageRuleCollector):
383         (WebCore::PageRuleCollector::matchedResult):
384         * css/StyleResolver.cpp:
385         (WebCore):
386         (WebCore::StyleResolver::State::clear):
387         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
388         (WebCore::StyleResolver::State::initForStyleResolve):
389         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
390         (WebCore::StyleResolver::styleForElement):
391         (WebCore::StyleResolver::styleForKeyframe):
392         (WebCore::StyleResolver::pseudoStyleForElement):
393         (WebCore::StyleResolver::styleForPage):
394         (WebCore::StyleResolver::pseudoStyleRulesForElement):
395         (WebCore::StyleResolver::applyMatchedProperties):
396         * css/StyleResolver.h:
397         (WebCore::MatchRequest::MatchRequest):
398         Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
399         state.
400         (MatchRequest):
401         (WebCore::StyleResolver::selectorFilter):
402         Added to obtain SelectorFilter in ElementRuleCollector's constructor.
403         (StyleResolver):
404         (MatchResult):
405         (WebCore::StyleResolver::State::State):
406         To pass ASSERT in StyleResolver::applyProperties, need to keep
407         m_regionForStyling.
408         (State):
409         (WebCore::StyleResolver::State::regionForStyling):
410         (WebCore::StyleResolver::State::useSVGZoomRules):
411         (WebCore::StyleResolver::hasSelectorForId):
412         (WebCore):
413         (WebCore::checkRegionSelector):
414         * inspector/InspectorCSSAgent.cpp:
415         (WebCore::InspectorCSSAgent::willMatchRule):
416         Removed StyleResolver from its parameter list. Instead, added
417         InspectorCSSOMWrappers and DocumentStyleSheetCollection.
418         * inspector/InspectorCSSAgent.h:
419         (WebCore):
420         (InspectorCSSAgent):
421         * inspector/InspectorInstrumentation.cpp:
422         (WebCore):
423         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
424         * inspector/InspectorInstrumentation.h:
425         (WebCore):
426         (InspectorInstrumentation):
427         (WebCore::InspectorInstrumentation::willMatchRule):
428
429 2013-03-11  Mike West  <mkwst@chromium.org>
430
431         XSSAuditor doesn't need a copy of the original document's body.
432         https://bugs.webkit.org/show_bug.cgi?id=111946
433
434         Reviewed by Darin Adler.
435
436         The XSSAuditor currently copies the original HTTP body of the document
437         that's being audited in order to include it into a violation report if
438         reflected XSS is detected. We don't actually need to do this, as we
439         have access to the original request information from inside the
440         XSSAuditorDelegate where the report is generated.
441         XSSAuditorDelegate::didBlockScript ASSERTs that it's running on the
442         main thread, so it should be safe to reach through the document's
443         loader to get that information directly, rather than passing it from
444         thread to thread via XSSInfo object properties.
445
446         * html/parser/XSSAuditor.h:
447         * html/parser/XSSAuditor.cpp:
448         (WebCore::XSSAuditor::init):
449         (WebCore::XSSAuditor::filterToken):
450         (WebCore::XSSAuditor::isSafeToSendToAnotherThread):
451         * html/parser/XSSAuditorDelegate.h:
452         (WebCore::XSSInfo::create):
453         (WebCore::XSSInfo::XSSInfo):
454         * html/parser/XSSAuditorDelegate.cpp:
455         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
456             Drop the XSSInfo and XSSAuditor properties that held an
457             isolatedCopy of the the original HTTP body. Depending on the
458             document's size, this could be a significant savings.
459         (WebCore::XSSAuditorDelegate::didBlockScript):
460             Reach into the document's loader's original request in order to
461             grab the body as a String, and feed that into the violation report
462             object.
463
464             As a drive-by, this patch creates a FrameLoader* temporary
465             variable to minimize repetition in this area of the code. We use
466             the loader a few times, but should only have to grab it once.
467
468 2013-03-11  Silvia Pfeiffer  <silviapf@chromium.org>
469
470         [Chromium] REGRESSION: Closed Captions button not showing properly
471         https://bugs.webkit.org/show_bug.cgi?id=109871
472
473         Reviewed by Jer Noble.
474
475         No new tests - covered by existing tests.
476
477         Most of the patch was in the meantime covered by a patch to
478         https://bugs.webkit.org/show_bug.cgi?id=111109 .
479         This changes a static Chromium-only function name to be consistent with
480         parent class function names.
481
482         * rendering/RenderMediaControlsChromium.cpp:
483         (WebCore::paintMediaToggleClosedCaptionsButton):
484         (WebCore::RenderMediaControlsChromium::paintMediaControlsPart):
485         Rename paintMediaClosedCaptionsButton to paintMediaToggleClosedCaptionsButton.
486
487 2013-03-11  Tim Horton  <timothy_horton@apple.com>
488
489         RenderSnapshottedPlugIn paints in PaintPhaseBlockBackground instead of PaintPhaseForeground
490         https://bugs.webkit.org/show_bug.cgi?id=111962
491         <rdar://problem/13289335>
492
493         Reviewed by Dean Jackson.
494
495         RenderSnapshottedPlugIn should paint its snapshot during the foreground
496         painting phase, instead of BlockBackground, to match normal plugin painting.
497
498         * rendering/RenderSnapshottedPlugIn.cpp:
499         (WebCore::RenderSnapshottedPlugIn::paint):
500
501 2013-03-07  Alexander Pavlov  <apavlov@chromium.org>
502
503         Web Inspector: [Elements] XSLT transformation result from the xml-stylesheet PI not rendered
504         https://bugs.webkit.org/show_bug.cgi?id=111313
505
506         Reviewed by Vsevolod Vlasov.
507
508         Frame document update upon XSL transformation was never instrumented.
509         This change instruments the Document::applyXSLTransform() method to that end.
510
511         Test: http/tests/inspector/styles/xsl-transformed.xml
512
513         * dom/Document.cpp:
514         (WebCore::Document::applyXSLTransform): Instrumented.
515         * inspector/InspectorDOMAgent.cpp:
516         (WebCore::InspectorDOMAgent::frameDocumentUpdated): Invoked upon applyXSLTransform().
517         * inspector/InspectorDOMAgent.h:
518         * inspector/InspectorInstrumentation.cpp:
519         (WebCore::InspectorInstrumentation::frameDocumentUpdatedImpl): Added.
520         * inspector/InspectorInstrumentation.h:
521         (WebCore::InspectorInstrumentation::didCommitLoad): Drive-by: simplified.
522         (WebCore::InspectorInstrumentation::frameDocumentUpdated): Added.
523
524 2013-03-10  Matt Falkenhagen  <falken@chromium.org>
525
526         Implement inert subtrees needed for modal <dialog>
527         https://bugs.webkit.org/show_bug.cgi?id=110952
528
529         Reviewed by Hajime Morrita.
530
531         This changes Node::disabled() to return true when a modal dialog is
532         open and the node is not in the dialog.
533
534         Reusing disabled for inertness is useful because then event
535         targeting and focus control automatically have the desired behavior:
536         inert nodes are skipped over.
537
538         Tests: fast/dom/HTMLDialogElement/closed-dialog-does-not-block-mouse-events.html
539                fast/dom/HTMLDialogElement/modal-dialog-blocks-mouse-events.html
540                fast/dom/HTMLDialogElement/non-modal-dialog-does-not-block-mouse-events.html
541
542         * dom/Document.h:
543         (WebCore::Document::activeModalDialog): Returns the topmost element in the top layer.
544         Since now the only elements in the top layer are modal dialogs, it is the active modal dialog.
545         * dom/Node.cpp:
546         (WebCore):
547         (WebCore::Node::isInert): As per the spec, a node that is not an ancestor or descendant of the modal dialog is inert.
548         (WebCore::Node::disabled): Return false when inert.
549         * dom/Node.h:
550         * html/HTMLFormControlElement.cpp:
551         (WebCore::HTMLFormControlElement::disabled): Fall back to the superclass so inert is taken into account.
552
553 2013-03-10  Glenn Adams  <glenn@skynav.com>
554
555         Line breaking opportunities at the end of a text node are missed
556         https://bugs.webkit.org/show_bug.cgi?id=17427
557
558         Reviewed by Darin Adler.
559
560         When initializing context for determining next break position,
561         reuse last two characters from previous text node(s) within block.
562         This additional state is stored in the current LazyLineBreakIterator
563         as an optimization to prevent having to add two new parameters to
564         isBreakable().
565
566         At present, this fixes only the ASCII shortcut code path, but
567         does not yet handle the non-ASCII path. Since the ASCII path is
568         the most performant critical, the handling of this latter path
569         will be addressed by webkit.org/b/105692.
570
571         Additionally test for case where last two characters context
572         is derived from distinct nodes, possibly with intervening empty
573         inline node(s).
574
575         Test: fast/text/line-break-between-text-nodes.html
576
577         * platform/text/TextBreakIterator.h:
578         (WebCore::LazyLineBreakIterator::LazyLineBreakIterator):
579         (WebCore::LazyLineBreakIterator::lastCharacter):
580         (WebCore::LazyLineBreakIterator::secondToLastCharacter):
581         (WebCore::LazyLineBreakIterator::setLastTwoCharacters):
582         (WebCore::LazyLineBreakIterator::resetLastTwoCharacters):
583         (WebCore::LazyLineBreakIterator::updateLastTwoCharacters):
584         (LazyLineBreakIterator):
585         Add state variables to retain last two characters of previous text node(s)
586         for reuse when initializing nextBreakPosition<>() context.
587         * rendering/RenderBlockLineLayout.cpp:
588         (WebCore::RenderBlock::layoutRunsAndFloatsInRange):
589         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak):
590         Record and reset retained last two characters of previous text node(s) as
591         appropriate.
592         * rendering/break_lines.cpp:
593         (WebCore::nextBreakablePosition):
594         Use state variables holding retained last two characters of previous text node(s)
595         for when initializing nextBreakPosition<>() context.
596
597 2013-03-10  Darin Adler  <darin@apple.com>
598
599         NetworkStorageSession leaks its CFURLStorageSessionRef
600         https://bugs.webkit.org/show_bug.cgi?id=111950
601         <rdar://problem/13384134>
602
603         Reviewed by Sam Weinig.
604
605         * platform/network/NetworkStorageSession.h:
606         Change the argument type of the constructor to a RetainPtr.
607         * platform/network/cf/NetworkStorageSessionCFNet.cpp:
608         (WebCore::NetworkStorageSession::NetworkStorageSession): Changed
609         the argument type to a RetainPtr.
610         (WebCore::NetworkStorageSession::switchToNewTestingSession): Added
611         calls to adoptCF to adopt the value returned by wkCreatePrivateStorageSession.
612         (WebCore::NetworkStorageSession::createPrivateBrowsingSession): Ditto.
613         (WebCore::NetworkStorageSession::cookieStorage): Changed to use adoptCF
614         instead of the RetainPtr constructor with AdoptCF since the former is
615         far easier to read.
616
617 2013-03-10  Jason Anderssen  <janderssen@gmail.com>
618
619         Conformance Test 1.0.3 (Beta) function: bufferData undefined value failed.
620         https://bugs.webkit.org/show_bug.cgi?id=111641
621
622         Reviewed by Dean Jackson.
623
624         The WebGL specification requires that a size of 0 is not valid. In javascript, passing in undefined 
625         as a parameter to a long long is the same as passing in 0, so we must check for this incorrect
626         value and fail. 
627         The test suite in Kronos 1.0.3 failed, test to verify conformance is as follows:
628         https://www.khronos.org/registry/webgl/sdk/tests/conformance/more/functions/bufferDataBadArgs.html.
629
630         * html/canvas/WebGLRenderingContext.cpp:
631         (WebCore::WebGLRenderingContext::bufferData):
632         Synthesize error and returned if size is 0.
633
634 2013-03-10  Andreas Kling  <akling@apple.com>
635
636         SVGDocumentExtensions should use OwnPtr for pending resource maps.
637         <http://webkit.org/b/111943>
638
639         Reviewed by Anders Carlsson.
640
641         * svg/SVGDocumentExtensions.cpp:
642         (WebCore::SVGDocumentExtensions::~SVGDocumentExtensions):
643         (WebCore::SVGDocumentExtensions::addPendingResource):
644         (WebCore::SVGDocumentExtensions::isElementPendingResources):
645         (WebCore::SVGDocumentExtensions::removeElementFromPendingResources):
646         (WebCore::SVGDocumentExtensions::removePendingResource):
647         (WebCore::SVGDocumentExtensions::removePendingResourceForRemoval):
648         (WebCore::SVGDocumentExtensions::markPendingResourcesForRemoval):
649         * svg/SVGDocumentExtensions.h:
650         (SVGDocumentExtensions):
651
652 2013-03-10  Tim Horton  <timothy_horton@apple.com>
653
654         Add a heuristic to determine the “primary” snapshotted plugin
655         https://bugs.webkit.org/show_bug.cgi?id=111932
656         <rdar://problem/13270208>
657
658         Reviewed by Dean Jackson.
659
660         * WebCore.exp.in: Export a few things.
661         * html/HTMLPlugInImageElement.cpp:
662         (WebCore::HTMLPlugInImageElement::HTMLPlugInImageElement):
663         (WebCore::classNameForShadowRoot): If we've been informed that we are the primary snapshotted plugin, add the 'primary' class.
664         (WebCore::HTMLPlugInImageElement::setIsPrimarySnapshottedPlugIn): Added
665         (WebCore::HTMLPlugInImageElement::updateSnapshotInfo): Hand classNameForShadowRoot our primary-ness.
666         * html/HTMLPlugInImageElement.h:
667         (HTMLPlugInImageElement): Add storage for m_isPrimarySnapshottedPlugIn.
668
669 2013-03-10  Mike West  <mkwst@chromium.org>
670
671         XSSAuditor doesn't need a copy of the original document URL.
672         https://bugs.webkit.org/show_bug.cgi?id=111944
673
674         Reviewed by Adam Barth.
675
676         When creating an XSSInfo object in response to detecting reflected XSS
677         on a page, the Auditor was passing in a copy of the document's
678         original URL for reporting. It doesn't look like we need this, as
679         XSSInfo's only consumer, XSSAuditorDelegate, runs on the main thread
680         with access to the document. We can obtain access to the same
681         information by reading the URL directly from the delegate's Document
682         object if and when we need it.
683
684         * html/parser/XSSAuditorDelegate.cpp:
685         (WebCore::XSSAuditorDelegate::didBlockScript):
686             Read the document's URL directly in order to create a violation
687             report.
688         (WebCore::XSSInfo::isSafeToSendToAnotherThread):
689         * html/parser/XSSAuditorDelegate.h:
690         (WebCore::XSSInfo::create):
691         (WebCore::XSSInfo::XSSInfo):
692         * html/parser/XSSAuditor.cpp:
693         (WebCore::XSSAuditor::init):
694         (WebCore::XSSAuditor::filterToken):
695         (WebCore::XSSAuditor::isSafeToSendToAnotherThread):
696         * html/parser/XSSAuditor.h:
697             Remove the copied original URL from both XSSInfo objects and the
698             XSSAuditor.
699
700 2013-03-10  Andreas Kling  <akling@apple.com>
701
702         GlyphMetricsMap should use OwnPtr.
703         <http://webkit.org/b/111937>
704
705         Reviewed by Anders Carlsson.
706
707         Use OwnPtr instead of raw pointer + deleteAllValues().
708
709         * platform/graphics/GlyphMetricsMap.h:
710         (GlyphMetricsMap):
711         (WebCore::::locatePageSlowCase):
712
713 2013-03-10  Eric Carlson  <eric.carlson@apple.com>
714
715         Allow iOS port to use InbandTextTrackPrivateAVF
716         https://bugs.webkit.org/show_bug.cgi?id=111933
717
718         Reviewed by Dean Jackson.
719
720         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.cpp:
721         (WebCore::InbandTextTrackPrivateAVF::processCue): Drive-by cleanup.
722         * platform/graphics/avfoundation/InbandTextTrackPrivateAVF.h:
723
724 2013-03-09  Eric Carlson  <eric.carlson@apple.com>
725
726         Enable platform code to implement text track menu
727         https://bugs.webkit.org/show_bug.cgi?id=111924
728
729         Reviewed by Dean Jackson.
730
731         No new tests, the new code isn't enabled in any ports yet.
732
733         * WebCore.xcodeproj/project.pbxproj: Add PlatformTextTrack.h and PlatformTextTrackMenu.h.
734
735         * html/HTMLAudioElement.cpp:
736         (WebCore::HTMLAudioElement::createForJSConstructor): scheduleLoad -> scheduleDelayedAction.
737
738         * html/HTMLMediaElement.cpp:
739         (WebCore::HTMLMediaElement::HTMLMediaElement): Deal with scheduleLoad to scheduleDelayedAction rename.
740         (WebCore::HTMLMediaElement::parseAttribute): Ditto.
741         (WebCore::HTMLMediaElement::finishParsingChildren): Ditto.
742         (WebCore::HTMLMediaElement::insertedInto): Ditto.
743         (WebCore::HTMLMediaElement::scheduleDelayedAction): Ditto.
744         (WebCore::HTMLMediaElement::scheduleNextSourceChild): Ditto.
745         (WebCore::HTMLMediaElement::loadTimerFired): Ditto.
746         (WebCore::HTMLMediaElement::textTrackModeChanged): Notify platform menu of track change.
747         (WebCore::HTMLMediaElement::playInternal): Deal with scheduleLoad to scheduleDelayedAction rename.
748         (WebCore::HTMLMediaElement::pauseInternal): Ditto.
749         (WebCore::HTMLMediaElement::mediaPlayerDidAddTrack): Ditto. Call addTrack() instead of appending 
750             the track directly.
751         (WebCore::HTMLMediaElement::setSelectedTextTrack): Deal with platform menu changing the
752             selected track.
753         (WebCore::HTMLMediaElement::platformTextTracks): Return an array of PlatformTracks representing
754             the current text tracks.
755         (WebCore::HTMLMediaElement::notifyMediaPlayerOfTextTrackChanges): Notify the platform menu
756             that the list of text tracks has changed.
757         (WebCore::HTMLMediaElement::platformTextTrackMenu): Return the platform track menu, if any.
758         (WebCore::HTMLMediaElement::closeCaptionTracksChanged): 
759         (WebCore::HTMLMediaElement::addTrack): Call addTrack() instead of appending the track directly.
760         (WebCore::HTMLMediaElement::removeTrack): Call closeCaptionTracksChanged.
761         (WebCore::HTMLMediaElement::addTextTrack): Call addTrack() instead of appending the track directly.
762         (WebCore::HTMLMediaElement::didAddTrack): Ditto.
763         (WebCore::HTMLMediaElement::didRemoveTrack): Deal with scheduleLoad to scheduleDelayedAction rename.
764         (WebCore::HTMLMediaElement::sourceWasAdded): Ditto.
765         (WebCore::HTMLMediaElement::clearMediaPlayer): Forget the platform track menu.
766         (WebCore::HTMLMediaElement::resume): Deal with scheduleLoad to scheduleDelayedAction rename.
767         * html/HTMLMediaElement.h:
768
769         * html/track/InbandTextTrack.h: scheduleLoad -> scheduleDelayedAction.
770
771         * html/track/TextTrack.cpp:
772         (WebCore::TextTrack::platformTextTrack): Create a PlatformTextTrack.
773         * html/track/TextTrack.h:
774
775         * platform/graphics/MediaPlayer.cpp:
776         (WebCore::MediaPlayer::implementsTextTrackControls): New, player private passthrough.
777         (WebCore::MediaPlayer::textTrackMenu): Ditto.
778         * platform/graphics/MediaPlayer.h:
779         * platform/graphics/MediaPlayerPrivate.h:
780
781         * platform/graphics/PlatformTextTrack.h: Added.
782
783         * platform/graphics/PlatformTextTrackMenu.h: Added.
784
785 2013-03-09  Eric Carlson  <eric.carlson@apple.com>
786
787         Video size calculated incorrectly when PLUGIN_PROXY_FOR_VIDEO
788         https://bugs.webkit.org/show_bug.cgi?id=111912
789
790         Reviewed by Dean Jackson.
791
792         * html/shadow/MediaControlElements.cpp:
793         (WebCore::MediaControlTextTrackContainerElement::updateSizes): We use RenderPart when
794             PLUGIN_PROXY_FOR_VIDEO is defined, not RenderVideo.
795
796 2013-03-09  Sebastian Dröge  <sebastian.droege@collabora.co.uk>
797
798         Fix offset handling in GStreamer WebKitWebSource.
799         https://bugs.webkit.org/show_bug.cgi?id=111888
800
801         Reviewed by Philippe Normand.
802
803         * platform/graphics/gstreamer/WebKitWebSourceGStreamer.cpp:
804         (webKitWebSrcSeekDataCb):
805         (StreamingClient::didReceiveData):
806         The offset handling in WebKitWebSource was completely wrong
807         before and caused wrong offsets to be set on the GStreamer buffers
808         after a seek.
809
810         Apart from that there was also a race condition that happens
811         when a downstream element causes seeks in very short succession
812         and is switching between two different parts of the stream.
813
814 2013-03-09  Keishi Hattori  <keishi@webkit.org>
815
816         Month transition animation is missing in some places
817         https://bugs.webkit.org/show_bug.cgi?id=111908
818
819         Reviewed by Kent Tamura.
820
821         Month transition animation was missing when navigating using keyboard
822         shortcuts and when navigation was trigger by selecting.
823
824         Added tests to calendar-picker/*-picker-key-operations.html.
825
826         * Resources/pagepopups/calendarPicker.js:
827         (Animator): Added annotations.
828         (Animator.prototype.isRunning): Returns true of the animation is running. Used by test.
829         (ScrollView.prototype.scrollAnimator): Returns the scroll animator. Used by test.
830         (CalendarPicker):
831         (CalendarPicker.prototype.onYearListViewDidSelectMonth): Use CalendarPicker.NavigationBehavior enum instead of bool.
832         (CalendarPicker.prototype.setSelection): Ditto.
833         (CalendarPicker.prototype._moveHighlight): Ditto.
834         (CalendarPicker.prototype.onCalendarTableKeyDown): Ditto.
835         (CalendarPicker.prototype.onBodyKeyDown): Ditto.
836
837 2013-03-09  Dean Jackson  <dino@apple.com>
838
839         Can't build w/o accelerated compositing
840         https://bugs.webkit.org/show_bug.cgi?id=111891
841
842         Patch originally came from Tobias Mueller <tobiasmue@gnome.org>
843
844         Unreviewed build fix for platforms without ACCELERATED_COMPOSITING enabled, due
845         to r145057.
846
847         * dom/PseudoElement.cpp:
848         (WebCore::PseudoElement::~PseudoElement): Wrap the call to pseudoElementDestroyed in
849             USE(ACCELERATED_COMPOSITING)
850
851 2013-03-07  Robert Hogan  <robert@webkit.org>
852
853         REGRESSION(r140907): Incorrect baseline for cells with media content during load
854         https://bugs.webkit.org/show_bug.cgi?id=108357
855
856         Reviewed by Julien Chaffraix.
857
858         If a cell has replaced content, the intrinsic height of its content can change between layouts. If that's the case then the intrinsic padding we used
859         for layout (the padding required to push the contents of the cell down to the row's baseline) is included in the new height and baseline and makes both
860         of them wrong. So if a cell's content's intrinsic height has changed push the new content up into the intrinsic padding and relayout so that the rest of
861         table and row layout can use the correct baseline and height for this cell.
862
863         Tests: fast/css/vertical-align-baseline-rowspan-012.html
864                http/tests/css/vertical-align-baseline-after-image-load-2.html
865                http/tests/css/vertical-align-baseline-after-image-load-3.html
866                http/tests/css/vertical-align-baseline-after-image-load.html
867
868         * rendering/RenderTableCell.cpp:
869         (WebCore::RenderTableCell::layout):
870         * rendering/RenderTableCell.h:
871         (WebCore::RenderTableCell::isBaselineAligned):
872         * rendering/RenderTableSection.cpp:
873         (WebCore::RenderTableSection::calcRowLogicalHeight):
874         (WebCore::RenderTableSection::layoutRows):
875
876 2013-03-08  Chris Fleizach  <cfleizach@apple.com>
877
878         REGRESSION: Intermittent crash in SpeechSynthesis::didFinishSpeaking
879         https://bugs.webkit.org/show_bug.cgi?id=111613
880
881         Reviewed by Ryosuke Niwa.
882
883         This crash happens when the mock synthesizer utterance variable gets cleared
884         before the speakingFinished timer happens. I don't see how that could happen
885         but I was able to make a similar problem happen when cancel is called twice.
886
887         This adds in a few more asserts and common sense checks. I'm hoping it will
888         illuminate the problem further.
889
890         * platform/mock/PlatformSpeechSynthesizerMock.cpp:
891         (WebCore::PlatformSpeechSynthesizerMock::speakingFinished):
892         (WebCore::PlatformSpeechSynthesizerMock::speak):
893         (WebCore::PlatformSpeechSynthesizerMock::cancel):
894
895 2013-03-08  David Kilzer  <ddkilzer@apple.com>
896
897         BUILD FIX: Make WebCore link for iOS
898
899         * WebCore.exp.in:
900         - Add ENABLE(RUBBER_BAND) for FrameView::setWantsLayerForTopOverHangArea(bool)
901           and FrameView::setWantsLayerForBottomOverHangArea(bool).
902         - Move FloatPoint::FloatPoint(_NSPoint const&) to !PLATFORM(IOS)
903           section.
904
905 2013-03-08  Julien Chaffraix  <jchaffraix@webkit.org>
906
907         [CSS Grid Layout] Resolve grid-{end|after} integer against the end|after edge
908         https://bugs.webkit.org/show_bug.cgi?id=111885
909
910         Reviewed by Tony Chang.
911
912         The current code resolves grid-end (resp. grid-after) <integer>'s format against the start
913         (resp. before) axis. The specification changed so that they are resolved against their matching
914         axis.
915
916         Test: fast/css-grid-layout/grid-auto-flow-resolution.html
917
918         * rendering/RenderGrid.cpp:
919         (WebCore::RenderGrid::maximumIndexInDirection):
920         Updated the code to do the grid sizing measurement without resolveGridPositionsFromStyle. That's required
921         as resolveGridPositionsFromStyle requires the grid to be sized.
922
923         (WebCore::RenderGrid::placeItemsOnGrid):
924         Added a comment about not recomputing after grid growth. This issue was raised to www-style
925         (http://lists.w3.org/Archives/Public/www-style/2013Mar/0182.html).
926
927         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
928         Added an ASSERT now that we don't call it during grid construction. Also added some code to pass
929         the side of the GridPosition we give to resolveGridPositionFromStyle.
930
931         (WebCore::RenderGrid::resolveGridPositionFromStyle):
932         Updated the code to resolve the grid position against the right side.
933
934         * rendering/RenderGrid.h:
935         Added GridPositionSide and updated resolveGridPositionFromStyle's signature.
936
937 2013-03-08  Sheriff Bot  <webkit.review.bot@gmail.com>
938
939         Unreviewed, rolling out r142015.
940         http://trac.webkit.org/changeset/142015
941         https://bugs.webkit.org/show_bug.cgi?id=111904
942
943         The change caused 2 major regressions (bug 111091 and bug
944         111595) and Pravin doesn't have time to investigate them
945         (Requested by jchaffraix on #webkit).
946
947         * dom/Node.cpp:
948         (WebCore::Node::diff):
949         * rendering/RenderBlock.cpp:
950         (WebCore::RenderBlock::childBecameNonInline):
951         (WebCore):
952         * rendering/RenderBlock.h:
953         (RenderBlock):
954         * rendering/RenderBoxModelObject.h:
955         (WebCore::RenderBoxModelObject::childBecameNonInline):
956         (RenderBoxModelObject):
957         * rendering/RenderInline.cpp:
958         (WebCore::RenderInline::childBecameNonInline):
959         (WebCore):
960         * rendering/RenderInline.h:
961         (RenderInline):
962         * rendering/RenderObject.cpp:
963         (WebCore):
964         (WebCore::RenderObject::handleDynamicFloatPositionChange):
965         (WebCore::RenderObject::styleWillChange):
966         (WebCore::RenderObject::styleDidChange):
967         * rendering/RenderObject.h:
968         (RenderObject):
969
970 2013-03-08  Dean Jackson  <dino@apple.com>
971
972         Don't snapshot Java plugins
973         https://bugs.webkit.org/show_bug.cgi?id=111899
974
975         Reviewed by Tim Horton.
976
977         Export MIMETypeRegistry::isJavaAppletMIMEType symbol.
978
979         * WebCore.exp.in:
980
981 2013-03-08  Rafael Weinstein  <rafaelw@chromium.org>
982
983         [HTMLTemplateElement] processTemplateEndTag() needs to check for template in html scope
984         https://bugs.webkit.org/show_bug.cgi?id=111880
985
986         Reviewed by Eric Seidel.
987
988         Currently, </template> handling exits with an error if there is not a template tag "in scope"
989         which will be true if there is a table (for instance) below a template. This makes it so that
990         the search (correctly) examines the entire element stack.
991
992         Tests added to html5lib testing library.
993
994         * html/parser/HTMLTreeBuilder.cpp:
995         (WebCore::HTMLTreeBuilder::processTemplateEndTag):
996
997 2013-03-08  Eric Seidel  <eric@webkit.org>
998
999         BackgroundHTMLParser should be able to atomize well-known strings
1000         https://bugs.webkit.org/show_bug.cgi?id=107337
1001
1002         Reviewed by Adam Barth.
1003
1004         Testing this patch easily requires applying bug 107236 locally
1005         to remove all the rendering noise from Parser/html-threaded-parser.html.
1006
1007         This patch adds a new class HTMLIdentifier which allows us to avoid
1008         allocating strings for known tag/attribute names from HTMLNames.
1009
1010         There is still a lot of meat on this bone, but I think it's important to
1011         land something "smallish" to start and iterate from there.
1012
1013         This took Parser/html-threaded-parser.html from:
1014         median= 443.726500002 ms, stdev= 7.25002679952 ms, min= 430.244000047 ms, max= 455.511000007 ms
1015         to:
1016         median= 427.849500004 ms, stdev= 9.96967058292 ms, min= 417.914000049 ms, max= 461.528000014 ms
1017         on my MBP.
1018
1019         * CMakeLists.txt:
1020         * GNUmakefile.list.am:
1021         * Target.pri:
1022         * WebCore.gypi:
1023         * WebCore.vcproj/WebCore.vcproj:
1024         * WebCore.vcxproj/WebCore.vcxproj:
1025         * html/parser/AtomicHTMLToken.h:
1026         (WebCore::AtomicHTMLToken::AtomicHTMLToken):
1027         * html/parser/BackgroundHTMLParser.cpp:
1028         (WebCore::tokenExitsForeignContent):
1029         (WebCore::tokenExitsSVG):
1030         (WebCore::tokenExitsMath):
1031         (WebCore::BackgroundHTMLParser::simulateTreeBuilder):
1032         * html/parser/CSSPreloadScanner.cpp:
1033         (WebCore::CSSPreloadScanner::scan):
1034         * html/parser/CSSPreloadScanner.h:
1035         (WebCore):
1036         (CSSPreloadScanner):
1037         * html/parser/CompactHTMLToken.cpp:
1038         (SameSizeAsCompactHTMLToken):
1039         (WebCore::CompactHTMLToken::CompactHTMLToken):
1040         * html/parser/CompactHTMLToken.h:
1041         (WebCore::CompactHTMLToken::Attribute::Attribute):
1042         (Attribute):
1043         (WebCore::CompactHTMLToken::data):
1044         (WebCore::CompactHTMLToken::publicIdentifier):
1045         (CompactHTMLToken):
1046         * html/parser/HTMLDocumentParser.cpp:
1047         (WebCore::HTMLDocumentParser::startBackgroundParser):
1048         * html/parser/HTMLIdentifier.cpp: Added.
1049         (WebCore):
1050         (WebCore::identifierTable):
1051         (WebCore::HTMLIdentifier::hasIndex):
1052         (WebCore::HTMLIdentifier::findIndex):
1053         (WebCore::nameForIndex):
1054         (WebCore::HTMLIdentifier::asString):
1055         (WebCore::HTMLIdentifier::asStringImpl):
1056         (WebCore::HTMLIdentifier::addNames):
1057         (WebCore::HTMLIdentifier::init):
1058         * html/parser/HTMLIdentifier.h: Added.
1059         (WebCore):
1060         (HTMLIdentifier):
1061         (WebCore::HTMLIdentifier::HTMLIdentifier):
1062         (WebCore::HTMLIdentifier::isSafeToSendToAnotherThread):
1063         * html/parser/HTMLParserIdioms.cpp:
1064         (WebCore::threadSafeEqual):
1065         (WebCore::threadSafeMatch):
1066         * html/parser/HTMLParserIdioms.h:
1067         (WebCore):
1068         (WebCore::threadSafeHTMLNamesMatch):
1069         * html/parser/HTMLPreloadScanner.cpp:
1070         (WebCore::TokenPreloadScanner::tagIdFor):
1071         (WebCore::TokenPreloadScanner::StartTagScanner::match):
1072         (TokenPreloadScanner::StartTagScanner):
1073         (WebCore::TokenPreloadScanner::StartTagScanner::processAttribute):
1074         * html/parser/HTMLPreloadScanner.h:
1075
1076 2013-03-08  Brandon Jones  <bajones@google.com>
1077
1078         Check to ensure MultisampleRenderbuffer creation succeeds
1079         https://bugs.webkit.org/show_bug.cgi?id=111780
1080
1081         Reviewed by Dean Jackson.
1082
1083         On OSX systems using AMD graphics chips the allocation of large
1084         Multisample Renderbuffers in Chromium would fail without any indication
1085         of failure. Attempting to draw to the buffer resulted in garbage being
1086         rendered onscreen. This could be reproduced by opening a full-page
1087         WebGL app and pressing (Command + "-") several times. This patch adds an
1088         additional check during DrawingBuffer resize to verify that the resized
1089         buffer is valid. 
1090
1091         * platform/graphics/gpu/DrawingBuffer.cpp:
1092         (WebCore):
1093         (WebCore::DrawingBuffer::checkBufferIntegrity):
1094         (WebCore::DrawingBuffer::reset):
1095         * platform/graphics/gpu/DrawingBuffer.h:
1096         (DrawingBuffer):
1097
1098 2013-03-08  Harald Alvestrand  <hta@chromium.org>
1099
1100         Implemented new API for RTCStatsReport object.
1101         https://bugs.webkit.org/show_bug.cgi?id=110333
1102
1103         Removed RTCStatsElement object, moved its interface to
1104         RTCStatsReport. Preserved some interfaces for
1105         backwards compatibility; will be removed in a later patch.
1106
1107         Reviewed by Adam Barth.
1108
1109         Tested by extensions to RTCPeerConnection-stats test.
1110
1111         * Modules/mediastream/RTCStatsElement.cpp: Removed.
1112         * Modules/mediastream/RTCStatsElement.h: Removed.
1113         * Modules/mediastream/RTCStatsElement.idl: Removed.
1114         * Modules/mediastream/RTCStatsReport.cpp:
1115         (WebCore::RTCStatsReport::create):
1116         (WebCore::RTCStatsReport::RTCStatsReport):
1117         (WebCore):
1118         (WebCore::RTCStatsReport::names):
1119         (WebCore::RTCStatsReport::local):
1120         (WebCore::RTCStatsReport::remote):
1121         (WebCore::RTCStatsReport::addStatistic):
1122         (WebCore::RTCStatsReport::addElement):
1123         * Modules/mediastream/RTCStatsReport.h:
1124         (RTCStatsReport):
1125         (WebCore::RTCStatsReport::timestamp):
1126         (WebCore::RTCStatsReport::id):
1127         (WebCore::RTCStatsReport::stat):
1128         * Modules/mediastream/RTCStatsReport.idl:
1129         * Modules/mediastream/RTCStatsResponse.cpp:
1130         (WebCore::RTCStatsResponse::namedItem):
1131         (WebCore):
1132         (WebCore::RTCStatsResponse::addReport):
1133         (WebCore::RTCStatsResponse::addStatistic):
1134         * Modules/mediastream/RTCStatsResponse.h:
1135         (RTCStatsResponse):
1136         * Modules/mediastream/RTCStatsResponse.idl:
1137         * WebCore.gypi:
1138         * platform/chromium/support/WebRTCStatsResponse.cpp:
1139         (WebKit::WebRTCStatsResponse::addReport):
1140         (WebKit):
1141         (WebKit::WebRTCStatsResponse::addStatistic):
1142         (WebKit::WebRTCStatsResponse::addElement):
1143         * platform/mediastream/RTCStatsResponseBase.h:
1144         (RTCStatsResponseBase):
1145
1146 2013-03-08  Eric Seidel  <eric@webkit.org>
1147
1148         Free up background parser's checkpoints when speculation succeeds
1149         https://bugs.webkit.org/show_bug.cgi?id=110547
1150
1151         Reviewed by Adam Barth.
1152
1153         This should be a memory (and possible perf) win while parsing
1154         pages, as we will no longer hold multiple copies of every
1155         source byte during the whole parse.
1156
1157         Many LayoutTests exercise this code path, and I've manually (debugger and printf)
1158         that we're hitting this code, but we'll have to wait for the memory/perf bots
1159         to tell us if this shows up as a win.
1160
1161         We only bother to message the parser at the end of a speculation chain, so as not
1162         to send too many messages to the background parser.
1163
1164         * html/parser/BackgroundHTMLInputStream.cpp:
1165         (WebCore::BackgroundHTMLInputStream::BackgroundHTMLInputStream):
1166         (WebCore::BackgroundHTMLInputStream::invalidateCheckpointsUpThrough):
1167         (WebCore):
1168         (WebCore::BackgroundHTMLInputStream::rewindTo):
1169         * html/parser/BackgroundHTMLInputStream.h:
1170         (BackgroundHTMLInputStream):
1171         (Checkpoint):
1172         (WebCore::BackgroundHTMLInputStream::Checkpoint::isNull):
1173         (WebCore::BackgroundHTMLInputStream::Checkpoint::clear):
1174         * html/parser/BackgroundHTMLParser.cpp:
1175         (WebCore::BackgroundHTMLParser::passedCheckpoint):
1176         (WebCore):
1177         * html/parser/BackgroundHTMLParser.h:
1178         (BackgroundHTMLParser):
1179         * html/parser/HTMLDocumentParser.cpp:
1180         (WebCore::HTMLDocumentParser::pumpPendingSpeculations):
1181
1182 2013-03-08  Chandra Shekar Vallala  <brk376@motorola.com>
1183
1184         [chromium] Keydown event for 'shift+alt' returns win keycode instead of 'alt'
1185         https://bugs.webkit.org/show_bug.cgi?id=111112
1186
1187         Reviewed by Tony Chang.
1188
1189         Return windows keycode of Alt incase of GDK_META_L, GDK_META_R. This matches
1190         the firefox behaviour in linux platform.
1191
1192         Added Manual Test : ManualTests/shift-alt-key-event.html
1193         Try press Shift then alt key. The test passes if the shiftKey, altKey values
1194         of JSKeyEvent are true and keycode/which is 18.
1195
1196         * platform/chromium/KeyCodeConversionGtk.cpp:
1197         (WebCore::windowsKeyCodeForKeyEvent):
1198
1199 2013-03-08  Mike West  <mkwst@chromium.org>
1200
1201         CSP: 'eval()' is blocked in report-only mode.
1202         https://bugs.webkit.org/show_bug.cgi?id=111867
1203
1204         Reviewed by Adam Barth.
1205
1206         Setting a 'Content-Security-Policy-Report-Only' header should not have
1207         any effect on what a page actually executes. Currently, however, setting
1208         a 'script-src' directive that doesn't whitelist 'unsafe-eval' actually
1209         blocks 'eval()' on the page. This patch fixes that by checking whether
1210         we're in report-only mode before turning 'eval()' off inside the script
1211         engine.
1212
1213         This leaves us in a weird state, however. We don't currently have any
1214         mechanism of explaining to the VM that we just want to be notified of
1215         'eval()' usage. I've filed http://wkbug.com/111869 to cover this
1216         aspect.
1217
1218         Test: http/tests/security/contentSecurityPolicy/eval-allowed-in-report-only-mode.html
1219
1220         * page/ContentSecurityPolicy.cpp:
1221         (WebCore::ContentSecurityPolicy::didReceiveHeader):
1222             For each policy we parse, check that we're only turning off eval in
1223             the VM when we're in enforce mode. If we're in report-only mode,
1224             skip it.
1225
1226 2013-03-08  Christian Biesinger  <cbiesinger@chromium.org>
1227
1228         REGRESSION (r143643): <button> should support ::first-line and ::first-letter
1229         https://bugs.webkit.org/show_bug.cgi?id=111782
1230
1231         Reviewed by Ojan Vafai.
1232
1233         Test: fast/forms/button-first-line-first-letter.html
1234
1235         * rendering/RenderBlock.cpp:
1236         (WebCore::RenderBlock::firstLineBlock):
1237         (WebCore::findFirstLetterBlock):
1238         Add isRenderButton to the first-line and first-letter checks that
1239         don't allow ::first-* styles for flexbox.
1240
1241 2013-03-08  Geoffrey Garen  <ggaren@apple.com>
1242
1243         Removed an out-of-date comment from SharedTimer
1244         https://bugs.webkit.org/show_bug.cgi?id=111875
1245
1246         Reviewed by Mark Hahnenberg.
1247
1248         Even if we surround each call to an ObjC interface with an autorelease
1249         pool, it's still nice to have one at top-level entry points like
1250         timers, to avoid turning a single mistake into a long-term leak.
1251
1252         * platform/ios/SharedTimerIOS.mm:
1253         (WebCore::timerFired):
1254         * platform/mac/SharedTimerMac.mm:
1255         (WebCore::timerFired):
1256
1257 2013-03-08  Benjamin Poulain  <benjamin@webkit.org>
1258
1259         [Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac
1260         https://bugs.webkit.org/show_bug.cgi?id=111297
1261
1262         Reviewed by Kenneth Rohde Christiansen.
1263
1264         The 'view-mode' Media Feature spec is implemented in WebCore but
1265         there is no WebKit support for it on Mac.
1266         Because of this, we always lie and report a windowed view mode.
1267
1268         This patch add a feature flag for the feature and disable it on
1269         Mac so that we stop reporting incorrect default values.
1270
1271         * WebCore.exp.in:
1272         * css/CSSValueKeywords.in:
1273         * css/MediaFeatureNames.h:
1274         (MediaFeatureNames):
1275         * css/MediaQueryEvaluator.cpp:
1276         * css/MediaQueryExp.cpp:
1277         (WebCore::featureWithCSSValueID):
1278         (WebCore::featureWithoutValue):
1279         * page/Page.cpp:
1280         (WebCore::Page::Page):
1281         * page/Page.h:
1282         (Page):
1283
1284 2013-03-08  Ryosuke Niwa  <rniwa@webkit.org>
1285
1286         After sending message, Mail changes formatting
1287         https://bugs.webkit.org/show_bug.cgi?id=111360
1288
1289         Reviewed by Enrica Casucci.
1290
1291         Added makeInsertedContentRoundTrippableWithHTMLTreeBuilder to move prohibited children (e.g. p, h1, etc...)
1292         out of paragraph elements to run immediately after the fragment insertion. This function splits trees and
1293         moves prohibited children out of paragraph elements to keep the tree isomorphic under HTML serialization and
1294         parsing. Unfortunately, there are many other DOM tree constructs we need to fix to make the subtree truly
1295         isomorphic but this is a step forward.
1296
1297         Test: editing/pasteboard/pasting-into-p-should-not-nest-p.html
1298
1299         * editing/ReplaceSelectionCommand.cpp:
1300         (WebCore::isProhibitedParagraphChild): Added. Matches the list at
1301         https://dvcs.w3.org/hg/editing/raw-file/57abe6d3cb60/editing.html#prohibited-paragraph-child
1302         except main element, which is currently missing in the specification.
1303         (WebCore::ReplaceSelectionCommand::makeInsertedContentRoundTrippableWithHTMLTreeBuilder): Added.
1304         (WebCore::ReplaceSelectionCommand::moveNodeOutOfAncestor): Added.
1305         (WebCore::ReplaceSelectionCommand::doApply): Call moveProhibitedChildrenOutOfParagraphElements.
1306
1307         * editing/ReplaceSelectionCommand.h:
1308         (ReplaceSelectionCommand):
1309
1310 2013-03-08  Eric Seidel  <eric@webkit.org>
1311
1312         AtomicHTMLToken should not be heap allocated or RefCounted
1313         https://bugs.webkit.org/show_bug.cgi?id=111250
1314
1315         Reviewed by Adam Barth.
1316
1317         It was clearly an oversight on our part to ever make AtomicHTMLToken ref-counted.
1318         We don't need the actual "token" saved, just enough of it to recreate a fake token.
1319
1320         This removed many more mallocs than I thought it would, for a nice little speed win.
1321         Before:
1322         median= 450.482999993 ms, stdev= 7.2381436538 ms, min= 436.084999994 ms, max= 464.968999964 ms
1323         After:
1324         median= 436.41600004 ms, stdev= 5.71435647554 ms, min= 427.160999971 ms, max= 446.753000026 ms
1325
1326         * html/parser/AtomicHTMLToken.h:
1327         (AtomicHTMLToken):
1328         * html/parser/HTMLConstructionSite.cpp:
1329         (WebCore::HTMLConstructionSite::createElementFromSavedToken):
1330         * html/parser/HTMLDocumentParser.cpp:
1331         (WebCore::HTMLDocumentParser::constructTreeFromHTMLToken):
1332         (WebCore::HTMLDocumentParser::constructTreeFromCompactHTMLToken):
1333         * html/parser/HTMLElementStack.cpp:
1334         (WebCore::HTMLElementStack::isHTMLIntegrationPoint):
1335         * html/parser/HTMLFormattingElementList.cpp:
1336         (WebCore):
1337         (WebCore::HTMLFormattingElementList::tryToEnsureNoahsArkConditionQuickly):
1338         (WebCore::HTMLFormattingElementList::ensureNoahsArkCondition):
1339         * html/parser/HTMLStackItem.h:
1340         (WebCore::HTMLStackItem::create):
1341         (WebCore::HTMLStackItem::localName):
1342         (WebCore::HTMLStackItem::attributes):
1343         (WebCore::HTMLStackItem::getAttributeItem):
1344         (HTMLStackItem):
1345         (WebCore::HTMLStackItem::hasLocalName):
1346         (WebCore::HTMLStackItem::hasTagName):
1347         (WebCore::HTMLStackItem::HTMLStackItem):
1348         * html/parser/HTMLTreeBuilder.cpp:
1349         (WebCore::HTMLTreeBuilder::processFakeStartTag):
1350         (WebCore::HTMLTreeBuilder::processFakeEndTag):
1351         (WebCore::HTMLTreeBuilder::processFakePEndTagIfPInButtonScope):
1352         (WebCore::HTMLTreeBuilder::processStartTagForInBody):
1353         (WebCore::HTMLTreeBuilder::processStartTag):
1354         (WebCore::HTMLTreeBuilder::processEndTagForInBody):
1355         (WebCore::HTMLTreeBuilder::processEndTag):
1356         (WebCore::HTMLTreeBuilder::defaultForBeforeHTML):
1357         (WebCore::HTMLTreeBuilder::defaultForBeforeHead):
1358         (WebCore::HTMLTreeBuilder::defaultForInHead):
1359         (WebCore::HTMLTreeBuilder::defaultForInHeadNoscript):
1360         (WebCore::HTMLTreeBuilder::defaultForAfterHead):
1361         * html/parser/TextDocumentParser.cpp:
1362         (WebCore::TextDocumentParser::insertFakePreElement):
1363
1364 2013-03-08  Roger Fong  <roger_fong@apple.com>
1365
1366         Makefile fixes.
1367
1368         * WebCore.vcxproj/WebCore.make:
1369
1370 2013-03-07  Emil A Eklund  <eae@chromium.org>
1371
1372         [sub-pixel] Rounding error in table cell height calculation causes unnecessary scrollbar
1373         https://bugs.webkit.org/show_bug.cgi?id=111794
1374
1375         Reviewed by Levi Weintraub.
1376         
1377         In RenderTableCell::logicalHeightForRowSizing the
1378         adjustedLogicalHeight is calculated from the logicalHeight and
1379         intrinsic padding and is then returned and floored. This can
1380         cause cause the cell to be slightly smaller (0.5px) than the
1381         element it contains.
1382
1383         Test: fast/sub-pixel/table-cell-height.html
1384
1385         * rendering/RenderTableCell.h:
1386         (WebCore::RenderTableCell::logicalHeightForRowSizing):
1387         Change to use pixelSnapped version of logicalHeight method and
1388         change signature to return int as the only caller immediately
1389         down-casts the result to an int.
1390
1391 2013-03-08  Christian Biesinger  <cbiesinger@chromium.org>
1392
1393         RenderFullScreen needs to clear override sizes when exiting full screen
1394         https://bugs.webkit.org/show_bug.cgi?id=111775
1395
1396         Reviewed by Ojan Vafai.
1397
1398         Test: fullscreen/full-screen-with-flex-item.html
1399
1400         * rendering/RenderFullScreen.cpp:
1401         (RenderFullScreen::unwrapRenderer):
1402         RenderFullScreen is a flexbox, so it will potentially set override
1403         sizes on its children while in fullscreen mode. When we exit
1404         fullscreen mode, we need to clear this override size, otherwise the
1405         the leftover override size may affect layout. See the testcase for an
1406         example.
1407
1408 2013-03-08  Julien Chaffraix  <jchaffraix@webkit.org>
1409
1410         [CSS Grid Layout] Handle 2 positions with one 'auto' properly
1411         https://bugs.webkit.org/show_bug.cgi?id=111653
1412
1413         Reviewed by Tony Chang.
1414
1415         The rendering code was making the assumption that we have one position.
1416         Thus it couldn't fully match what the specification wants as the 2 opposite
1417         positions are required to resolve either position in several cases (e.g.
1418         1 / span 2, auto / 'c').
1419
1420         This change introduces resolveGridPositionsFromStyle to do both opposite
1421         positions resolution in one pass and thus handling more cases.
1422
1423         Test: fast/css-grid-layout/grid-item-spanning-resolution.html
1424
1425         * rendering/RenderGrid.cpp:
1426         (WebCore::RenderGrid::maximumIndexInDirection):
1427         (WebCore::RenderGrid::placeItemsOnGrid):
1428         (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid):
1429         (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid):
1430         Updated the above functions to rely on resolveGridPositionsFromStyle.
1431
1432         (WebCore::RenderGrid::resolveGridPositionsFromStyle):
1433         Added this new function that handle the correct resolution.
1434
1435         (WebCore::RenderGrid::resolveGridPositionFromStyle):
1436         Updated the ASSERT to match the new code flow.
1437
1438         * rendering/RenderGrid.h:
1439         (WebCore::RenderGrid::GridSpan::GridSpan):
1440         Introduced this new struct to hold the 2 positions along one axis.
1441
1442 2013-03-08  Dominic Cooney  <dominicc@chromium.org>
1443
1444         RenderTextControlSingleLine should not assume that its text element has a renderer
1445         https://bugs.webkit.org/show_bug.cgi?id=111826
1446
1447         Reviewed by Ojan Vafai.
1448
1449         Tests: fast/forms/search/search-autoscroll-hidden-decoration-container-crash.html
1450                fast/forms/search/search-hide-decoration-container-crash.html
1451                fast/forms/search/search-scroll-hidden-decoration-container-crash.html
1452
1453         * rendering/RenderTextControlSingleLine.cpp:
1454         (WebCore::RenderTextControlSingleLine::layout):
1455         (WebCore::RenderTextControlSingleLine::controlClipRect):
1456         (WebCore::RenderTextControlSingleLine::autoscroll):
1457         (WebCore::RenderTextControlSingleLine::scroll):
1458
1459 2013-03-08  Joshua Bell  <jsbell@chromium.org>
1460
1461         IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
1462         https://bugs.webkit.org/show_bug.cgi?id=111459
1463
1464         Reviewed by Adam Barth.
1465
1466         IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
1467         origin is opened, the backing store instance must be re-used). This was a map to raw
1468         pointers so that the backing store can be collected when all database references are
1469         dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
1470         would add/remove itself on creation/destruction.
1471
1472         Replace this with a HashMap<WeakPtr<T>>. This simplifies the plumbing; map entries
1473         "leak" but are purged on subsequent opens.
1474
1475         Added webkit_unit_test (Chromium port) to verify refcounts.
1476
1477         * Modules/indexeddb/IDBBackingStore.cpp:
1478         (WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
1479         (WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
1480         (WebCore::IDBBackingStore::open): Ditto.
1481         * Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
1482         (WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
1483         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
1484         (WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
1485         May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
1486         (WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
1487         * Modules/indexeddb/IDBFactoryBackendImpl.h:
1488         (IDBFactoryBackendImpl): Remove plumbing methods.
1489
1490 2013-03-08  John Mellor  <johnme@chromium.org>
1491
1492         @media queries do not take zooming into account
1493         https://bugs.webkit.org/show_bug.cgi?id=53186
1494
1495         Reviewed by Kenneth Rohde Christiansen.
1496
1497         Fixes @media width and height to take into account full page zoom, by
1498         adding code to MediaQueryEvaluator's width/heightMediaFeatureEval,
1499         corresponding to the existing code in Element::clientWidth which makes
1500         document.documentElement.clientWidth take into account page zoom.
1501
1502         Test: fast/media/mq-width-pagezoom.html
1503
1504         * css/MediaQueryEvaluator.cpp:
1505         (WebCore::heightMediaFeatureEval):
1506         (WebCore::widthMediaFeatureEval):
1507
1508 2013-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1509
1510         [BlackBerry] Add stubs for DNSResolveQueue platform specific methods
1511         https://bugs.webkit.org/show_bug.cgi?id=111841
1512
1513         Reviewed by Rob Buis.
1514
1515         Add empty implementations of
1516         DNSResolveQueue::platformProxyIsEnabledInSystemPreferences() and
1517         DNSResolveQueue::platformResolve() to DNSBlackBerry.cpp to make it
1518         build.
1519
1520         * platform/network/blackberry/DNSBlackBerry.cpp:
1521         (WebCore::DNSResolveQueue::platformProxyIsEnabledInSystemPreferences):
1522         (WebCore::DNSResolveQueue::platformResolve):
1523
1524 2013-03-08  Glenn Hartmann  <hartmanng@chromium.org>
1525
1526        Adding a hook to collect data for a Google UMA histogram to track when
1527        m_needsCompositedScrolling is turned on and off.
1528        https://bugs.webkit.org/show_bug.cgi?id=111725
1529
1530        Reviewed by Julien Chaffraix.
1531
1532        We want to keep track of this information to quantify the effects of a
1533        few patches that will cause us to opt in to composited scrolling.
1534        Specifically, we want to measure the effects of
1535        https://bugs.webkit.org/show_bug.cgi?id=109302,
1536        https://bugs.webkit.org/show_bug.cgi?id=109966,
1537        https://bugs.webkit.org/show_bug.cgi?id=109591, and
1538        https://bugs.webkit.org/show_bug.cgi?id=107618.
1539
1540        We do this by measuring a per-layer boolean value, and comparing the
1541        ratio between number of layers opted in and number of layers that remain
1542        uncomposited. We hope the relative number of layers opting in will
1543        increase after the relevant patches land and are enabled.
1544
1545        Unfortunately implementing extra statistics is impractical at the
1546        moment since most of the actionable relevant data is expensive to
1547        compute. For example, it would be useful to know if the layers that opt
1548        out do so because of invisible or non-overlapping layers that cause a
1549        potential stacking container's children to be discontiguous, because we
1550        would potentially be able to mitigate the problem. However, this would
1551        add considerable overhead to perform overlap testing just to gather
1552        data.
1553
1554        No new tests (no change in behaviour).
1555
1556        * rendering/RenderLayer.cpp:
1557        (WebCore::RenderLayer::updateNeedsCompositedScrolling):
1558
1559 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
1560
1561         [BlackBerry] GraphicsContext: rename addRoundedRectClip to clipRoundedRect
1562         https://bugs.webkit.org/show_bug.cgi?id=111852
1563
1564         Reviewed by Rob Buis.
1565
1566         This changed in r139353.
1567
1568         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
1569         (WebCore::GraphicsContext::clipRoundedRect):
1570
1571 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
1572
1573         [BlackBerry] Add BlendMode parameter to GraphicsContext::setPlatformCompositeOperation
1574         https://bugs.webkit.org/show_bug.cgi?id=111840
1575
1576         Reviewed by Rob Buis.
1577
1578         This parameter was added in r137011.
1579
1580         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
1581         (WebCore::GraphicsContext::setPlatformCompositeOperation):
1582
1583 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
1584
1585         [BlackBerry] Remove unused GraphicsContext::addInnerRoundedRectClip()
1586         https://bugs.webkit.org/show_bug.cgi?id=111838
1587
1588         Reviewed by Rob Buis.
1589
1590         This was removed in r139138.
1591
1592         * platform/graphics/blackberry/GraphicsContextBlackBerry.cpp:
1593
1594 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
1595
1596         [BlackBerry] GraphicsContext: add fillRule parameter to clip() and canvasClip()
1597         https://bugs.webkit.org/show_bug.cgi?id=111836
1598
1599         Reviewed by Rob Buis.
1600
1601         This parameter was added in r139967.
1602
1603         * platform/graphics/blackberry/PathBlackBerry.cpp:
1604         (WebCore):
1605         (WebCore::GraphicsContext::clip):
1606         (WebCore::GraphicsContext::canvasClip):
1607
1608 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
1609
1610         Web Inspector: Get rid of file system ids and use file pathes as uri for file based uiSourceCodes.
1611         https://bugs.webkit.org/show_bug.cgi?id=111753
1612
1613         Reviewed by Pavel Feldman.
1614
1615         * inspector/front-end/FileSystemMapping.js:
1616         (WebInspector.FileSystemMappingImpl):
1617         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings.get this):
1618         (WebInspector.FileSystemMappingImpl.prototype._loadFromSettings):
1619         (WebInspector.FileSystemMappingImpl.prototype._saveToSettings):
1620         (WebInspector.FileSystemMappingImpl.prototype.set addFileSystemMapping):
1621         (WebInspector.FileSystemMappingImpl.prototype.removeFileSystemMapping):
1622         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPaths):
1623         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPathForPrefix):
1624         * inspector/front-end/FileSystemProjectDelegate.js:
1625         (WebInspector.FileSystemProjectDelegate.projectId):
1626         (WebInspector.FileSystemProjectDelegate.prototype.id):
1627         (WebInspector.FileSystemProjectDelegate.prototype.fileSystemPath):
1628         (WebInspector.FileSystemWorkspaceProvider):
1629         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemAdded):
1630         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
1631         (WebInspector.FileSystemWorkspaceProvider.prototype.fileSystemPath):
1632         * inspector/front-end/IsolatedFileSystemManager.js:
1633         (WebInspector.IsolatedFileSystemManager.prototype._innerAddFileSystem):
1634         (WebInspector.IsolatedFileSystemManager.prototype._fileSystemRemoved):
1635         * inspector/front-end/Workspace.js:
1636         (WebInspector.Workspace.prototype.uiSourceCodeForURL):
1637
1638 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
1639
1640         Web Inspector: Polish TabbedEditorContaner and ScriptsNavigator behavior.
1641         https://bugs.webkit.org/show_bug.cgi?id=111732
1642
1643         Reviewed by Pavel Feldman.
1644
1645         Resources matching inspectedPageURL are always expanded in NavigatorView now.
1646         Snippets tab in scripts navigator is not automatically opened anymore.
1647         Cleared saved TabbedEditorContainer history because it might have been corrupted due to errors in earlier versions.
1648         Snippets are not revealed in TabbedEditorContainer anymore unless they were actually selected by user or there is no other tabs opened.
1649
1650         * inspector/front-end/NavigatorView.js:
1651         (WebInspector.NavigatorView):
1652         (WebInspector.NavigatorView.prototype.addUISourceCode):
1653         (WebInspector.NavigatorView.prototype._inspectedURLChanged):
1654         (WebInspector.NavigatorView.prototype.revealUISourceCode):
1655         (WebInspector.NavigatorView.prototype.removeUISourceCode):
1656         (WebInspector.NavigatorFolderTreeElement.prototype.onattach):
1657         (WebInspector.NavigatorUISourceCodeTreeNode.prototype.uiSourceCode):
1658         (WebInspector.NavigatorUISourceCodeTreeNode.prototype.reveal):
1659         * inspector/front-end/ScriptsNavigator.js:
1660         (WebInspector.ScriptsNavigator.prototype.revealUISourceCode):
1661         * inspector/front-end/ScriptsPanel.js:
1662         (WebInspector.ScriptsPanel.prototype._showFile):
1663         * inspector/front-end/Settings.js:
1664         (WebInspector.VersionController.prototype._updateVersionFrom1To2):
1665         * inspector/front-end/TabbedEditorContainer.js:
1666         (WebInspector.TabbedEditorContainer.prototype.addUISourceCode.tabId.this._tabIds.get this):
1667         (WebInspector.TabbedEditorContainer.prototype.addUISourceCode):
1668         (WebInspector.TabbedEditorContainer.History.prototype._rebuildItemIndex):
1669
1670 2013-03-08  Vsevolod Vlasov  <vsevik@chromium.org>
1671
1672         Web Inspector: Add shortcut for running a snippet.
1673         https://bugs.webkit.org/show_bug.cgi?id=111680
1674
1675         Reviewed by Pavel Feldman.
1676
1677         Added Ctrl/Cmd+Enter as a shortcut for running a snippet.
1678
1679         * inspector/front-end/SnippetJavaScriptSourceFrame.js:
1680         (WebInspector.SnippetJavaScriptSourceFrame):
1681         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runButtonClicked):
1682         (WebInspector.SnippetJavaScriptSourceFrame.prototype._runSnippet):
1683         (WebInspector.SnippetJavaScriptSourceFrame.prototype._onKeyDown):
1684
1685 2013-03-08  Philip Rogers  <pdr@google.com>
1686
1687         Prevent infinite loop in SVG use cycle detection
1688         https://bugs.webkit.org/show_bug.cgi?id=111822
1689
1690         Reviewed by Stephen Chenney.
1691
1692         SVG use cycle detection depended on idForStyleResolution() which differs from
1693         getIdAttribute() in quirks mode. During use tree cycle detection, this difference
1694         resulted in an infinite loop because idForStyleResolution() used lower-cased id
1695         attributes. This patch removes an existing fixme for this and switches to using
1696         getIdAttribute().
1697
1698         Test: svg/custom/use-cycle-detection.html
1699
1700         * svg/SVGUseElement.cpp:
1701         (WebCore::SVGUseElement::hasCycleUseReferencing):
1702
1703 2013-03-08  Yuki Sekiguchi  <yuki.sekiguchi@access-company.com>
1704
1705         When we set word-wrap: break-word and xml:space="preserve" to svg text element, the text is collapsed.
1706         https://bugs.webkit.org/show_bug.cgi?id=111675
1707
1708         Reviewed by Stephen Chenney.
1709
1710         RenderSVGText define its size when it laid out its first line at SVGRootInlineBox::computePerCharacterLayoutInformation().
1711
1712         In the following spec, SVG don't perform automatic line break or word wrapping.
1713         http://www.w3.org/TR/SVG/text.html#Introduction
1714         > SVG performs no automatic line breaking or word wrapping.
1715         However, when we set word-wrap: break-word and xml:space="preserve" to svg text element, RenderBlock::LineBreaker::nextLineBreak() breaks the text.
1716         This make single character lines and make RenderSVGText narrow.
1717
1718         We must ignore word-wrap property to make the text a single line.
1719
1720         We always disable break words and break all in nextLineBreak() when the object is SVGInlineText.
1721
1722         Test: svg/text/preserve-break-word.html
1723
1724         * rendering/RenderBlockLineLayout.cpp:
1725         (WebCore::RenderBlock::LineBreaker::nextSegmentBreak): Disable break words and break all when we process SVG Text.
1726
1727 2013-03-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1728
1729         [Qt] HTML5 video - sound volume bar out of widget
1730         https://bugs.webkit.org/show_bug.cgi?id=108213
1731
1732         Reviewed by Jocelyn Turcotte.
1733
1734         Since we use Safari shadow DOM for media controls, follow
1735         the overall layout of Safari media control CSS.
1736
1737         * css/mediaControlsQt.css:
1738         (audio::-webkit-media-controls-panel, video::-webkit-media-controls-panel):
1739         (audio::-webkit-media-controls-mute-button, video::-webkit-media-controls-mute-button):
1740         (audio::-webkit-media-controls-play-button, video::-webkit-media-controls-play-button):
1741         (audio::-webkit-media-controls-timeline-container, video::-webkit-media-controls-timeline-container):
1742         (audio::-webkit-media-controls-current-time-display, video::-webkit-media-controls-current-time-display):
1743         (audio::-webkit-media-controls-time-remaining-display, video::-webkit-media-controls-time-remaining-display):
1744         (audio::-webkit-media-controls-timeline, video::-webkit-media-controls-timeline):
1745         (audio::-webkit-media-controls-volume-slider-container, video::-webkit-media-controls-volume-slider-container):
1746         (audio::-webkit-media-controls-volume-slider, video::-webkit-media-controls-volume-slider):
1747         (audio::-webkit-media-controls-seek-back-button, video::-webkit-media-controls-seek-back-button):
1748         (audio::-webkit-media-controls-seek-forward-button, video::-webkit-media-controls-seek-forward-button):
1749         (audio::-webkit-media-controls-rewind-button, video::-webkit-media-controls-rewind-button):
1750         (audio::-webkit-media-controls-return-to-realtime-button, video::-webkit-media-controls-return-to-realtime-button):
1751         (audio::-webkit-media-controls-toggle-closed-captions-button, video::-webkit-media-controls-toggle-closed-captions-button):
1752
1753 2013-03-08  Allan Sandfeld Jensen  <allan.jensen@digia.com>
1754
1755         [Qt] Doesn't build with QtMultimedia
1756         https://bugs.webkit.org/show_bug.cgi?id=111847
1757
1758         Reviewed by Jocelyn Turcotte.
1759
1760         Fix include.
1761
1762         * platform/graphics/qt/MediaPlayerPrivateQt.h:
1763
1764 2013-03-08  Huang Dongsung  <luxtella@company100.net>
1765
1766         [EFL][Qt] REGRESSION(r144787): A fixed element lags when scrolling and wheeling.
1767         https://bugs.webkit.org/show_bug.cgi?id=111829
1768
1769         Reviewed by Noam Rosenthal.
1770
1771         Currently, flagsChanged deals with all boolean flags. It introduces this bug
1772         because when another flag (i.e. preserves3D) is changed, fixedToViewport is set
1773         to false. So this patch updates all flags when at least one flag is changed.
1774
1775         In addition, this patch amends isScrollable code to match other flags.
1776
1777         This patch can only be tested manually since there is no automated
1778         testing facilities for in-motion touch.
1779         Test: ManualTests/fixed-position.html
1780               ManualTests/nested-fixed-position.html
1781
1782         * platform/graphics/texmap/coordinated/CoordinatedGraphicsLayer.cpp:
1783         (WebCore::CoordinatedGraphicsLayer::setScrollableArea):
1784         (WebCore::CoordinatedGraphicsLayer::syncLayerState):
1785         * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
1786         (WebCore::CoordinatedGraphicsScene::setLayerState):
1787         * platform/graphics/texmap/coordinated/CoordinatedGraphicsState.h:
1788         (WebCore::CoordinatedGraphicsLayerState::CoordinatedGraphicsLayerState):
1789
1790 2013-03-07  Dean Jackson  <dino@apple.com>
1791
1792         Remove dead label code in snapshotted plugin
1793         https://bugs.webkit.org/show_bug.cgi?id=111781
1794
1795         Reviewed by Tim Horton.
1796
1797         Since ports can use the shadow tree to do label display,
1798         there is no need for the hardcoded timers in RenderSnapshottedPlugin.
1799
1800         * rendering/RenderSnapshottedPlugIn.cpp: Remove label flags and timers.
1801         (WebCore::RenderSnapshottedPlugIn::RenderSnapshottedPlugIn):
1802         (WebCore::RenderSnapshottedPlugIn::~RenderSnapshottedPlugIn):
1803         (WebCore::RenderSnapshottedPlugIn::updateSnapshot):
1804         (WebCore::RenderSnapshottedPlugIn::handleEvent):
1805         * rendering/RenderSnapshottedPlugIn.h:
1806         (RenderSnapshottedPlugIn):
1807
1808 2013-03-07  Dean Jackson  <dino@apple.com>
1809
1810         Implement a custom appearance for the snapshotted plugin background
1811         https://bugs.webkit.org/show_bug.cgi?id=108368
1812
1813         Reviewed by Tim Horton.
1814
1815         After https://bugs.webkit.org/show_bug.cgi?id=108284 (r142507), a
1816         snapshotted plugin was no longer drawing the background of the
1817         label blurred. Since the snapshot content was now a shadow tree,
1818         it wasn't feasible to pre-blur a region of the snapshot: the label
1819         could be any size and in any location, with ports being able to
1820         override the appearance through their UA style sheet.
1821
1822         Instead we now use one of the elements in the tree, the snapshot-overlay,
1823         as a hook where ports can add any effect they want. This could be simply
1824         a border, or a transparent mask, or even a CSS filter. We introduce a custom
1825         CSS appearance "snapshotted-plugin-overlay", which could be added to the
1826         element in the injected UA stylesheet. This calls into RenderTheme in
1827         the same way that custom controls do.
1828
1829         Meanwhile, in RenderThemeMac, we implement the appearance by drawing the
1830         content of the plugin snapshot into the background of the element. That
1831         way we can add effects in CSS.
1832
1833         Test: plugins/snapshot-appearance.html
1834
1835         * css/CSSPrimitiveValueMappings.h:
1836         (WebCore::CSSPrimitiveValue::CSSPrimitiveValue): Handle SnapshottedPluginOverlayPart.
1837         * css/CSSValueKeywords.in: New appearance value snapshotted-plugin-overlay.
1838         * platform/ThemeTypes.h: New value SnapshottedPluginOverlayPart.
1839         * html/HTMLPlugInElement.h:
1840         (WebCore::toHTMLPlugInElement): Add safer casting helpers.
1841         * html/HTMLPlugInImageElement.h:
1842         (WebCore::toHTMLPlugInImageElement): Ditto.
1843         * rendering/RenderSnapshottedPlugIn.cpp: Remove the code for handling
1844             the blur directly in the renderer.
1845         (WebCore::RenderSnapshottedPlugIn::paint): Simplify the paint logic since we're
1846             no longer trying to blur here.
1847         (WebCore::RenderSnapshottedPlugIn::paintSnapshot): Ditto.
1848         * rendering/RenderSnapshottedPlugIn.h: Remove the methods that were trying
1849             to blur the image directly.
1850         * rendering/RenderTheme.cpp:
1851         (WebCore::RenderTheme::paint): Call paintSnapshottedPluginOverlay.
1852         * rendering/RenderTheme.h:
1853         (WebCore::RenderTheme::paintSnapshottedPluginOverlay): New virtual method with default implementation.
1854         * rendering/RenderThemeMacShared.h:
1855         (RenderThemeMacShared): Override paintSnapshottedPluginOverlay.
1856         * rendering/RenderThemeMacShared.mm:
1857         (WebCore::RenderThemeMacShared::paintSnapshottedPluginOverlay): Implement a custom render path
1858             that takes the snapshot image from the node's parent, and draws it into the background.
1859             Along the way make sure we're actually using the right type of element (an HTMLPlugInImageElement).
1860
1861 2013-03-08  Sergio Villar Senin  <svillar@igalia.com>
1862
1863         Improve drag&drop of list items in contentEditable divs
1864         https://bugs.webkit.org/show_bug.cgi?id=111556
1865
1866         Reviewed by Ryosuke Niwa.
1867
1868         A single fully selected <li> should generate the same markup as if
1869         we were selecting some of them, i.e., we should preserve the list
1870         structure and appearance.
1871
1872         Test: editing/selection/drag-list-item.html
1873
1874         * editing/htmlediting.cpp:
1875         (WebCore::isListItem): modified constness.
1876         * editing/htmlediting.h:
1877         (WebCore): ditto.
1878         * editing/markup.cpp:
1879         (WebCore::highestAncestorToWrapMarkup):
1880
1881 2013-03-08  Alberto Garcia  <agarcia@igalia.com>
1882
1883         [BlackBerry] LayerTiler: rename currentFrameHasAlpha as currentFrameKnownToBeOpaque
1884         https://bugs.webkit.org/show_bug.cgi?id=111828
1885
1886         Reviewed by Carlos Garcia Campos.
1887
1888         This changed in r141637.
1889
1890         * platform/graphics/blackberry/LayerTiler.cpp:
1891         (WebCore::LayerTiler::updateTextureContentsIfNeeded):
1892
1893 2013-03-08  Antoine Quint  <graouts@apple.com>
1894
1895         Fix a couple of typos.
1896
1897         Unreviewed.
1898
1899         * inspector/Inspector.json:
1900
1901 2013-03-08  Carlos Garcia Campos  <cgarcia@igalia.com>
1902
1903         [BlackBerry] Use OwnPtr for CredentialBackingStore members
1904         https://bugs.webkit.org/show_bug.cgi?id=111737
1905
1906         Reviewed by Rob Buis.
1907
1908         It simplifies the code a bit.
1909
1910         * platform/network/blackberry/CredentialBackingStore.cpp:
1911         (WebCore::CredentialBackingStore::~CredentialBackingStore):
1912         (WebCore::CredentialBackingStore::open):
1913         (WebCore::CredentialBackingStore::certMgrWrapper):
1914         * platform/network/blackberry/CredentialBackingStore.h:
1915         (CredentialBackingStore):
1916
1917 2013-03-07  Gavin Barraclough  <barraclough@apple.com>
1918
1919         MemoryPressureHandler should fully flush the WebCore & NS URL caches
1920         https://bugs.webkit.org/show_bug.cgi?id=111827
1921
1922         Rubber Stamped by Geoff Garen
1923
1924         When the handler is fired we should free as much memory as possible.
1925
1926         * platform/mac/MemoryPressureHandlerMac.mm:
1927         (WebCore::MemoryPressureHandler::releaseMemory):
1928             - fully flush the WebCore & NS URL caches
1929
1930 2013-03-07  Keishi Hattori  <keishi@webkit.org>
1931
1932         Update calendar picker UI
1933         https://bugs.webkit.org/show_bug.cgi?id=109439
1934
1935         Reviewed by Kent Tamura.
1936
1937         This patch changes the calendar picker UI.
1938
1939         Added tests to existing calendar picker tests.
1940         Test: platform/chromium/fast/forms/calendar-picker/calendar-picker-appearance-month-popup.html
1941
1942         * Resources/pagepopups/calendarPicker.css:
1943         (body):
1944         (.rtl):
1945         (.scroll-view):
1946         (.scroll-view-content):
1947         (.list-cell):
1948         (.list-cell.hidden):
1949         (.day-cell):
1950         (.week-number-cell):
1951         (.day-cell.today):
1952         (.day-cell.highlighted):
1953         (.day-cell.highlighted.disabled):
1954         (.day-cell.selected):
1955         (.day-cell.disabled):
1956         (.day-cell.current-month):
1957         (.calendar-table-view):
1958         (.preparing .calendar-table-view:focus):
1959         (.week-day-label):
1960         (.week-number-label):
1961         (.calendar-table-header-view):
1962         (.calendar-picker):
1963         (.calendar-header-view):
1964         (.calendar-title):
1965         (.rtl .calendar-title):
1966         (.month-popup-button:disabled):
1967         (.month-popup-button):
1968         (.month-popup-button .disclosure-triangle):
1969         (.month-popup-button .disclosure-triangle svg):
1970         (.today-button::after):
1971         (.calendar-navigation-button):
1972         (.year-list-view):
1973         (.year-list-cell):
1974         (.year-list-cell .label):
1975         (.year-list-cell .month-chooser):
1976         (.month-buttons-row):
1977         (.month-button):
1978         (.month-button.highlighted):
1979         (.scrubby-scroll-bar):
1980         (.scrubby-scroll-thumb):
1981         (.month-popup-view):
1982         (.year-list-view .scrubby-scroll-bar):
1983         (.rtl .year-list-view .scrubby-scroll-bar):
1984         * Resources/pagepopups/calendarPicker.js:
1985         (setGlobalParams): Sets the global params.
1986         (initialize):
1987         (openCalendarPicker):
1988         (CalendarHeaderView.prototype.onNavigationButtonClick): Fix typo.
1989         (CalendarPicker):
1990         (CalendarPicker.prototype.onWindowResize): We want to have the "preparing" class applied
1991         to cancel css transitions while setting up the calendar picker so we can avoid flaky pixel tests.
1992         (CalendarPicker.prototype.onYearListViewDidHide): The user clicked on a month so hide the month popup.
1993         (CalendarPicker.prototype.onYearListViewDidSelectMonth): Change the current month in response to the month popup.
1994         (CalendarPicker.prototype.attachTo): We want the calendar table focused when the calendar picker first opens.
1995         (CalendarPicker.prototype.cleanup): Clean up any event listeners or elements attached to nodes outside of this.element.
1996         (CalendarPicker.prototype.onMonthPopupButtonClick): Open the month popup in response to the month popup button being clicked.
1997         (CalendarPicker.prototype._setConfig): Configures the calendar picker.
1998         (CalendarPicker.prototype.currentMonth): The currently shown month.
1999         (CalendarPicker.prototype.setCurrentMonth): Scrolls the calendar table to the given month. Use the navigation behavior param to specify if you want a transition animation.
2000         (CalendarPicker.prototype.adjustHeight): Adjusts the height so its just tall enough to fit the current month. If the month picker is open, fit that.
2001         (CalendarPicker.prototype.selection): Currently selected date range.
2002         (CalendarPicker.prototype.highlight): Currently highlighted date range.
2003         (CalendarPicker.prototype.firstVisibleDay): Returns the first visible day ignoring scroll animation (i.e. this is the first visible day when the scroll animation is done).
2004         (CalendarPicker.prototype.lastVisibleDay): Returns the last visible day ignoring scroll animation.
2005         (CalendarPicker.prototype.selectRangeContainingDay): Sets the selection to the date range containing the given day.
2006         (CalendarPicker.prototype.highlightRangeContainingDay): Sets the highlight to the date range containing the given day.
2007         (CalendarPicker.prototype.setSelection): Sets the selection to the given date range.
2008         (CalendarPicker.prototype._setHighlight): Sets the highlight to the given date range.
2009         (CalendarPicker.prototype._stepMismatch): Just moving.
2010         (CalendarPicker.prototype._outOfRange): Ditto.
2011         (CalendarPicker.prototype.isValid): Returns true if the given date range is a valid selection.
2012         (CalendarPicker.prototype.isValidDay): Returns true if the day is part of a valid selection.
2013         (CalendarPicker.prototype._moveHighlight): Moves the highlight to the given date range if possible. Returns true if it succeeds.
2014         (CalendarPicker.prototype.onCalendarTableKeyDown): Handles the arrow keys, etc.
2015         (CalendarPicker.prototype.width):
2016         (CalendarPicker.prototype.height):
2017         (CalendarPicker.prototype.setHeight):
2018         (CalendarPicker.prototype.onBodyKeyDown): Handles esc/m/y/d.
2019         * Resources/pagepopups/chromium/calendarPickerChromium.css:
2020         (.calendar-table-view:focus):
2021         (.preparing .calendar-table-view:focus):
2022
2023 2013-03-07  Seokju Kwon  <seokju.kwon@gmail.com>
2024
2025         Web Inspector: Remove unused return value after r122962
2026         https://bugs.webkit.org/show_bug.cgi?id=111821
2027
2028         Reviewed by Pavel Feldman.
2029
2030         No new tests.
2031
2032         * inspector/front-end/ConsolePanel.js:
2033         (WebInspector.ConsolePanel.prototype.jumpToPreviousSearchResult):
2034         * inspector/front-end/ElementsPanel.js:
2035         (WebInspector.ElementsPanel.prototype.jumpToPreviousSearchResult):
2036         * inspector/front-end/ScriptsPanel.js:
2037         (WebInspector.ScriptsPanel.prototype.jumpToPreviousSearchResult):
2038
2039 2013-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2040
2041         Unreviewed, rolling out r145166.
2042         http://trac.webkit.org/changeset/145166
2043         https://bugs.webkit.org/show_bug.cgi?id=111819
2044
2045         build break - no symbol
2046         webkit_support::CreateScopedTempDirectory() (Requested by
2047         hayato on #webkit).
2048
2049         * Modules/indexeddb/IDBBackingStore.cpp:
2050         (WebCore::IDBBackingStore::IDBBackingStore):
2051         (WebCore::IDBBackingStore::~IDBBackingStore):
2052         (WebCore::IDBBackingStore::open):
2053         * Modules/indexeddb/IDBBackingStore.h:
2054         (WebCore):
2055         (IDBBackingStore):
2056         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
2057         (WebCore::IDBFactoryBackendImpl::addIDBBackingStore):
2058         (WebCore):
2059         (WebCore::IDBFactoryBackendImpl::removeIDBBackingStore):
2060         (WebCore::IDBFactoryBackendImpl::openBackingStore):
2061         * Modules/indexeddb/IDBFactoryBackendImpl.h:
2062         (IDBFactoryBackendImpl):
2063
2064 2013-03-07  Hajime Morrita  <morrita@google.com>
2065
2066         Custom Elements: CustomElement constructor shouldn't share function instance
2067         https://bugs.webkit.org/show_bug.cgi?id=111807
2068
2069         Reviewed by Kentaro Hara.
2070
2071         Adaptor functions of custom elements unintentionally share the instance.
2072         This fix gives new one for each.
2073
2074         Test: Updated fast/dom/custom/document-register-basic.html
2075
2076         * bindings/v8/V8AdaptorFunction.cpp:
2077         (WebCore::V8AdaptorFunction::wrap):
2078
2079 2013-03-07  Jared Wyles  <wyles@adobe.com>
2080
2081         Reading border radius from style property returns in wrong order.
2082         https://bugs.webkit.org/show_bug.cgi?id=110853
2083
2084         Reviewed by Ryosuke Niwa
2085         
2086         Updating the order of border-radius to return in the order specified
2087         in http://www.w3.org/TR/css3-background/#the-border-radius
2088
2089         Tests updated in LayoutTests/fast/borders/border-radius-parsing.html 
2090         Changed the expectations in LayoutTests/inspector/elements/elements-panel-styles-expected.txt 
2091         
2092         Compat information -
2093         jQuery's css function favours using getComputedStyle for elements so that should not be impacted.
2094         Zepto does check for the element on style first so may be a slight concern there.
2095
2096         * css/StylePropertyShorthand.cpp:
2097         (WebCore::borderRadiusShorthand):
2098
2099 2013-03-07  Andreas Kling  <akling@apple.com>
2100
2101         Resizing Cappuccino is very laggy on WebKit since Safari 5.1
2102         <http://webkit.org/b/71354>
2103         <rdar://problem/10565998>
2104
2105         Reviewed by Anders Carlsson.
2106
2107         * WebCore.exp.in: Export FloatPoint(const NSPoint&)
2108
2109 2013-03-07  Andreas Kling  <akling@apple.com>
2110
2111         Remove desktop version of -webkit-text-size-adjust property.
2112         <http://webkit.org/b/56543>
2113         <rdar://problem/9150203>
2114
2115         Reviewed by Simon Fraser.
2116
2117         This property existed to support a number of Apple-internal clients of WebKit.
2118         We no longer need this property, and since it's clashing with a mobile version of the
2119         same property with different meaning, let's remove it altogether from the desktop build.
2120
2121         * css/CSSComputedStyleDeclaration.cpp:
2122         (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue):
2123         * css/CSSParser.cpp:
2124         (WebCore::isValidKeywordPropertyAndValue):
2125         (WebCore::isKeywordPropertyID):
2126         (WebCore::CSSParser::parseValue):
2127         * css/CSSPrimitiveValue.cpp:
2128         (WebCore::CSSPrimitiveValue::computeLengthDouble):
2129         * css/CSSProperty.cpp:
2130         (WebCore::CSSProperty::isInheritedProperty):
2131         * css/CSSPropertyNames.in:
2132         * css/StyleBuilder.cpp:
2133         (WebCore::ApplyPropertyLineHeight::applyValue):
2134         * css/StyleResolver.cpp:
2135         (WebCore::StyleResolver::updateFont):
2136         (WebCore::StyleResolver::applyProperties):
2137         (WebCore::StyleResolver::applyProperty):
2138         * css/StyleResolver.h:
2139         (StyleResolver):
2140         * css/svg.css:
2141         * editing/EditingStyle.cpp:
2142         * inspector/front-end/inspector.css:
2143         (#console-messages):
2144         * inspector/front-end/resourcesPanel.css:
2145         (.storage-view.query):
2146         * rendering/style/RenderStyle.cpp:
2147         (WebCore::RenderStyle::diff):
2148         * rendering/style/RenderStyle.h:
2149         * rendering/style/StyleRareInheritedData.cpp:
2150         (WebCore::StyleRareInheritedData::StyleRareInheritedData):
2151         (WebCore::StyleRareInheritedData::operator==):
2152         * rendering/style/StyleRareInheritedData.h:
2153         (StyleRareInheritedData):
2154
2155 2013-03-07  Joshua Bell  <jsbell@chromium.org>
2156
2157         IndexedDB: Use WeakPtr for Factory-to-BackingStore reference
2158         https://bugs.webkit.org/show_bug.cgi?id=111459
2159
2160         Reviewed by Adam Barth.
2161
2162         IDBFactoryBackendImpl maintains a map of backing stores - if another database in the same
2163         origin is opened, the backing store instance must be re-used). This was a map to raw
2164         pointers so that the backing store can be collected when all database references are
2165         dropped. The map was maintained manually by passing the factory to the IDBBackingStore which
2166         would add/remove itself on creation/destruction.
2167
2168         Replace this with a HashMap<WeakPtr<>>. This simplifies the plumbing; map entries
2169         "leak" but are purged on subsequent opens.
2170
2171         Added webkit_unit_test (Chromium port) to verify refcounts.
2172
2173         * Modules/indexeddb/IDBBackingStore.cpp:
2174         (WebCore::IDBBackingStore::IDBBackingStore): No need to notify factory of lifetime.
2175         (WebCore::IDBBackingStore::~IDBBackingStore): Ditto.
2176         (WebCore::IDBBackingStore::open): Ditto.
2177         * Modules/indexeddb/IDBBackingStore.h: No reference to the factory, but...
2178         (WebCore::IDBBackingStore::createWeakPtr): Do need to expose weak pointers for the factory to hold.
2179         * Modules/indexeddb/IDBFactoryBackendImpl.cpp:
2180         (WebCore::cleanWeakMap): Helper function to scrub a HashMap<WeakPtr<T>> of empty pointers.
2181         May move to WTF when we've learned how general it is, or come up with a dedicated WeakPtrHashMap type.
2182         (WebCore::IDBFactoryBackendImpl::openBackingStore): WeakPtr fu.
2183         * Modules/indexeddb/IDBFactoryBackendImpl.h:
2184         (IDBFactoryBackendImpl): Remove plumbing methods.
2185
2186 2013-03-07  Otto Derek Cheung  <otcheung@rim.com>
2187
2188         [BlackBerry] RefCounting ParsedCookie to avoid SegFaults
2189         https://bugs.webkit.org/show_bug.cgi?id=111761
2190
2191         Reviewed by Rob Buis.
2192
2193         Making necessary changes to ref count the ParsedCookie object.
2194
2195         Tested using the opera cookie test suite and the BB Browser cookie test suite.
2196         Tested using the browser, visiting popular sites such as facebook, reddit, google etc
2197         to ensure cookie functionality isn't changed.
2198
2199         * loader/blackberry/CookieJarBlackBerry.cpp:
2200         (WebCore::getRawCookies):
2201         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.cpp:
2202         (WebCore::CookieDatabaseBackingStore::insert):
2203         (WebCore::CookieDatabaseBackingStore::update):
2204         (WebCore::CookieDatabaseBackingStore::remove):
2205         (WebCore::CookieDatabaseBackingStore::getCookiesFromDatabase):
2206         (WebCore::CookieDatabaseBackingStore::invokeGetCookiesWithLimit):
2207         (WebCore::CookieDatabaseBackingStore::invokeSendChangesToDatabase):
2208         (WebCore::CookieDatabaseBackingStore::addToChangeQueue):
2209         * platform/blackberry/CookieDatabaseBackingStore/CookieDatabaseBackingStore.h:
2210         (CookieDatabaseBackingStore):
2211         * platform/blackberry/CookieManager.cpp:
2212         (WebCore::cookieSorter):
2213         (WebCore::CookieManager::setCookies):
2214         (WebCore::CookieManager::getCookie):
2215         (WebCore::CookieManager::generateHtmlFragmentForCookies):
2216         (WebCore::CookieManager::getRawCookies):
2217         (WebCore::CookieManager::checkAndTreatCookie):
2218         (WebCore::CookieManager::addCookieToMap):
2219         (WebCore::CookieManager::getBackingStoreCookies):
2220         (WebCore::CookieManager::findOrCreateCookieMap):
2221         (WebCore::CookieManager::removeCookieWithName):
2222         (WebCore::CookieManager::cookieLimitCleanUp):
2223         * platform/blackberry/CookieManager.h:
2224         * platform/blackberry/CookieMap.cpp:
2225         (WebCore::CookieMap::addOrReplaceCookie):
2226         (WebCore::CookieMap::removeCookieAtIndex):
2227         (WebCore::CookieMap::removeCookie):
2228         (WebCore::CookieMap::getAllCookies):
2229         (WebCore::CookieMap::removeOldestCookie):
2230         (WebCore::CookieMap::deleteAllCookiesAndDomains):
2231         (WebCore::CookieMap::getAllChildCookies):
2232         * platform/blackberry/CookieMap.h:
2233         (CookieMap):
2234         * platform/blackberry/CookieParser.cpp:
2235         (WebCore):
2236         (WebCore::CookieParser::parse):
2237         (WebCore::CookieParser::parseOneCookie):
2238         * platform/blackberry/CookieParser.h:
2239         (CookieParser):
2240         * platform/blackberry/ParsedCookie.cpp:
2241         * platform/blackberry/ParsedCookie.h:
2242         (ParsedCookie):
2243         (WebCore::ParsedCookie::create):
2244
2245 2013-03-07  Aaron Colwell  <acolwell@chromium.org>
2246
2247         Heap-use-after-free in WebCore::HTMLMediaElement::~HTMLMediaElement
2248         https://bugs.webkit.org/show_bug.cgi?id=110623
2249
2250         Reviewed by Kentaro Hara.
2251
2252         Test: http/tests/misc/delete-frame-during-readystatechange-with-gc-after-video-removal.html
2253
2254         * bindings/v8/V8GCController.cpp: Fix MinorGCWrapperVisitor so it doesn't collect ActiveDOMObjects
2255                                           that have pending activity.
2256         * html/HTMLAudioElement.h:
2257         (HTMLAudioElement): Removed hasPendingActivity() now that this is handled by the base class.
2258         * html/HTMLAudioElement.idl: Removed ActiveDOMObject annotation since HTMLMediaElement now has it.
2259         * html/HTMLMediaElement.cpp:
2260         (WebCore::HTMLMediaElement::hasPendingActivity): Update implementation to return true if the media
2261                                                          has audio and is playing. This brings the code into
2262                                                          compliance with the detached element behavior outlined
2263                                                          in the HTML5 spec.
2264         * html/HTMLMediaElement.idl: Added ActiveDOMObject annotation so that all derived classes are
2265                                      considered ActiveDOMObjects.
2266
2267 2013-03-07  Jeffrey Pfau  <jpfau@apple.com>
2268
2269         CFNetwork cache partitioning does not work properly on subdomains
2270         https://bugs.webkit.org/show_bug.cgi?id=111772
2271
2272         Reviewed by David Kilzer.
2273
2274         Ensure that the cache partitioning is done over the top privately-controlled domain for the NSURLRequest.
2275
2276         Not possible to test with current automated test tools, must be tested manually.
2277
2278         * loader/cache/MemoryCache.cpp: Remove extraneous calls to partitionName
2279         (WebCore):
2280         (WebCore::MemoryCache::add):
2281         (WebCore::MemoryCache::revalidationSucceeded):
2282         (WebCore::MemoryCache::resourceForRequest):
2283         (WebCore::MemoryCache::evict):
2284         (WebCore::MemoryCache::removeResourcesWithOrigin):
2285         * platform/network/cf/ResourceRequest.h: Put top privately-controlled domain reduction code into ResourceRequest::partitionName
2286         (ResourceRequest):
2287         (WebCore::ResourceRequest::cachePartition):
2288         (WebCore::ResourceRequest::setCachePartition): Pre-process the partition name
2289         * platform/network/cf/ResourceRequestCFNet.cpp:
2290         (WebCore):
2291         (WebCore::ResourceRequest::partitionName):
2292         * platform/network/mac/ResourceRequestMac.mm:
2293         (WebCore::ResourceRequest::doUpdatePlatformRequest): Use a UTF-8 version of the cache partition name
2294
2295 2013-03-07  Kenneth Russell  <kbr@google.com>
2296
2297         Compute WebGL context attributes from DrawingBuffer when it is used
2298         https://bugs.webkit.org/show_bug.cgi?id=111666
2299
2300         Reviewed by James Robinson.
2301
2302         Fixed computation of antialias flag when DrawingBuffer is used.
2303
2304         No new tests; covered by existing tests. Ran WebGL conformance
2305         tests on desktop Linux and Android to test.
2306
2307         * html/canvas/WebGLRenderingContext.cpp:
2308         (WebCore):
2309         (WebCore::WebGLRenderingContext::getContextAttributes):
2310             Query DrawingBuffer, when used, for antialias flag.
2311
2312 2013-03-07  Beth Dakin  <bdakin@apple.com>
2313
2314         Need API to draw custom overhang area
2315         https://bugs.webkit.org/show_bug.cgi?id=111679
2316         -and corresponding-
2317         <rdar://problem/13291415>
2318
2319         Reviewed by Simon Fraser.
2320
2321         This will allow clients to put custom images into the top or bottom overhang area.
2322
2323         New FrameView API takes a bool indicating whether the client wants a top/bottom 
2324         overhang layer. If the bool is true, the overhang layer will be returned. 
2325         * WebCore.exp.in:
2326         * page/FrameView.cpp:
2327         (WebCore::FrameView::setWantsLayerForTopOverHangArea):
2328         (WebCore::FrameView::setWantsLayerForBottomOverHangArea):
2329         * page/FrameView.h:
2330         (FrameView):
2331
2332         Keep member variables for the top and bottom overhang layers. Create them if 
2333         necessary, and update them if the root layer changes.
2334         * rendering/RenderLayerCompositor.cpp:
2335         (WebCore::RenderLayerCompositor::updateRootLayerPosition):
2336         (WebCore::RenderLayerCompositor::updateLayerForTopOverhangArea):
2337         (WebCore::RenderLayerCompositor::updateLayerForBottomOverhangArea):
2338         (WebCore::RenderLayerCompositor::reportMemoryUsage):
2339         * rendering/RenderLayerCompositor.h:
2340         (RenderLayerCompositor):
2341
2342 2013-03-07  Gavin Barraclough  <barraclough@apple.com>
2343
2344         Reduce page cache size on Mac
2345         https://bugs.webkit.org/show_bug.cgi?id=111795
2346
2347         Rubber stamped by Geoff Garen
2348
2349         5 entries is unnecessarily large; research show 3 should suffice.
2350         On a low memory warning we should clear this completely.
2351
2352         * platform/mac/MemoryPressureHandlerMac.mm:
2353         (WebCore::MemoryPressureHandler::releaseMemory):
2354             - clear the page cache completely
2355
2356 2013-03-07  Simon Fraser  <simon.fraser@apple.com>
2357
2358         Rename Mac's TileCache to TileController, and WebTileCacheLayer to WebTiledBackingLayer
2359         https://bugs.webkit.org/show_bug.cgi?id=111779
2360
2361         Reviewed by Tim Horton.
2362         
2363         "TileCache" was a name conflict in downstream code, so rename it to TileController.
2364         The layer that has a TileController is now a WebTiledBackingLayer (which fits with
2365         the TiledBacking API that TileController exposes).
2366         
2367         Also renamed the flags in PlatformCALayer to match.
2368
2369         Rename only, no behavior change.
2370
2371         * WebCore.xcodeproj/project.pbxproj:
2372         * page/scrolling/mac/ScrollingTreeScrollingNodeMac.mm:
2373         (WebCore::ScrollingTreeScrollingNodeMac::logExposedUnfilledArea):
2374         * platform/graphics/GraphicsLayerClient.h:
2375         (WebCore::GraphicsLayerClient::shouldUseTiledBacking):
2376         * platform/graphics/ca/GraphicsLayerCA.cpp:
2377         (WebCore::GraphicsLayerCA::GraphicsLayerCA):
2378         (WebCore::GraphicsLayerCA::recursiveCommitChanges):
2379         (WebCore::GraphicsLayerCA::platformCALayerShowRepaintCounter):
2380         (WebCore::GraphicsLayerCA::platformCALayerDidCreateTiles):
2381         (WebCore::GraphicsLayerCA::updateVisibleRect):
2382         (WebCore::GraphicsLayerCA::getDebugBorderInfo):
2383         (WebCore::GraphicsLayerCA::requiresTiledLayer):
2384         (WebCore::GraphicsLayerCA::swapFromOrToTiledLayer):
2385         * platform/graphics/ca/GraphicsLayerCA.h:
2386         * platform/graphics/ca/PlatformCALayer.h:
2387         (WebCore::PlatformCALayer::usesTiledBackingLayer):
2388         * platform/graphics/ca/mac/PlatformCALayerMac.mm:
2389         (PlatformCALayer::PlatformCALayer):
2390         (PlatformCALayer::~PlatformCALayer):
2391         (PlatformCALayer::tiledBacking):
2392         * platform/graphics/ca/mac/TileController.h: Renamed from Source/WebCore/platform/graphics/ca/mac/TileCache.h.
2393         * platform/graphics/ca/mac/WebTileLayer.h:
2394         (TileController):
2395         * platform/graphics/ca/mac/WebTileLayer.mm:
2396         (-[WebTileLayer drawInContext:]):
2397         (-[WebTileLayer setTileController:WebCore::]):
2398         (-[WebTileLayer logFilledFreshTile]):
2399         * platform/graphics/ca/mac/WebTiledBackingLayer.h: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.h.
2400         * platform/graphics/ca/mac/WebTiledBackingLayer.mm: Renamed from Source/WebCore/platform/graphics/ca/mac/WebTileCacheLayer.mm.
2401         * platform/graphics/mac/WebLayer.mm:
2402         (drawLayerContents):
2403         * rendering/RenderLayerBacking.cpp:
2404         (WebCore::RenderLayerBacking::RenderLayerBacking):
2405         (WebCore::RenderLayerBacking::shouldUseTiledBacking):
2406         (WebCore::RenderLayerBacking::adjustTiledBackingCoverage):
2407         (WebCore::RenderLayerBacking::createPrimaryGraphicsLayer):
2408         * rendering/RenderLayerBacking.h:
2409         (WebCore::RenderLayerBacking::usingTiledBacking):
2410         (RenderLayerBacking):
2411         (WebCore::RenderLayerBacking::hasTiledBackingFlatteningLayer):
2412         * rendering/RenderLayerCompositor.cpp:
2413         (WebCore::RenderLayerCompositor::frameViewDidLayout):
2414         (WebCore::RenderLayerCompositor::rootFixedBackgroundsChanged):
2415         (WebCore::RenderLayerCompositor::supportsFixedRootBackgroundCompositing):
2416
2417 2013-03-07  Alexey Proskuryakov  <ap@apple.com>
2418
2419         FormData should allow setting filename to empty
2420         https://bugs.webkit.org/show_bug.cgi?id=111687
2421
2422         Reviewed by Brady Eidson.
2423
2424         Tests: http/tests/local/formdata/send-form-data-with-empty-blob-filename.html
2425                http/tests/local/formdata/send-form-data-with-empty-file-filename.html
2426
2427         * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems):
2428         Missing value is a null string. If the string is empty, we should treat is as
2429         authoritative.
2430
2431 2013-03-07  David Hyatt  <hyatt@apple.com>
2432
2433         REGRESSION: fast/border/border-fit-2.html needs updating
2434         https://bugs.webkit.org/show_bug.cgi?id=111776
2435
2436         Reviewed by Simon Fraser.
2437
2438         This test is incorrectly shrinking the border image now.
2439         We need to apply some clamping to the border-fit like the
2440         old code did. The pixel results *are* still changing though,
2441         since a layout-time shrinkage will not result in right-aligned
2442         boxes in an LTR block when the left edge gets chopped. We'll
2443         have to see if this behavioral change ends up being a problem,
2444         but for now we'll rebaseline and assume it will be ok.
2445
2446         * rendering/RenderBlock.cpp:
2447         (WebCore::RenderBlock::fitBorderToLinesIfNeeded):
2448
2449 2013-03-07  Antoine Quint  <graouts@apple.com>
2450
2451         Web Inspector: provide reasons why a layer was composited in the LayerTreeAgent
2452         https://bugs.webkit.org/show_bug.cgi?id=111703
2453
2454         Introduce a new LayerTree.reasonsForCompositingLayer(layerId) method which returns
2455         the list of reasons why the provided layer was composited as an object with an
2456         optional property for each possible reason. The RenderLayerCompositor already knows
2457         how to provide this information via its own reasonsForCompositing() method, and we
2458         process the returned bitmask to populate the object sent to the front-end.
2459
2460         Reviewed by Timothy Hatcher.
2461
2462         Test: inspector-protocol/layers/layers-compositing-reasons.html
2463
2464         * inspector/Inspector.json:
2465         * inspector/InspectorLayerTreeAgent.cpp:
2466         (WebCore::InspectorLayerTreeAgent::reasonsForCompositingLayer):
2467         (WebCore):
2468         * inspector/InspectorLayerTreeAgent.h:
2469         (InspectorLayerTreeAgent):
2470
2471 2013-03-07  Anders Carlsson  <andersca@apple.com>
2472
2473         Add a didFocusTextField callback to the injected bundle form client
2474         https://bugs.webkit.org/show_bug.cgi?id=111771
2475
2476         Reviewed by Andreas Kling.
2477
2478         Export a symbol needed by WebKit2.
2479
2480         * WebCore.exp.in:
2481
2482 2013-03-06  James Robinson  <jamesr@chromium.org>
2483
2484         [chromium] Stop using WebTransformationMatrix on WebLayer
2485         https://bugs.webkit.org/show_bug.cgi?id=111635
2486
2487         Reviewed by Adrienne Walker.
2488
2489         Switches over to the SkMatrix44 transform setters.
2490
2491         * platform/graphics/chromium/GraphicsLayerChromium.cpp:
2492         (WebCore::transformToSkMatrix44):
2493           Utility for convering a WebCore::TransformationMatrix to an SkMatrix44.
2494           Will move to a more common location once it gets more callers.
2495         (WebCore::GraphicsLayerChromium::updateTransform):
2496         (WebCore::GraphicsLayerChromium::updateChildrenTransform):
2497
2498 2013-03-07  Eric Carlson  <eric.carlson@apple.com>
2499
2500         [Mac] allow iOS to use CaptionUserPreferencesMac
2501         https://bugs.webkit.org/show_bug.cgi?id=111770
2502
2503         Reviewed by Dean Jackson.
2504
2505         No new tests, covered by existing tests.
2506
2507         * page/CaptionUserPreferencesMac.h:
2508         * page/CaptionUserPreferencesMac.mm:
2509         (WebCore::userCaptionPreferencesChangedNotificationCallback): Respond to notifications on
2510             the web thread.
2511
2512 2013-03-07  Mike West  <mkwst@chromium.org>
2513
2514         Move side-effects on hover/active state out of hit-testing
2515         https://bugs.webkit.org/show_bug.cgi?id=98168
2516
2517         Reviewed by Julien Chaffraix.
2518
2519         Original patch by Allan Sandfeld Jensen; I'm just tweaking things.
2520
2521         Document::updateHoverActiveState is currently called during hit testing
2522         to update the hover and active states of elements effected by mouse
2523         movements (or their keyboard equivalents). This conflates the hit test
2524         algorithm itself with side-effects associated with specific use-cases.
2525
2526         This conflation makes it very difficult to reuse the hover/active logic
2527         for things other than hit testing. 'mouseenter'/'mouseleave' events[1]
2528         are one example of a feature that would be simple to implement on top of
2529         this existing logic if we split it out from the hit testing path, and
2530         instead call it explicitly when necessary. An explicit split between
2531         hit testing and its side-effects will also enable us to simplify the
2532         logic in future patches with well-named parameters, rather than relying
2533         on stuffing properties into HitTestRequest.
2534
2535         This patch drops the call to Document::updateHoverActiveState from
2536         RenderView::hitTest, and adjusts the three call-sites in EventHandler
2537         to explicitly call out to it rather than Document::updateStyleIfNeeded.
2538         The latter call is still necessary but has been folded into
2539         updateHoverActiveState, as the former is never called without calling
2540         the latter.
2541
2542         [1]: http://wkbug.com/18930
2543
2544         * dom/Document.h:
2545         * dom/Document.cpp:
2546         (WebCore::Document::updateHoverActiveState):
2547             First, this function must now only be called from contexts that were
2548             performing a read/write hit-test: the code asserts this
2549             precondition.
2550
2551             Second, rather than accepting a HitTestResult, the function accepts
2552             an Element* from which to begin the hover/active chain changes.
2553
2554             Third, we have to explicitly update the hover/active states for
2555             documents between the updated element and the top-level document.
2556             The hit-testing logic was taking care of this for us, now we need to
2557             take care of it ourselves.
2558
2559             Fourth, call out to updateStyleIfNeeded rather than making our
2560             caller do so. The calls were always paired; now that's explicit.
2561         (WebCore::Document::prepareMouseEvent):
2562         * page/EventHandler.cpp:
2563         (WebCore::EventHandler::hitTestResultAtPoint):
2564         (WebCore::EventHandler::sendContextMenuEventForKey):
2565         (WebCore::EventHandler::hoverTimerFired):
2566             Call out to updateHoverActiveState rather than updateStyleIfNeeded.
2567         * rendering/RenderView.cpp:
2568         (WebCore::RenderView::hitTest):
2569             Drop the call to updateHoverActiveState.
2570
2571 2013-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
2572
2573         Unreviewed, rolling out r145097.
2574         http://trac.webkit.org/changeset/145097
2575         https://bugs.webkit.org/show_bug.cgi?id=111765
2576
2577         Triggers an ASSERT in the Chromium port (Requested by abarth
2578         on #webkit).
2579
2580         * html/FileInputType.cpp:
2581         (WebCore::FileInputType::appendFormData):
2582         * platform/network/FormData.cpp:
2583         (WebCore::FormData::appendKeyValuePairItems):
2584
2585 2013-03-07  Chris Fleizach  <cfleizach@apple.com>
2586
2587         AX: Can't activate links with VoiceOver in Safari
2588         https://bugs.webkit.org/show_bug.cgi?id=111755
2589
2590         Reviewed by Tim Horton.
2591
2592         VoiceOver is relying on the press action being the first action in the list. We changed
2593         that order inadvertently recently, which confuses VoiceOver.
2594
2595         Test: platform/mac/accessibility/press-action-is-first.html
2596
2597         * accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
2598         (-[WebAccessibilityObjectWrapper accessibilityActionNames]):
2599
2600 2013-03-07  Rafael Weinstein  <rafaelw@chromium.org>
2601
2602         Unreviewed, rolling out r145083.
2603         http://trac.webkit.org/changeset/145083
2604         https://bugs.webkit.org/show_bug.cgi?id=110733
2605
2606         caused lots crashes in http/tests/security/xssAuditor/* tests
2607
2608         * html/parser/XSSAuditor.cpp:
2609         (WebCore::XSSAuditor::XSSAuditor):
2610         (WebCore::XSSAuditor::init):
2611         (WebCore::XSSAuditor::filterToken):
2612         * html/parser/XSSAuditor.h:
2613         * html/parser/XSSAuditorDelegate.cpp:
2614         (WebCore::XSSAuditorDelegate::didBlockScript):
2615         * html/parser/XSSAuditorDelegate.h:
2616         (WebCore::XSSInfo::create):
2617         (XSSInfo):
2618         (WebCore::XSSInfo::XSSInfo):
2619
2620 2013-03-07  Michelangelo De Simone  <michelangelo@webkit.org>
2621
2622         [CSS Shaders] Implement hue and saturation non-separable blend modes
2623         https://bugs.webkit.org/show_bug.cgi?id=109464
2624
2625         Added the following GLSL helper functions to the CustomFilterValidatedProgram:
2626
2627             - css_Sat(C): returns the saturation for the color C
2628             - css_SetSat(C, s): sets the saturation s on the color C
2629             - css_SetSatHelper(Cmin, Cmid, Cmax, s): helper function for css_SetSat
2630
2631         The above functions are being used for the "hue" and "saturation" non-separable
2632         blend modes, the relevant spec for such modes is at URL:
2633         https://dvcs.w3.org/hg/FXTF/rawfile/tip/compositing/index.html#blendingnonseparable
2634
2635         Reviewed by Dean Jackson.
2636
2637         Tests: css3/filters/custom/custom-filter-nonseparable-blend-mode-hue.html
2638                css3/filters/custom/custom-filter-nonseparable-blend-mode-saturation.html
2639
2640         * platform/graphics/filters/CustomFilterValidatedProgram.cpp:
2641         (WebCore::CustomFilterValidatedProgram::blendFunctionString):
2642
2643 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
2644
2645         Web Inspector: [ACE] set correct font
2646         https://bugs.webkit.org/show_bug.cgi?id=111747
2647
2648         Reviewed by Pavel Feldman.
2649
2650         No new tests.
2651
2652         Set class "source-code" for the ace editor element.
2653
2654         * inspector/front-end/AceTextEditor.js:
2655         (WebInspector.AceTextEditor):
2656
2657 2013-03-06  Ojan Vafai  <ojan@chromium.org>
2658
2659         Recalculate borders at the beginning of table layout
2660         https://bugs.webkit.org/show_bug.cgi?id=111634
2661
2662         Reviewed by Julien Chaffraix.
2663
2664         Doing it in convertStyleLogicalWidthToComputedWidth missed some dynamic
2665         relayout cases. I confirmed that the new results match the results we
2666         would get if we set the border width initially instead of dynamically.
2667
2668         * rendering/RenderTable.cpp:
2669         (WebCore::RenderTable::convertStyleLogicalWidthToComputedWidth):
2670         (WebCore::RenderTable::layout):
2671
2672 2013-03-07  David Hyatt  <hyatt@apple.com>
2673
2674         border-fit-adjust should happen at layout time rather than paint time
2675         https://bugs.webkit.org/show_bug.cgi?id=111606
2676         <rdar://problem/13101714>
2677
2678         Reviewed by Antti Koivisto.
2679
2680         In order for border-fit-adjust to be accurate in more cases, it needs
2681         to be a layout-time adjustment rather than a paint-time adjustment.
2682         Specifically there are cases where an LTR adjusted box was right-aligned
2683         by its container, and without genuinely shrinking the size of the box,
2684         we end up chopping off the right edge but not shifting the box to the
2685         right to compensate.
2686         
2687         This patch changes border-fit-adjust to now do the adjustment using
2688         the override width mechanism and a second layout pass instead of just
2689         hacking painting.
2690
2691         Test: fast/block/border-fit-with-right-alignment.html
2692
2693         * rendering/RenderBlock.cpp:
2694         (WebCore::RenderBlock::layoutBlock):
2695         Calls fitBorderToLinesIfNeeded at the end of layout to do a second
2696         layout pass if the adjustment needs to be made.
2697
2698         (WebCore::RenderBlock::fitBorderToLinesIfNeeded):
2699         Renamed borderFitAdjust to fitBorderToLinesIfNeeded and made it
2700         non-virtual, since it's no longer called from RenderBox code. Changed it
2701         to do a relayout using override widths if an adjustment is needed.
2702
2703         * rendering/RenderBlock.h:
2704         (RenderBlock):
2705         Renamed borderFitAdjust to fitBorderToLinesIfNeeded and made it
2706         non-virtual.
2707
2708         * rendering/RenderBox.cpp:
2709         (WebCore::RenderBox::paintBoxDecorations):
2710         (WebCore::RenderBox::paintMask):
2711         Removed the paint-time border-fit adjustment.
2712
2713         (WebCore::RenderBox::computeLogicalWidthInRegion):
2714         Use the override width when border-fit is set to lines.
2715
2716         * rendering/RenderBox.h:
2717         (RenderBox):
2718         Remove the virtual borderFitAdjust method.
2719
2720 2013-03-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
2721
2722         REGRESSION(r143727): Clicking / selecting inside an <embed> is broken
2723         https://bugs.webkit.org/show_bug.cgi?id=111217
2724
2725         Reviewed by Julien Chaffraix.
2726
2727         Hit-testing into child frames need to happen in RenderPart, otherwise
2728         we will miss frame views in <embed> and <object> elements. 
2729
2730         Test: fast/dom/nodesFromRect/nodesFromRect-embedded-frame-content.html
2731
2732         * rendering/RenderFrameBase.cpp:
2733         * rendering/RenderFrameBase.h:
2734         (RenderFrameBase):
2735         * rendering/RenderPart.cpp:
2736         (WebCore::RenderPart::nodeAtPoint):
2737         * rendering/RenderPart.h:
2738         (RenderPart):
2739
2740 2013-03-07  Alexey Proskuryakov  <ap@apple.com>
2741
2742         FormData should allow setting filename to empty
2743         https://bugs.webkit.org/show_bug.cgi?id=111687
2744
2745         Reviewed by Brady Eidson.
2746
2747         Tests: http/tests/local/formdata/send-form-data-with-empty-blob-filename.html
2748                http/tests/local/formdata/send-form-data-with-empty-file-filename.html
2749
2750         * html/FileInputType.cpp: (WebCore::FileInputType::appendFormData):
2751         Use a Blob for empty file input, not a hacky File with empty path.
2752
2753         * platform/network/FormData.cpp: (WebCore::FormData::appendKeyValuePairItems):
2754         Missing value is a null string. If the string is empty, we should treat is as
2755         authoritative.
2756
2757 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
2758
2759         Web Inspector: [CodeMirror] dublicated horizontal scroll
2760         https://bugs.webkit.org/show_bug.cgi?id=111712
2761
2762         Reviewed by Pavel Feldman.
2763
2764         Set a box-sizing css property on all codemirror elements to
2765         "content-box".
2766
2767         No new tests.
2768
2769         * inspector/front-end/cm/cmdevtools.css:
2770         (.CodeMirror *):
2771
2772 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
2773
2774         Web Inspector: Styles sidebar pane toolbar disappears in horizontal split mode.
2775         https://bugs.webkit.org/show_bug.cgi?id=111735
2776
2777         Reviewed by Pavel Feldman.
2778
2779         * inspector/front-end/ElementsPanel.js:
2780         (WebInspector.ElementsPanel.prototype._splitVertically):
2781         * inspector/front-end/elementsPanel.css:
2782         (.sidebar-pane.composite .metrics-and-computed .sidebar-pane-toolbar):
2783
2784 2013-03-07  Zan Dobersek  <zdobersek@igalia.com>
2785
2786         [GTK] Limit the supported compilers to GCC >= 4.7 and Clang >= 3.0
2787         https://bugs.webkit.org/show_bug.cgi?id=109932
2788
2789         Reviewed by Martin Robinson.
2790
2791         * GNUmakefile.am: Replace references to SYMBOL_VISIBILITY_INLINES and SYMBOL_VISIBILITY variables with the actual flags.
2792         They are now available by default due to the limited set of supported compilers.
2793         * bindings/gobject/GNUmakefile.am: Ditto.
2794
2795 2013-03-07  Mike West  <mkwst@chromium.org>
2796
2797         XSSAuditor should send only one console error when blocking a page.
2798         https://bugs.webkit.org/show_bug.cgi?id=110733
2799
2800         Reviewed by Daniel Bates.
2801
2802         Currently, we send two console errors when XSSAuditor blocks a page:
2803         "Refused to execute a JavaScript script. Source code of script found
2804         within request.\n", and "Entire page will be blocked.".
2805
2806         We should only send one message, tuning it properly for the context, and
2807         including the URL of the page effected by the XSSAuditor's work.
2808
2809         Covered by rebaselines of all the XSSAuditor and 'reflected-xss' tests.
2810
2811         * html/parser/XSSAuditor.cpp:
2812         * html/parser/XSSAuditor.h:
2813         (WebCore::XSSAuditor::XSSAuditor):
2814             Add two booleans to track the headers used to set the XSSAuditor state.
2815         (WebCore::XSSAuditor::init):
2816             Save a copy of the document's URL even if we're not generating a
2817             report upon violation: we'll need it for the console messages. Also
2818             populate the didSendValidXXXHeader booleans for use later.
2819         (WebCore::XSSAuditor::filterToken):
2820             Add detail about the header status to the constructed XSSInfo object.
2821         * html/parser/XSSAuditorDelegate.cpp:
2822         (WebCore::buildConsoleError):
2823             Move message construction out into a separate inlined function, as
2824             it's becoming complex.
2825         (WebCore::XSSAuditorDelegate::didBlockScript):
2826             Fold the "Entire page will be blocked" message into the main console
2827             error.
2828         * html/parser/XSSAuditorDelegate.h:
2829         (WebCore::XSSInfo::create):
2830         (WebCore::XSSInfo::XSSInfo):
2831             Add detail about header status to XSSInfo in order to correctly
2832             construct the console error.
2833
2834 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
2835
2836         Web Inspector: Add some more compilation annotations to NavigatorView
2837         https://bugs.webkit.org/show_bug.cgi?id=111730
2838
2839         Reviewed by Alexander Pavlov.
2840
2841         * inspector/front-end/NavigatorView.js:
2842
2843 2013-03-06  Gustavo Noronha Silva  <gns@gnome.org>
2844
2845         [GTK] Enable translations for WebKit2
2846         https://bugs.webkit.org/show_bug.cgi?id=111398
2847
2848         Reviewed by Martin Robinson.
2849
2850         Build change only, thus no tests.
2851
2852         * GNUmakefile.am: distribute po files.
2853         * platform/gtk/po/POTFILES.in: adjust paths for translatable files.
2854
2855 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
2856
2857         Web Inspector: [CodeMirror] update codemirror to version 3.1
2858         https://bugs.webkit.org/show_bug.cgi?id=111711
2859
2860         Reviewed by Vsevolod Vlasov.
2861
2862         Update code mirror experimental editor to version 3.1
2863
2864         No new tests.
2865
2866         * inspector/front-end/cm/codemirror.css:
2867         (.CodeMirror div.CodeMirror-cursor):
2868         (.CodeMirror div.CodeMirror-secondarycursor):
2869         (.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor):
2870         (.CodeMirror.cm-keymap-fat-cursor div.CodeMirror-cursor:not(#nonsense_id)):
2871         (.CodeMirror div.CodeMirror-cursor.CodeMirror-overwrite):
2872         (.CodeMirror-gutters):
2873         (.CodeMirror-linewidget):
2874         (.CodeMirror-widget):
2875         (.CodeMirror-focused div.CodeMirror-cursor):
2876         (@media print):
2877         * inspector/front-end/cm/codemirror.js:
2878         (window.CodeMirror):
2879         (window.CodeMirror.):
2880
2881 2013-03-07  Sergio Correia  <sergio.correia@openbossa.org>
2882
2883         OpenGLShims: fix check for ANGLE GLES2 extensions
2884         https://bugs.webkit.org/show_bug.cgi?id=111656
2885
2886         Reviewed by Simon Hausmann.
2887
2888         The check for ANGLE GLES2 extensions is currently being overriden
2889         with checks for APPLE extensions in lookupOpenGLFunctionAddress().
2890
2891         No new tests. No user visible behavior changed.
2892
2893         * platform/graphics/OpenGLShims.cpp:
2894         (WebCore::lookupOpenGLFunctionAddress):
2895
2896 2013-03-07  David Kilzer  <ddkilzer@apple.com>
2897
2898         Rename visible_units.h to VisibleUnits.h in WebCore.vcxproj.filters
2899         <http://webkit.org/b/111426>
2900
2901         * WebCore.vcxproj/WebCore.vcxproj.filters: Rename visible_units.h
2902         to VisibleUnits.h and re-sort.
2903
2904 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
2905
2906         Web Inspector: Support a shortcut for reloading front-end in debug mode.
2907         https://bugs.webkit.org/show_bug.cgi?id=111709
2908
2909         Reviewed by Pavel Feldman.
2910
2911         * inspector/front-end/buildSystemOnly.js:
2912         * inspector/front-end/inspector.js:
2913         (WebInspector.documentKeyDown):
2914
2915 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
2916
2917         Web Inspector: Support setting up file system mappings from scripts panel context menu.
2918         https://bugs.webkit.org/show_bug.cgi?id=111583
2919
2920         Reviewed by Pavel Feldman.
2921
2922         Added context menu items to set up network - file system mappings from sources panel.
2923         Implemented mapping add/remove methods on Workspace.
2924         Added a dialog suggesting to reload front-end after making such changes.
2925
2926         * English.lproj/localizedStrings.js:
2927         * inspector/front-end/FileSystemMapping.js:
2928         (WebInspector.FileSystemMappingImpl.prototype.fileSystemPath):
2929         * inspector/front-end/FileSystemProjectDelegate.js:
2930         (WebInspector.FileSystemWorkspaceProvider.prototype._fileSystemRemoved):
2931         (WebInspector.FileSystemWorkspaceProvider.prototype.fileSystemPath):
2932         * inspector/front-end/FilteredItemSelectionDialog.js:
2933         (WebInspector.FilteredItemSelectionDialog.prototype.onEnter):
2934         (WebInspector.FilteredItemSelectionDialog.prototype.setQuery):
2935         (WebInspector.SelectUISourceCodeDialog):
2936         (WebInspector.SelectUISourceCodeDialog.prototype.uiSourceCodeSelected):
2937         (WebInspector.SelectUISourceCodeDialog.prototype.filterProject):
2938         (WebInspector.SelectUISourceCodeDialog.prototype.filterUISourceCode):
2939         (WebInspector.SelectUISourceCodeDialog.prototype.selectItem):
2940         (WebInspector.SelectUISourceCodeDialog.prototype._uiSourceCodeAdded):
2941         (WebInspector.OpenResourceDialog):
2942         (WebInspector.OpenResourceDialog.prototype.uiSourceCodeSelected):
2943         (WebInspector.OpenResourceDialog.prototype.filterProject):
2944         (WebInspector.SelectUISourceCodeForProjectTypeDialog):
2945         (WebInspector.SelectUISourceCodeForProjectTypeDialog.prototype.uiSourceCodeSelected):
2946         (WebInspector.SelectUISourceCodeForProjectTypeDialog.prototype.filterProject):
2947         (WebInspector.SelectUISourceCodeForProjectTypeDialog.show):
2948         * inspector/front-end/ScriptsPanel.js:
2949         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork.mapFileSystemToNetwork):
2950         (WebInspector.ScriptsPanel.prototype._mapFileSystemToNetwork):
2951         (WebInspector.ScriptsPanel.prototype._removeNetworkMapping):
2952         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem.mapNetworkToFileSystem):
2953         (WebInspector.ScriptsPanel.prototype._mapNetworkToFileSystem):
2954         (WebInspector.ScriptsPanel.prototype.):
2955         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeMappingItems):
2956         (WebInspector.ScriptsPanel.prototype._appendUISourceCodeItems):
2957         * inspector/front-end/SettingsScreen.js:
2958         (WebInspector.WorkspaceSettingsTab):
2959         (WebInspector.WorkspaceSettingsTab.prototype.wasShown):
2960         (WebInspector.WorkspaceSettingsTab.prototype._reset):
2961         * inspector/front-end/ViewportControl.js:
2962         (WebInspector.ViewportControl.prototype.refresh):
2963         * inspector/front-end/Workspace.js:
2964         (WebInspector.Workspace.prototype.addMapping):
2965         (WebInspector.Workspace.prototype.removeMapping):
2966         * inspector/front-end/externs.js:
2967         (WebInspector.suggestReload):
2968         * inspector/front-end/inspector.js:
2969         (WebInspector.suggestReload):
2970
2971 2013-03-07  Vsevolod Vlasov  <vsevik@chromium.org>
2972
2973         Web Inspector: Add support for frontend reloading
2974         https://bugs.webkit.org/show_bug.cgi?id=111727
2975
2976         Reviewed by Pavel Feldman.
2977
2978         This patch adds support for frontend reloading including:
2979           - making sure no messages are sent to backend once frontend started reloading
2980           - updating frontend url with up-to-date dockSide query parameter value.
2981
2982         * inspector/front-end/InspectorBackend.js:
2983         (InspectorBackendClass.prototype.sendMessageObjectToBackend):
2984         (InspectorBackendClass.prototype.disconnect):
2985         * inspector/front-end/externs.js:
2986         (WebInspector.reload):
2987         * inspector/front-end/inspector.js:
2988         (WebInspector.reload):
2989
2990 2013-03-07  Alexei Filippov  <alph@chromium.org>
2991
2992         Web Inspector: Change profile start button caption depending on profile type.
2993         https://bugs.webkit.org/show_bug.cgi?id=111698
2994
2995         Change the start profiling button caption to "Snapshot" for
2996         snapshot-like profile types, e.g. JS heap snapshot, native memory snapshot.
2997
2998         Reviewed by Yury Semikhatsky.
2999
3000         * English.lproj/localizedStrings.js:
3001         * inspector/front-end/HeapSnapshotView.js:
3002         (WebInspector.HeapSnapshotProfileType.prototype.isInstantProfile):
3003         * inspector/front-end/NativeMemorySnapshotView.js:
3004         (WebInspector.NativeSnapshotProfileType.prototype.isInstantProfile):
3005         (WebInspector.NativeMemoryProfileType.prototype.isInstantProfile):
3006         * inspector/front-end/ProfileLauncherView.js:
3007         (WebInspector.ProfileLauncherView):
3008         (WebInspector.ProfileLauncherView.prototype.addProfileType):
3009         (WebInspector.ProfileLauncherView.prototype._updateControls):
3010         (WebInspector.MultiProfileLauncherView.prototype._updateControls):
3011         (WebInspector.MultiProfileLauncherView.prototype._profileTypeChanged):
3012         * inspector/front-end/ProfilesPanel.js:
3013         (WebInspector.ProfileType.prototype.isInstantProfile):
3014
3015 2013-03-07  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
3016
3017         [texmap] Remove direct access to clip state from clip stack
3018         https://bugs.webkit.org/show_bug.cgi?id=111630
3019
3020         Reviewed by Allan Sandfeld Jensen.
3021
3022         As we are now monitoring the clip state from
3023         TextureMapperGL/BitmapTextureGL, have direct access to clip state object
3024         would eventually make it dirty without properly setting the
3025         'clipStateDirty' flag. This bug intends to substitute direct access with
3026         auxiliary functions which would set the clip state dirty when necessary.
3027
3028         No new tests. No user visible behavior changed.
3029
3030         * platform/graphics/texmap/TextureMapperGL.cpp:
3031         (WebCore::TextureMapperGL::ClipStack::intersect):
3032         (WebCore::TextureMapperGL::ClipStack::setStencilIndex):
3033         (WebCore::TextureMapperGL::drawBorder):
3034         (WebCore::TextureMapperGL::drawTexture):
3035         (WebCore::TextureMapperGL::beginScissorClip):
3036         (WebCore::TextureMapperGL::beginClip):
3037         Replaced direct access with auxiliary functions.
3038
3039         * platform/graphics/texmap/TextureMapperGL.h:
3040         (ClipStack): Removed ClipStack::current() function.
3041         (WebCore::TextureMapperGL::ClipStack::getStencilIndex): Added.
3042         (WebCore::TextureMapperGL::ClipStack::isCurrentScissorBoxEmpty): Added.
3043
3044 2013-03-07  Bruno de Oliveira Abinader  <bruno.abinader@basyskom.com>
3045
3046         [Texturemapper] transform-style 'flat' value is broken
3047         https://bugs.webkit.org/show_bug.cgi?id=111566
3048
3049         Reviewed by Allan Sandfeld Jensen.
3050
3051         After changes from r144290, the CSS3 'transform-styles' property, when
3052         used with 'flat' value, resulted in non-stenciled rendering inside
3053         clipped area - vide example from Surfin' Safari blog:
3054         https://www.webkit.org/blog-files/3d-transforms/transform-style.html
3055
3056         This patch forces the clip state to be applied when binding the default
3057         surface.
3058
3059         No new tests. No user visible behavior changed.
3060
3061         * platform/graphics/texmap/TextureMapperGL.cpp:
3062         (WebCore::TextureMapperGL::ClipStack::apply):
3063         (WebCore::TextureMapperGL::ClipStack::applyIfNeeded): Added.
3064         Moved state cache check from apply() to applyIfNeeded().
3065
3066         (WebCore::BitmapTextureGL::clearIfNeeded):
3067         (WebCore::BitmapTextureGL::bind):
3068         (WebCore::TextureMapperGL::beginScissorClip):
3069         (WebCore::TextureMapperGL::beginClip):
3070         (WebCore::TextureMapperGL::endClip):
3071         * platform/graphics/texmap/TextureMapperGL.h:
3072         (ClipStack):
3073         Use applyIfNeeded() to check for clip state before clipping.
3074
3075 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
3076
3077         Web Inspector: refactoring: move TextEditorModel.Indent enum into TextUtils
3078         https://bugs.webkit.org/show_bug.cgi?id=111715
3079
3080         Reviewed by Pavel Feldman.
3081
3082         Move WebInspector.TextEditorModel.Indent into WebInspector.TextUtils namespace.
3083
3084         No new tests: no change in behaviour.
3085
3086         * inspector/front-end/SettingsScreen.js:
3087         (WebInspector.GenericSettingsTab):
3088         * inspector/front-end/TextEditorModel.js:
3089         (WebInspector.TextEditorModel.endsWithBracketRegex.):
3090         * inspector/front-end/TextUtils.js:
3091
3092 2013-03-07  Ian Vollick  <vollick@chromium.org>
3093
3094         Fix painting phases for composited scrolling
3095         https://bugs.webkit.org/show_bug.cgi?id=107618
3096
3097         Reviewed by Simon Fraser.
3098
3099         With composited scrolling, the scrolling contents layer paints the 
3100         foreground and the main graphics layer paints the background. This 
3101         causes a few problems:
3102
3103           1) If we create a foreground layer, we end up with two layers painting 
3104              the foreground phase.
3105           2) Focus rings / outlines paint into the foreground layer, so they end
3106              up moving around with the scrolling contents.
3107           3) Neg z-order descendants paint in the the main graphics layer and
3108              will therefore not scroll.
3109
3110         To deal with 1) we need to stop painting the foreground into both the
3111         foreground and scrolling contents layers. We also need to ensure that
3112         the foreground layer is the right size and has the right offset from
3113         renderer if we're on the composited scrolling path.
3114
3115         To deal with 2) and 3), I have added a new graphics layer painting phase 
3116         flag -- GraphicsLayerPaintCompositedScroll -- and applied it to two
3117         layers in the subtree created by RenderLayerBacking. This ultimately
3118         affects the paint phase passed to RenderLayer::paintLayerContents and
3119         allows us to paint the focus rings, outlines and negative z-order
3120         descendants into the proper layers.
3121
3122         Tests: compositing/overflow/composited-scrolling-paint-phases.html
3123                compositing/overflow/do-not-paint-outline-into-composited-scrolling-contents.html
3124                compositing/overflow/paint-neg-z-order-descendants-into-scrolling-contents-layer.html
3125
3126         * page/Frame.h:
3127           Added a flag for including painting phases in the layer tree dump.
3128         (WebCore::GraphicsLayer::dumpProperties):
3129           Can now dump painting phase information, but only if requested.
3130         * platform/graphics/GraphicsLayerClient.h:
3131           Added a new entry to GraphicsLayerPaintingPhaseFlags for comp-scroll.
3132         (WebCore::RenderLayer::paintLayerContents):
3133           Updated the logic to account for the new comp-scroll-related paint
3134           phase flag.
3135         * rendering/RenderLayer.h:
3136           Added the RenderLayer painting phase counterpart to
3137           GraphicsLayerPaintCompositedScroll.
3138         * rendering/RenderLayerBacking.cpp:
3139         (WebCore::RenderLayerBacking::updateGraphicsLayerGeometry):
3140           Ensures that the foreground layer is sized correctly for comp-scroll.
3141         (WebCore::RenderLayerBacking::updateScrollingLayers):
3142           If we have a foreground layer, the scrolling contents layer no
3143           longer gets assigned the foreground painting phase.
3144         (WebCore::RenderLayerBacking::paintingPhaseForPrimaryLayer):
3145           If we're comp-scrolling, then the primary layer gets the new phase.
3146         (WebCore::RenderLayerBacking::paintIntoLayer):
3147           Simply translates the new graphics layer painting phase to its
3148           render layer counterpart.
3149         (WebCore::RenderLayerCompositor::layerTreeAsText):
3150         * testing/Internals.cpp:
3151         (WebCore::Internals::layerTreeAsText):
3152         * testing/Internals.h:
3153         * testing/Internals.idl:
3154           The above changes are solely plumbing to allow layout tests to
3155           request that paint phase information be included in the layer tree
3156           dump.
3157
3158 2013-03-07  Allan Sandfeld Jensen  <allan.jensen@digia.com>
3159
3160         [Qt] Use Qt5.1 supportedMimeTypes methods.
3161         https://bugs.webkit.org/show_bug.cgi?id=111185
3162
3163         Reviewed by Jocelyn Turcotte.
3164
3165         Uses the supportedMimeTypes() methods from QImageReader and QImageWriter when available.
3166
3167         * platform/MIMETypeRegistry.cpp:
3168         (WebCore::initializeSupportedImageMIMETypes):
3169         (WebCore::initializeSupportedImageMIMETypesForEncoding):
3170
3171 2013-03-07  Ilya Tikhonovsky  <loislo@chromium.org>
3172
3173         Web Inspector: Flame Chart. Stick item color to the function.
3174         https://bugs.webkit.org/show_bug.cgi?id=111697
3175
3176         Reviewed by Yury Semikhatsky.
3177
3178         Different nodes associated with a single function have to use the same color.
3179         Minor polish: do not filter out (idle) and (program) items. They were big due to an error on v8 side.
3180         Set minimum width to 0 for more precise picture.
3181
3182         * inspector/front-end/FlameChart.js:
3183         (WebInspector.FlameChart):
3184         (WebInspector.FlameChart.prototype._rootNodes):
3185         (WebInspector.FlameChart.prototype.draw):
3186         (WebInspector.FlameChart.prototype._drawNode):
3187         (WebInspector.FlameChart.prototype._drawBar):
3188
3189 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
3190
3191         Web Inspector: [ACE] gutter size should be fixed.
3192         https://bugs.webkit.org/show_bug.cgi?id=111576
3193
3194         Reviewed by Pavel Feldman.
3195
3196         Add a custom ace editor build that supports setFixedGutterWidth configuration
3197         parameter and switch this setting on.
3198
3199         No new tests.
3200
3201         * inspector/front-end/AceTextEditor.js:
3202         (WebInspector.AceTextEditor): Switch fixedGutterWidth setting on.
3203         * inspector/front-end/ace/ace.js:
3204         (.):
3205
3206 2013-03-07  Sheriff Bot  <webkit.review.bot@gmail.com>
3207
3208         Unreviewed, rolling out r145059.
3209         http://trac.webkit.org/changeset/145059
3210         https://bugs.webkit.org/show_bug.cgi?id=111707
3211
3212         crash webkit build (Requested by tasak on #webkit).
3213
3214         * CMakeLists.txt:
3215         * GNUmakefile.list.am:
3216         * Target.pri:
3217         * WebCore.gypi:
3218         * WebCore.xcodeproj/project.pbxproj:
3219         * css/CSSAllInOne.cpp:
3220         * css/DocumentRuleSets.cpp:
3221         (WebCore::ShadowDistributedRules::collectMatchRequests):
3222         * css/DocumentRuleSets.h:
3223         * css/ElementRuleCollector.cpp: Removed.
3224         * css/ElementRuleCollector.h: Removed.
3225         * css/PageRuleCollector.cpp: Removed.
3226         * css/PageRuleCollector.h: Removed.
3227         * css/StyleResolver.cpp:
3228         (WebCore::leftToRightDeclaration):
3229         (WebCore):
3230         (WebCore::rightToLeftDeclaration):
3231         (WebCore::StyleResolver::State::ensureRuleList):
3232         (WebCore::StyleResolver::State::clear):
3233         (WebCore::StyleResolver::addMatchedProperties):
3234         (WebCore::StyleResolver::addElementStyleProperties):
3235         (MatchingUARulesScope):
3236         (WebCore::MatchingUARulesScope::MatchingUARulesScope):
3237         (WebCore::MatchingUARulesScope::~MatchingUARulesScope):
3238         (WebCore::MatchingUARulesScope::isMatchingUARules):
3239         (WebCore::StyleResolver::collectMatchingRules):
3240         (WebCore::StyleResolver::collectMatchingRulesForRegion):
3241         (WebCore::StyleResolver::sortAndTransferMatchedRules):
3242         (WebCore::StyleResolver::matchScopedAuthorRules):
3243         (WebCore::StyleResolver::matchHostRules):
3244         (WebCore::StyleResolver::matchAuthorRules):
3245         (WebCore::StyleResolver::matchUserRules):
3246         (WebCore::StyleResolver::matchUARules):
3247         (WebCore::StyleResolver::collectMatchingRulesForList):
3248         (WebCore::compareRules):
3249         (WebCore::StyleResolver::sortMatchedRules):
3250         (WebCore::StyleResolver::matchAllRules):
3251         (WebCore::StyleResolver::State::initForStyleResolve):
3252         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
3253         (WebCore::StyleResolver::styleForElement):
3254         (WebCore::StyleResolver::styleForKeyframe):
3255         (WebCore::StyleResolver::pseudoStyleForElement):
3256         (WebCore::StyleResolver::styleForPage):
3257         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3258         (WebCore::StyleResolver::ruleMatches):
3259         (WebCore::StyleResolver::checkRegionSelector):
3260         (WebCore::comparePageRules):
3261         (WebCore::StyleResolver::matchPageRules):
3262         (WebCore::checkPageSelectorComponents):
3263         (WebCore::StyleResolver::matchPageRulesForList):
3264         (WebCore::StyleResolver::isLeftPage):
3265         (WebCore::StyleResolver::isFirstPage):
3266         (WebCore::StyleResolver::pageName):
3267         * css/StyleResolver.h:
3268         (WebCore::MatchRequest::MatchRequest):
3269         (MatchRequest):
3270         (StyleResolver):
3271         (MatchResult):
3272         (WebCore::StyleResolver::State::State):
3273         (State):
3274         (WebCore::StyleResolver::State::takeRuleList):
3275         (WebCore::StyleResolver::State::setSameOriginOnly):
3276         (WebCore::StyleResolver::State::isSameOriginOnly):
3277         (WebCore::StyleResolver::State::pseudoStyleRequest):
3278         (WebCore::StyleResolver::State::setMode):
3279         (WebCore::StyleResolver::State::mode):
3280         (WebCore::StyleResolver::State::matchedRules):
3281         (WebCore::StyleResolver::State::addMatchedRule):
3282         * inspector/InspectorCSSAgent.cpp:
3283         (WebCore::InspectorCSSAgent::willMatchRule):
3284         * inspector/InspectorCSSAgent.h:
3285         (WebCore):
3286         (InspectorCSSAgent):
3287         * inspector/InspectorInstrumentation.cpp:
3288         (WebCore):
3289         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
3290         * inspector/InspectorInstrumentation.h:
3291         (WebCore):
3292         (InspectorInstrumentation):
3293         (WebCore::InspectorInstrumentation::willMatchRule):
3294
3295 2013-03-07  Kentaro Hara  <haraken@chromium.org>
3296
3297         Unreviewed. Rebaselined run-bindings-tests.
3298
3299         * bindings/scripts/test/V8/V8TestInterface.cpp:
3300         (WebCore):
3301         * bindings/scripts/test/V8/V8TestObj.cpp:
3302         (WebCore):
3303
3304 2013-03-07  Takashi Sakamoto  <tasak@google.com>
3305
3306         [Refactoring] Implement RuleCollector
3307         https://bugs.webkit.org/show_bug.cgi?id=109916
3308
3309         Reviewed by Antti Koivisto.
3310
3311         Implemented rule collector for an element and collector for a page.
3312         Not all members in class State are required entire while resolving
3313         a style.
3314
3315         No new tests, because just refactoring.
3316
3317         * CMakeLists.txt:
3318         * GNUmakefile.list.am:
3319         * Target.pri:
3320         * WebCore.gypi:
3321         * WebCore.xcodeproj/project.pbxproj:
3322         * css/CSSAllInOne.cpp:
3323         Added ElementRuleCollector and PageRuleCollector.
3324         * css/DocumentRuleSets.cpp:
3325         (WebCore::ShadowDistributedRules::collectMatchRequests):
3326         Since behaviorAtBoundary is a state owned by ElementRuleCollector,
3327         removed from here.
3328         * css/DocumentRuleSets.h:
3329         (WebCore::ShadowDistributedRules::isEmpty):
3330         Added to quickly check whether there exist any ShadowDistributedRules
3331         or not.
3332         * css/ElementRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
3333         (WebCore):
3334         (WebCore::ElementRuleCollector::matchedResult):
3335         (WebCore::ElementRuleCollector::matchedRuleList):
3336         (WebCore::ElementRuleCollector::addMatchedRule):
3337         (WebCore::ElementRuleCollector::clearMatchedRules):
3338         (WebCore::ElementRuleCollector::ensureRuleList):
3339         (WebCore::ElementRuleCollector::addElementStyleProperties):
3340         (WebCore::ElementRuleCollector::collectMatchingRules):
3341         (WebCore::ElementRuleCollector::collectMatchingRulesForRegion):
3342         (WebCore::ElementRuleCollector::sortAndTransferMatchedRules):
3343         (WebCore::ElementRuleCollector::matchScopedAuthorRules):
3344         (WebCore::ElementRuleCollector::matchHostRules):
3345         (WebCore::ElementRuleCollector::matchShadowDistributedRules):
3346         (WebCore::ElementRuleCollector::matchAuthorRules):
3347         (WebCore::ElementRuleCollector::matchUserRules):
3348         (WebCore::ElementRuleCollector::matchUARules):
3349         (WebCore::ElementRuleCollector::ruleMatches):
3350         (WebCore::ElementRuleCollector::collectMatchingRulesForList):
3351         (WebCore::ElementRuleCollector::sortMatchedRules):
3352         (WebCore::ElementRuleCollector::matchAllRules):
3353         Moved these methods from StyleResolver to this class.
3354         (WebCore::ElementRuleCollector::hasAnyMatchingRules):
3355         This method is used for checking whether a given element can share
3356         a cache.
3357         * css/ElementRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
3358         (WebCore):
3359         (WebCore::ElementRuleCollector::ElementRuleCollector):
3360         Use styleResolver instance to initialize its member variables, i.e.
3361         SelectorFilter, RuleSets, InspectorCSSOMWrappers, and
3362         StyleScopedResolver.
3363         (ElementRuleCollector):
3364         (WebCore::ElementRuleCollector::setMode):
3365         (WebCore::ElementRuleCollector::setPseudoStyleRequest):
3366         (WebCore::ElementRuleCollector::setSameOriginOnly):
3367         (WebCore::ElementRuleCollector::setRegionForStyling):
3368         Mode, SameOriginOnly, RegionForStyling are only used while collecting
3369         matched rules.
3370         (WebCore::ElementRuleCollector::setMedium):
3371         Need to know which default stylesheet should be looked up.
3372         (WebCore::ElementRuleCollector::document):
3373         * css/PageRuleCollector.cpp: Copied from Source/WebCore/css/StyleResolver.cpp.
3374         (WebCore::comparePageRules):
3375         (WebCore::PageRuleCollector::isLeftPage):
3376         (WebCore::PageRuleCollector::isFirstPage):
3377         (WebCore::PageRuleCollector::pageName):
3378         (WebCore::PageRuleCollector::matchAllPageRules):
3379         (WebCore::PageRuleCollector::matchPageRules):
3380         (WebCore::checkPageSelectorComponents):
3381         (WebCore::PageRuleCollector::matchPageRulesForList):
3382         Moved from StyleResolver.
3383         * css/PageRuleCollector.h: Copied from Source/WebCore/css/StyleResolver.h.
3384         (WebCore):
3385         (WebCore::PageRuleCollector::PageRuleCollector):
3386         (PageRuleCollector):
3387         (WebCore::PageRuleCollector::matchedResult):
3388         * css/StyleResolver.cpp:
3389         (WebCore):
3390         (WebCore::StyleResolver::State::clear):
3391         (WebCore::StyleResolver::MatchResult::addMatchedProperties):
3392         (WebCore::StyleResolver::State::initForStyleResolve):
3393         (WebCore::StyleResolver::styleSharingCandidateMatchesRuleSet):
3394         (WebCore::StyleResolver::styleForElement):
3395         (WebCore::StyleResolver::styleForKeyframe):
3396         (WebCore::StyleResolver::pseudoStyleForElement):
3397         (WebCore::StyleResolver::styleForPage):
3398         (WebCore::StyleResolver::pseudoStyleRulesForElement):
3399         (WebCore::StyleResolver::applyMatchedProperties):
3400         * css/StyleResolver.h:
3401         (WebCore::MatchRequest::MatchRequest):
3402         Removed behaviorAtBoundary. Instead, ElementRuleCollector have the
3403         state.
3404         (MatchRequest):
3405         (WebCore::StyleResolver::selectorFilter):
3406         Added to obtain SelectorFilter in ElementRuleCollector's constructor.
3407         (StyleResolver):
3408         (MatchResult):
3409         (WebCore::StyleResolver::State::State):
3410         To pass ASSERT in StyleResolver::applyProperties, need to keep
3411         m_regionForStyling.
3412         (State):
3413         (WebCore::StyleResolver::State::regionForStyling):
3414         (WebCore::StyleResolver::State::useSVGZoomRules):
3415         (WebCore::StyleResolver::hasSelectorForId):
3416         (WebCore):
3417         (WebCore::checkRegionSelector):
3418         * inspector/InspectorCSSAgent.cpp:
3419         (WebCore::InspectorCSSAgent::willMatchRule):
3420         Removed StyleResolver from its parameter list. Instead, added
3421         InspectorCSSOMWrappers and DocumentStyleSheetCollection.
3422         * inspector/InspectorCSSAgent.h:
3423         (WebCore):
3424         (InspectorCSSAgent):
3425         * inspector/InspectorInstrumentation.cpp:
3426         (WebCore):
3427         (WebCore::InspectorInstrumentation::willMatchRuleImpl):
3428         * inspector/InspectorInstrumentation.h:
3429         (WebCore):
3430         (InspectorInstrumentation):
3431         (WebCore::InspectorInstrumentation::willMatchRule):
3432
3433 2013-03-07  Andrey Lushnikov  <lushnikov@chromium.org>
3434
3435         Web Inspector: [ACE] add experimental breakpoint support
3436         https://bugs.webkit.org/show_bug.cgi?id=111573
3437
3438         Reviewed by Pavel Feldman.
3439
3440         No new tests.
3441
3442         - Implement attributes model for ace editor. Update attribute
3443         locations by handling onTextChange event from editor.
3444         - Implement breakpoints atop of attributes model.
3445
3446         * inspector/front-end/AceTextEditor.js: